Merge branch 'master' of ssh://git.code.sf.net/p/netdisco/netdisco-ng
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
[% IF task.tag == 'jobqueue' %]
|
||||
<span id="nd_device-name">
|
||||
<a class="nd_adminbutton" name="delall" href="#"><i class="icon-trash text-error"></i></a>
|
||||
<a id="nd_countdown-refresh" href="#"><i class="text-success icon-refresh"></i></a>
|
||||
<a id="nd_countdown-refresh" href="#"><i class="text-success icon-refresh icon-spin"></i></a>
|
||||
<a id="nd_countdown-control" href="#">
|
||||
<i id="nd_countdown-control-icon" class="text-success icon-play"></i></a>
|
||||
<span id="nd_countdown"></span>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
href="[% device_ports %]&q=[% params.q | uri %]&f=[% row.port | uri %]">[% row.port | html_entity %]</a></td>
|
||||
<td>[% row.device_port.name | html_entity %]</td>
|
||||
<td><a class="nd_linkcell"
|
||||
href="[% search_device %]&ip=[% row.subnet | uri %]">[% row.subnet | html_entity %]</a></td>
|
||||
href="[% search_device %]&q=[% row.subnet | uri %]&ip=[% row.subnet | uri %]">[% row.subnet | html_entity %]</a></td>
|
||||
</tr>
|
||||
[% END %]
|
||||
</tbody>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
[% ELSE %]
|
||||
<td>
|
||||
<a rel="tooltip" data-placement="top" data-offset="5" data-title="Find Similar Devices"
|
||||
href="[% search_device %]&location=[% d.location | uri %]">[% d.location | html_entity %]</a>
|
||||
href="[% search_device %]&q=[% d.location | uri %]&location=[% d.location | uri %]">[% d.location | html_entity %]</a>
|
||||
</td>
|
||||
[% END %]
|
||||
</tr>
|
||||
@@ -42,10 +42,10 @@
|
||||
<td>Vendor / Model</td>
|
||||
<td>
|
||||
<a rel="tooltip" data-placement="top" data-offset="5" data-title="Find Similar Devices"
|
||||
href="[% search_device %]&vendor=[% d.vendor | uri %]">[% d.vendor | html_entity %]</a>
|
||||
href="[% search_device %]&q=[% d.vendor | uri %]&vendor=[% d.vendor | uri %]">[% d.vendor | html_entity %]</a>
|
||||
/
|
||||
<a rel="tooltip" data-placement="top" data-offset="5" data-title="Find Similar Devices"
|
||||
href="[% search_device %]&model=[% d.model | uri %]">[% d.model | html_entity %]</a>
|
||||
href="[% search_device %]&q=[% d.model | uri %]&model=[% d.model | uri %]">[% d.model | html_entity %]</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -53,7 +53,7 @@
|
||||
<td>[% d.os | html_entity %] /
|
||||
<a rel="tooltip" data-placement="top" data-offset="5"
|
||||
data-title="Find Similar Devices"
|
||||
href="[% search_device %]&os_ver=[% d.os_ver | uri %]">[% d.os_ver | html_entity %]</a>
|
||||
href="[% search_device %]&q=[% d.os_ver | uri %]&os_ver=[% d.os_ver | uri %]">[% d.os_ver | html_entity %]</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<i class="icon-fullscreen text-info"></i>
|
||||
[% ELSIF row.has_column_loaded('is_free') AND row.is_free %]
|
||||
<i class="icon-arrow-down text-success"></i>
|
||||
[% ELSIF row.up_admin == 'up' AND row.up != 'up' %]
|
||||
[% ELSIF row.up_admin == 'up' AND (row.up != 'up' AND row.up != 'dormant') %]
|
||||
<i class="icon-arrow-down text-error"></i>
|
||||
[% ELSE %]
|
||||
<i class="icon-angle-up text-success"></i>
|
||||
@@ -210,6 +210,7 @@
|
||||
<td>
|
||||
[% IF params.c_neighbors AND (row.remote_ip OR row.is_uplink) %]
|
||||
[% IF row.neighbor %]
|
||||
<i class="icon-link"></i>
|
||||
<a href="[% uri_for('/device',
|
||||
self_options) %]&q=[% row.neighbor.dns || row.neighbor.ip | uri %]&f=[% row.remote_port | uri %]">
|
||||
[% row.neighbor.dns.remove(settings.domain_suffix) || row.neighbor.ip | html_entity %]
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
<tr>
|
||||
<th>
|
||||
<a class="nd_linkcell"
|
||||
href="[% search_device %]&vendor=[% platform.vendor | uri %]">
|
||||
href="[% search_device %]&q=[% platform.vendor | uri %]&vendor=[% platform.vendor | uri %]">
|
||||
[% platform.vendor | html_entity %]</a>
|
||||
</th>
|
||||
<th>
|
||||
<a class="nd_linkcell"
|
||||
href="[% search_device %]&model=[% platform.model | uri %]">
|
||||
href="[% search_device %]&q=[% platform.model | uri %]&model=[% platform.model | uri %]">
|
||||
[% platform.model | html_entity %]</a>
|
||||
</th>
|
||||
<th>[% platform.get_column('count') | html_entity %]</th>
|
||||
@@ -48,7 +48,7 @@
|
||||
<th>[% release.os | html_entity %]</th>
|
||||
<th>
|
||||
<a class="nd_linkcell"
|
||||
href="[% search_device %]&os_ver=[% release.os_ver | uri %]">
|
||||
href="[% search_device %]&q=[% release.os_ver | uri %]&os_ver=[% release.os_ver | uri %]">
|
||||
[% release.os_ver | html_entity %]</a>
|
||||
</th>
|
||||
<th>[% release.get_column('count') | html_entity %]</th>
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
// browser
|
||||
function update_page_title (tab) {
|
||||
var pgtitle = 'Netdisco';
|
||||
if ($('#nd_device-name').text().length) {
|
||||
var pgtitle = $('#nd_device-name').text() +' - '+ $('#'+ tab + '_link').text();
|
||||
if ($.trim($('#nd_device-name').text()).length) {
|
||||
pgtitle = $.trim($('#nd_device-name').text()) +' - '+ $('#'+ tab + '_link').text();
|
||||
}
|
||||
return pgtitle;
|
||||
}
|
||||
@@ -44,14 +44,14 @@
|
||||
}
|
||||
|
||||
// each sidebar search form has a hidden copy of the main navbar search
|
||||
// query. when the tab query takes place, copy the navbar locally, then
|
||||
// replicate to all other tabs.
|
||||
function copy_navbar_to_sidebar (tab) {
|
||||
var form = '#' + tab + '_form';
|
||||
|
||||
// copy navbar value to currently active sidebar form
|
||||
if ($('#nq').val()) {
|
||||
$(form).find("input[name=q]").val( $('#nq').val() );
|
||||
}
|
||||
// then copy to all other inactive tab sidebars
|
||||
$('form').find("input[name=q]").each( function() {
|
||||
$(this).val( $(form).find("input[name=q]").val() );
|
||||
});
|
||||
@@ -63,9 +63,9 @@
|
||||
[% FOREACH tab IN settings._search_tabs %]
|
||||
$('[% "#${tab.tag}_form" %]').submit(function (event) {
|
||||
var pgtitle = update_page_title('[% tab.tag %]');
|
||||
update_csv_download_link('search', '[% tab.tag %]', '[% tab.provides_csv %]');
|
||||
update_browser_history('[% tab.tag %]', pgtitle);
|
||||
copy_navbar_to_sidebar('[% tab.tag %]');
|
||||
update_browser_history('[% tab.tag %]', pgtitle);
|
||||
update_csv_download_link('search', '[% tab.tag %]', '[% tab.provides_csv %]');
|
||||
do_search(event, '[% tab.tag %]');
|
||||
});
|
||||
[% END %]
|
||||
@@ -76,9 +76,9 @@
|
||||
[% FOREACH tab IN settings._device_tabs %]
|
||||
$('[% "#${tab.tag}_form" %]').submit(function (event) {
|
||||
var pgtitle = update_page_title('[% tab.tag %]');
|
||||
update_csv_download_link('device', '[% tab.tag %]', '[% tab.provides_csv %]');
|
||||
update_browser_history('[% tab.tag %]', pgtitle);
|
||||
copy_navbar_to_sidebar('[% tab.tag %]');
|
||||
update_browser_history('[% tab.tag %]', pgtitle);
|
||||
update_csv_download_link('device', '[% tab.tag %]', '[% tab.provides_csv %]');
|
||||
|
||||
[% IF tab.tag == 'ports' %]
|
||||
// to be fair I can't remember why we do this in JS and not from the app
|
||||
@@ -93,7 +93,9 @@
|
||||
|
||||
// form reset icon on ports tab
|
||||
$('#nd_sidebar-reset-link').attr('href', '/device?tab=ports&reset=on&' +
|
||||
$('#ports_form').find('input[name="q"],input[name="f"],input[name="partial"]').serialize())
|
||||
$('#ports_form')
|
||||
.find('input[name="q"],input[name="f"],input[name="partial"],input[name="invert"]')
|
||||
.serialize())
|
||||
[% END %]
|
||||
|
||||
do_search(event, '[% tab.tag %]');
|
||||
|
||||
@@ -88,7 +88,8 @@
|
||||
<input placeholder="Find Anything" class="search-query span3"
|
||||
id="nq" name="q" type="text" autocomplete="off"/>
|
||||
<span style="font-size: 24px;">
|
||||
<i id="navsearchgo" class="icon-search nd_navbar-icon"></i>
|
||||
<i id="navsearchgo" class="icon-search nd_navbar-icon"
|
||||
rel="tooltip" data-placement="bottom" data-offset="5" data-title="New Search" data-container="body"></i>
|
||||
</span>
|
||||
</form>
|
||||
[% IF user_has_role('admin') %]
|
||||
|
||||
@@ -15,6 +15,13 @@
|
||||
<label class="nd_checkboxlabel" for="partial">
|
||||
<span class="nd_port-partial-checkbox uneditable-input">Partial Match</span>
|
||||
</label>
|
||||
<label class="add-on nd_port-invert-label">
|
||||
<input type="checkbox" id="invert"
|
||||
name="invert"[% ' checked="checked"' IF params.invert %]/>
|
||||
</label>
|
||||
<label class="nd_checkboxlabel" for="invert">
|
||||
<span class="nd_port-invert-checkbox uneditable-input">Not</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
@@ -29,12 +36,13 @@
|
||||
<li><i class="icon-li icon-arrow-down text-success"></i> Port Free</li>
|
||||
<li><i class="icon-li icon-remove"></i> Admin Disabled</li>
|
||||
<li><i class="icon-li icon-fullscreen text-info"></i> Blocking</li>
|
||||
<li><i class="icon-li icon-link"></i> Neighbor Device</li>
|
||||
<li><i class="icon-li icon-unlink text-error"></i> Neighbor Inacessible</li>
|
||||
<li><i class="icon-li icon-phone"></i> IP Phone</li>
|
||||
<li><i class="icon-li icon-signal"></i> Wireless Client</li>
|
||||
<li><i class="icon-li icon-book"></i> Archived Data</li>
|
||||
[% IF user_has_role('port_control') %]
|
||||
<li><i class="icon-li icon-refresh"></i> Click "Update View"</li>
|
||||
<li><i class="icon-li icon-refresh icon-spin"></i> Click "Update View"</li>
|
||||
[% END %]
|
||||
</ul>
|
||||
</div>
|
||||
@@ -124,4 +132,5 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<button id="[% tab.id %]_submit" type="submit" class="btn btn-info">Update View</button>
|
||||
<button id="[% tab.id %]_submit" type="submit" class="btn btn-info">
|
||||
<i class="icon-search icon-large pull-left nd_navbar-icon"></i> Update View</button>
|
||||
|
||||
@@ -77,4 +77,5 @@
|
||||
<span class="nd_searchcheckbox uneditable-input">Match All Options</span>
|
||||
</label>
|
||||
</div>
|
||||
<button id="[% tab.id %]_submit" type="submit" class="btn btn-info">Search Again</button>
|
||||
<button id="[% tab.id %]_submit" type="submit" class="btn btn-info">
|
||||
<i class="icon-search icon-large pull-left nd_navbar-icon"></i> Search Devices</button>
|
||||
|
||||
@@ -46,4 +46,5 @@
|
||||
[% END %]
|
||||
</select>
|
||||
</div>
|
||||
<button id="[% tab.id %]_submit" type="submit" class="btn btn-info">Search Again</button>
|
||||
<button id="[% tab.id %]_submit" type="submit" class="btn btn-info">
|
||||
<i class="icon-search icon-large pull-left nd_navbar-icon"></i> Search Nodes</button>
|
||||
|
||||
@@ -10,4 +10,5 @@
|
||||
<span class="nd_searchcheckbox uneditable-input">Partial Name</span>
|
||||
</label>
|
||||
</div>
|
||||
<button id="[% tab.id %]_submit" type="submit" class="btn btn-info">Search Again</button>
|
||||
<button id="[% tab.id %]_submit" type="submit" class="btn btn-info">
|
||||
<i class="icon-search icon-large pull-left nd_navbar-icon"></i> Search Ports</button>
|
||||
|
||||
Reference in New Issue
Block a user