summaryrefslogtreecommitdiffstats
path: root/webui_templates
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-09-14 14:59:29 -0400
committerMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-09-14 14:59:29 -0400
commit9fce10e7cf0a616b14c031d7b03c78f58a887c56 (patch)
treedabbb05b0eee7ec6f57ab943ee767cd5e98c016e /webui_templates
parent522f4a9573db3443b6fdba095a97daf7755bbaf3 (diff)
downloadthird_party-cobbler-9fce10e7cf0a616b14c031d7b03c78f58a887c56.tar.gz
third_party-cobbler-9fce10e7cf0a616b14c031d7b03c78f58a887c56.tar.xz
third_party-cobbler-9fce10e7cf0a616b14c031d7b03c78f58a887c56.zip
Repos are now added to the WebUI.
Diffstat (limited to 'webui_templates')
-rw-r--r--webui_templates/master.tmpl6
-rw-r--r--webui_templates/repo_edit.tmpl95
-rw-r--r--webui_templates/repo_list.tmpl33
3 files changed, 131 insertions, 3 deletions
diff --git a/webui_templates/master.tmpl b/webui_templates/master.tmpl
index b856f6d..0e73c03 100644
--- a/webui_templates/master.tmpl
+++ b/webui_templates/master.tmpl
@@ -37,15 +37,15 @@
<li><a href="$base_url/profile_list" class="menu">Profiles</a></li>
<li><a href="$base_url/system_list" class="menu">Systems</a></li>
<li><a href="$base_url/ksfile_list" class="menu">Kickstarts</a></li>
- <li>(Pending: Repos)</li>
+ <li><a href="$base_url/repo_list" class="menu">Repos</a></li>
<li><hr/></li>
<li>ADD</li>
<li><a href="$base_url/distro_edit" class="menu">Distro</a></li>
<li><a href="$base_url/profile_edit" class="menu">Profile</a></li>
<li><a href="$base_url/system_edit" class="menu">System</a></li>
- <li>(Pending: Repo)</li>
+ <li><a href="$base_url/repo_edit" class="menu">Repo</a></li>
<li><hr/></li>
- <li>Sync</li>
+ <li>&lt;Sync&gt;</li>
</ul>
</div>
diff --git a/webui_templates/repo_edit.tmpl b/webui_templates/repo_edit.tmpl
new file mode 100644
index 0000000..5783f37
--- /dev/null
+++ b/webui_templates/repo_edit.tmpl
@@ -0,0 +1,95 @@
+#extends cobbler.webui.master
+
+#block body
+
+<form method="post" action="$base_url/repo_save">
+<fieldset id="cform">
+
+ #if $repo
+ <legend>Editing Repo</legend>
+ <input type="hidden" name="new_or_edit" value="edit"/>
+ #else
+ <legend>Adding a Repo</legend>
+ <input type="hidden" name="new_or_edit" value="new"/>
+ #end if
+
+ <label for="name">Name</label>
+ <input type="text" size="32" style="width: 150px;" name="name" id="name"
+ #if $repo
+ value="$repo.name"
+ #end if
+ />
+ <br/>
+
+ <label for="mirror">Mirror Location (http/ftp/rsync)</label>
+ <input type="text" size="32" style="width: 150px;" name="mirror" id="mirror"
+ #if $repo
+ value="$repo.mirror"
+ #end if
+ />
+ <br/>
+
+ <label for="keepupdated">Keep Updated</label>
+ <input type="checkbox" name="keepupdated" id="keepupdated"
+ #if $repo
+ #if $repo.keep_updated
+ selected="True"
+ #else
+ selected="False"
+ #end if
+ #else
+ selected = "True"
+ #end if
+ />
+ <br/>
+
+ <label for="localfilename">Local Filename</label>
+ <input type="text" size="32" style="width: 150px;" name="localfilename" id="localfilename"
+ #if $repo
+ value="$repo.local_filename"
+ #end if
+ />
+
+
+ <br/>
+
+ ## FIXME: input field sizes should be larger (universally)
+ ## FIXME: make this a text area?
+ <label for="rpmlist">RPM List</label>
+ <input type="text" size="32" style="width: 150px;" name="rpmlist" id="rpmlist"
+ #if $repo
+ value="$repo.rpm_list"
+ #end if
+ />
+ <br/>
+
+ <label for="createrepo_flags">createrepo flags</label>
+ <input type="text" size="32" style="width: 150px;" name="creatrepoflags" id="createrepoflags"
+ #if $repo
+ value="$repo.createrepo_flags"
+ #end if
+ />
+ <br/>
+
+ #if $repo
+ <label for="delete">Delete</label>
+ <input type="checkbox" name="delete1" value="delete1">Yes
+ <input type="checkbox" name="delete2" value="delete2">Really
+ <br/>
+ #end if
+
+ <input type="submit" name="submit" value="Save"/>
+ <input type="reset" name="reset" value="Reset"/>
+</fieldset>
+</form>
+<br/>
+
+<blockquote>
+Note: Newly added repos contain no package content until "cobbler reposync" is run
+from the command line, which means that profiles relying on these repositories will
+not install. Placing "cobbler reposync" on a crontab to ensure frequent updates
+is recommended procedure.
+</blockquote>
+
+<br/>
+#end block body
diff --git a/webui_templates/repo_list.tmpl b/webui_templates/repo_list.tmpl
new file mode 100644
index 0000000..0aff65c
--- /dev/null
+++ b/webui_templates/repo_list.tmpl
@@ -0,0 +1,33 @@
+#extends cobbler.webui.master
+#attr $title = "Cobbler: List of Repositories"
+
+#block body
+<table class="sortable">
+ <thead>
+ <caption>Cobbler Repos</caption>
+ <tr>
+ <th class="text">Name</th>
+ <th class="text">Mirror</th>
+ </tr>
+ </thead>
+ <tbody>
+ #set $evenodd = 1
+ #for $repo in $repos
+ #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/repo_edit?name=$repo.name">$repo.name</a>
+ </td>
+ <td>$repo.mirror</td>
+ </tr>
+ #end for
+ </tbody>
+</table>
+#end block body
+