remove limit from module inventory options

This commit is contained in:
Eric A. Miller
2014-05-29 20:33:58 -04:00
parent 8590b6781f
commit 0288f3be24
2 changed files with 7 additions and 12 deletions

View File

@@ -35,8 +35,6 @@ hook 'before' => sub {
}, },
] ]
); );
params->{'limit'} ||= 1024;
}; };
hook 'before_template' => sub { hook 'before_template' => sub {
@@ -86,7 +84,7 @@ get '/ajax/content/report/moduleinventory' => require_login sub {
{ '+columns' => [qw/ device.dns device.name /], { '+columns' => [qw/ device.dns device.name /],
join => 'device', join => 'device',
collapse => 1, collapse => 1,
})->limit( param('limit') )->hri->all; })->hri->all;
} }
else { else {
@results = $rs->search( @results = $rs->search(

View File

@@ -1,5 +1,5 @@
<p class="nd_sidebar-title"><em>Module Search Options</em></p> <p class="nd_sidebar-title"><em>Module Search</em></p>
<div class="clearfix"> <div class="clearfix">
<i id="device_clear_btn" data-btn-for="device" <i id="device_clear_btn" data-btn-for="device"
class="nd_field-clear-icon icon-trash icon-large"></i> class="nd_field-clear-icon icon-trash icon-large"></i>
@@ -51,14 +51,10 @@
[% END %] [% END %]
</select> </select>
</div> </div>
<div class="clearfix"> <fieldset>
<em class="muted">Limit:</em><br/> <legend class="nd_sidebar-legend">
<select id="nd_mac-format" class="nd_side-select" name="limit"> <label><em><strong>Options</strong></em></label>
[% FOREACH size IN [ '128', '256', '1024', '2048', '4096', '8192' ] %] </legend>
<option[% ' selected="selected"' IF params.limit == size %]>[% size %]</option>
[% END %]
</select>
</div>
<div class="clearfix input-prepend"> <div class="clearfix input-prepend">
<label class="add-on"> <label class="add-on">
<input type="checkbox" id="fruonly" <input type="checkbox" id="fruonly"
@@ -77,5 +73,6 @@
<span class="nd_searchcheckbox uneditable-input">Match All Options</span> <span class="nd_searchcheckbox uneditable-input">Match All Options</span>
</label> </label>
</div> </div>
</fieldset>
<button id="[% tab.tag %]_submit" type="submit" class="btn btn-info"> <button id="[% tab.tag %]_submit" type="submit" class="btn btn-info">
<i class="icon-search icon-large pull-left nd_navbar-icon"></i> Search Modules</button> <i class="icon-search icon-large pull-left nd_navbar-icon"></i> Search Modules</button>