Further improve the dynamic device info web UI (#657)

* Improve the device type selection UI

* Extend the image_files data structure with human readable device name, instead of having complex for loops in the jinja2 template.

* Leverage device type constants in the OLED monitor script

* Fix typo

* Generate the list of valid network devices that can be attached programmatically

* Fix typo
This commit is contained in:
Daniel Markstedt
2022-02-13 08:28:50 -08:00
committed by GitHub
parent f96ade9149
commit 25b9b4ada2
5 changed files with 36 additions and 29 deletions

View File

@@ -57,7 +57,7 @@ def extend_device_names(device_types):
Takes a (list) of (str) device_types with the four letter device acronyms
Returns a (dict) of device_type:device_name mappings of localized device names
"""
mapped_device_types = []
mapped_device_types = {}
for device_type in device_types:
if device_type is "SAHD":
device_name = _("SASI Hard Drive")
@@ -75,6 +75,6 @@ def extend_device_names(device_types):
device_name = _("DaynaPORT SCSI/Link")
else:
device_name = _("Unknown Device")
mapped_device_types.append({device_type: device_name})
mapped_device_types[device_type] = device_name
return mapped_device_types