Support sample descriptions
This commit is contained in:
parent
07e99017b1
commit
29a18f5135
|
@ -45,6 +45,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
{% if SAMPLE_INFO %}
|
||||||
|
<div class="alert alert-warning" role="alert">
|
||||||
|
<h4 class="alert-heading">Template information</h4>
|
||||||
|
<p style="white-space: pre;">{{ SAMPLE_INFO }}</p>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
{% endif %}
|
||||||
<fieldset class="form-group">
|
<fieldset class="form-group">
|
||||||
<legend>Menu Entries</legend>
|
<legend>Menu Entries</legend>
|
||||||
<p>Selectable options displayed on the boot menu.</p>
|
<p>Selectable options displayed on the boot menu.</p>
|
||||||
|
|
16
main.py
16
main.py
|
@ -24,11 +24,15 @@ class ISOserver(object):
|
||||||
for item in samples:
|
for item in samples:
|
||||||
self.samples[item] = {}
|
self.samples[item] = {}
|
||||||
with open(os.path.join("samples", item, "menu.default")) as f:
|
with open(os.path.join("samples", item, "menu.default")) as f:
|
||||||
self.samples[item]["menu"] = f.read()
|
self.samples[item]["MENU_ENTRIES"] = f.read()
|
||||||
with open(os.path.join("samples", item, "seed.default")) as f:
|
with open(os.path.join("samples", item, "seed.default")) as f:
|
||||||
self.samples[item]["seed"] = f.read()
|
self.samples[item]["SEED_CONTENT"] = f.read()
|
||||||
with open(os.path.join("samples", item, "ks.default")) as f:
|
with open(os.path.join("samples", item, "ks.default")) as f:
|
||||||
self.samples[item]["ks"] = f.read()
|
self.samples[item]["KS_CONTENT"] = f.read()
|
||||||
|
info_path = os.path.join("samples", item, "info.txt")
|
||||||
|
if os.path.exists(info_path):
|
||||||
|
with open(os.path.join("samples", item, "info.txt")) as f:
|
||||||
|
self.samples[item]["SAMPLE_INFO"] = f.read()
|
||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def index(self, refresh=False, sample="default"):
|
def index(self, refresh=False, sample="default"):
|
||||||
|
@ -37,10 +41,8 @@ class ISOserver(object):
|
||||||
|
|
||||||
yield(self.template.render(ISOS=self.iso_selection,
|
yield(self.template.render(ISOS=self.iso_selection,
|
||||||
SAMPLES=self.samples.keys(),
|
SAMPLES=self.samples.keys(),
|
||||||
MENU_ENTRIES=self.samples[sample]["menu"],
|
current_sample=sample,
|
||||||
SEED_CONTENT=self.samples[sample]["seed"],
|
**self.samples[sample]))
|
||||||
KS_CONTENT=self.samples[sample]["ks"],
|
|
||||||
current_sample=sample))
|
|
||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def process(self, menu_entries, seed_content, kickstart, base_image, action, sample):
|
def process(self, menu_entries, seed_content, kickstart, base_image, action, sample):
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
A basic automatic install intended for virtual machines. System updates will be installed on the first boot.
|
|
@ -0,0 +1 @@
|
||||||
|
Identical to the default install, but with LVM for the root filesystem and a separate /boot partition.
|
Loading…
Reference in New Issue