diff options
author | 2017-08-04 19:23:18 +1000 | |
---|---|---|
committer | 2017-08-04 19:23:18 +1000 | |
commit | b97e374cdbc7988e193f6377f2604f1d4b6264ea (patch) | |
tree | 24d9b899f6c086a4f0135e3ef96ffa3867da2799 /scripts/minimaws/lib/wsgiserve.py | |
parent | 3eb9ddfa1691ce147861a2648e34dc7478f8f3b8 (diff) |
minimaws: expose system BIOS, better way of dropping tables
Diffstat (limited to 'scripts/minimaws/lib/wsgiserve.py')
-rw-r--r-- | scripts/minimaws/lib/wsgiserve.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/minimaws/lib/wsgiserve.py b/scripts/minimaws/lib/wsgiserve.py index 370ca811fa6..e8182f06077 100644 --- a/scripts/minimaws/lib/wsgiserve.py +++ b/scripts/minimaws/lib/wsgiserve.py @@ -207,7 +207,25 @@ class MachineHandler(QueryPageHandler): tuple(imperfect)).encode('utf-8'); yield '</table>\n'.encode('utf-8') + # allow system BIOS selection + haveoptions = False + for name, desc, isdef in self.dbcurs.get_biossets(id): + if not haveoptions: + haveoptions = True; + yield htmltmpl.MACHINE_OPTIONS_HEADING.substitute().encode('utf-8') + yield htmltmpl.MACHINE_BIOS_PROLOGUE.substitute().encode('utf-8') + yield htmltmpl.MACHINE_BIOS_OPTION.substitute( + name=cgi.escape(name, True), + description=cgi.escape(desc), + isdefault=('yes' if isdef else 'no')).encode('utf-8') + if haveoptions: + yield '</select>\n<script>set_default_system_bios();</script>\n'.encode('utf-8') + + # placeholder for machine slots - populated by client-side JavaScript if self.dbcurs.count_slots(id): + if not haveoptions: + haveoptions = True + yield htmltmpl.MACHINE_OPTIONS_HEADING.substitute().encode('utf-8') yield htmltmpl.MACHINE_SLOTS_PLACEHOLDER.substitute( machine=self.js_escape(self.shortname)).encode('utf=8') |