diff options
author | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-09-11 18:41:35 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-09-11 18:41:35 -0400 |
commit | be10c5605d5376a8c5c14a3be5b306bb951fd0f2 (patch) | |
tree | b91b754cca3707cb65c30716d6ecc838c4a93532 /webui_templates | |
parent | 17ffb1ded3928943abfad248e12240868678ac3f (diff) | |
download | third_party-cobbler-be10c5605d5376a8c5c14a3be5b306bb951fd0f2.tar.gz third_party-cobbler-be10c5605d5376a8c5c14a3be5b306bb951fd0f2.tar.xz third_party-cobbler-be10c5605d5376a8c5c14a3be5b306bb951fd0f2.zip |
Check in beginings of Cobbler WebUI packaging (thanks: Al Tobey). More work TBA.
Diffstat (limited to 'webui_templates')
-rw-r--r-- | webui_templates/distro_list.tmpl | 35 | ||||
-rw-r--r-- | webui_templates/error_page.tmpl | 6 | ||||
-rw-r--r-- | webui_templates/index.tmpl | 8 | ||||
-rw-r--r-- | webui_templates/item.tmpl | 38 | ||||
-rw-r--r-- | webui_templates/ksfile_edit.tmpl | 17 | ||||
-rw-r--r-- | webui_templates/ksfile_list.tmpl | 33 | ||||
-rw-r--r-- | webui_templates/ksfile_view.tmpl | 6 | ||||
-rw-r--r-- | webui_templates/master.tmpl | 55 | ||||
-rw-r--r-- | webui_templates/profile_add.tmpl | 45 | ||||
-rw-r--r-- | webui_templates/profile_list.tmpl | 33 | ||||
-rw-r--r-- | webui_templates/system_edit.tmpl | 48 | ||||
-rw-r--r-- | webui_templates/system_list.tmpl | 35 |
12 files changed, 359 insertions, 0 deletions
diff --git a/webui_templates/distro_list.tmpl b/webui_templates/distro_list.tmpl new file mode 100644 index 0000000..4654972 --- /dev/null +++ b/webui_templates/distro_list.tmpl @@ -0,0 +1,35 @@ +#extends cobbler.webui.master +#attr $title = "Cobbler: List of Distributions" + +#block body +<table class="sortable"> + <thead> + <caption>Cobbler Distributions</caption> + <tr> + <th class="text">Name</th> + <th class="text">Breed</th> + <th class="text">Arch</th> + </tr> + </thead> + <tbody> + #set $evenodd = 1 + #for $distro in $distros + #if $evenodd % 2 == 0 + #set $tr_class = "roweven" + #else + #set $tr_class = "rowodd" + #end if + #set $evenodd += 1 + + <tr class="$tr_class"> + <td> + <a href="$base_url/distro_view?distribution=$distro.name">$distro.name</a> + </td> + <td>$distro.breed</td> + <td>$distro.arch</td> + </tr> + #end for + </tbody> +</table> +#end block body + diff --git a/webui_templates/error_page.tmpl b/webui_templates/error_page.tmpl new file mode 100644 index 0000000..9bf7473 --- /dev/null +++ b/webui_templates/error_page.tmpl @@ -0,0 +1,6 @@ +#extends cobbler.webui.master +#attr $title = "Cobbler: Error" + +#block body +<h1 style="color: red;">$message</h1> +#end block body diff --git a/webui_templates/index.tmpl b/webui_templates/index.tmpl new file mode 100644 index 0000000..b249f32 --- /dev/null +++ b/webui_templates/index.tmpl @@ -0,0 +1,8 @@ +#extends cobbler.webui.master + +#block body + +This is my empty index page. + +#end block body + diff --git a/webui_templates/item.tmpl b/webui_templates/item.tmpl new file mode 100644 index 0000000..e06083f --- /dev/null +++ b/webui_templates/item.tmpl @@ -0,0 +1,38 @@ +#extends cobbler.webui.master + +#block body +<table class="sortable"> + <thead> + <caption>$caption</caption> + <th>Key</th> + <th>Value</th> + </thead> + <tbody> + #set $evenodd = 1 + #for $key,$value in $item_data.items(): + + #if $evenodd % 2 == 0 + #set $tr_class = "roweven" + #else + #set $tr_class = "rowodd" + #end if + #set $evenodd += 1 + + <tr class="$tr_class"> + <td>$key</td> + <td> + #if isinstance($value,dict): + <ul style="list-style-type: none; margin: 0; padding: 0;"> + #for $skey,$sval in $value.items(): + <li>$skey = $sval</li> + #end for + </ul> + #else + $value + #end if + </td> + </tr> + #end for + </tbody> +</table> +#end block body diff --git a/webui_templates/ksfile_edit.tmpl b/webui_templates/ksfile_edit.tmpl new file mode 100644 index 0000000..a28fe74 --- /dev/null +++ b/webui_templates/ksfile_edit.tmpl @@ -0,0 +1,17 @@ +#extends cobbler.webui.master +#attr $title = "Cobbler: Edit Kickstart File $ksfile" + +#block body +<form method="post" action="$base_url/ksfile_save"> + <input type="hidden" name="ksfile" value="$ksfile"/> + <fieldset id="cform"> + <legend>Edit Kickstart File</legend> + + <pre><textarea rows="40" cols="120" name="ksdata">$ksdata</textarea></pre> + <br/> + + <input type="submit" name="submit" value="Save"/> + <input type="reset" name="reset" value="Reset"/> + </fieldset> +</form> +#end block body diff --git a/webui_templates/ksfile_list.tmpl b/webui_templates/ksfile_list.tmpl new file mode 100644 index 0000000..af196ec --- /dev/null +++ b/webui_templates/ksfile_list.tmpl @@ -0,0 +1,33 @@ +#extends cobbler.webui.master + +#block body +<table class="sortable"> + <thead> + <caption>Cobbler Kickstart Files</caption> + <tr> + <th class="text">Name</th> + <th> </th> + </tr> + </thead> + <tbody> + #set $evenodd = 1 + #for $ksfile in $ksfiles + #if $evenodd % 2 == 0 + #set $tr_class = "roweven" + #else + #set $tr_class = "rowodd" + #end if + #set $evenodd += 1 + + <tr class="$tr_class"> + <td>$ksfile</td> + <td><!-- + <a href="/ksfile_edit?ksfile=$ksfile">edit</a> + <a href="/ksfile_view?ksfile=$ksfile">view</a> + --> + </td> + </tr> + #end for + </tbody> +</table> +#end block body diff --git a/webui_templates/ksfile_view.tmpl b/webui_templates/ksfile_view.tmpl new file mode 100644 index 0000000..b6abf67 --- /dev/null +++ b/webui_templates/ksfile_view.tmpl @@ -0,0 +1,6 @@ +#extends cobbler.webui.master + +#block body +<pre class="config_data">$ksdata</pre> +#end block body + diff --git a/webui_templates/master.tmpl b/webui_templates/master.tmpl new file mode 100644 index 0000000..5517d9c --- /dev/null +++ b/webui_templates/master.tmpl @@ -0,0 +1,55 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml"> +<head> +#attr $title = "Cobbler Web Interface" + <title>$title</title> + <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> + + <link rel="stylesheet" type="text/css" media="all" href="/cobbler/webui/style.css" /> + <link rel="stylesheet" type="text/css" media="all" href="/cobbler/webui/cobblerweb.css" /> +</head> + +<body> + +<div id="wrap"> + <h1 id="masthead"> + <a href="$base_url/index"> + <img alt="Cobbler Logo" + src="/cobbler/webui/logo-cobbler.png"/> + </a> + </h1> +</div> + +<div id="main"> + +<div id="sidebar"> + <ul id="nav"> + <li> + <select name="cobbler_server" style="text-transform: none;"> + <option value="http://localhost:25151">http://localhost:25151</option> + </select> + </li> + <li><hr/></li> + <li><a href="$base_url/settings_view" class="menu">Cobbler Settings</a></li> + <li><hr/></li> + <li><a href="$base_url/profile_list" class="menu">List Profiles</a></li> + <li><a href="$base_url/distro_list" class="menu">List Distros</a></li> + <li><a href="$base_url/system_list" class="menu">List Systems</a></li> + <li><a href="$base_url/ksfile_list" class="menu">List KS Files</a></li> + <li><hr/></li> + <li><a href="$base_url/system_add" class="menu">Add System</a></li> + <li><a href="$base_url/profile_add" class="menu">Add Profile</a></li> + </ul> +</div> + +<div id="content"> +#block body + + <h1 style="color: red;">Template Failure</h1> + +#end block body +</div><!-- content --> +</div><!-- main --> + +</body> +</html> diff --git a/webui_templates/profile_add.tmpl b/webui_templates/profile_add.tmpl new file mode 100644 index 0000000..424e7d9 --- /dev/null +++ b/webui_templates/profile_add.tmpl @@ -0,0 +1,45 @@ +#extends cobbler.webui.master + +#block body +<form method="post" action="/profile_save"> +<fieldset id="cform"> + <legend>Add a Profile</legend> + +<!-- + cobbler profile add -name=string -distro=string [-kickstart=url] + [-kopts=string] [-ksmeta=string] [-virt-file-size=gigabytes] + [-virt-ram=megabytes] [-virt-type=string] [-virt-path=string] +--> + + <label for="name">Profile Name</label> + <input type="text" size="32" style="width: 150px;" name="name" id="name"/> + <br/> + + <label for="distro">Distribution</label> + <select name="distro" id="distro"> + #for $distro in $distros: + <option name="$distro.name">$distro.name</option> + #end for + </select> + <br/> + + <label for="ksfile">Kickstart File</label> + <select name="ksfile" id="ksfile"> + #for $ksfile in $ksfiles: + <option name="$ksfile">$ksfile</option> + #end for + </select> + <br/> + + <label for="kopts">Kernel Options</label> + <input type="text" size="128" style="width: 150px;" name="kopts" id="kopts"/> + <br/> + + <label for="ksmeta">Kickstart Metadata</label> + <input type="text" size="128" style="width: 150px;" name="ksmeta" id="ksmeta"/> + <br/> + + <input type="submit" name="submit" value="Save"/> + <input type="reset" name="reset" value="Reset"/> +</fieldset> +#end block body diff --git a/webui_templates/profile_list.tmpl b/webui_templates/profile_list.tmpl new file mode 100644 index 0000000..8699b40 --- /dev/null +++ b/webui_templates/profile_list.tmpl @@ -0,0 +1,33 @@ +#extends cobbler.webui.master + +#block body +<table class="sortable"> + <thead> + <caption>Cobbler Profiles</caption> + <tr> + <th class="text">Name</th> + <th class="text">Distribution</th> + <th class="text">KS File</th> + </tr> + </thead> + <tbody> + #set $evenodd = 1 + #for $profile in $profiles + #if $evenodd % 2 == 0 + #set $tr_class = "roweven" + #else + #set $tr_class = "rowodd" + #end if + #set $evenodd += 1 + + <tr class="$tr_class"> + <td>$profile.name</td> + <td> + <a href="$base_url/distro_view?distribution=$profile.distro">$profile.distro</a> + </td> + <td>$profile.kickstart</td> + </tr> + #end for + </tbody> +</table> +#end block body diff --git a/webui_templates/system_edit.tmpl b/webui_templates/system_edit.tmpl new file mode 100644 index 0000000..8034bd2 --- /dev/null +++ b/webui_templates/system_edit.tmpl @@ -0,0 +1,48 @@ +#extends cobbler.webui.master + +#block body +<form method="post" action="$base_url/system_save"> +<fieldset id="cform"> + <legend>Add a System</legend> + + <label for="name">System Name</label> + <input type="text" size="32" style="width: 150px;" name="name" id="name"/> + <br/> + + <label for="profile">Profile</label> + <select name="profile" id="profile"> + #for $profile in $profiles: + <option name="$profile.name">$profile.name</option> + #end for + </select> + <br/> + + <label for="mac">MAC</label> + <input type="text" size="18" style="width: 150px;" name="mac" id="mac"/> + <br/> + + <label for="ip">IP</label> + <input type="text" size="15" style="width: 150px;" name="ip" id="ip"/> + <br/> + + <label for="hostname">Hostname</label> + <input type="text" size="128" style="width: 150px;" name="hostname" id="hostname"/> + <br/> + + <label for="kopts">Kernel Options</label> + <input type="text" size="128" style="width: 150px;" name="kopts" id="kopts"/> + <br/> + + <label for="ksmeta">Kickstart Metadata</label> + <input type="text" size="128" style="width: 150px;" name="ksmeta" id="ksmeta"/> + <br/> + + <label for="netboot">Netboot Enabled</label> + <input type="radio" name="netboot" value="y"/>Yes <input type="radio" name="netboot" value="n" checked="1"/> No + <br/> + + <input type="submit" name="submit" value="Save"/> + <input type="reset" name="reset" value="Reset"/> +</fieldset> +</form> +#end block body diff --git a/webui_templates/system_list.tmpl b/webui_templates/system_list.tmpl new file mode 100644 index 0000000..8e6d1d8 --- /dev/null +++ b/webui_templates/system_list.tmpl @@ -0,0 +1,35 @@ +#extends cobbler.webui.master + +#block body +<table class="sortable"> + <thead> + <caption>Cobbler Systems</caption> + <tr> + <th class="text">Name</th> + <th class="text">Distribution</th> + <th class="nosort"> </th> + </tr> + </thead> + <tbody> + #set $evenodd = 1 + #for $system in $systems + #if $evenodd % 2 == 0 + #set $tr_class = "roweven" + #else + #set $tr_class = "rowodd" + #end if + #set $evenodd += 1 + + <tr class="$tr_class"> + <td>${system.name}</td> + <td> + <a href="$base_url/distro_view?distribution=${system.distro}">${system.distro}</a> + </td> + <td> + <a href="$base_url/system_edit?name=${system.name}">edit</a> + </td> + </tr> + #end for + </tbody> +</table> +#end block body |