[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'));
|
||||||
|
|
||||||
template details => {
|
if( param( 'expert' ) )
|
||||||
login => session('login')
|
{
|
||||||
, domain => param('domain')
|
template details => {
|
||||||
, domain_zone => $zone->output() };
|
login => session('login')
|
||||||
|
, domain => param('domain')
|
||||||
|
, 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,11 +5,88 @@
|
|||||||
|
|
||||||
<h3>Fichier de zone de <% domain %></h3>
|
<h3>Fichier de zone de <% domain %></h3>
|
||||||
|
|
||||||
<form class="form" action='/domain/update/<% domain %>' method="post" >
|
<% IF expert %>
|
||||||
<textarea name="zoneupdated" rows="20" cols="100"><% domain_zone %></textarea>
|
<form class="form" action='/domain/update/<% domain %>' method="post" >
|
||||||
<br />
|
<textarea name="zoneupdated" rows="20" cols="100"><% domain_zone %></textarea>
|
||||||
<input type="submit" value="Mettre à jour la zone" />
|
<br />
|
||||||
</form>
|
<input type="submit" value="Mettre à jour la zone" />
|
||||||
|
</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>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user