summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/minimaws/lib/wsgiserve.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/minimaws/lib/wsgiserve.py')
-rw-r--r--scripts/minimaws/lib/wsgiserve.py18
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')