Subnets report date range fixed, but (unnecessary?) "not" option removed
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2.027008_002 - 2014-06-23
|
||||||
|
|
||||||
|
[BUG FIXES]
|
||||||
|
|
||||||
|
* Subnets report date range fixed, but (unnecessary?) "not" option removed
|
||||||
|
|
||||||
2.027008_001 - 2014-06-23
|
2.027008_001 - 2014-06-23
|
||||||
|
|
||||||
[NEW FEATURES]
|
[NEW FEATURES]
|
||||||
|
|||||||
@@ -20,8 +20,13 @@ __PACKAGE__->result_source_instance->view_definition(<<'ENDSQL');
|
|||||||
FROM subnets s1, node_ip ni
|
FROM subnets s1, node_ip ni
|
||||||
WHERE s1.net <<= ?::cidr
|
WHERE s1.net <<= ?::cidr
|
||||||
AND ni.ip <<= s1.net
|
AND ni.ip <<= s1.net
|
||||||
AND ni.time_last >= ?
|
AND ((
|
||||||
AND ni.time_last <= ?
|
ni.time_first IS null
|
||||||
|
AND ni.time_last IS null
|
||||||
|
) OR (
|
||||||
|
ni.time_last >= ?
|
||||||
|
AND ni.time_last <= ?
|
||||||
|
))
|
||||||
AND s1.last_discover >= ?
|
AND s1.last_discover >= ?
|
||||||
UNION
|
UNION
|
||||||
SELECT DISTINCT net, di.alias as ip
|
SELECT DISTINCT net, di.alias as ip
|
||||||
|
|||||||
@@ -18,15 +18,12 @@ get '/ajax/content/report/subnets' => require_login sub {
|
|||||||
my $agenot = param('age_invert') || '0';
|
my $agenot = param('age_invert') || '0';
|
||||||
my ( $start, $end ) = param('daterange') =~ /(\d+-\d+-\d+)/gmx;
|
my ( $start, $end ) = param('daterange') =~ /(\d+-\d+-\d+)/gmx;
|
||||||
|
|
||||||
if ($agenot) {
|
$start = $start . ' 00:00:00';
|
||||||
my $tmp = $end;
|
$end = $end . ' 23:59:59';
|
||||||
$end = $start;
|
|
||||||
$start = $tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
my @results = schema('netdisco')->resultset('Virtual::SubnetUtilization')
|
my @results = schema('netdisco')->resultset('Virtual::SubnetUtilization')
|
||||||
->search(undef,{
|
->search(undef,{
|
||||||
bind => [ $subnet, $start, $end, $end, $subnet, $end, $end ],
|
bind => [ $subnet, $start, $end, $start, $subnet, $start, $start ],
|
||||||
})->hri->all;
|
})->hri->all;
|
||||||
|
|
||||||
return unless scalar @results;
|
return unless scalar @results;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
[% FOREACH row IN results %]
|
[% FOREACH row IN results %]
|
||||||
<tr>
|
<tr>
|
||||||
<td class="nd_center-cell"><a href="[% uri_for('/report/ipinventory') %]?subnet=[% row.subnet | uri %]&daterange=[% daterange | uri %]&limit=[% row.subnet_size | uri %]">
|
<td class="nd_center-cell"><a href="[% uri_for('/report/ipinventory') %]?subnet=[% row.subnet | uri %]&daterange=[% params.daterange | uri %]&age_invert=[% params.age_invert | uri %]&limit=[% row.subnet_size | uri %]">
|
||||||
[% row.subnet | html_entity %]</a></td>
|
[% row.subnet | html_entity %]</a></td>
|
||||||
<td class="nd_center-cell">[% row.subnet_size | format_number %]</td>
|
<td class="nd_center-cell">[% row.subnet_size | format_number %]</td>
|
||||||
<td class="nd_center-cell">[% row.active | format_number %]</td>
|
<td class="nd_center-cell">[% row.active | format_number %]</td>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
<legend class="nd_sidebar-legend">
|
<legend class="nd_sidebar-legend">
|
||||||
<label><em><strong>Date Range</strong></em></label>
|
<label><em><strong>Date Range</strong></em></label>
|
||||||
</legend>
|
</legend>
|
||||||
|
<!--
|
||||||
<div class="clearfix input-prepend">
|
<div class="clearfix input-prepend">
|
||||||
<label class="add-on">
|
<label class="add-on">
|
||||||
<input type="checkbox" id="age_invert"
|
<input type="checkbox" id="age_invert"
|
||||||
@@ -19,6 +20,7 @@
|
|||||||
<span class="nd_searchcheckbox uneditable-input">Not within...</span>
|
<span class="nd_searchcheckbox uneditable-input">Not within...</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
<input class="nd_side-input" id="daterange" required="required"
|
<input class="nd_side-input" id="daterange" required="required"
|
||||||
type="text" name="daterange" value="[%
|
type="text" name="daterange" value="[%
|
||||||
|
|||||||
Reference in New Issue
Block a user