Fixes from api 2

This commit is contained in:
2019-11-21 17:44:37 +01:00
parent d49aa17a9a
commit fb54505a40
6 changed files with 29 additions and 27 deletions

View File

@@ -1,5 +1,9 @@
# Changelog
## 2019/11/21
- Fixing bugs of last change and cleaning some code
- Preparing web gui (It's hide yet)
## 2019/11/20
- New API (2). All requests now works in POST and SSL (Self-Signed)
- Now using Flask and not falcon with waitress-serve (Lesser dependencies and ssl support)

View File

@@ -1,22 +1,25 @@
# File hierarchy
## Root folder
- api.py -> Server file. It manages all requests from clients and connects to database
- loadserver.bat -> A helper to run api.py on Windows
- api.py -> Server file. It manages all requests from clients and connects to database. Runs at port 3333 by default
- loadserver.bat -> A helper to run api.py and admin.py on Windows
- loadserver.sh -> A helper to run api.py and admin.py on Linux
- sql.py -> Helper for api.py sql sentences
- sysopt.py -> Config of api and sql
## Client folder
## Client folder. Programs of client
- client.ps1 -> This file has to run every X time (I suggest every hour) on every client and as NT\SYSTEM or local admin. You can do this with a Task Schedule as SYSTEM in a GPO (Active Directory)
- control.pyw -> This is the gui of the program. With that you manages the client-server program. It has to be in same folder as configpcm.ini file
- configpcm.ini -> Configuration for client and control.
## Admin folder. This is the folder for webapp that runs with server if using loadserver from root
-admin.py -> Web app (By default, runs at port 3434)
## BD folder
- database.db -> Database file in sqlite3
## cooks folder
It has the cooks in yaml format.
Warning: Do not change name of cooks created and assigned directly.
Warning: Do not change name of cooks created and assigned directly. Use control for that
## Doc folder
Documentation...

View File

@@ -27,12 +27,10 @@ For server you can use Linux, Mac or Windows, and in theory any environment that
- Flask
- pyopenssl
- Yaml
- Python3 deps can be installed it using pip install command (pip install pyopenssl flask pyyaml)
- For controlling the program, you have to start control.pyw using Python3. It doesn't need to be started in server, but it has to be in that folder (Or with configpcm.ini file).
It uses easygui of python3 (pip install easygui)
- For controlling the program, you have to start control.pyw using Python3. It doesn't need to be started in server, but it has to be in that folder (Or with configpcm.ini file).
- It uses easygui of python3 (pip install easygui)
## Clients
- Windows: