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
This commit is contained in:
Daniel Markstedt
2023-10-31 14:54:04 -07:00
committed by GitHub
parent 7bbcf59c76
commit 029cf06c72
6 changed files with 141 additions and 145 deletions
@@ -142,7 +142,7 @@ class CtrlBoardMenuBuilder(MenuBuilder):
def create_images_menu(self, context_object=None):
"""Creates a sub menu showing all the available images"""
menu = Menu(CtrlBoardMenuBuilder.IMAGES_MENU)
images_info = self.file_cmd.list_images()
images_info = self.piscsi_cmd.list_images()
menu.add_entry("Return", {"context": self.IMAGES_MENU, "action": self.ACTION_RETURN})
images = images_info["files"]
sorted_images = sorted(images, key=lambda d: d["name"])