summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates')
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/base.html34
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/confirm.html117
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/copy.html122
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/dns.html40
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/dnsedit.html98
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/edit.html191
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/errors.html31
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/host.html80
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/hostbase/host_confirm_delete.html89
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/hostbase/log_detail.html23
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/index.html16
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/login.html37
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/logout.html13
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/logout.tmpl6
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/logviewer.html27
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/navbar.tmpl5
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/new.html102
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/remove.html89
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/results.html45
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/search.html57
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/zoneedit.html81
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/zonenew.html43
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/zones.html37
-rw-r--r--src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/zoneview.html71
24 files changed, 1454 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/base.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/base.html
new file mode 100644
index 000000000..1d7c5565b
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/base.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>{% block title %}BCFG2 - Hostbase{% endblock %}</title>
+ <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}/boxypastel.css" />
+ <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}/base.css" />
+ <!--<script type="text/javascript" src="http://hostbase.mcs.anl.gov/site_media/main.js"> -->
+ {% block extra_header_info %}{% endblock %}
+</head>
+
+<body>
+ <div id="header">
+ <div id="branding">
+ <h1>BCFG2</h1>
+ </div>
+ <div id="user-tools">...Change is Coming...</div>
+ </div>
+ <div id="sidebar">
+ {% block sidebar %}
+ <ul class="sidebar">
+ </ul>
+ {% endblock %}
+ </div>
+
+ <div id="content-main">
+ <div id="container">
+ {% block pagebanner %}{% endblock %}
+ {% block content %}{% endblock %}
+
+ </div>
+ </div>
+</body>
+</html>
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/confirm.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/confirm.html
new file mode 100644
index 000000000..ca8b0cc07
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/confirm.html
@@ -0,0 +1,117 @@
+{% extends "base.html" %}
+
+{% block pagebanner %}
+ <div class="header">
+ <h2>Confirm Removal</h2>
+ </div>
+ <br/>
+{% endblock %}
+
+{% block sidebar %}
+{% include "navbar.tmpl" %}
+{% include "logout.tmpl" %}
+{% endblock %}
+
+{% block content %}
+
+<form name="input" action="confirm.html?sub=true" method="post">
+Are you sure you want to remove these items?
+
+{% if interface %}
+<ul>
+<li> interface: {{ interface.mac_addr }} </li>
+{% endif %}
+
+
+{% if ips %}
+<ul>
+{% for ip in ips %}
+<li> ip: {{ ip.ip_addr }} </li>
+<ul>
+{% for name in names %}
+{% ifequal name.0 ip.id %}
+<li> name: {{ name.1.name }} </li>
+<ul>
+{% endifequal %}
+{% for cname in cnames %}
+{% ifequal cname.0 name.1.id %}
+<li> cname: {{ cname.1.name }} </li>
+{% endifequal %}
+{% endfor %}
+</ul>
+<ul>
+{% for mx in mxs %}
+{% ifequal mx.0 name.1.id %}
+<li> mx: {{ mx.1.priority }} {{ mx.1.mx }} </li>
+{% endifequal %}
+{% endfor %}
+</ul>
+{% endfor %}
+</ul>
+{% endfor %}
+</ul>
+{% endif %}
+
+{% if names and not ips %}
+<ul>
+{% for name in names %}
+<li> name: {{ name.name }} </li>
+<ul>
+{% for cname in cnames %}
+{% ifequal cname.0 name.id %}
+<li> cname: {{ cname.1.cname }} </li>
+{% endifequal %}
+{% endfor %}
+</ul>
+<ul>
+{% for mx in mxs %}
+{% ifequal mx.0 name.id %}
+<li> mx: {{ mx.1.priority }} {{ mx.1.mx }} </li>
+{% endifequal %}
+{% endfor %}
+</ul>
+{% endfor %}
+</ul>
+{% endif %}
+
+{% if cnames and not names %}
+<ul>
+{% for cname in cnames %}
+<li> cname: {{ cname.cname }} </li>
+{% endfor %}
+</ul>
+{% endif %}
+
+{% if mxs and not names %}
+<ul>
+{% for mx in mxs %}
+<li> mx: {{ mx.priority }} {{ mx.mx }} </li>
+{% endfor %}
+</ul>
+{% endif %}
+
+{% if interface %}
+</ul>
+{% endif %}
+
+{% if zone_id %}
+<ul>
+{% ifequal type 'zonemx' %}
+<li> mx: {{ zonemx.priority }} {{ zonemx.mx }} </li>
+{% endifequal %}
+
+{% ifequal type 'nameserver' %}
+<li> nameserver: {{ nameserver.name }} </li>
+{% endifequal %}
+
+{% ifequal type 'address' %}
+<li> address: {{ address.ip_addr }} </li>
+{% endifequal %}
+</ul>
+{% endif %}
+
+<input type="submit" value="confirm">
+<input type="reset" value="cancel" onclick="history.back()">
+</form>
+
+{% endblock %}
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/copy.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/copy.html
new file mode 100644
index 000000000..400ef58f2
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/copy.html
@@ -0,0 +1,122 @@
+{% extends "base.html" %}
+
+{% block pagebanner %}
+ <div class="header">
+ <h2>new host information</h2>
+ </div>
+ <br/>
+{% endblock %}
+
+{% block sidebar %}
+<a href="/hostbase/" class="sidebar">search hostbase</a>
+{% include "logout.tmpl" %}
+{% endblock %}
+
+{% block content %}
+
+<form name="hostdata" action="?sub=true" method="post">
+<input type="hidden" name="host">
+<table border="0" width="100%">
+ <colgroup>
+ <col width="150">
+ <col width="*">
+ <tr> <td> <b>hostname</b></td>
+ <td> <input name="hostname" type="text" value="{{ host.hostname }}" ></td></tr>
+ <tr> <td> <b>whatami</b></td>
+ <td>
+ <select name="whatami">
+ {% for choice in WHATAMI_CHOICES %}
+ {% ifequal host.whatami choice.0 %}
+ <option value="{{ choice.0 }}" selected="selected" >{{ choice.1 }}
+ {% else %}
+ <option value="{{ choice.0 }}">{{ choice.1 }}
+ {% endifequal %}
+ {% endfor %}
+ </select>
+ </td></tr>
+ <tr> <td> <b>netgroup</b></td>
+ <td>
+ <select name="netgroup">
+ {% for choice in NETGROUP_CHOICES %}
+ {% ifequal host.netgroup choice.0 %}
+ <option value="{{ choice.0 }}" selected="selected" >{{ choice.1 }}
+ {% else %}
+ <option value="{{ choice.0 }}">{{ choice.1 }}
+ {% endifequal %}
+ {% endfor %}
+ </select>
+ </td></tr>
+ <tr> <td> <b>class</b></td>
+ <td>
+ <select name="security_class">
+ {% for choice in CLASS_CHOICES %}
+ {% ifequal host.security_class choice.0 %}
+ <option value="{{ choice.0 }}" selected="selected" >{{ choice.1 }}
+ {% else %}
+ <option value="{{ choice.0 }}">{{ choice.1 }}
+ {% endifequal %}
+ {% endfor %}
+ </select></td></tr>
+ <tr> <td> <b>support</b></td>
+ <td>
+ <select name="support">
+ {% for choice in SUPPORT_CHOICES %}
+ {% ifequal host.support choice.0 %}
+ <option value="{{ choice.0 }}" selected="selected" >{{ choice.1 }}
+ {% else %}
+ <option value="{{ choice.0 }}">{{ choice.1 }}
+ {% endifequal %}
+ {% endfor %}
+ </select></td></tr>
+ <tr> <td> <b>csi</b></td>
+ <td> <input name="csi" type="text" value="{{ host.csi }}" ></td></tr>
+ <tr> <td> <b>printq</b></td>
+ <td> <input name="printq" type="text" value="{{ host.printq }}" ></td></tr>
+ <tr> <td> <b>outbound_smtp</b></td>
+ <td>
+ {% if host.outbound_smtp %}
+ <input type="checkbox" name="outbound_smtp" checked="checked" ></td></tr>
+ {% else %}
+ <input type="checkbox" name="outbound_smtp" ></td></tr>
+ {% endif %}
+ <tr> <td> <b>primary_user</b></td>
+ <td> <input name="primary_user" type="text" size="32" value="{{ host.primary_user }}"> (email address)</td></tr>
+ <tr> <td> <b>administrator</b></td>
+ <td> <input name="administrator" type="text" size="32" value="{{ host.administrator }}"> (email address)</td></tr>
+ <tr> <td> <b>location</b></td>
+ <td> <input name="location" type="text" value="{{ host.location }}"></td></tr>
+ <tr> <td> <b>expiration_date</b></td>
+ <td> <input name="expiration_date" type="text" size="10" value="{{ host.expiration_date }}">YYYY-MM-DD</td></tr>
+ <tr> <td><br><b>Interface</b></td><td><br>
+ {% for choice in TYPE_CHOICES %}
+ <input type="radio" name="hdwr_type_new" value="{{ choice.0 }}" >{{ choice.1 }}
+ {% endfor %}
+ </td></tr>
+ <tr> <td> <b>dhcp</b></td>
+ <td>
+ <input type="checkbox" name="dhcp_new"></td></tr>
+ <tr> <td> <b>mac_addr</b></td>
+ <td> <input name="mac_addr_new" type="text"></td></tr>
+ <tr> <td> <b>ip_addr</b></td>
+ <td> <input name="ip_addr_new" type="text"></td></tr>
+ <tr> <td><br><b>Interface</b></td><td><br>
+ {% for choice in TYPE_CHOICES %}
+ <input type="radio" name="hdwr_type_new2" value="{{ choice.0 }}" >{{ choice.1 }}
+ {% endfor %}
+ </td></tr>
+ <tr> <td> <b>dhcp</b></td>
+ <td>
+ <input type="checkbox" name="dhcp_new2"></td></tr>
+ <tr> <td> <b>mac_addr</b></td>
+ <td> <input name="mac_addr_new2" type="text"></td></tr>
+ <tr> <td> <b>ip_addr</b></td>
+ <td> <input name="ip_addr_new2" type="text"></td></tr>
+ <tr> <td> <b>comments</b></td>
+ <td> <textarea rows="10" cols="50" name="comments"></textarea></td></tr>
+</table>
+<br>
+<p><input type="submit" value="Submit">
+</form>
+
+{% endblock %}
+
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/dns.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/dns.html
new file mode 100644
index 000000000..da179e5a1
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/dns.html
@@ -0,0 +1,40 @@
+{% extends "base.html" %}
+
+{% block pagebanner %}
+ <div class="header">
+ <h2>dns info for {{ host.hostname }}</h2>
+ </div>
+ <br/>
+{% endblock %}
+
+{% block sidebar %}
+{% include "navbar.tmpl" %}
+<ul class="sidebar">
+ <li><a href="/hostbase/{{ host.id }}/" class="sidebar">host info</a></li>
+ <li><a href="/hostbase/{{ host.id }}/edit/" class="sidebar">edit host info</a></li>
+ <li><a href="edit/" class="sidebar">edit dns info</a></li>
+ <li><a href="/hostbase/{{ host.id }}/logs/" class="sidebar">change logs</a></li>
+</ul>
+{% include "logout.tmpl" %}
+{% endblock %}
+
+{% block content %}
+
+{% for interface in host.interface_set.all %}
+ {% for ip in interface.ip_set.all %}
+ <ul><li> <b>ip_addr:</b> {{ ip.ip_addr }}</li>
+ {% for name in ip.name_set.all %}
+ <ul> <li><b>name:</b> {{ name.name }}</li> <ul>
+ {% for cname in name.cname_set.all %}
+ <li> <b>cname:</b> {{ cname.cname }}</li>
+ {% endfor %}
+ {% for mx in name.mxs.all %}
+ <li> <b>mx:</b> {{ mx.priority }} {{ mx.mx }}</li>
+ {% endfor %}
+ </ul></ul>
+ {% endfor %}
+ </ul>
+ {% endfor %}
+{% endfor %}
+{% endblock %}
+
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/dnsedit.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/dnsedit.html
new file mode 100644
index 000000000..b1b71ab67
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/dnsedit.html
@@ -0,0 +1,98 @@
+{% extends "base.html" %}
+
+{% block pagebanner %}
+ <div class="header">
+ <h2>dns info for {{ host.hostname }}</h2>
+ </div>
+ <br/>
+{% endblock %}
+
+{% block sidebar %}
+{% include "navbar.tmpl" %}
+<ul class="sidebar">
+ <li><a href="/hostbase/{{ host.id }}/" class="sidebar">host info</a></li>
+ <li><a href="/hostbase/{{ host.id }}/edit/" class="sidebar">edit host info</a></li>
+ <li><a href="/hostbase/{{ host.id }}/dns/" class="sidebar">see dns info</a></li>
+ <li><a href="/hostbase/{{ host.id }}/logs/" class="sidebar">change logs</a></li>
+</ul>
+{% include "logout.tmpl" %}
+{% endblock %}
+
+{% block content %}
+
+<form name="dns" action="?sub=true" method="post">
+<input type="hidden" name="host" value="{{ host.id }}">
+<table border="0" width="100%">
+ <colgroup>
+ <col width="150">
+ <col width="*">
+ {% for interface in interfaces %}
+ <tr><td><br></td></tr>
+ <tr> <td> <b>interface type</b> </td>
+ <td> {{ interface.hdwr_type }} </td></tr>
+ <tr> <td> <b>mac_addr</b> </td>
+ <td> {{ interface.mac_addr }} </td></tr>
+ <tr><td><hr></td><td><hr></td></tr>
+ {% for ip in info %}
+ {% ifequal ip.0.interface interface %}
+ <tr> <td> <b>ip_addr</b></td>
+ <td>{{ ip.0.ip_addr }}</td></tr>
+ {% for name in ip.1 %}
+ <tr> <td><b>name(dns)</b></td>
+ <td> <input name="name{{ name.id }}" type="text" value="{{ name.name }}">
+ <select name="dns_view{{ name.id }}">
+ {% for choice in DNS_CHOICES %}
+ {% ifequal name.dns_view choice.0 %}
+ <option value="{{ choice.0 }}" selected="selected">{{ choice.1 }}
+ {% else %}
+ <option value="{{ choice.0 }}">{{ choice.1 }}
+ {% endifequal %}
+ {% endfor %}
+ </select>
+ <a style="font-size:75%" href="/hostbase/{{ host.id }}/name/{{ name.id }}/confirm">remove</a></td></tr>
+ {% for cname in cnames %}
+ {% ifequal name cname.name %}
+ <tr> <td> <b>cname</b></td>
+ <td> <input name="cname{{ cname.id }}" type="text" value="{{ cname.cname }}">
+ <a style="font-size:75%" href="/hostbase/{{ host.id }}/cname/{{ cname.id }}/confirm">remove</a></td></tr>
+ {% endifequal %}
+ {% endfor %}
+ <tr> <td> <b>cname</b></td>
+ <td> <input name="{{ name.id }}cname" type="text"></td></tr>
+ {% for mx in mxs %}
+ {% ifequal mx.0 name.id %}
+ {% for record in mx.1 %}
+ <tr> <td> <b>mx</b></td>
+ <td> <input name="priority{{ record.id }}" type="text" size="6" value="{{ record.priority }}">
+ <input name="mx{{ record.id }}" type="text" value="{{ record.mx }}">
+ <a style="font-size:75%" href="/hostbase/{{ host.id }}/mx/{{ record.id }}/{{ name.id }}/confirm">remove</a></td></tr>
+ {% endfor %}
+ {% endifequal %}
+ {% endfor %}
+ <tr> <td> <b>mx</b></td>
+ <td> <input name="{{ name.id }}priority" type="text" size="6">
+ <input name="{{ name.id }}mx" type="text"></td></tr>
+ {% endfor %}
+ <tr> <td> <b>name</b></td>
+ <td> <input name="{{ ip.0.ip_addr }}name" type="text">
+ <select name="{{ ip.0.ip_addr }}dns_view">
+ {% for choice in DNS_CHOICES %}
+ <option value="{{ choice.0 }}">{{ choice.1 }}
+ {% endfor %}
+ </select></td></tr>
+ <tr> <td> <b>cname</b></td>
+ <td> <input name="{{ ip.0.ip_addr }}cname" type="text"></td></tr>
+ <tr> <td> <b>mx</b></td>
+ <td> <input name="{{ ip.0.ip_addr }}priority" type="text" size="6">
+ <input name="{{ ip.0.ip_addr }}mx" type="text"></td></tr>
+ <tr><td></td></tr>
+ <tr><td><hr></td><td><hr></td></tr>
+ {% endifequal %}
+ {% endfor %}
+ {% endfor %}
+ </table>
+
+<p><input type="submit" value="Submit">
+</form>
+
+{% endblock %}
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/edit.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/edit.html
new file mode 100644
index 000000000..961c9d143
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/edit.html
@@ -0,0 +1,191 @@
+{% extends "base.html" %}
+
+{% block pagebanner %}
+ <div class="header">
+ <h2>{{ host.hostname }}</h2>
+ </div>
+ <br/>
+{% endblock %}
+
+{% block sidebar %}
+{% include "navbar.tmpl" %}
+<ul class="sidebar">
+<li><a href="/hostbase/{{ host.id }}/" class="sidebar">host info</a></li>
+<li><a href="/hostbase/{{ host.id }}/dns/" class="sidebar">detailed dns info</a></li>
+<li><a href="/hostbase/{{ host.id }}/dns/edit/" class="sidebar">edit dns info</a></li>
+<li><a href="/hostbase/{{ host.id }}/logs/" class="sidebar">change logs</a></li>
+</ul>
+{% include "logout.tmpl" %}
+{% endblock %}
+
+{% block content %}
+
+<script language="JavaScript" type="text/Javascript">
+function toggleAddr(interface_id){
+ if(document.getElementById){
+ var style = document.getElementById('ipaddr'+interface_id).style;
+ style.display = style.display? "":"block";
+ }
+}
+function toggleInter(){
+ if(document.getElementById){
+ var style = document.getElementById('interface').style;
+ style.display = style.display? "":"block";
+ }
+}
+</script>
+
+<style type=text/css>
+{% for interface in interfaces %}
+div#ipaddr{{ interface.0.id }}{
+ display: none;
+}
+{% endfor %}
+div#interface{
+ display: none;
+}
+</style>
+
+<form name="hostdata" action="" method="post">
+<fieldset class="module aligned ()">
+<input type="hidden" name="host" value="{{ host.id }}">
+ <label for="id_hostname">hostname:</label>
+ <input name="hostname" value="{{ host.hostname }}"><br>
+ <label for="id_whatami">whatami:</label>
+ <select name="whatami">
+ {% for choice in host.WHATAMI_CHOICES %}
+ {% ifequal host.whatami choice.0 %}
+ <option value="{{ choice.0 }}" selected="selected">{{ choice.1 }}
+ {% else %}
+ <option value="{{ choice.0 }}">{{ choice.1 }}
+ {% endifequal %}
+ {% endfor %}
+ </select><br>
+ <label for="id_netgroup">netgroup:</label>
+ <select name="netgroup">
+ {% for choice in host.NETGROUP_CHOICES %}
+ {% ifequal host.netgroup choice.0 %}
+ <option value="{{ choice.0 }}" selected="selected">{{ choice.1 }}
+ {% else %}
+ <option value="{{ choice.0 }}">{{ choice.1 }}
+ {% endifequal %}
+ {% endfor %}
+ </select><br>
+ <label for="id_security_class">class:</label>
+ <select name="security_class">
+ {% for choice in host.CLASS_CHOICES %}
+ {% ifequal host.security_class choice.0 %}
+ <option value="{{ choice.0 }}" selected="selected">{{ choice.1 }}
+ {% else %}
+ <option value="{{ choice.0 }}">{{ choice.1 }}
+ {% endifequal %}
+ {% endfor %}
+ </select><br>
+ <label for="id_support">support:</label>
+ <select name="support">
+ {% for choice in host.SUPPORT_CHOICES %}
+ {% ifequal host.support choice.0 %}
+ <option value="{{ choice.0 }}" selected="selected">{{ choice.1 }}
+ {% else %}
+ <option value="{{ choice.0 }}">{{ choice.1 }}
+ {% endifequal %}
+ {% endfor %}
+ </select><br>
+ <label for="id_csi">csi:</label>
+ <input name="csi" type="text" value="{{ host.csi }}"><br>
+ <label for="id_printq">printq:</label>
+ <input name="printq" type="text" value="{{ host.printq }}"><br>
+ <label for="id_outbound_smtp">outbound_smtp:</label>
+ {% if host.outbound_smtp %}
+ <input type="checkbox" checked="checked" name="outbound_smtp">
+ {% else %}
+ <input type="checkbox" name="outbound_smtp">
+ {% endif %}<br>
+ <label for="id_primary_user">primary_user:</label>
+ <input name="primary_user" type="text" size="32" value="{{ host.primary_user }}"><br>
+ <label for="id_administrator">administrator:</label>
+ <input name="administrator" type="text" size="32" value="{{ host.administrator }}"><br>
+ <label for="id_location">location:</label>
+ <input name="location" type="text" value="{{ host.location }}"><br>
+ <label for="id_expiration_date">expiration_date:</label>
+ <input name="expiration_date" type="text" value="{{ host.expiration_date }}"> YYYY-MM-DD<br>
+ {% for interface in interfaces %}
+ <label for="id_interface">Interface:</label>
+ <select name="hdwr_type{{ interface.0.id }}">
+ {% for choice in interface.0.TYPE_CHOICES %}
+ {% ifequal interface.0.hdwr_type choice.0 %}
+ <option value="{{ choice.0 }}" selected="selected">{{ choice.1 }}
+ {% else %}
+ <option value="{{ choice.0 }}">{{ choice.1 }}
+ {% endifequal %}
+ {% endfor %}
+ </select><br>
+ <label for="id_dhcp">dhcp:</label>
+ {% if interface.0.dhcp %}
+ <input type="checkbox" checked="checked" name="dhcp{{ interface.0.id }}">
+ {% else %}
+ <input type="checkbox" name="dhcp{{ interface.0.id }}">
+ {% endif %}<br>
+ <label for="id_mac_addr">mac_addr:</label>
+ <input name="mac_addr{{ interface.0.id }}" type="text" value="{{ interface.0.mac_addr }}">
+ <a style="font-size:75%" href="/hostbase/{{ host.id }}/interface/{{ interface.0.id }}/confirm">remove</a><br>
+ {% for ip in interface.1 %}
+ <label for="id_ip_addr">ip_addr:</label>
+ <input name="ip_addr{{ ip.id }}" type="text" value="{{ ip.ip_addr }}">
+ <a style="font-size:75%" href="/hostbase/{{ host.id }}/ip/{{ ip.id }}/confirm">remove</a><br>
+ {% endfor %}
+
+<!-- Section for adding a new IP address to an existing interface -->
+<!-- By default, section is hidden -->
+ <div id=ipaddr{{ interface.0.id }}>
+ <label for="id_ip_addr">ip_addr:</label>
+ <input name="{{ interface.0.id }}ip_addr" type="text"><br>
+ </div>
+ <a style="font-size:75%" href=# onclick="toggleAddr({{ interface.0.id }})">Add a New IP Address</a><br>
+ {% endfor %}
+<!-- End section for new IP address -->
+
+<!-- Section for add an entirely new interface to a host -->
+<!-- By default, section is hidden -->
+ <div id=interface>
+ <label for="id_interface">Interface:</label>
+ <select name="hdwr_type_new">
+ {% for choice in TYPE_CHOICES %}
+ <option value="{{ choice.0 }}">{{ choice.1 }}
+ {% endfor %}
+ </select><br>
+ <label for="id_dhcp">dhcp:</label>
+ {% if host.dhcp %}
+ <input type="checkbox" checked="checked" name="dhcp_new">
+ {% else %}
+ <input type="checkbox" name="dhcp_new">
+ {% endif %}<br>
+ <label for="id_mac_addr">mac_addr:</label>
+ <td> <input name="mac_addr_new" type="text"><br>
+ <label for="id_ip_addr">ip_addr:</label>
+ <td> <input name="ip_addr_new" type="text"><br>
+</div>
+<a style="font-size:75%" href=# onclick="toggleInter()">Add a New Interface</a><br>
+<!-- End new interface section -->
+
+
+<label for="id_comments">comments:</label>
+<textarea rows="10" cols="50" name="comments">{{ host.comments }}</textarea><br>
+<a style="font-size:75%" href="/hostbase/{{ host.id }}/dns/edit">edit detailed DNS information for this host</a>
+<br>
+this host is
+<select name="status">
+{% for choice in host.STATUS_CHOICES %}
+{% ifequal host.status choice.0 %}
+<option value="{{ choice.0 }}" selected="selected">{{ choice.1 }}
+{% else %}
+<option value="{{ choice.0 }}">{{ choice.1 }}
+{% endifequal %}
+{% endfor %}
+</select><br>
+last update on {{ host.last }}<br>
+<input type="submit" value="submit">
+<input type="reset" value="cancel" onclick="history.back()">
+</form>
+
+{% endblock %}
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/errors.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/errors.html
new file mode 100644
index 000000000..e5429b86c
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/errors.html
@@ -0,0 +1,31 @@
+{% extends "base.html" %}
+
+{% block pagebanner %}
+ <div class="header">
+ <h2>Search Results</h2>
+ </div>
+ <br/>
+{% endblock %}
+
+{% block sidebar %}
+{% include "navbar.tmpl" %}
+{% include "logout.tmpl" %}
+{% endblock %}
+
+{% block content %}
+
+{% if failures %}
+There were errors in the following fields<br><br>
+{% for failure in failures %}
+
+<font color="#FF0000">{{ failure }}</font><br>
+{% comment %}
+{{ failure.1|join:", " }}
+{% endcomment %}
+
+{% endfor %}
+{% endif %}
+<br>
+Press the back button on your browser and edit those field(s)
+
+{% endblock %}
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/host.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/host.html
new file mode 100644
index 000000000..d6b8873bc
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/host.html
@@ -0,0 +1,80 @@
+{% extends "base.html" %}
+
+{% block pagebanner %}
+ <div class="header">
+ <h2>{{ host.hostname }}</h2>
+ </div>
+ <br/>
+{% endblock %}
+
+{% block sidebar %}
+{% include "navbar.tmpl" %}
+<ul class="sidebar">
+ <li><a href="dns/" class="sidebar">detailed dns info</a></li>
+ <li><a href="edit/" class="sidebar">edit host info</a></li>
+ <li><a href="dns/edit/" class="sidebar">edit dns info</a></li>
+ <li><a href="logs/" class="sidebar">change logs</a></li>
+</ul>
+{% include "logout.tmpl" %}
+{% endblock %}
+
+{% block content %}
+
+<table border="0" width="100%">
+ <colgroup>
+ <col width="150">
+ <col width="*">
+ <tr> <td> <b>hostname</b></td>
+ <td> {{ host.hostname }}</td></tr>
+ <tr> <td> <b>whatami</b></td>
+ <td> {{ host.whatami }}</td></tr>
+ <tr> <td> <b>netgroup</b></td>
+ <td> {{ host.netgroup }}</td></tr>
+ <tr> <td> <b>class</b></td>
+ <td> {{ host.security_class }}</td></tr>
+ <tr> <td> <b>support</b></td>
+ <td> {{ host.support }}</td></tr>
+ <tr> <td> <b>csi</b></td>
+ <td> {{ host.csi }}</td></tr>
+ <tr> <td> <b>printq</b></td>
+ <td> {{ host.printq }}</td></tr>
+ <tr> <td> <b>outbound_smtp</b></td>
+ {% if host.outbound_smtp %}
+ <td> y </td></tr>
+ {% else %}
+ <td> n </td></tr>
+ {% endif %}
+ <tr> <td> <b>primary_user</b></td>
+ <td> {{ host.primary_user }}</td></tr>
+ <tr> <td> <b>administrator</b></td>
+ <td> {{ host.administrator }}</td></tr>
+ <tr> <td> <b>location</b></td>
+ <td> {{ host.location }}</td></tr>
+ <tr> <td> <b>expiration_date</b></td>
+ <td> {{ host.expiration_date }}</td></tr>
+ {% for interface in host.inserface_set.all %}
+ <tr> <td><br><b>Interface</b></td>
+ {% ifnotequal interface.0.hdwr_type 'no' %}
+ <td><br>{{ interface.0.hdwr_type }}</td></tr>
+ {% endifnotequal %}
+ {% if interface.0.dhcp %}
+ <tr> <td> <b>mac_addr</b></td>
+ <td> {{ interface.0.mac_addr }}</b></td></tr>
+ {% endif %}
+ {% for ip in interface.1 %}
+ <tr> <td> <b>ip_addr</b></td>
+ <td> {{ ip.ip_addr }}</td></tr>
+ {% endfor %}
+ {% endfor %}
+ <tr> <td valign="top"> <b>comments</b></td>
+ <td>
+ {{ host.comments|linebreaksbr }}<br>
+ </td></tr>
+
+</table>
+<a style="font-size:75%" href="/hostbase/{{ host.id }}/dns/">see detailed DNS information for this host</a>
+<br><br>
+this host is {{ host.status }}<br>
+last update on {{ host.last }}<br>
+
+{% endblock %}
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/hostbase/host_confirm_delete.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/hostbase/host_confirm_delete.html
new file mode 100644
index 000000000..b5d794b50
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/hostbase/host_confirm_delete.html
@@ -0,0 +1,89 @@
+{% extends "base.html" %}
+
+{% block pagebanner %}
+ <div class="header">
+ <h2>Are you sure you want to remove {{ object.hostname }}?</h2>
+ </div>
+ <br/>
+{% endblock %}
+
+{% block sidebar %}
+{% include "navbar.tmpl" %}
+<ul class="sidebar">
+ <li><a href="dns/" class="sidebar">detailed dns info</a></li>
+ <li><a href="edit/" class="sidebar">edit host info</a></li>
+ <li><a href="dns/edit/" class="sidebar">edit dns info</a></li>
+</ul>
+{% include "logout.tmpl" %}
+{% endblock %}
+
+{% block content %}
+
+<table border="0" width="100%">
+ <colgroup>
+ <col width="150">
+ <col width="*">
+ <tr> <td> <b>hostname</b></td>
+ <td> {{ object.hostname }}</td></tr>
+ <tr> <td> <b>whatami</b></td>
+ <td> {{ object.whatami }}</td></tr>
+ <tr> <td> <b>netgroup</b></td>
+ <td> {{ object.netgroup }}</td></tr>
+ <tr> <td> <b>class</b></td>
+ <td> {{ object.security_class }}</td></tr>
+ <tr> <td> <b>support</b></td>
+ <td> {{ object.support }}</td></tr>
+ <tr> <td> <b>csi</b></td>
+ <td> {{ object.csi }}</td></tr>
+ <tr> <td> <b>printq</b></td>
+ <td> {{ object.printq }}</td></tr>
+ <tr> <td> <b>dhcp</b></td>
+ {% if host.dhcp %}
+ <td> y </td></tr>
+ {% else %}
+ <td> n </td></tr>
+ {% endif %}
+ <tr> <td> <b>outbound_smtp</b></td>
+ {% if host.outbound_smtp %}
+ <td> y </td></tr>
+ {% else %}
+ <td> n </td></tr>
+ {% endif %}
+ <tr> <td> <b>primary_user</b></td>
+ <td> {{ object.primary_user }}</td></tr>
+ <tr> <td> <b>administrator</b></td>
+ <td> {{ object.administrator }}</td></tr>
+ <tr> <td> <b>location</b></td>
+ <td> {{ object.location }}</td></tr>
+ <tr> <td> <b>expiration_date</b></td>
+ <td> {{ object.expiration_date }}</td></tr>
+ {% for interface in interfaces %}
+ <tr> <td><br><b>Interface</b></td>
+ {% ifnotequal interface.0.hdwr_type 'no' %}
+ <td><br>{{ interface.0.hdwr_type }}</td></tr>
+ {% endifnotequal %}
+ <tr> <td> <b>mac_addr</b></td>
+ <td> {{ interface.0.mac_addr }}</b></td></tr>
+ {% for ip in interface.1 %}
+ <tr> <td> <b>ip_addr</b></td>
+ <td> {{ ip.ip_addr }}</td></tr>
+ {% endfor %}
+ {% endfor %}
+ <tr> <td valign="top"> <b>comments</b></td>
+ <td>
+ {{ object.comments|linebreaksbr }}<br>
+ </td></tr>
+
+</table>
+<a style="font-size:75%" href="/hostbase/{{ object.id }}/dns/">see detailed DNS information for this host</a>
+<br><br>
+this host is {{ object.status }}<br>
+last update on {{ object.last }}<br>
+
+<form name="input" action="remove.html?sub=true" method="post">
+<input type="submit" value="remove">
+<input type="reset" value="cancel" onclick="history.back()">
+</form>
+
+{% endblock %}
+
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/hostbase/log_detail.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/hostbase/log_detail.html
new file mode 100644
index 000000000..aa9679cbd
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/hostbase/log_detail.html
@@ -0,0 +1,23 @@
+{% extends "base.html" %}
+
+{% block pagebanner %}
+ <div class="header">
+ <h2>Change Logs for {{ object.hostname }}</h2>
+ </div>
+ <br/>
+{% endblock %}
+
+{% block sidebar %}
+{% include "navbar.tmpl" %}
+{% include "logout.tmpl" %}
+{% endblock %}
+
+{% block content %}
+
+<ul>
+<li><b>Hostname:</b>{{ object.hostname }}</li>
+<li><b>Date:</b>{{ object.date }}</li>
+<li><b>Log:</b>{{ object.log }}</li>
+</ul>
+
+{% endblock %}
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/index.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/index.html
new file mode 100644
index 000000000..92258b648
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/index.html
@@ -0,0 +1,16 @@
+{% extends "base.html" %}
+{% block pagebanner %}
+ <div class="header">
+ <h2>Welcome to Hostbase!</h2>
+ <p>Hostbase is a web based management tools for Bcfg2 Hosts</p>
+ </div>
+ <br/>
+{% endblock %}
+{% block sidebar %}
+<a href="/login/" class="sidebar">login to hostbase</a><br>
+<a href="/hostbase/" class="sidebar">search for hosts</a><br>
+<a href="hostbase/zones/" class="sidebar">zone file information</a>
+{% endblock %}
+{% block content %}
+{% endblock %}
+
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/login.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/login.html
new file mode 100644
index 000000000..ec24a0fc0
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/login.html
@@ -0,0 +1,37 @@
+{% extends "base.html" %}
+{% block pagebanner %}
+ <div class="header">
+ <h2>Login to Hostbase!</h2>
+ <p>You must login to manage hosts</p>
+ </div>
+ <br/>
+{% endblock %}
+{% block sidebar %}
+<a href="/hostbase/" class="sidebar">search for hosts</a><br>
+<a href="/hostbase/new" class="sidebar">add a new host</a><br>
+<a href="hostbase/zones/" class="sidebar">zone file information</a>
+{% endblock %}
+{% block content %}
+ {% if form.has_errors %}
+ {{ form.username.errors|join:", " }}
+ <p>Login Failed.</p>
+ {% endif %}
+ {% if user.is_authenticated %}
+ <p>Welcome, {{ user.username }}. Thanks for logging in.</p>
+ {% else %}
+ <p>Welcome, user. Please log in.</p>
+ <form name="input" action="." method="post">
+ <input name="username" type="text">
+ <br />
+ <input name="password" type="password">
+ <br />
+ <input type="submit" value="Login">
+ {% if next %}
+ <input type="hidden" name="next" value="{{ next }}" />
+ {% else %}
+ <input type="hidden" name="next" value="/hostbase/" />
+ {% endif %}
+
+ </form>
+ {% endif %}
+{% endblock %}
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/logout.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/logout.html
new file mode 100644
index 000000000..994f631a8
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/logout.html
@@ -0,0 +1,13 @@
+{% extends "base.html" %}
+{% block pagebanner %}
+ <div class="header">
+ <h2>You are logged out of Hostbase!</h2>
+ </div>
+ <br/>
+{% endblock %}
+{% block sidebar %}
+<a href="/login/" class="sidebar">Login to Hostbase</a>
+{% endblock %}
+{% block content %}
+{% endblock %}
+
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/logout.tmpl b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/logout.tmpl
new file mode 100644
index 000000000..e71e90e76
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/logout.tmpl
@@ -0,0 +1,6 @@
+<p>
+{% if logged_in %}
+<a href="/logout/" class="sidebar">logout</a>
+{% else %}
+<a href="/login/" class="sidebar">login</a>
+{% endif %}
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/logviewer.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/logviewer.html
new file mode 100644
index 000000000..806ccd63d
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/logviewer.html
@@ -0,0 +1,27 @@
+{% extends "base.html" %}
+
+{% block pagebanner %}
+ <div class="header">
+ <h2>Change Logs for {{ hostname }}</h2>
+ </div>
+ <br/>
+{% endblock %}
+
+{% block sidebar %}
+{% include "navbar.tmpl" %}
+{% include "logout.tmpl" %}
+{% endblock %}
+
+{% block content %}
+
+{% if host.get_logs %}
+<ul>
+{% for log in host.get_logs %}
+<li><a href="{{ log.id }}/">{{ log.date }}</li>
+{% endfor %}
+</ul>
+{% else %}
+There are no logs for this host<br>
+{% endif %}
+
+{% endblock %}
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/navbar.tmpl b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/navbar.tmpl
new file mode 100644
index 000000000..877d427d0
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/navbar.tmpl
@@ -0,0 +1,5 @@
+<a href="/hostbase/" class="sidebar">host search</a><br>
+<a href="/hostbase/new" class="sidebar">add a new host</a><br>
+<a href="/hostbase/zones" class="sidebar">zone file information</a><br>
+<a href="/hostbase/zones/new" class="sidebar">add a zone</a><br>
+
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/new.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/new.html
new file mode 100644
index 000000000..2dcd6271f
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/new.html
@@ -0,0 +1,102 @@
+{% extends "base.html" %}
+
+{% block pagebanner %}
+ <div class="header">
+ <h2>new host information</h2>
+ </div>
+ <br/>
+{% endblock %}
+
+{% block sidebar %}
+<a href="/hostbase/" class="sidebar">search hostbase</a>
+{% include "logout.tmpl" %}
+{% endblock %}
+
+{% block content %}
+
+<form name="hostdata" action="?sub=true" method="post">
+<input type="hidden" name="host">
+<table border="0" width="100%">
+ <colgroup>
+ <col width="150">
+ <col width="*">
+ <tr> <td> <b>hostname</b></td>
+ <td> <input name="hostname" type="text" ></td></tr>
+ <tr> <td> <b>whatami</b></td>
+ <td>
+ <select name="whatami">
+ {% for choice in WHATAMI_CHOICES %}
+ <option value="{{ choice.0 }}">{{ choice.1 }}
+ {% endfor %}
+ </select>
+ </td></tr>
+ <tr> <td> <b>netgroup</b></td>
+ <td>
+ <select name="netgroup">
+ {% for choice in NETGROUP_CHOICES %}
+ <option value="{{ choice.0 }}">{{ choice.1 }}
+ {% endfor %}
+ </select>
+ </td></tr>
+ <tr> <td> <b>class</b></td>
+ <td>
+ <select name="security_class">
+ {% for choice in CLASS_CHOICES %}
+ <option value="{{ choice.0 }}">{{ choice.1 }}
+ {% endfor %}
+ </select></td></tr>
+ <tr> <td> <b>support</b></td>
+ <td>
+ <select name="support">
+ {% for choice in SUPPORT_CHOICES %}
+ <option value="{{ choice.0 }}">{{ choice.1 }}
+ {% endfor %}
+ </select></td></tr>
+ <tr> <td> <b>csi</b></td>
+ <td> <input name="csi" type="text" ></td></tr>
+ <tr> <td> <b>printq</b></td>
+ <td> <input name="printq" type="text" ></td></tr>
+ <tr> <td> <b>outbound_smtp</b></td>
+ <td>
+ <input type="checkbox" name="outbound_smtp"></td></tr>
+ <tr> <td> <b>primary_user</b></td>
+ <td> <input name="primary_user" type="text" size="32" > (email address)</td></tr>
+ <tr> <td> <b>administrator</b></td>
+ <td> <input name="administrator" type="text" size="32" > (email address)</td></tr>
+ <tr> <td> <b>location</b></td>
+ <td> <input name="location" type="text" ></td></tr>
+ <tr> <td> <b>expiration_date</b></td>
+ <td> <input name="expiration_date" type="text" size="10" >YYYY-MM-DD</td></tr>
+ <tr> <td><br><b>Interface</b></td><td><br>
+ {% for choice in TYPE_CHOICES %}
+ <input type="radio" name="hdwr_type_new" value="{{ choice.0 }}" >{{ choice.1 }}
+ {% endfor %}
+ </td></tr>
+ <tr> <td> <b>dhcp</b></td>
+ <td>
+ <input type="checkbox" name="dhcp_new"></td></tr>
+ <tr> <td> <b>mac_addr</b></td>
+ <td> <input name="mac_addr_new" type="text"></td></tr>
+ <tr> <td> <b>ip_addr</b></td>
+ <td> <input name="ip_addr_new" type="text"></td></tr>
+ <tr> <td><br><b>Interface</b></td><td><br>
+ {% for choice in TYPE_CHOICES %}
+ <input type="radio" name="hdwr_type_new2" value="{{ choice.0 }}" >{{ choice.1 }}
+ {% endfor %}
+ </td></tr>
+ <tr> <td> <b>dhcp</b></td>
+ <td>
+ <input type="checkbox" name="dhcp_new2"></td></tr>
+ <tr> <td> <b>mac_addr</b></td>
+ <td> <input name="mac_addr_new2" type="text"></td></tr>
+ <tr> <td> <b>ip_addr</b></td>
+ <td> <input name="ip_addr_new2" type="text"></td></tr>
+ <tr> <td> <b>comments</b></td>
+ <td> <textarea rows="10" cols="50" name="comments"></textarea></td></tr>
+</table>
+<br>
+<p><input type="submit" value="Submit">
+</form>
+
+{% endblock %}
+
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/remove.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/remove.html
new file mode 100644
index 000000000..4329200dd
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/remove.html
@@ -0,0 +1,89 @@
+{% extends "base.html" %}
+
+{% block pagebanner %}
+ <div class="header">
+ <h2>Are you sure you want to remove {{ host.hostname }}?</h2>
+ </div>
+ <br/>
+{% endblock %}
+
+{% block sidebar %}
+{% include "navbar.tmpl" %}
+<ul class="sidebar">
+ <li><a href="dns/" class="sidebar">detailed dns info</a></li>
+ <li><a href="edit/" class="sidebar">edit host info</a></li>
+ <li><a href="dns/edit/" class="sidebar">edit dns info</a></li>
+</ul>
+{% include "logout.tmpl" %}
+{% endblock %}
+
+{% block content %}
+
+<table border="0" width="100%">
+ <colgroup>
+ <col width="150">
+ <col width="*">
+ <tr> <td> <b>hostname</b></td>
+ <td> {{ host.hostname }}</td></tr>
+ <tr> <td> <b>whatami</b></td>
+ <td> {{ host.whatami }}</td></tr>
+ <tr> <td> <b>netgroup</b></td>
+ <td> {{ host.netgroup }}</td></tr>
+ <tr> <td> <b>class</b></td>
+ <td> {{ host.security_class }}</td></tr>
+ <tr> <td> <b>support</b></td>
+ <td> {{ host.support }}</td></tr>
+ <tr> <td> <b>csi</b></td>
+ <td> {{ host.csi }}</td></tr>
+ <tr> <td> <b>printq</b></td>
+ <td> {{ host.printq }}</td></tr>
+ <tr> <td> <b>dhcp</b></td>
+ {% if host.dhcp %}
+ <td> y </td></tr>
+ {% else %}
+ <td> n </td></tr>
+ {% endif %}
+ <tr> <td> <b>outbound_smtp</b></td>
+ {% if host.outbound_smtp %}
+ <td> y </td></tr>
+ {% else %}
+ <td> n </td></tr>
+ {% endif %}
+ <tr> <td> <b>primary_user</b></td>
+ <td> {{ host.primary_user }}</td></tr>
+ <tr> <td> <b>administrator</b></td>
+ <td> {{ host.administrator }}</td></tr>
+ <tr> <td> <b>location</b></td>
+ <td> {{ host.location }}</td></tr>
+ <tr> <td> <b>expiration_date</b></td>
+ <td> {{ host.expiration_date }}</td></tr>
+ {% for interface in interfaces %}
+ <tr> <td><br><b>Interface</b></td>
+ {% ifnotequal interface.0.hdwr_type 'no' %}
+ <td><br>{{ interface.0.hdwr_type }}</td></tr>
+ {% endifnotequal %}
+ <tr> <td> <b>mac_addr</b></td>
+ <td> {{ interface.0.mac_addr }}</b></td></tr>
+ {% for ip in interface.1 %}
+ <tr> <td> <b>ip_addr</b></td>
+ <td> {{ ip.ip_addr }}</td></tr>
+ {% endfor %}
+ {% endfor %}
+ <tr> <td valign="top"> <b>comments</b></td>
+ <td>
+ {{ host.comments|linebreaksbr }}<br>
+ </td></tr>
+
+</table>
+<a style="font-size:75%" href="/hostbase/{{ host.id }}/dns/">see detailed DNS information for this host</a>
+<br><br>
+this host is {{ host.status }}<br>
+last update on {{ host.last }}<br>
+
+<form name="input" action="remove.html?sub=true" method="post">
+<input type="submit" value="remove">
+<input type="reset" value="cancel" onclick="history.back()">
+</form>
+
+{% endblock %}
+
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/results.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/results.html
new file mode 100644
index 000000000..45b22058d
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/results.html
@@ -0,0 +1,45 @@
+{% extends "base.html" %}
+
+{% block pagebanner %}
+ <div class="header">
+ <h2>Search Results</h2>
+ </div>
+ <br/>
+{% endblock %}
+
+{% block sidebar %}
+{% include "navbar.tmpl" %}
+{% include "logout.tmpl" %}
+{% endblock %}
+
+{% block content %}
+
+{% if hosts %}
+<table border="0" width="100%">
+ <colgroup>
+ <col width="200">
+ <col width="75">
+ <col width="50">
+ <col width="50">
+ <col width="50">
+ <col width="*">
+ <tr> <td><b>hostname</b></td>
+ <td> <b>status</b> </td>
+ </tr>
+ {% for host in hosts %}
+ <tr> <td>{{ host.0 }}</td>
+ <td> {{ host.2 }} </td>
+ <td> <a href="{{ host.1 }}">view</a> </td>
+ <td> <a href="{{ host.1 }}/edit">edit</a> </td>
+ <td> <a href="{{ host.1 }}/copy">copy</a> </td>
+ <td> <a href="{{ host.1 }}/logs">logs</a> </td>
+<!-- <td> <a href="{{ host.1 }}/remove">remove</a> </td> -->
+ </tr>
+ {% endfor %}
+</table>
+{% else %}
+No hosts matched your query<br>
+Click the back button on your browser to edit your search
+{% endif %}
+
+{% endblock %}
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/search.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/search.html
new file mode 100644
index 000000000..409d418fe
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/search.html
@@ -0,0 +1,57 @@
+{% extends "base.html" %}
+
+{% block pagebanner %}
+ <div class="header">
+ <h2>Welcome to Hostbase!</h2>
+ <p>search for hosts using one or more of the fields below
+ </div>
+ <br/>
+{% endblock %}
+
+{% block sidebar %}
+<a href="/hostbase/new" class="sidebar">add a new host</a><br>
+<a href="/hostbase/zones" class="sidebar">zone file information</a><br>
+{% include "logout.tmpl" %}
+{% endblock %}
+
+{% block content %}
+{% comment %}
+ ...or go to <a href="hostinfo">this</a>
+ page to enter hostinfo-like queries<br><br>
+{% endcomment %}
+
+<form name="input" action="?sub=true" method="post">
+ <fieldset class="module aligned ()">
+ <label for="hostname">hostname:</label><input name="hostname" type="text" ><br>
+ <label for="netgroup">netgroup:</label><input name="netgroup" type="text" ><br>
+ <label for="security_class">class:</label><input name="security_class" type="text" ><br>
+ <label for="support">support:</label><input name="support" type="text" ><br>
+ <label for="csi">csi:</label><input name="csi" type="text" ><br>
+ <label for="printq">printq:</label><input name="printq" type="text" ><br>
+ <label for="outbound_smtp">outbound_smtp:</label>
+ {% for choice in yesno %}
+ <input type="radio" name="outbound_smtp" value="{{ choice.0 }}" >{{ choice.1 }}
+ {% endfor %}<br>
+ <label for="primary_user">primary_user:</label><input name="primary_user" type="text" ><br>
+ <label for="administrator">administrator:</label><input name="administrator" type="text" ><br>
+ <label for="location">location:</label><input name="location" type="text" ><br>
+ <label for="expiration_date">expiration_date:</label><input name="expiration_date" type="text" ><br>
+ <br><label for="Interface">Interface:</label>
+ {% for choice in TYPE_CHOICES %}
+ <input type="radio" name="hdwr_type" value="{{ choice.0 }}" >{{ choice.1 }}
+ {% endfor %}<br>
+ <label for="dhcp">dhcp:</label>
+ {% for choice in yesno %}
+ <input type="radio" name="dhcp" value="{{ choice.0 }}" >{{ choice.1 }}
+ {% endfor %}<br>
+ <label for="mac_addr">mac_addr:</label><input name="mac_addr" type="text" ><br>
+ <label for="ip_addr">ip_addr:</label><input name="ip_addr" type="text" ><br>
+ <label for="dns_view">dns_viewer:</label>
+ {% for choice in DNS_CHOICES %}
+ <input type="radio" name="dns_view" value="{{ choice.0 }}" >{{ choice.1 }}
+ {% endfor %}<br>
+ <label for="mx">mx:</label><input name="mx" type="text" ><br>
+<p>
+<input type="submit" value="Search">
+</form>
+{% endblock %}
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/zoneedit.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/zoneedit.html
new file mode 100644
index 000000000..ee355ee87
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/zoneedit.html
@@ -0,0 +1,81 @@
+{% extends "base.html" %}
+
+{% block pagebanner %}
+ <div class="header">
+ <h2>Zones</h2>
+ <p>Edit information for {{ zone }}
+ </div>
+ <br/>
+{% endblock %}
+
+{% block sidebar %}
+{% include "navbar.tmpl" %}
+<ul>
+<li><a href="/hostbase/zones/{{ zone_id }}/" class="sidebar">view zone</a><br>
+</li>
+</ul>
+{% include "logout.tmpl" %}
+{% endblock %}
+
+{% block content %}
+
+<script language="JavaScript" type="text/Javascript">
+function toggleField(fieldname){
+ if(document.getElementById){
+ var style = document.getElementById(fieldname).style;
+ style.display = style.display? "":"block";
+ }
+}
+</script>
+
+<style type=text/css>
+div#nameserver{
+ display: none;
+}
+div#mx{
+ display: none;
+}
+div#address{
+ display: none;
+}
+</style>
+
+<form name="zonedata" action="" method="post">
+ <fieldset class="module aligned ()">
+<label for="id_zone">zone:</label></td> <td>{{ form.zone }}<br>
+<label for="id_admin">admin:</label></td> <td>{{ form.admin }}<br>
+<label for="id_primary_master">primary_master:</label></td> <td>{{ form.primary_master }}<br>
+<label for="id_expire">expire:</label></td> <td>{{ form.expire }}<br>
+<label for="id_retry">retry:</label></td> <td>{{ form.retry }}<br>
+<label for="id_refresh">refresh:</label></td> <td>{{ form.refresh }}<br>
+<label for="id_ttl">ttl:</label></td> <td>{{ form.ttl }}<br>
+{% for ns in nsforms %}
+<label for="id_name">nameserver:</label></td> <td>{{ ns.name }}<br>
+{% endfor %}
+</table>
+<div id=nameserver>
+ <label for="id_name">nameserver:</label></td> <td>{{ nsadd.name }}<br>
+ <label for="id_name">nameserver:</label></td> <td>{{ nsadd.name }}<br>
+</div>
+<a style="font-size:75%" href=# onclick="toggleField('nameserver')">Add NS records</a><br>
+{% for mx in mxforms %}
+<label for="id_mx">mx:</label></td> <td>{{ mx.priority }} {{ mx.mx }}<br>
+{% endfor %}
+<div id=mx>
+ <label for="id_mx">mx:</label></td> <td>{{ mxadd.priority }} {{ mxadd.mx }}<br>
+ <label for="id_mx">mx:</label></td> <td>{{ mxadd.priority }} {{ mxadd.mx }}<br>
+</div>
+<a style="font-size:75%" href=# onclick="toggleField('mx')">Add MX records</a><br>
+{% for a in aforms %}
+<label for="id_address">ip address:</label></td> <td>{{ a.ip_addr }}<br>
+{% endfor %}
+<div id=address>
+ <label for="id_address">ip address:</label></td> <td>{{ addadd.ip_addr }}<br>
+ <label for="id_address">ip address:</label></td> <td>{{ addadd.ip_addr }}<br>
+</div>
+<a style="font-size:75%" href=# onclick="toggleField('address')">Add A records</a><br>
+<label for="id_aux">aux:</label></td> <td>{{ form.aux }}<br>
+<p><input type="submit" value="Submit">
+</form>
+
+{% endblock %}
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/zonenew.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/zonenew.html
new file mode 100644
index 000000000..b59fa9e3c
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/zonenew.html
@@ -0,0 +1,43 @@
+{% extends "base.html" %}
+
+{% block pagebanner %}
+ <div class="header">
+ <h2>Zones</h2>
+ <p>Enter information for a new zone to be generated by Hostbase
+ </div>
+ <br/>
+{% endblock %}
+
+{% block sidebar %}
+{% include "navbar.tmpl" %}
+{% include "logout.tmpl" %}
+{% endblock %}
+
+{% block content %}
+<form name="zonedata" action="" method="post">
+ <fieldset class="module aligned ()">
+ {{ form.as_p}}
+<!--
+ <label for="id_zone">zone:</label>{{ form.zone }}<br>
+ <label for="id_admin">admin:</label>{{ form.admin }}<br>
+ <label for="id_primary_master">primary_master:</label>{{ form.primary_master }}<br>
+ <label for="id_expire">expire:</label>{{ form.expire }}<br>
+ <label for="id_retry">retry:</label>{{ form.retry }}<br>
+ <label for="id_refresh">refresh:</label>{{ form.refresh }}<br>
+ <label for="id_ttl">ttl:</label>{{ form.ttl }}<br>
+ <label for="id_name">nameserver:</label>{{ nsform.name }}<br>
+ <label for="id_name">nameserver:</label>{{ nsform.name }}<br>
+ <label for="id_name">nameserver:</label>{{ nsform.name }}<br>
+ <label for="id_name">nameserver:</label>{{ nsform.name }}<br>
+ <label for="id_mx">mx:</label>{{ mxform.priority }} {{ mxform.mx }}<br>
+ <label for="id_mx">mx:</label>{{ mxform.priority }} {{ mxform.mx }}<br>
+ <label for="id_mx">ip address:</label>{{ aform.ip_addr }}<br>
+ <label for="id_mx">ip address:</label>{{ aform.ip_addr }}<br>
+ <label for="id_aux">aux:
+(information not generated from Hostbase)</label>{{ form.aux }}<br>
+--!>
+ <p><input type="submit" value="Submit">
+ </fieldset>
+</form>
+{% endblock %}
+
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/zones.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/zones.html
new file mode 100644
index 000000000..c773e7922
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/zones.html
@@ -0,0 +1,37 @@
+{% extends "base.html" %}
+
+{% block pagebanner %}
+ <div class="header">
+ <h2>Zones</h2>
+ <p>Hostbase generates DNS zone files for the following zones.
+ </div>
+ <br/>
+{% endblock %}
+
+{% block sidebar %}
+{% include "navbar.tmpl" %}
+{% include "logout.tmpl" %}
+{% endblock %}
+
+{% block content %}
+{% if zone_list %}
+<table border="0" width="100%">
+ <colgroup>
+ <col width="200">
+ <col width="75">
+ <col width="50">
+ <col width="*">
+ <tr> <td><b>zone</b></td>
+ </tr>
+ {% for zone in zone_list|dictsort:"zone" %}
+ <tr> <td> {{ zone.zone }}</td>
+ <td> <a href="{{ zone.id }}">view</a> </td>
+ <td> <a href="{{ zone.id }}/edit">edit</a> </td>
+ </tr>
+ {% endfor %}
+</table>
+{% else %}
+There is no zone data currently in the database<br>
+{% endif %}
+{% endblock %}
+
diff --git a/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/zoneview.html b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/zoneview.html
new file mode 100644
index 000000000..fa12e3ec5
--- /dev/null
+++ b/src/lib/Bcfg2/Server/Hostbase/hostbase/webtemplates/zoneview.html
@@ -0,0 +1,71 @@
+{% extends "base.html" %}
+
+{% block pagebanner %}
+ <div class="header">
+ <h2>Zones</h2>
+ <p>Hostbase generates DNS zone files for the following zones.
+ </div>
+ <br/>
+{% endblock %}
+
+{% block sidebar %}
+{% include "navbar.tmpl" %}
+<ul class="sidebar">
+<li><a href="/hostbase/zones/{{ zone.id }}/edit/" class="sidebar">edit zone</a><br>
+</li>
+</ul>
+{% include "logout.tmpl" %}
+{% endblock %}
+
+{% block content %}
+<table border="0" width="100%">
+ <colgroup>
+ <col width="200">
+ <col width="*">
+ <tr> <td> <b>zone</b></td>
+ <td> {{ zone.zone }}</td></tr>
+ <tr> <td> <b>serial</b></td>
+ <td> {{ zone.serial }}</td></tr>
+ <tr> <td> <b>admin</b></td>
+ <td> {{ zone.admin }}</td></tr>
+ <tr> <td> <b>primary_master</b></td>
+ <td> {{ zone.primary_master }}</td></tr>
+ <tr> <td> <b>expire</b></td>
+ <td> {{ zone.expire }}</td></tr>
+ <tr> <td> <b>retry</b></td>
+ <td> {{ zone.retry }}</td></tr>
+ <tr> <td> <b>refresh</b></td>
+ <td> {{ zone.refresh }}</td></tr>
+ <tr> <td> <b>ttl</b></td>
+ <td> {{ zone.ttl }}</td></tr>
+
+ <tr><td valign="top"> <b>nameservers</b></td>
+ <td>
+ {% for nameserver in zone.nameservers.all %}
+ {{ nameserver.name }}<br>
+ {% endfor %}
+ </td></tr>
+ <tr><td valign="top"> <b>mxs</b></td>
+ <td>
+ {% for mx in zone.mxs.all %}
+ {{ mx.priority }} {{ mx.mx }}<br>
+ {% endfor %}
+ </td></tr>
+ {% if addresses %}
+ <tr><td valign="top"> <b>A records</b></td>
+ <td>
+ {% for address in sof.addresses.all %}
+ {{ address.ip_addr }}<br>
+ {% endfor %}
+ </td></tr>
+ {% endif %}
+
+ <tr> <td valign="top"> <b>aux</b></td>
+ <td>
+ {{ zone.aux|linebreaksbr }}
+ </td></tr>
+
+</table>
+<br><br>
+{% endblock %}
+