[Detail] First version of double mode.
There is two mode : easy mode and expert mode. - In expert mode, entire file is presented, and user can change it manually. - In easy mode, records informations are presented in a table.
This commit is contained in:
parent
b729f6fc8e
commit
5af67dcd67
@ -143,10 +143,28 @@ prefix '/domain' => sub {
|
|||||||
|
|
||||||
my $zone = $app->get_domain(session('login') , param('domain'));
|
my $zone = $app->get_domain(session('login') , param('domain'));
|
||||||
|
|
||||||
|
if( param( 'expert' ) )
|
||||||
|
{
|
||||||
template details => {
|
template details => {
|
||||||
login => session('login')
|
login => session('login')
|
||||||
, domain => param('domain')
|
, domain => param('domain')
|
||||||
, domain_zone => $zone->output() };
|
, domain_zone => $zone->output()
|
||||||
|
, expert => true };
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
# say dump( $zone->cname());
|
||||||
|
template details => {
|
||||||
|
login => session('login')
|
||||||
|
, domain => param('domain')
|
||||||
|
, domain_zone => $zone->output()
|
||||||
|
, a => $zone->a()
|
||||||
|
, aaaa => $zone->aaaa()
|
||||||
|
, cname => $zone->cname()
|
||||||
|
, ptr => $zone->ptr()
|
||||||
|
, mx => $zone->mx()
|
||||||
|
, ns => $zone->ns() };
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,12 +5,89 @@
|
|||||||
|
|
||||||
<h3>Fichier de zone de <% domain %></h3>
|
<h3>Fichier de zone de <% domain %></h3>
|
||||||
|
|
||||||
|
<% IF expert %>
|
||||||
<form class="form" action='/domain/update/<% domain %>' method="post" >
|
<form class="form" action='/domain/update/<% domain %>' method="post" >
|
||||||
<textarea name="zoneupdated" rows="20" cols="100"><% domain_zone %></textarea>
|
<textarea name="zoneupdated" rows="20" cols="100"><% domain_zone %></textarea>
|
||||||
<br />
|
<br />
|
||||||
<input type="submit" value="Mettre à jour la zone" />
|
<input type="submit" value="Mettre à jour la zone" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<a href='/domain/details/<% domain %>' >Easy Mode</a>
|
||||||
|
<% ELSE %>
|
||||||
|
|
||||||
|
<table border=1 >
|
||||||
|
<caption>
|
||||||
|
<td>Name</td>
|
||||||
|
<td>Class</td>
|
||||||
|
<td>Type</td>
|
||||||
|
<td>Host</td>
|
||||||
|
<td>TTL</td>
|
||||||
|
</caption>
|
||||||
|
|
||||||
|
<% FOREACH address in ns %>
|
||||||
|
<tr>
|
||||||
|
<td><% address.name %></td>
|
||||||
|
<td><% address.class %></td>
|
||||||
|
<td>NS</td>
|
||||||
|
<td><% address.host %></td>
|
||||||
|
<td><% address.ttl %></td>
|
||||||
|
</tr>
|
||||||
|
<% END %>
|
||||||
|
|
||||||
|
<% FOREACH address in a %>
|
||||||
|
<tr>
|
||||||
|
<td><% address.name %></td>
|
||||||
|
<td><% address.class %></td>
|
||||||
|
<td>A</td>
|
||||||
|
<td><% address.host %></td>
|
||||||
|
<td><% address.ttl %></td>
|
||||||
|
</tr>
|
||||||
|
<% END %>
|
||||||
|
|
||||||
|
<% FOREACH address in aaaa %>
|
||||||
|
<tr>
|
||||||
|
<td><% address.name %></td>
|
||||||
|
<td><% address.class %></td>
|
||||||
|
<td>AAAA</td>
|
||||||
|
<td><% address.host %></td>
|
||||||
|
<td><% address.ttl %></td>
|
||||||
|
</tr>
|
||||||
|
<% END %>
|
||||||
|
|
||||||
|
<% FOREACH address in cname %>
|
||||||
|
<tr>
|
||||||
|
<td><% address.name %></td>
|
||||||
|
<td><% address.class %></td>
|
||||||
|
<td>CNAME</td>
|
||||||
|
<td><% address.host %></td>
|
||||||
|
<td><% address.ttl %></td>
|
||||||
|
</tr>
|
||||||
|
<% END %>
|
||||||
|
|
||||||
|
<% FOREACH address in ptr %>
|
||||||
|
<tr>
|
||||||
|
<td><% address.name %></td>
|
||||||
|
<td><% address.class %></td>
|
||||||
|
<td>PTR</td>
|
||||||
|
<td><% address.host %></td>
|
||||||
|
<td><% address.ttl %></td>
|
||||||
|
</tr>
|
||||||
|
<% END %>
|
||||||
|
|
||||||
|
<% FOREACH address in mx %>
|
||||||
|
<tr>
|
||||||
|
<td><% address.name %></td>
|
||||||
|
<td><% address.class %></td>
|
||||||
|
<td>MX</td>
|
||||||
|
<td><% address.host %> (<% address.priority %>)</td>
|
||||||
|
<td><% address.ttl %></td>
|
||||||
|
</tr>
|
||||||
|
<% END %>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
<a href='/domain/details/<% domain %>?expert=1'>Expert Mode</a>
|
||||||
|
<% END %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div> <!-- fin de colonne -->
|
</div> <!-- fin de colonne -->
|
||||||
|
Reference in New Issue
Block a user