RASCSI/src/web
Daniel Markstedt c8b6ac409b
Indicator of a running macproxy daemon in the webapp (#436)
* Support for downloading properties files

* Show extra message when unzipping properties file

* Add logic to unzip method

* Move unzipped properties into CFG_DIR

* Better status message

* Cleanup

* Generic process introspection method

* Show macproxy status in the webapp
2021-11-08 19:11:27 -08:00
..
mock/bin Cleanup rascsi-web mocking for current develop (#301) 2021-10-05 20:39:26 -05:00
pwa RaSCSI logo favicons (#237) 2021-09-19 14:36:43 -07:00
service-infra Fix language in 502 page 2021-09-24 13:30:59 -07:00
static Display image properties inline in the image list, and remove the previous UI 2021-10-23 23:00:40 -07:00
templates Indicator of a running macproxy daemon in the webapp (#436) 2021-11-08 19:11:27 -08:00
.pylintrc Web UI code cleanup and refactoring (#409) 2021-11-06 19:25:02 -05:00
device_utils.py Web UI code cleanup and refactoring (#409) 2021-11-06 19:25:02 -05:00
drive_properties.json Update drive_properties.json (#372) 2021-10-24 18:33:33 -07:00
file_cmds.py Special handling of properties files (#432) 2021-11-08 19:10:52 -08:00
pi_cmds.py Indicator of a running macproxy daemon in the webapp (#436) 2021-11-08 19:11:27 -08:00
ractl_cmds.py ID reservation in Web UI (#416) 2021-11-06 21:11:17 -05:00
README.md Web UI code cleanup and refactoring (#409) 2021-11-06 19:25:02 -05:00
requirements.txt Web UI code cleanup and refactoring (#409) 2021-11-06 19:25:02 -05:00
settings.py Make rascsi, rascsi-web and easyinstall.sh portable (#426) 2021-11-08 20:33:33 -06:00
socket_cmds.py Web UI code cleanup and refactoring (#409) 2021-11-06 19:25:02 -05:00
start.sh Web UI code cleanup and refactoring (#409) 2021-11-06 19:25:02 -05:00
web.py Indicator of a running macproxy daemon in the webapp (#436) 2021-11-08 19:11:27 -08:00

RaSCSI Web

Setup local dev env

# Make a virtual env named venv
$ python3 -m venv venv
# Use that virtual env in this shell
$ source venv/bin/activate
# Install requirements
$ pip install -r requirements.txt
# Use mocks and a temp dir - start the web server
$ BASE_DIR=/tmp/images/ PATH=$PATH:`pwd`/mock/bin/ python3 web.py

Mocks for local development

You may edit the files under mock/bin to simulate Linux command responses. TODO: rascsi-web uses protobuf commands to send and receive data from rascsi. A separate mocking solution will be needed for this interface.

Static analysis with pylint

It is recommended to run pylint against new code to protect against bugs and keep the code readable and maintainable. The local pylint configuration lives in .pylintrc

sudo apt install pylint3
pylint3 python_source_file.py

Pushing to the Pi via git

Setup a bare repo on the rascsi

$ ssh pi@rascsi
$ mkdir /home/pi/dev.git && cd /home/pi/dev.git
$ git --bare init
Initialized empty Git repository in /home/pi/dev.git

Locally

$ cd ~/source/RASCSI
$ git remote add pi ssh://pi@rascsi/home/pi/dev.git
$ git push pi master