mirror of https://git.48k.eu/ogcp
Implement cache management through cache/list and cache/delete API REST methods. The view corresponds to the URL action/cache and contains three main parts: - Free cache available in the client's bubbles. - Image selection form to request the deletion and view the client with that image in cache. - Cache details per client to see total, used and available cache. The main usecase for the view is the removal of cache to make room for new images in clients with slow connections. Checking clients where available cache space is not enough to hold the new image and then requesting removal of specific images. The html template receives the following structures from the view: storage_data[ip] = {'used': 223452345, 'total': 2345234523452} client_images[ip] = [f'{image_name}.{image_checksum}', ...] image_data[f'{image_name}.{image_checksum}'] = { clients: ['192.168.0.1', ...], size: 34534530850, name: image_name, } |
||
---|---|---|
ogcp | ||
.gitignore | ||
COPYING | ||
README.md | ||
requirements.txt | ||
run_test.sh |
README.md
ogCP
ogCP (OpenGnsys Control Panel) is the new web interface, a modern alternative to the classical administration panel (WebConsole).
Installation
Steps to install ogCP on Ubuntu 18.04 LTS:
- Clone the repository that is temporarily available at: https://github.com/javsanpar/ogCP
- Edit
ogcp/cfg/ogcp.json
and include the API token and the IP address of the ogServer. In addition, we must define the user and the key we want for authentication in ogCP. - Create a python virtual environment.
- Install venv with:
apt-get install python3-venv
- Create the folder where we will start the virtual environment.
- Create the virtual environment with:
python3 -m venv ./previous-folder
- Install venv with:
- Activate the shell with the virtual environment with:
source ./previous-folder/bin/activate
- (Optional) If you want to expose ogCP to other machines, you must edit
run_test.sh
with:... flask run --host=0.0.0.0
- With the shell linked to the newly created python environment, navigate to
the folder where you cloned ogCP and launch:
When running./run_test.sh
run_test.sh
for the first time some errors are expected, but they do not affect to the usability of ogCP.
License
ogCP is released under the GNU Affero Public License v3+