Commit Graph

12 Commits

Author SHA1 Message Date
Daniel Markstedt
0589a0efad
Improve UX for file upload forms (#1299)
* Improve UX for file upload forms

* Fix styles for admin service list

* Turn tabs into spaces
2023-11-04 02:21:54 -07:00
Daniel Markstedt
cb6174fc1d
Web UI: Remove workaround for listing English locale (#1291)
* Remove workaround for listing English locale

* Use pathlib object to construct upload path
2023-11-03 05:22:01 -07:00
Daniel Markstedt
063e8ed32b
Static analysis fixes for Python codebase (#1277)
* Don't log names of internal symbols that can be used for attacks

* Add integrity check to dropzone.js library

* Better a11y of web form labels

* Safer handling of file download paths

* Don't invert boolean check

* Make backend auth check a flask abort

* Clean up indentation to remove unwanted tabs

* Run workflow either on PR events, or branch pushes, not both
2023-11-01 06:28:53 -07:00
Daniel Markstedt
029cf06c72
Web UI: Upload to tmp file name then rename if successful (#1272)
* Upload to tmp file name then rename if successful

* Move the dropzone.js operations back into web.py

* Move list_images() from file commands into piscsi commands (it was the only class method in that package that calls the protobuf interface)

* Remove now-redundant helptext
2023-10-31 14:54:04 -07:00
Daniel Markstedt
ff017a9c1d
Web UI: Handling for non-existence of working dirs (#1130) 2023-03-23 20:07:19 -07:00
Daniel Markstedt
5fd0dc420b
WebUI: Traverse target dir to get subdirs to download/upload to (#1115) 2023-03-04 16:57:32 -08:00
Daniel Markstedt
ddf258db57
Fix bugs in the upload to images form (#1111)
* Fix formatting of the image subdir list for uploading

* Fix upload path
2023-02-28 22:46:52 -08:00
Daniel Markstedt
dd00547f92
Formatted image file data structure that breaks down by subdir (#1102)
- New utility method for the web app, which sorts image files into dicts where the subdir is the key
- In the web ui, display each subdir in a table nested in a details tag.
- Allow for picking destination subdir when uploading files
- Style the expandable details blocks in the images table
- Add a check for ~ paths to the is_safe_path() utility method
2023-02-24 17:28:58 -08:00
Daniel Markstedt
cfc3390b81
Noscript fallback messages; relocate js into templates (#1097) 2023-02-14 18:48:53 -08:00
Daniel Markstedt
f2b74046dd
Add noscript tag with notice when JavaScript is off (#1091) 2023-02-13 13:20:57 -08:00
Daniel Markstedt
956195d67e
Ability to download and upload config files (#1083)
- Rename `/config/load` endpoint to `/config/action` since it has multiple functions
- Add a `send` function to above endpoint, which triggers a download of the config file, and use it with a new Download button on the index page
- Add an option to upload to the CFG_DIR
- Improve layout of the file transfer destination web form: radio buttons before labels, and better padding between options
- Add a test for config downloading
2023-01-28 14:34:34 -08:00
Daniel Markstedt
6b6a303986
Tweak dropzone config and introduce dedicated Upload page (#1040)
- Introduce a dedicated Upload page and move the upload form there
- Style the utility hyperlinks on the index page with icons and bold text
- Display the cancel / dismiss downloads link, and tweak the link text to make more sense. Note: Cancelled downloads won't remove the partially uploaded file.
- Hide image preview thumbnails. Not relevant to our usecase, and mess up the layout when it happens.
- Turn on chunk retries and tweaks chunk size to be a full MiB (probably won't make a big difference)
2022-12-19 17:21:01 -08:00