Feature #1060
openNeed store manager web UI
90%
Description
Although the touchscreen is useful for general drive data, it's not user-friendly for managing the stores.
Each store needs to be configurable with- Directories (add, remove, rename, write-enable, read-enable)
- ACLs
- Enable as PiSentry store
- Data usage per directory
Don't make it complex. Use simple CSS layout with few UI components.
Web server directly accesses mount points and makes changes, so it must run as root. Touchscreen UI should NOT access this metadata - only low level drive data should be displayed.
Related issues
Updated by Hammel 6 months ago
- Status changed from New to In Progress
- % Done changed from 0 to 20
The pistoreweb application is now stubbed out fully given the API definition (see pistoreweb.c) and expected UI.
The first API implemented is the monitor request for status - get.c:pistoreStatus(). This now needs a unit test. To do this, the jarvis.c/h code needs to be updated to make monitor requests to pistoreweb, but it needs to act like a monitor now and not like Jarvis.
Updated by Hammel 6 months ago
pistoreweb needs to register with the monitor. This must happen before we allow processing by mongoose. Or the mongoose handlers should ignore all requests if registration isn't complete.
Registration is sending the multicast request and getting back the UUID generated by the monitor. Once the UUID is received, it must be stored and used for API transactions.
See piboxd registerDevice() for how registration works. pistoreweb will need to support "/register?uuid=<>". This function also shows possible responses.
Updated by Hammel 6 months ago
Registration and default index.html are now working.
Next:Retrieve storage stats.Ready to test but must be tested on PiStore system.
Generate png graph of stats.This is basically a version of gtk_graph_paint() in pistore:graphwidget.c that just writes the graph to a file.
Create index.tmpl template.Build image map from png graph.Generate index.html from index.tmpl and just add links to each drive. An image map can't (easily, keeping it KISS) be sync'd with png write, index gets and graph image gets.
Add code to replace template tags with generated code.- Add CSS to template (embed it to reduce secondary calls).
Updated by Hammel 6 months ago
- Blocks Feature #588: File Manager for PiStore's added
Updated by Hammel about 1 month ago
This is actually really clumsy. It would be better (sadly) to use client side javascript. It can do automated callbacks to update the graph. And the layout can be much nicer. So this needs to be updated with a MINIMAL javascript client side. Mongoose will have no problems sending that.