#31 Configurable Free Time in Port Utilization Report

This commit is contained in:
Oliver Gorwits
2018-03-10 10:45:39 +00:00
parent dd44877059
commit 66e3d2d64e
6 changed files with 38 additions and 6 deletions

View File

@@ -144,6 +144,9 @@ sidebar_defaults:
report_moduleinventory:
fruonly: { default: checked }
matchall: { default: checked }
report_portutilization:
age_num: { default: 3 }
age_unit: { default: months }
device_port_col_idx_left: 0
device_port_col_idx_mid: 2
device_port_col_idx_right: -1

View File

@@ -112,7 +112,7 @@
<li>
<em class="muted">Mark as Free if Down for:</em><br/>
<select id="nd_days-select" name="age_num">
[% FOREACH count IN [1..32] %]
[% FOREACH count IN [1..31] %]
<option[% ' selected="selected"' IF vars.sidebar_defaults.device_ports.age_num == count %]>[% count %]</option>
[% END %]
</select>

View File

@@ -0,0 +1,19 @@
<p class="nd_sidebar-title"><em>Port Utilization</em></p>
<div class="clearfix">
<em class="muted">Mark as Free if Down for:</em><br/>
<select id="nd_days-select" name="age_num">
[% FOREACH count IN [1..31] %]
<option[% ' selected="selected"' IF vars.sidebar_defaults.report_portutilization.age_num == count %]>[% count %]</option>
[% END %]
</select>
<select id="nd_age-select" name="age_unit">
[% FOREACH unit IN [ 'days', 'weeks', 'months', 'years' ] %]
<option[% ' selected="selected"' IF vars.sidebar_defaults.report_portutilization.age_unit == unit %]>[% unit %]</option>
[% END %]
</select>
</div>
<button id="[% report.tag %]_submit" type="submit" class="btn btn-info">
<i class="icon-search icon-large pull-left nd_navbar-icon"></i> Run Report</button>