diff options
author | 2018-04-25 21:58:00 +1000 | |
---|---|---|
committer | 2018-04-25 21:58:00 +1000 | |
commit | a821aa4e4c57b444a0b6fc58f51496b6071d893a (patch) | |
tree | a034551143eab44e3d4aad9cf5b7dcb4c9a72ce7 /docs/release/scripts/minimaws/lib/wsgiserve.py | |
parent | 1fc298816d792f0cb7515678bd551f4db7cee838 (diff) |
0.197 Release filestag197
Diffstat (limited to 'docs/release/scripts/minimaws/lib/wsgiserve.py')
-rw-r--r-- | docs/release/scripts/minimaws/lib/wsgiserve.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/release/scripts/minimaws/lib/wsgiserve.py b/docs/release/scripts/minimaws/lib/wsgiserve.py index e8182f06077..b30828e01e0 100644 --- a/docs/release/scripts/minimaws/lib/wsgiserve.py +++ b/docs/release/scripts/minimaws/lib/wsgiserve.py @@ -221,6 +221,22 @@ class MachineHandler(QueryPageHandler): if haveoptions: yield '</select>\n<script>set_default_system_bios();</script>\n'.encode('utf-8') + # allow RAM size selection + first = True + for name, size, isdef in self.dbcurs.get_ram_options(id): + if first: + if not haveoptions: + haveoptions = True; + yield htmltmpl.MACHINE_OPTIONS_HEADING.substitute().encode('utf-8') + yield htmltmpl.MACHINE_RAM_PROLOGUE.substitute().encode('utf-8') + first = False + yield htmltmpl.MACHINE_RAM_OPTION.substitute( + name=cgi.escape(name, True), + size=cgi.escape('{:,}'.format(size)), + isdefault=('yes' if isdef else 'no')).encode('utf-8') + if not first: + yield '</select>\n<script>set_default_ram_option();</script>\n'.encode('utf-8') + # placeholder for machine slots - populated by client-side JavaScript if self.dbcurs.count_slots(id): if not haveoptions: |