source: trunk/LATMOS-Accounts-Web/root/html/netzones/index.tt @ 1064

Last change on this file since 1064 was 1064, checked in by nanardon, 12 years ago

Add puppet zones

This patch create a new zone type "puppet" which generate manifest files for a
set of computers.

Puppet class can be set in the zone or in the host, both settings are merged.

  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1[% db = c.model('Accounts').db %]
2<!-- $Id -->
3<div style="float: right" id="filter">
4[% INCLUDE 'includes/filter.tt'
5   formuri = c.uri_for()
6   otype = 'netzone'
7%]
8</div>
9
10[% IF c.req.param('attrval') %]
11[% FOREACH netzonename = netzonelist.sort %]
12[% IF loop.first %]
13<table>
14<tr><th colspan="2">[% netztype | html %]</th></tr>
15[% END %]
16<tr>
17    <td>[% netzonename | html %]</td>
18    <td>
19    <a href="[% c.uri_for('/netzones', netzonename) %]">
20        <img src="[% c.uri_for('/static', 'icons', 'icon_edit.png') %]"
21            height="16" width="16"
22            alt="[% "edit " _ netzonename | html %]"></a>
23    </td>
24</tr>
25[% IF loop.last %]
26</table>
27[% END %]
28[% END %]
29[% ELSE %]
30
31<table border="0">
32[% FOREACH netztype = [ 'dns', 'reverse', 'dhcp', 'puppet' ] %]
33[% netzonelist = db.search_objects('netzone', 'type=' _ netztype) %]
34[% FOREACH netzonename = netzonelist.sort %]
35[% netzone = db.get_object('netzone', netzonename) %]
36[% IF loop.first %]
37<tr><th colspan="2">[% netztype | ucfirst | html %]</th></tr>
38<tr><th>Nom</th><th>Description</th></tr>
39[% END %]
40<tr>
41    <td>
42    <a href="[% c.uri_for('/netzones', netzonename) %]">
43        <img src="[% c.uri_for('/static', 'icons', 'icon_edit.png') %]"
44            height="16" width="16"
45            alt="[% "edit " _ netzonename | html %]"></a>
46        [% netzonename | html %]
47    </td>
48    <td>
49        <span title="[% netzone.get_c_field('description') | html %]">
50        [% netzone.get_c_field('description') | truncate(20) | html %]
51        </span>
52    </td>
53</tr>
54[% IF loop.last %]
55[% END %]
56[% END %]
57[% END %]
58[% END %] [%# IF %]
59</table>
Note: See TracBrowser for help on using the repository browser.