...and remove old code using age_on flag
This commit is contained in:
@@ -42,9 +42,7 @@ get '/ajax/content/report/ipinventory' => require_login sub {
|
||||
$subnet = NetAddr::IP::Lite->new('0.0.0.0/32')
|
||||
if (! $subnet) or ($subnet->addr eq '0.0.0.0');
|
||||
|
||||
my $age = param('age_on') || '0';
|
||||
my $agenot = param('age_invert') || '0';
|
||||
|
||||
my ( $start, $end ) = param('daterange') =~ /(\d+-\d+-\d+)/gmx;
|
||||
|
||||
my $limit = param('limit') || 256;
|
||||
@@ -129,7 +127,7 @@ get '/ajax/content/report/ipinventory' => require_login sub {
|
||||
)->as_query;
|
||||
|
||||
my $rs;
|
||||
if ( $age && $start && $end ) {
|
||||
if ( $start && $end ) {
|
||||
$start = $start . ' 00:00:00';
|
||||
$end = $end . ' 23:59:59';
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</tbody>
|
||||
[% FOREACH row IN results.all %]
|
||||
<tr>
|
||||
<td class="nd_center-cell"><a href="[% uri_for('/report/ipinventory') %]?subnet=[% row.subnet | uri %]&daterange=[% daterange | uri %]&limit=[% row.subnet_size | uri %]&age_on=on">
|
||||
<td class="nd_center-cell"><a href="[% uri_for('/report/ipinventory') %]?subnet=[% row.subnet | uri %]&daterange=[% daterange | uri %]&limit=[% row.subnet_size | uri %]">
|
||||
[% row.subnet | html_entity %]</a></td>
|
||||
<td class="nd_center-cell">[% row.subnet_size | html_entity %]</td>
|
||||
<td class="nd_center-cell">[% row.active | html_entity %]</td>
|
||||
|
||||
@@ -45,16 +45,4 @@
|
||||
,delay: 250
|
||||
,minLength: 3
|
||||
});
|
||||
|
||||
// change color of daterange input when activated
|
||||
$('#age_on').change(function() {
|
||||
if ($(this).is(':checked')) {
|
||||
$('#daterange').parent('.clearfix').addClass('success');
|
||||
}
|
||||
else {
|
||||
$('#daterange').parent('.clearfix').removeClass('success');
|
||||
}
|
||||
});
|
||||
// fire the event to set success class correctly on page load
|
||||
$('#age_on').change();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user