Merge of og-work branch, many new features.

Squashed commit of the following:

commit a43c98962a
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon Jun 3 20:37:39 2013 +0100

    Missing mibdirs causes all MIBs to be loaded (with a warning)

commit 09829a25b8
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon Jun 3 20:07:31 2013 +0100

    local plugins site_plugins dir

commit b0e804e558
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon Jun 3 19:59:04 2013 +0100

    use send_error and redirect from Dancer

commit 3d1185261a
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon Jun 3 19:13:40 2013 +0100

    support path config option

commit 31ca119f84
Merge: 9a79855 4d2b3a5
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon Jun 3 00:06:17 2013 +0100

    Merge remote-tracking branch 'origin/og-work' into og-work
    g-work"

    This reverts commit 9a79855361, reversing
    changes made to 6fd6118354.

    Conflicts:
    	Netdisco/share/views/plugin/device_port_column/c_observiumsparklines.tt

commit 9a79855361
Merge: 6fd6118 c8c3b82
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon Jun 3 00:03:32 2013 +0100

    Merge remote-tracking branch 'origin/master' into og-work

commit 6fd6118354
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun Jun 2 15:47:45 2013 +0100

    extra note about behind proxy

commit 798086ca29
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun Jun 2 15:30:26 2013 +0100

    complete the observium plugin

commit 66b3ced179
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun Jun 2 12:48:06 2013 +0100

    Plugins can have CSS and Javascript loaded within <head>

commit 4d2b3a5307
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Thu May 30 08:50:16 2013 +0100

    get device dns to port template

commit ed1bfa1ae7
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Thu May 30 08:17:02 2013 +0100

    observium sparklines plugin; support X:: namespace

commit 76b7636c74
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Thu May 30 06:30:06 2013 +0100

    rename private settings keys

commit fdac8f6c33
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Thu May 30 05:59:53 2013 +0100

    add macwalk and arpnip buttons to device details

commit 3d688c7d83
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Thu May 30 05:57:20 2013 +0100

    Revert "reduce refresh to 5sec"

    This reverts commit 8ea9ec7dd9.

commit dc62382112
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Thu May 30 05:50:34 2013 +0100

    support for arpwalk and macwalk and all jobs via web

commit 8bc7d83c98
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Thu May 30 05:35:41 2013 +0100

    simplify discover options to only discoverall and discover

commit 8ea9ec7dd9
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Wed May 29 20:23:08 2013 +0100

    reduce refresh to 5sec

commit 8c54e6c58b
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Wed May 29 20:11:06 2013 +0100

    show undiscovered neighbor properly

commit e0ee25628f
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Wed May 29 19:54:09 2013 +0100

    avoid unecessary log for queueing

commit d5565423f2
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Wed May 29 19:51:37 2013 +0100

    avoid warning on undefined remote type

commit 5d9b58a6b2
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Wed May 29 19:48:22 2013 +0100

    avoid explosion when not admin

commit 377bb942e0
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Wed May 29 19:46:52 2013 +0100

    avoid undefined warning

commit 08806dcfa2
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Wed May 29 19:46:42 2013 +0100

    get_db_version will be 0 at first deploy

commit 9511c17056
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Wed May 29 19:15:55 2013 +0100

    fix name of Template module

commit eb0288de35
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue May 28 07:17:07 2013 +0100

    initial config settings documentation

commit 7f2ea7f8dc
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon May 27 15:18:15 2013 +0100

    remove check_mac to own module, use in macsuck too

commit b995cf6398
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon May 27 15:01:29 2013 +0100

    show probable but undiscovered neighbor is ports display

commit dd8d461188
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon May 27 14:52:41 2013 +0100

    new schema version for is_uplink and is_uplink_admin

commit 3f6a7b5aa2
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon May 27 14:47:59 2013 +0100

    make sure device_port is updated when manual_topo is set

commit 33bf9a6599
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun May 26 19:51:49 2013 +0100

    export store_arp and store_node

commit 0ed356d560
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat May 25 17:12:31 2013 +0100

    use row lock not table lock

commit f830bc3a3b
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat May 25 16:38:33 2013 +0100

    move macsuck/arpnip/discover to ::Core namespace

commit be40788987
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Fri May 24 21:10:34 2013 +0100

    add maybe_uplink to device_port; more macsuck implementation

commit 88371026d5
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Fri May 24 14:34:58 2013 +0100

    start on macsuck; tweak update locking

commit 6f7c87ac07
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Fri May 24 13:10:58 2013 +0100

    ORDER BY ... FOR UPDATE will allow us to avoid table lock

commit 7c438e01fc
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Fri May 24 12:12:46 2013 +0100

    yet more efficient arpnip

commit c74c56dc02
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Fri May 24 11:34:23 2013 +0100

    guard against race with *_or_* DBIC methods

commit d50c54972e
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon May 20 23:42:41 2013 +0100

    more efficient arpnip

commit 73c8979130
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun May 19 22:52:15 2013 +0100

    fix confusing name

commit bf78e82411
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun May 19 22:37:22 2013 +0100

    fix mistake in DBIx::Class schema

commit 6a5af95836
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun May 19 22:06:27 2013 +0100

    arpnip implementation

commit 594abd3f82
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Thu May 16 00:00:50 2013 +0100

    PostgreSQL explicit locking support.

    Squashed commit of the following:

    commit 76e1539102
    Author: Oliver Gorwits <oliver@cpan.org>
    Date:   Wed May 15 23:54:25 2013 +0100

        finished explicit locking module

    commit 369387258b
    Author: Oliver Gorwits <oliver@cpan.org>
    Date:   Tue May 14 23:50:42 2013 +0100

        initial implementation of locking from schema object

commit 55c6d4fe63
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue May 14 21:05:01 2013 +0100

    add discover button to device details page

commit 11fd8bf964
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue May 14 20:43:43 2013 +0100

    fix typo and clear port box on autocomplete dropdown

commit a00f9b5c2e
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue May 14 20:38:54 2013 +0100

    move admin tasks and remove JobControl package

commit 74bc0023df
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat May 11 18:25:04 2013 +0100

    complete job queue delete and kill running timers properly when reloading page

commit dd6947f38d
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat May 11 16:51:28 2013 +0100

    fix improper use of bootstrap table class

commit cd5b83f71e
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat May 11 15:55:45 2013 +0100

    fix update view icon in sidebar

commit e9349f325d
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat May 11 11:57:19 2013 +0100

    css audit

commit 201470275d
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Thu May 9 23:48:05 2013 +0100

    add job queue to standard plugins list

commit a18a3c72a3
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Thu May 9 23:37:43 2013 +0100

    fix table headings and improve Action display in Job Queue

commit 70f5da8bb6
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Thu May 9 23:30:32 2013 +0100

    implement "no devices" prompt for admin users to do first discover

commit 2e8ac83173
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Thu May 9 21:53:39 2013 +0100

    more js refactoring for report and search

commit 479ac0e55d
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Thu May 9 21:50:29 2013 +0100

    refactor js for device tabs

commit 6a17fe5d6c
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Thu May 9 21:05:42 2013 +0100

    fix crazy races with javasacript by using global delegations

commit e94e3cef3b
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Wed May 8 23:06:41 2013 +0100

    remove Try::Tiny from web runtime

commit c746e68b9b
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue May 7 21:54:11 2013 +0100

    make topo autocomplete more responsive

commit 24c511786f
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue May 7 21:52:17 2013 +0100

    display name and IP for device typeahead

commit 52ab7d1266
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue May 7 21:47:05 2013 +0100

    add drop-down control for the topo form fields

commit 5744b6845f
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue May 7 21:25:30 2013 +0100

    complete the topology editor (add/delete)

commit b510fbe8c5
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue May 7 00:59:11 2013 +0100

    add new admin tasks to default plugins list

commit 11d55e0129
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Tue May 7 00:56:19 2013 +0100

    Manual Device Topology

    Needed to add the 'autocomplete' jQuery UI component because
    it can do minLength=0 properly. Used the smoothness UI theme.

    Added typeahead AJAX calls to support the topology searching.

    Added new plugin and template for the topology editing page.

commit bf7a419d08
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon May 6 22:16:24 2013 +0100

    add a little colour to lone tab titles

commit 9690a31f19
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon May 6 22:01:13 2013 +0100

    complete Manage Pseudo Devices

commit 024f4d9a83
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon May 6 00:49:47 2013 +0100

    use bootstrap font colour instead of css

commit f75f1e5cbf
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon May 6 00:45:18 2013 +0100

    add frontend update/del forms, and display port count

commit f0899e16b3
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun May 5 23:53:20 2013 +0100

    add frontend pseudo device add form

commit 3271c01931
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun May 5 21:45:17 2013 +0100

    complete the code for admin tasks page loading

commit 38f70624f3
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun May 5 17:04:30 2013 +0100

    set up file paths consistently in all scripts

commit c761ca839b
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun May 5 17:00:30 2013 +0100

    Helper script to import the Netdisco 1.x Topology file to the database

commit f468b48049
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun May 5 16:20:39 2013 +0100

    Handle whitespace ahead of OUI data

commit 5c8a5754f6
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun May 5 16:16:20 2013 +0100

    also set neighbor info when discovering device interfaces

commit acb988b6af
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun May 5 15:34:20 2013 +0100

    try to avoid duplicate execution of scheduled jobs

commit c6bcaf66c5
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun May 5 14:16:25 2013 +0100

    do not clobber manual topo when discovering neighbors

commit d9a6a1882a
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sun May 5 13:02:45 2013 +0100

    User icon color indicates port_control/admin ability

commit 2cdcb9db7e
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon Apr 29 23:34:27 2013 +0100

    add support for admin tasks as plugins

commit 075a770c9a
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon Apr 29 22:23:20 2013 +0100

    skip pseudo devices (vendor netdisco)

commit 045c022d42
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon Apr 29 21:58:33 2013 +0100

    incorporate manual topo info from the topology db table

commit 09285d42b4
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat Apr 27 18:39:12 2013 +0100

    add unique constraints to topology table

commit 2780b72e49
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat Apr 27 15:38:05 2013 +0100

    muted help text in sidebar

commit 733d4f83fb
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat Apr 27 14:39:54 2013 +0100

    sorry, testing hook changes

commit 71e366e352
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat Apr 27 14:34:36 2013 +0100

    sorry, testing hook changes

commit 7f9eaa99f5
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat Apr 27 14:33:44 2013 +0100

    sorry, testing hook changes

commit 5215fd632d
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat Apr 27 14:30:07 2013 +0100

    sorry, testing hook changes

commit be817d60c2
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat Apr 27 14:21:45 2013 +0100

    sorry, testing hook changes

commit 1fd3695358
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat Apr 27 14:18:57 2013 +0100

    sorry, testing hook changes

commit ac448c4a91
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat Apr 27 14:13:03 2013 +0100

    sorry, testing hook changes

commit c563b8d9af
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat Apr 27 14:08:54 2013 +0100

    sorry, testing hook changes

commit 3abcfb01d5
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat Apr 27 14:06:25 2013 +0100

    sorry, testing hook changes

commit 877a81facf
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Sat Apr 27 14:05:25 2013 +0100

    sorry, testing hook changes
This commit is contained in:
Oliver Gorwits
2013-06-03 20:38:33 +01:00
parent c8c3b82238
commit 4d0e2461f5
119 changed files with 3524 additions and 778 deletions

View File

@@ -0,0 +1,42 @@
<i class="nd_sidebar-toggle icon-wrench icon-large" id="nd_sidebar-toggle-img-out"
rel="tooltip" data-placement="left" data-offset="5" data-title="Show Sidebar"></i>
<div class="container-fluid">
<div class="nd_sidebar nd_sidebar-pinned">
<div class="well">
<i class="nd_sidebar-toggle icon-signout" id="nd_sidebar-toggle-img-in"
rel="tooltip" data-placement="left" data-offset="5" data-title="Hide Sidebar"></i>
<i class="nd_sidebar-pin icon-pushpin nd_sidebar-pin-clicked"
rel="tooltip" data-placement="left" data-offset="5" data-title="Unpin Sidebar"></i>
<div class="tab-content">
<div id="[% task.tag %]_search" class="tab-pane active">
<form id="[% task.tag %]_form" class="nd_sidebar-form form-stacked"
method="get" action="[% uri_for('/admin') %]">
[% TRY %]
[% INCLUDE "sidebar/admintask/${task.tag}.tt" %]
<script type="text/javascript">has_sidebar["[% task.tag %]"] = 1;</script>
[% CATCH %]
<script type="text/javascript">has_sidebar["[% task.tag %]"] = 0;</script>
[% END %]
</form>
</div> <!-- /tab-pane -->
</div> <!-- /tab-content -->
</div>
</div>
<div class="content">
<ul id="nd_search-results" class="nav nav-tabs">
<li class="active"><a id="[% task.tag %]_link" class="nd_single-tab"
href="#[% task.tag %]_pane">[% task.label %]</a></li>
[% IF task.tag == 'jobqueue' %]
<span id="nd_device-name"></span>
[% END %]
</ul>
<div class="tab-content">
<div class="tab-pane active" id="[% task.tag %]_pane"></div>
</div>
</div>
<script type="text/javascript">
[%+ INCLUDE 'js/admintask.js' -%]
</script>

View File

@@ -0,0 +1,51 @@
<table class="table table-bordered table-condensed table-hover">
<thead>
<tr>
<th class="nd_center-cell">Entered</th>
<th class="nd_center-cell">Action</th>
<th class="nd_center-cell">Status</th>
<th class="nd_center-cell">Device</th>
<th class="nd_center-cell">Port</th>
<th class="nd_center-cell">Param</th>
<th class="nd_center-cell">User</th>
<th class="nd_center-cell">Started</th>
<th class="nd_center-cell">Finished</th>
<th class="nd_center-cell">Action</th>
</tr>
</thead>
</tbody>
[% WHILE (row = results.next) %]
<tr
[% ' class="success"' IF row.status == 'done' %]
[% ' class="error"' IF row.status == 'error' %]
[% ' class="info"' IF row.status.search('^queued-') %]
>
<td class="nd_center-cell">[% row.entered_stamp | html_entity %]</td>
<td class="nd_center-cell">
[% FOREACH word IN row.action.split('_') %]
[% word.ucfirst | html_entity %]&nbsp;
[% END %]
</td>
[% IF row.status.search('^queued-') %]
<td class="nd_center-cell">Running on &quot;[% row.status.remove('^queued-') | html_entity %]&quot;</td>
[% ELSE %]
<td class="nd_center-cell">[% row.status.ucfirst | html_entity %]</td>
[% END %]
<td class="nd_center-cell"><a class="nd_linkcell"
href="[% uri_for('/device') %]?q=[% row.device | uri %]">[% row.device | html_entity %]</a></td>
<td class="nd_center-cell">[% row.port | html_entity %]</td>
<td class="nd_center-cell">[% row.subaction | html_entity %]</td>
<td class="nd_center-cell">[% row.username | html_entity %]</td>
<td class="nd_center-cell">[% row.started_stamp | html_entity %]</td>
<td class="nd_center-cell">[% row.finished_stamp | html_entity %]</td>
<td class="nd_center-cell">
<form name="del" class="nd_inline-form">
<input name="job" type="hidden" value="[% row.job | html_entity %]">
<button class="btn" name="del" type="submit"><i class="icon-trash text-error"></i></button>
</form>
</td>
</tr>
[% END %]
</tbody>
</table>

View File

@@ -0,0 +1,44 @@
<table class="table table-bordered table-striped">
<thead>
<tr>
<th class="nd_center-cell">Device Name</th>
<th class="nd_center-cell">Device IP</th>
<th class="nd_center-cell">Number of Ports</th>
<th class="nd_center-cell">Action</th>
</tr>
</thead>
</tbody>
<tr>
<form name="add">
<td class="nd_center-cell"><input name="dns" type="text"></td>
<td class="nd_center-cell"><input name="ip" type="text"></td>
<td class="nd_center-cell"><input name="ports" type="number"></td>
<td class="nd_center-cell">
<button class="btn btn-small" name="add" type="submit"><i class="icon-plus-sign"></i> Add</button>
</td>
</form>
</tr>
[% WHILE (row = results.next) %]
<tr>
<form name="update">
<td class="nd_center-cell"><a class="nd_linkcell"
href="[% uri_for('/device') %]?q=[% row.dns | uri %]">[% row.dns | html_entity %]</a></td>
<td class="nd_center-cell">[% row.ip | html_entity %]</td>
<td class="nd_center-cell"><input name="ports" type="number" value="[% row.port_count | html_entity %]"></td>
<td class="nd_center-cell">
<input name="dns" type="hidden" value="[% row.dns | html_entity %]">
<input name="ip" type="hidden" value="[% row.ip | html_entity %]">
<button class="btn" name="update" type="submit"><i class="icon-save text-warning"></i></button>
</form>
<form name="del" class="nd_inline-form">
<input name="dns" type="hidden" value="[% row.dns | html_entity %]">
<input name="ip" type="hidden" value="[% row.ip | html_entity %]">
<input name="ports" type="hidden" value="[% row.port_count | html_entity %]">
<button class="btn" name="del" type="submit"><i class="icon-trash text-error"></i></button>
</form>
</td>
</tr>
[% END %]
</tbody>
</table>

View File

@@ -0,0 +1,64 @@
<table class="table table-bordered table-striped">
<thead>
<tr>
<th class="nd_center-cell">Left Device</th>
<th class="nd_center-cell">Left Port</th>
<th class="nd_center-cell">Right Device</th>
<th class="nd_center-cell">Right Port</th>
<th class="nd_center-cell">Action</th>
</tr>
</thead>
</tbody>
<tr>
<form name="add">
<td class="nd_center-cell">
<div class="input-append">
<input class="nd_topo_dev nd_topo_dev1" name="dev1" type="text">
<span class="add-on nd_topo_dev_caret"><i class="icon-caret-down icon-large"></i></span>
</div>
</td>
<td class="nd_center-cell">
<div class="input-append">
<input class="nd_topo_port nd_topo_dev1" name="port1" type="text">
<span class="add-on nd_topo_port_caret"><i class="icon-caret-down icon-large"></i></span>
</div>
</td>
<td class="nd_center-cell">
<div class="input-append">
<input class="nd_topo_dev nd_topo_dev2" name="dev2" type="text">
<span class="add-on nd_topo_dev_caret"><i class="icon-caret-down icon-large"></i></span>
</div>
</td>
<td class="nd_center-cell">
<div class="input-append">
<input class="nd_topo_port nd_topo_dev2" name="port2" type="text">
<span class="add-on nd_topo_port_caret"><i class="icon-caret-down icon-large"></i></span>
</div>
</td>
<td class="nd_center-cell">
<button class="btn btn-small" name="add" type="submit"><i class="icon-plus-sign"></i> Add</button>
</td>
</form>
</tr>
[% WHILE (row = results.next) %]
<tr>
<form name="del">
<td class="nd_center-cell"><a class="nd_linkcell"
href="[% uri_for('/device') %]?q=[% row.dev1 | uri %]">[% row.dev1 | html_entity %]</a></td>
<td class="nd_center-cell">[% row.port1 | html_entity %]</td>
<td class="nd_center-cell"><a class="nd_linkcell"
href="[% uri_for('/device') %]?q=[% row.dev2 | uri %]">[% row.dev2 | html_entity %]</a></td>
<td class="nd_center-cell">[% row.port2 | html_entity %]</td>
<td class="nd_center-cell">
<input name="dev1" type="hidden" value="[% row.dev1 | html_entity %]">
<input name="port1" type="hidden" value="[% row.port1 | html_entity %]">
<input name="dev2" type="hidden" value="[% row.dev2 | html_entity %]">
<input name="port2" type="hidden" value="[% row.port2 | html_entity %]">
<button class="btn" name="del" type="submit"><i class="icon-trash text-error"></i></button>
</form>
</td>
</tr>
[% END %]
</tbody>
</table>

View File

@@ -1,9 +1,9 @@
<table class="table-bordered table-condensed table-striped">
<table class="table table-bordered table-condensed table-striped">
<thead>
<tr>
<th>Address</th>
<th>DNS</th>
<th class="center_cell">Interface</th>
<th class="nd_center-cell">Interface</th>
<th>Description</th>
<th>Prefix</th>
</tr>
@@ -13,7 +13,7 @@
<tr>
<td>[% row.alias | html_entity %]</a>
<td>[% row.dns | html_entity %]</a>
<td class="center_cell"><a class="nd_linkcell"
<td class="nd_center-cell"><a class="nd_linkcell"
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"

View File

@@ -1,4 +1,4 @@
<table class="table-condensed table-striped">
<table class="table table-condensed table-striped">
</tbody>
<tr>
<td>System Name</td>
@@ -7,11 +7,11 @@
<tr>
<td>Location
[% IF vars.user.port_control %]
<i class="icon-edit nd_edit_icon nd_device_details_edit"></i>
<i class="icon-edit nd_edit-icon nd_device-details-edit"></i>
[% END %]
</td>
[% IF vars.user.port_control %]
<td class="nd_editable_cell" contenteditable="true"
<td class="nd_editable-cell" contenteditable="true"
data-field="location" data-for-device="[% d.ip %]">
[% d.location | html_entity %]
</td>
@@ -25,11 +25,11 @@
<tr>
<td>Contact
[% IF vars.user.port_control %]
<i class="icon-edit nd_edit_icon nd_device_details_edit"></i>
<i class="icon-edit nd_edit-icon nd_device-details-edit"></i>
[% END %]
</td>
[% IF vars.user.port_control %]
<td class="nd_editable_cell" contenteditable="true"
<td class="nd_editable-cell" contenteditable="true"
data-field="contact" data-for-device="[% d.ip | html_entity %]">
[% d.contact | html_entity %]
</td>
@@ -93,5 +93,24 @@
<td>VTP Domain</td>
<td>[% d.vtp_domain | html_entity %]</td>
</tr>
[% IF vars.user.admin %]
<tr>
<td>Admin Tasks</td>
<td>
<form method="post" class="nd_inline-form" action="[% uri_for('/admin/discover') %]">
<input type="hidden" value="[% d.ip %]" name="device" type="text"/>
<button type="submit" class="btn btn-info btn-small">Discover</button>
</form>
<form method="post" class="nd_inline-form" action="[% uri_for('/admin/arpnip') %]">
<input type="hidden" value="[% d.ip %]" name="device" type="text"/>
<button type="submit" class="btn btn-info btn-small">Arpnip</button>
</form>
<form method="post" class="nd_inline-form" action="[% uri_for('/admin/macsuck') %]">
<input type="hidden" value="[% d.ip %]" name="device" type="text"/>
<button type="submit" class="btn btn-info btn-small">Macsuck</button>
</form>
</td>
</tr>
[% END %]
</tbody>
</table>

View File

@@ -1,4 +1,4 @@
<table class="table-bordered table-condensed table-striped">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th></th>
@@ -6,7 +6,10 @@
[% NEXT IF item.name == 'c_admin' %]
[% NEXT IF item.name == 'c_nodes' AND params.c_nodes AND params.c_neighbors %]
[% NEXT UNLESS params.${item.name} %]
<th[% ' class="center_cell"' IF NOT loop.first %]>[% item.label | html_entity %]</th>
<th[% ' class="nd_nudge-for-icon"' IF
(vars.user.port_control AND params.c_admin AND (item.name == 'c_port' OR item.name == 'c_name')) %]>
[% item.label | html_entity %]
</th>
[% END %]
</tr>
</thead>
@@ -25,87 +28,109 @@
[% END %]
</td>
[% FOREACH config IN settings._extra_device_port_cols %]
[% NEXT UNLESS config.position == 'left' AND params.${config.name} %]
<td>
[% TRY %]
[% INCLUDE "plugin/${config.name}/device_port_column.tt" %]
[% CATCH %]
<!-- dummy content required by Template Toolkit TRY -->
[% END %]
</td>
[% END %]
[% IF params.c_port %]
[% IF vars.user.port_control AND params.c_admin %]
[% IF row.up_admin == 'up' %]
<td nowrap class="nd_editable_cell" data-action="down"
data-field="c_port" data-for-device="[% device | html_entity %]" data-for-port="[% row.port | html_entity %]">
<i class="icon-hand-down nd_hand_icon"
<td nowrap class="nd_editable-cell" data-action="down"
data-field="c_port" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
<i class="icon-hand-down nd_hand-icon"
rel="tooltip" data-placement="top" data-offset="3"
data-animation="" data-title="Click to Disable"></i>
[% ELSE %]
<td nowrap class="nd_editable_cell" data-action="up"
data-field="c_port" data-for-device="[% device | html_entity %]" data-for-port="[% row.port | html_entity %]">
<i class="icon-hand-up nd_hand_icon"
<td nowrap class="nd_editable-cell" data-action="up"
data-field="c_port" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
<i class="icon-hand-up nd_hand-icon"
rel="tooltip" data-placement="top" data-offset="3"
data-animation="" data-title="Click to Enable"></i>
[% END %]
[% ELSE %]
<td nowrap>
[% END %]
<a class="nd_linkcell nd_this_port_only" href="[% uri_for('/device',
<a class="nd_linkcell nd_this-port-only" href="[% uri_for('/device',
self_options) %]&q=[% params.q | uri %]&f=[% row.port | uri %]">
[% row.port | html_entity %]
</a></td>
[% END %]
[% FOREACH config IN settings._extra_device_port_cols %]
[% NEXT UNLESS config.position == 'mid' AND params.${config.name} %]
<td>
[% TRY %]
[% INCLUDE "plugin/${config.name}/device_port_column.tt" %]
[% CATCH %]
<!-- dummy content required by Template Toolkit TRY -->
[% END %]
</td>
[% END %]
[% IF params.c_descr %]
<td nowrap class="center_cell">[% row.descr | html_entity %]</td>
<td nowrap>[% row.descr | html_entity %]</td>
[% END %]
[% IF params.c_type %]
<td class="center_cell">[% row.type | html_entity %]</td>
<td>[% row.type | html_entity %]</td>
[% END %]
[% IF params.c_duplex %]
<td class="center_cell">
<td>
[% IF row.up == 'up' AND row.duplex %]
[% row.duplex_admin | html_entity %] / [% row.duplex | html_entity %]
[% row.duplex_admin.ucfirst | html_entity %] / [% row.duplex.ucfirst | html_entity %]
[% END %]
</td>
[% END %]
[% IF params.c_lastchange %]
<td class="center_cell">[% row.lastchange_stamp | html_entity %]</td>
<td>[% row.lastchange_stamp | html_entity %]</td>
[% END %]
[% IF params.c_name %]
[% IF vars.user.port_control AND params.c_admin %]
<td nowrap class="center_cell nd_editable_cell" contenteditable="true"
data-field="c_name" data-for-device="[% device | html_entity %]" data-for-port="[% row.port | html_entity %]">
<i class="icon-edit nd_edit_icon"></i>
<td nowrap class="nd_editable-cell" contenteditable="true"
data-field="c_name" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
<i class="icon-edit nd_edit-icon"></i>
[% ELSE %]
<td nowrap class="center_cell">
<td nowrap>
[% END %]
<div class="nd_editable_cell_content">
<div class="nd_editable-cell-content">
[% row.name | html_entity %]
</div>
</td>
[% END %]
[% IF params.c_speed %]
<td class="center_cell">[% row.speed | html_entity %]</td>
<td>[% row.speed | html_entity %]</td>
[% END %]
[% IF params.c_mac %]
<td class="center_cell">[% row.mac | html_entity %]</td>
<td>[% row.mac | html_entity %]</td>
[% END %]
[% IF params.c_mtu %]
<td class="center_cell">[% row.mtu | html_entity %]</td>
<td>[% row.mtu | html_entity %]</td>
[% END %]
[% IF params.c_vlan %]
[% IF vars.user.port_control AND params.c_admin %]
<td class="center_cell nd_editable_cell" contenteditable="true"
data-field="c_vlan" data-for-device="[% device | html_entity %]" data-for-port="[% row.port | html_entity %]">
<i class="icon-edit nd_edit_icon"></i>
<div class="nd_editable_cell_content">
<td class="nd_editable-cell" contenteditable="true"
data-field="c_vlan" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
<i class="icon-edit nd_edit-icon"></i>
<div class="nd_editable-cell-content">
[% IF row.vlan %][% row.vlan | html_entity %][% END %]
</div>
</td>
[% ELSE %]
<td class="center_cell">
<td>
<a class="nd_linkcell"
href="[% uri_for('/search') %]?tab=vlan&q=[% row.vlan | uri %]">
[% row.vlan | html_entity %]</a>
@@ -123,11 +148,10 @@
[% SET output = output _ ', ' IF NOT loop.last %]
[% END %]
[% IF row.tagged_vlans_count > 10 %] [%# TODO make this a settable variable %]
[% SET output = '<div class="vlan_total">(' _ row.tagged_vlans_count
_ ')</div><span class="nd_linkcell nd_collapse_vlans">
<i class="cell-arrow-up-down icon-chevron-up icon-large">
</i>Show VLANs</span>
<div class="nd_collapsing nd_collapse_pre_hidden">' _ output %]
[% SET output = '<div class="nd_vlan-total">(' _ row.tagged_vlans_count
_ ')</div><span class="nd_linkcell nd_collapse-vlans">
<div class="nd_arrow-up-down-left icon-chevron-up icon-large"></div>Show VLANs</span>
<div class="nd_collapsing nd_collapse-pre-hidden">' _ output %]
[% SET output = output _ '</div>' %]
[% END %]
[% output %]
@@ -140,15 +164,15 @@
[% IF row.power.admin == 'true' %]
[% IF vars.user.port_control AND params.c_admin %]
<td nowrap data-action="false"
data-field="c_power" data-for-device="[% device | html_entity %]"
data-field="c_power" data-for-device="[% device.ip | html_entity %]"
data-for-port="[% row.port | html_entity %]">
<i class="icon-off nd_power_icon nd_power_on"
<i class="icon-off nd_power-icon nd_power-on"
rel="tooltip" data-placement="top" data-offset="3"
data-animation="" data-title="Click to Disable"></i>
[% ELSE %]
<td nowrap>
<i class="icon-off nd_power_on"></i>
<i class="icon-off nd_power-on"></i>
[% END %]
<span>
[% IF row.power.power > 0 %]
@@ -160,10 +184,10 @@
[% ELSE %]
[% IF vars.user.port_control AND params.c_admin %]
<td nowrap data-action="true"
data-field="c_power" data-for-device="[% device | html_entity %]"
data-field="c_power" data-for-device="[% device.ip | html_entity %]"
data-for-port="[% row.port | html_entity %]">
<i class="icon-off nd_power_icon"
<i class="icon-off nd_power-icon"
rel="tooltip" data-placement="top" data-offset="3"
data-animation="" data-title="Click to Enable"></i>
[% ELSE %]
@@ -179,22 +203,25 @@
[% IF params.c_nodes OR params.c_neighbors %]
<td>
[% IF params.c_neighbors AND row.remote_ip %]
[% IF params.c_neighbors AND (row.remote_ip OR row.is_uplink) %]
[% IF row.neighbor %]
<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 %]
([% row.remote_port | html_entity %])</a>
[% ELSE %]
[% ELSIF row.remote_ip AND row.remote_port %]
<span class="label label-important">N</span>
<a href="[% search_node %]&q=[% row.remote_ip | uri %]">
[% row.remote_ip | html_entity %] (port: [% row.remote_port | html_entity %]
id: [% (row.remote_type _ ' / ') IF row.remote_type %][% row.remote_id | html_entity %])</a>
[% ' id: '_ row.remote_type IF row.remote_type%]
[% ' type: '_ row.remote_id IF row.remote_id%])</a>
[% ELSE %]
<span class="label label-important">N</span> (probable neighbor)
[% END %]
[% END %]
[% IF params.c_nodes %]
[% FOREACH node IN row.$nodes %]
[% '<br/>' IF row.remote_ip OR NOT loop.first %]
[% '<br/>' IF (row.remote_ip OR row.is_uplink) OR NOT loop.first %]
[% '<span class="label label-warning">A</span> &nbsp;' IF NOT node.active %]
<a href="[% search_node %]&q=[% node.net_mac.$mac_format_call | uri %]">
[% node.net_mac.$mac_format_call | html_entity %]</a>
@@ -216,14 +243,25 @@
[% END %]
[% IF params.c_stp %]
<td class="center_cell">[% row.stp | html_entity %]</td>
<td>[% row.stp | html_entity %]</td>
[% END %]
[% IF params.c_up %]
<td class="center_cell">
[% row.up_admin | html_entity %] / [% row.up | html_entity %]
<td>
[% row.up_admin.ucfirst | html_entity %] / [% row.up.ucfirst | html_entity %]
</td>
[% END %]
[% FOREACH config IN settings._extra_device_port_cols %]
[% NEXT UNLESS config.position == 'right' AND params.${config.name} %]
<td>
[% TRY %]
[% INCLUDE "plugin/${config.name}/device_port_column.tt" %]
[% CATCH %]
<!-- dummy content required by Template Toolkit TRY -->
[% END %]
</td>
[% END %]
</tr>
[% END %]
</tbody>

View File

@@ -1,28 +1,28 @@
<table class="table-bordered table-condensed table-striped">
<table class="table table-bordered table-condensed table-striped">
<thead>
<tr>
<th class="center_cell">Left Device</th>
<th class="center_cell">Interface</th>
<th class="center_cell">Duplex</th>
<th class="center_cell">Right Device</th>
<th class="center_cell">Interface</th>
<th class="center_cell">Duplex</th>
<th class="nd_center-cell">Left Device</th>
<th class="nd_center-cell">Interface</th>
<th class="nd_center-cell">Duplex</th>
<th class="nd_center-cell">Right Device</th>
<th class="nd_center-cell">Interface</th>
<th class="nd_center-cell">Duplex</th>
</tr>
</thead>
</tbody>
[% WHILE (row = results.next) %]
<tr>
<td class="center_cell">[% row.left_dns || row.left_ip | html_entity %]</a>
<td class="center_cell"><a class="nd_linkcell"
<td class="nd_center-cell">[% row.left_dns || row.left_ip | html_entity %]</a>
<td class="nd_center-cell"><a class="nd_linkcell"
href="[% device_ports %]&q=[% row.left_dns || row.left_ip | uri %]&f=[% row.left_port | uri %]&c_duplex=on">
[% row.left_port | html_entity %]</a></td>
<td class="center_cell">[% row.left_duplex.ucfirst | html_entity %]</td>
<td class="nd_center-cell">[% row.left_duplex.ucfirst | html_entity %]</td>
<td class="center_cell">[% row.right_dns || row.right_ip | html_entity %]</a>
<td class="center_cell"><a class="nd_linkcell"
<td class="nd_center-cell">[% row.right_dns || row.right_ip | html_entity %]</a>
<td class="nd_center-cell"><a class="nd_linkcell"
href="[% device_ports %]&q=[% row.right_dns || row.right_ip | uri %]&f=[% row.right_port | uri %]&c_duplex=on">
[% row.right_port | html_entity %]</a></td>
<td class="center_cell">[% row.right_duplex.ucfirst | html_entity %]</td>
<td class="nd_center-cell">[% row.right_duplex.ucfirst | html_entity %]</td>
</tr>
[% END %]
</tbody>

View File

@@ -1,4 +1,4 @@
<table class="table-bordered table-condensed table-striped">
<table class="table table-bordered table-condensed table-striped">
<thead>
<tr>
<th>Device</th>

View File

@@ -1,4 +1,4 @@
<table class="table-bordered table-condensed table-striped">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>MAC</th>

View File

@@ -1,4 +1,4 @@
<table class="table-bordered table-condensed table-striped">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>MAC</th>

View File

@@ -1,4 +1,4 @@
<table class="table-bordered table-condensed table-striped">
<table class="table table-bordered table-condensed table-striped">
<thead>
<tr>
<th>Description</th>

View File

@@ -1,4 +1,4 @@
<table class="table-bordered table-condensed table-striped">
<table class="table table-bordered table-condensed table-striped">
<thead>
<tr>
<th>Vlan</th>
@@ -12,17 +12,17 @@
</tbody>
[% WHILE (row = results.next) %]
<tr>
<td><a class="nd_linkcell nd_stealthlink"
<td><a class="nd_linkcell nd_stealth-link"
href="[% device_ports %]&q=[% row.dns || row.ip | uri %]&f=[% row.vlan.vlan | uri %]">[% row.vlan.vlan | html_entity %]</a></td>
<td><a class="nd_linkcell"
href="[% device_ports %]&q=[% row.dns || row.ip | uri %]&f=[% row.vlan.vlan | uri %]">[% row.dns || row.ip | html_entity %]</a></td>
<td><a class="nd_linkcell nd_stealthlink"
<td><a class="nd_linkcell nd_stealth-link"
href="[% device_ports %]&q=[% row.dns || row.ip | uri %]&f=[% row.vlan.vlan | uri %]">[% row.vlan.description | html_entity %]</a></td>
<td><a class="nd_linkcell nd_stealthlink"
<td><a class="nd_linkcell nd_stealth-link"
href="[% device_ports %]&q=[% row.dns || row.ip | uri %]&f=[% row.vlan.vlan | uri %]">[% row.model | html_entity %]</a></td>
<td><a class="nd_linkcell nd_stealthlink"
<td><a class="nd_linkcell nd_stealth-link"
href="[% device_ports %]&q=[% row.dns || row.ip | uri %]&f=[% row.vlan.vlan | uri %]">[% row.os | html_entity %]</a></td>
<td><a class="nd_linkcell nd_stealthlink"
<td><a class="nd_linkcell nd_stealth-link"
href="[% device_ports %]&q=[% row.dns || row.ip | uri %]&f=[% row.vlan.vlan | uri %]">[% row.vendor | html_entity %]</a></td>
</tr>
[% END %]

View File

@@ -1,6 +1,6 @@
<i class="sidebar_toggle icon-wrench icon-large" id="sidebar_toggle_img_out"
<i class="nd_sidebar-toggle icon-wrench icon-large" id="nd_sidebar-toggle-img-out"
rel="tooltip" data-placement="left" data-offset="5" data-title="Show Sidebar"></i>
<i class="icon-question-sign icon-large" id="netmap_help_img" rel="popover"
<i class="icon-question-sign icon-large" id="nd_netmap-help" rel="popover"
data-title="Neighbor Map Controls"
data-html="true"
data-content="
@@ -12,16 +12,16 @@
</ul>"
data-placement='left' data-trigger='click'></i>
<div class="container-fluid">
<div class="sidebar sidebar_pinned">
<div class="nd_sidebar nd_sidebar-pinned">
<div class="well">
<i class="sidebar_toggle icon-signout" id="sidebar_toggle_img_in"
<i class="nd_sidebar-toggle icon-signout" id="nd_sidebar-toggle-img-in"
rel="tooltip" data-placement="left" data-offset="5" data-title="Hide Sidebar"></i>
<i class="sidebar_pin icon-pushpin sidebar_pin_clicked"
<i class="nd_sidebar-pin icon-pushpin nd_sidebar-pin-clicked"
rel="tooltip" data-placement="left" data-offset="5" data-title="Unpin Sidebar"></i>
<div class="tab-content">
[% FOREACH tab IN settings.device_tabs %]
[% FOREACH tab IN settings._device_tabs %]
<div id="[% tab.tag %]_search" class="tab-pane [% 'active' IF params.tab == tab.tag %]">
<form id="[% tab.tag %]_form" class="nd_sidesearchform form-stacked"
<form id="[% tab.tag %]_form" class="nd_sidebar-form form-stacked"
method="get" action="[% uri_for('/device') %]">
<input name="tab" value="[% tab.tag %]" type="hidden"/>
[% TRY %]
@@ -41,14 +41,14 @@
</div>
<div class="content">
<ul id="search_results" class="nav nav-tabs">
[% FOREACH tab IN settings.device_tabs %]
<ul id="nd_search-results" class="nav nav-tabs">
[% FOREACH tab IN settings._device_tabs %]
<li[% ' class="active"' IF params.tab == tab.tag %]><a id="[% tab.tag %]_link" href="#[% tab.tag %]_pane">[% tab.label %]</a></li>
[% END %]
<span id="nd_device_name">[% d.dns || d.name | html_entity %]</span>
<span id="nd_device-name">[% d.dns || d.name | html_entity %]</span>
</ul>
<div class="tab-content">
[% FOREACH tab IN settings.device_tabs %]
[% FOREACH tab IN settings._device_tabs %]
<div class="tab-pane[% ' active' IF params.tab == tab.tag %]" id="[% tab.tag %]_pane"></div>
[% END %]
</div>

View File

@@ -1,5 +1,5 @@
<div class="container">
<div class="row nd_herorow">
<div class="row nd_hero-row">
<div class="span8 offset2">
[% IF params.failed %]
<div class="alert alert-error fade in">
@@ -30,7 +30,7 @@
<h2>Welcome to Netdisco</h2>
<small>Netdisco is an Open Source web-based network management tool.</small>
[% IF NOT session.user %]
<form class="nd_loginform" method="post" action="[% uri_for('/login') %]">
<form class="nd_login-form" method="post" action="[% uri_for('/login') %]">
<div class="form-horizontal">
<input placeholder="Username" class="span2" name="username" type="text"/>
<input placeholder="Password" class="span2" name="password" type="password"/>
@@ -44,6 +44,19 @@
<script type="text/javascript"> $('#nq').focus(); // set focus to navbar search </script>
[% END %]
</div>
[% IF vars.nodevices %]
<div class="hero-unit">
<h3>Initial Discovery</h3>
<p>You haven't discovered any devices yet.<p>
<p>Enter a network device name or IP to queue the first discovery:</p>
<form method="post" action="[% uri_for('/admin/discover') %]">
<div class="form-horizontal">
<input placeholder="Device hostname or IP" class="span4" name="device" type="text"/>
<button type="submit" class="btn btn-info">Discover</button>
</div>
</form>
</div>
[% END %]
</div>
</div>
</div> <!-- /container -->

View File

@@ -2,8 +2,8 @@
[% IF models.count %]
<div class="row">
<div class="span6">
<h3 class="nd_inv_tbl_head">By Platform</h3>
<table class="table table-condensed">
<h3 class="nd_inventory-table-head">By Platform</h3>
<table class="table table-condensed table-hover">
<thead>
<tr>
<th>Vendor</th>
@@ -32,8 +32,8 @@
</table>
</div>
<div class="span6">
<h3 class="nd_inv_tbl_head">By Software Release</h3>
<table class="table table-condensed">
<h3 class="nd_inventory-table-head">By Software Release</h3>
<table class="table table-condensed table-hover">
<thead>
<tr>
<th>OS</th>

View File

@@ -0,0 +1,120 @@
// used by the tabbing interface to make sure the correct
// ajax content is loaded
var path = 'admin';
// keep track of timers so we can kill them
var nd_timers = new Array();
// this is called by do_search to support local code
// which might need to act on the newly inserted content
// but which cannot use jQuery delegation via .on()
function inner_view_processing(tab) {
// reload this table every 10 seconds
if (tab == 'jobqueue') {
$('#nd_device-name').text('10');
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('9') }, 1000 ));
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('8') }, 2000 ));
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('7') }, 3000 ));
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('6') }, 4000 ));
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('5') }, 5000 ));
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('4') }, 6000 ));
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('3') }, 7000 ));
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('2') }, 8000 ));
nd_timers.push(setTimeout(function() { $('#nd_device-name').text('1') }, 9000 ));
nd_timers.push(setTimeout(function() {
// clear any running timers
for (var i = 0; i < nd_timers.length; i++) {
clearTimeout(nd_timers[i]);
}
// reload the tab content
$('#' + tab + '_form').trigger('submit');
}, 10000));
}
// activate typeahead on the topo boxes
$('.nd_topo_dev').autocomplete({
source: '/ajax/data/deviceip/typeahead'
,delay: 150
,minLength: 0
});
// activate typeahead on the topo boxes
$('.nd_topo_port.nd_topo_dev1').autocomplete({
source: function (request, response) {
var query = $('.nd_topo_dev1').serialize();
return $.get('/ajax/data/port/typeahead', query, function (data) {
return response(data);
});
}
,minLength: 0
});
// activate typeahead on the topo boxes
$('.nd_topo_port.nd_topo_dev2').autocomplete({
source: function (request, response) {
var query = $('.nd_topo_dev2').serialize();
return $.get('/ajax/data/port/typeahead', query, function (data) {
return response(data);
});
}
,delay: 150
,minLength: 0
});
}
// on load, establish global delegations for now and future
$(document).ready(function() {
var tab = '[% task.tag %]'
var target = '#' + tab + '_pane';
// get all devices on device input focus
$(target).on('focus', '.nd_topo_dev', function(e) {
$(this).autocomplete('search', '%') });
$(target).on('click', '.nd_topo_dev_caret', function(e) {
$(this).siblings('.nd_topo_dev').autocomplete('search', '%') });
// get all ports on port input focus
$(target).on('focus', '.nd_topo_port', function(e) {
$(this).autocomplete('search') });
$(target).on('click', '.nd_topo_port_caret', function(e) {
$(this).siblings('.nd_topo_port').val('');
$(this).siblings('.nd_topo_port').autocomplete('search');
});
// activity for admin task tables
// dynamically bind to all forms in the table
$(target).on('submit', 'form', function() {
// stop form from submitting normally
event.preventDefault();
// clear any running timers
for (var i = 0; i < nd_timers.length; i++) {
clearTimeout(nd_timers[i]);
}
// submit the query and put results into the tab pane
$.ajax({
type: 'POST'
,async: true
,dataType: 'html'
,url: uri_base + '/ajax/control/admin/' + tab + '/' + $(this).attr('name')
,data: $(this).serializeArray()
,beforeSend: function() {
$(target).html(
'<div class="span2 alert">Request submitted...</div>'
);
}
,success: function(content) {
$('#' + tab + '_form').trigger('submit');
}
,error: function() {
$(target).html(
'<div class="span5 alert alert-error">' +
'Request failed! Please contact your site administrator.</div>'
);
}
});
});
});

View File

@@ -1,15 +1,22 @@
$(document).ready(function() {
// search hook for each tab
[% FOREACH tab IN settings.search_tabs %]
$('[% "#${tab.tag}_form" %]').submit(function(event){ do_search(event, '[% tab.tag %]'); });
[% END %]
[% FOREACH tab IN settings.device_tabs %]
// search tabs
[% FOREACH tab IN settings._search_tabs %]
$('[% "#${tab.tag}_form" %]').submit(function(event){ do_search(event, '[% tab.tag %]'); });
[% END %]
// device tabs
[% FOREACH tab IN settings._device_tabs %]
$('[% "#${tab.tag}_form" %]').submit(function(event){ do_search(event, '[% tab.tag %]'); });
[% END %]
// and for the reports page
[% IF report %]
// for the report pages
$('[% "#${report.tag}_form" %]').submit(function(event){ do_search(event, '[% report.tag %]'); });
[% END -%]
[% IF task %]
// for the admin pages
$('[% "#${task.tag}_form" %]').submit(function(event){ do_search(event, '[% task.tag %]'); });
[% END %]
// on page load, load the content for the active tab

View File

@@ -6,65 +6,121 @@
var form_inputs = $("#ports_form .clearfix input").not('[type="checkbox"]')
.add("#ports_form .clearfix select");
// this is called by do_search to support local code
// which might need to act on the newly inserted content
// but which cannot use jQuery delegation via .on()
function inner_view_processing(tab) {
// LT wanted the page title to reflect what's on the page :)
document.title = $('#nd_device_name').text()
document.title = $('#nd_device-name').text()
+' - '+ $('#'+ tab + '_link').text();
// used for contenteditable cells to find out whether the user has made
// changes, and only reset when they submit or cancel the change
var dirty = false;
// show or hide netmap help button
if (tab == 'netmap') {
$('#nd_netmap-help').show();
}
else {
$('#nd_netmap-help').hide();
}
// activate tooltips and popovers
$("[rel=tooltip]").tooltip({live: true});
$("[rel=popover]").popover({live: true});
}
// on load, establish global delegations for now and future
$(document).ready(function() {
var tab = '[% tab.tag %]'
var target = '#' + tab + '_pane';
// sidebar form fields should change colour and have bin/copy icon
form_inputs.each(function() {device_form_state($(this))});
form_inputs.change(function() {device_form_state($(this))});
// sidebar collapser events trigger change of up/down arrow
$('.collapse').on('show', function() {
$(this).siblings().find('.nd_arrow-up-down-right')
.toggleClass('icon-chevron-up icon-chevron-down');
});
$('.collapse').on('hide', function() {
$(this).siblings().find('.nd_arrow-up-down-right')
.toggleClass('icon-chevron-up icon-chevron-down');
});
// handler for bin icon in port filter box
var portfilter = $('#ports_form').find("input[name=f]");
$('.nd_field-clear-icon').click(function() {
portfilter.val('');
$('#ports_form').trigger('submit');
device_form_state(portfilter); // will hide copy icons
});
// clickable device port names can simply resubmit AJAX rather than
// fetch the whole page again.
$('#ports_pane').on('click', '.nd_this-port-only', function() {
event.preventDefault(); // link is real so prevent page submit
var port = $(this).text();
port = $.trim(port);
portfilter.val(port);
$('.nd_field-clear-icon').show();
$('#ports_form').trigger('submit');
device_form_state(portfilter); // will hide copy icons
});
// VLANs column list collapser trigger
// it's a bit of a faff because we can't easily use Bootstrap's collapser
$('.nd_collapse_vlans').toggle(function() {
$('#ports_pane').on('click', '.nd_collapse-vlans', function() {
$(this).siblings('.nd_collapsing').toggle();
$(this).siblings('.cell-arrow-up-down')
.toggleClass('icon-chevron-up icon-chevron-down');
$(this).html('<div class="cell-arrow-up-down icon-chevron-down icon-large"></div>Hide VLANs');
}, function() {
$(this).siblings('.nd_collapsing').toggle();
$(this).siblings('.cell-arrow-up-down')
.toggleClass('icon-chevron-up icon-chevron-down');
$(this).html('<div class="cell-arrow-up-down icon-chevron-up icon-large"></div>Show VLANs');
if ($(this).find('.nd_arrow-up-down-left').hasClass('icon-chevron-up')) {
$(this).html('<div class="nd_arrow-up-down-left icon-chevron-down icon-large"></div>Hide VLANs');
}
else {
$(this).html('<div class="nd_arrow-up-down-left icon-chevron-up icon-large"></div>Show VLANs');
}
});
// toggle visibility of port up/down and edit controls
$('.nd_editable_cell').mouseenter(function() {
$(this).children('.nd_hand_icon').show();
$('.tab-content').on('mouseenter', '.nd_editable-cell', function() {
$(this).children('.nd_hand-icon').show();
if (! $(this).is(':focus')) {
$(this).children('.nd_edit_icon').show(); // ports
$(this).siblings('td').find('.nd_device_details_edit').show(); // details
$(this).children('.nd_edit-icon').show(); // ports
$(this).siblings('td').find('.nd_device-details-edit').show(); // details
}
});
$('.nd_editable_cell').mouseleave(function() {
$(this).children('.nd_hand_icon').hide();
$('.tab-content').on('mouseleave', '.nd_editable-cell', function() {
$(this).children('.nd_hand-icon').hide();
if (! $(this).is(':focus')) {
$(this).children('.nd_edit_icon').hide(); // ports
$(this).siblings('td').find('.nd_device_details_edit').hide(); // details
$(this).children('.nd_edit-icon').hide(); // ports
$(this).siblings('td').find('.nd_device-details-edit').hide(); // details
}
});
$('[contenteditable=true]').focus(function() {
$(this).children('.nd_edit_icon').hide(); // ports
$(this).siblings('td').find('.nd_device_details_edit').hide(); // details
$('.tab-content').on('focus', '[contenteditable=true]', function() {
$(this).children('.nd_edit-icon').hide(); // ports
$(this).siblings('td').find('.nd_device-details-edit').hide(); // details
});
// activity for port up/down control
$('.icon-hand-up').click(function() {
$('#ports_pane').on('click', '.icon-hand-up', function() {
port_control(this); // save
});
$('.icon-hand-down').click(function() {
$('#ports_pane').on('click', '.icon-hand-down', function() {
port_control(this); // save
});
// activity for power enable/disable control
$('.nd_power_icon').click(function() {
$('#ports_pane').on('click', '.nd_power-icon', function() {
port_control(this); // save
});
var dirty = false;
// activity for contenteditable control
$('[contenteditable=true]').keydown(function() {
$('.tab-content').on('keydown', '[contenteditable=true]', function() {
var esc = event.which == 27,
nl = event.which == 13;
@@ -84,55 +140,4 @@
dirty = true;
}
});
// show or hide netmap help button
if (tab == 'netmap') {
$('#netmap_help_img').show();
}
else {
$('#netmap_help_img').hide();
}
// activate tooltips and popovers
$("[rel=tooltip]").tooltip({live: true});
$("[rel=popover]").popover({live: true});
}
$(document).ready(function() {
// sidebar form fields should change colour and have bin/copy icon
form_inputs.each(function() {device_form_state($(this))});
form_inputs.change(function() {device_form_state($(this))});
// sidebar collapser events trigger change of up/down arrow
$('.collapse').on('show', function() {
$(this).siblings().find('.arrow-up-down')
.toggleClass('icon-chevron-up icon-chevron-down');
});
$('.collapse').on('hide', function() {
$(this).siblings().find('.arrow-up-down')
.toggleClass('icon-chevron-up icon-chevron-down');
});
// handler for bin icon in port filter box
var portfilter = $('#ports_form').find("input[name=f]");
$('.field_clear_icon').click(function() {
portfilter.val('');
$('#ports_form').trigger('submit');
device_form_state(portfilter); // will hide copy icons
});
// clickable device port names can simply resubmit AJAX rather than
// fetch the whole page again.
$('body').on('click', '.nd_this_port_only', function() {
event.preventDefault(); // link is real so prevent page submit
var port = $(this).text();
port = $.trim(port);
portfilter.val(port);
$('.field_clear_icon').show();
$('#ports_form').trigger('submit');
device_form_state(portfilter); // will hide copy icons
});
});

View File

@@ -8,4 +8,8 @@
// on load, check initial Device Search Options form state,
// and on each change to the form fields
$(document).ready(function() { });
$(document).ready(function() {
var tab = '[% report.tag %]'
var target = '#' + tab + '_pane';
});

View File

@@ -7,19 +7,22 @@
.add("#device_form .clearfix select");
// this is called by do_search to support local code
// here, when tab changes need to strike/unstrike the navbar search
// which might need to act on the newly inserted content
// but which cannot use jQuery delegation via .on()
function inner_view_processing(tab) {
}
// on load, check initial Device Search Options form state,
// and on each change to the form fields
// on load, establish global delegations for now and future
$(document).ready(function() {
var tab = '[% tab.tag %]'
var target = '#' + tab + '_pane';
// sidebar form fields should change colour and have bin/copy icon
form_inputs.each(function() {device_form_state($(this))});
form_inputs.change(function() {device_form_state($(this))});
// handler for copy icon in search option
$('.field_copy_icon').click(function() {
$('.nd_field-copy-icon').click(function() {
var name = $(this).data('btn-for');
var input = $('#device_form [name=' + name + ']');
input.val( $('#nq').val() );
@@ -27,7 +30,7 @@
});
// handler for bin icon in search option
$('.field_clear_icon').click(function() {
$('.nd_field-clear-icon').click(function() {
var name = $(this).data('btn-for');
var input = $('#device_form [name=' + name + ']');
input.val('');

View File

@@ -13,28 +13,38 @@
<script type="text/javascript" src="[% uri_base %]/javascripts/jquery-latest.min.js"></script>
<!-- <script type="text/javascript" src="http://code.jquery.com/jquery-migrate-1.1.1.js"></script> -->
<script type="text/javascript" src="[% uri_base %]/javascripts/jquery-ui.custom.min.js"></script>
<script type="text/javascript" src="[% uri_base %]/javascripts/jquery-history.js"></script>
<script type="text/javascript" src="[% uri_base %]/javascripts/jquery-deserialize.js"></script>
<script type="text/javascript" src="[% uri_base %]/javascripts/bootstrap.min.js"></script>
<script type="text/javascript" src="[% uri_base %]/javascripts/jquery.qtip.min.js"></script>
<script type="text/javascript" src="[% uri_base %]/javascripts/d3.min.js"></script>
<script type="text/javascript" src="[% uri_base %]/javascripts/toastr.js"></script>
<script type="text/javascript">
var uri_base = '[% uri_base %]';
</script>
<script type="text/javascript" src="[% uri_base %]/javascripts/netdisco.js"></script>
[% IF vars.user.port_control %]
<script type="text/javascript" src="[% uri_base %]/javascripts/toastr.js"></script>
<script type="text/javascript" src="[% uri_base %]/javascripts/netdisco_portcontrol.js"></script>
[% END %]
<link rel="stylesheet" href="[% uri_base %]/css/toastr.css"/>
[% FOREACH add_js IN settings._additional_javascript %]
<script type="text/javascript" src="[% uri_base %]/plugin/[% add_js %]/[% add_js %].js"></script>
[% END %]
<link rel="stylesheet" href="[% uri_base %]/css/bootstrap.min.css"/>
<link rel="stylesheet" href="[% uri_base %]/css/jquery.qtip.min.css"/>
<link rel="stylesheet" href="[% uri_base %]/css/smoothness/jquery-ui.custom.min.css"/>
<link rel="stylesheet" href="[% uri_base %]/css/font-awesome.min.css"/>
<link rel="stylesheet" href="[% uri_base %]/css/toastr.css"/>
<link rel="stylesheet" href="[% uri_base %]/css/netdisco.css"/>
<link rel="stylesheet" href="[% uri_base %]/css/nd_print.css" media="print"/>
[% FOREACH add_css IN settings._additional_css %]
<link rel="stylesheet" href="[% uri_base %]/plugin/[% add_css %]/[% add_css %].css"/>
[% END %]
</head>
<body>
@@ -52,22 +62,22 @@
<a class="brand" href="[% uri_for('/') %]">Netdisco</a>
[% IF session.user %]
<ul class="nav">
[% FOREACH ni IN settings.navbar_items %]
[% FOREACH ni IN settings._navbar_items %]
<li[% ' class="active"' IF vars.nav == ni.tag %]>
<a href="[% uri_for(ni.path) %]">[% ni.label | html_entity %]</a>
</li>
[% END %]
[% IF settings.reports.size %]
[% IF settings._reports.size %]
<li class="dropdown[% ' active' IF vars.nav == 'reports' %]">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Reports <b class="caret"></b></a>
<ul class="dropdown-menu">
[% FOREACH category IN settings.report_order %]
[% IF settings.reports_menu.$category.size %]
[% FOREACH category IN settings._report_order %]
[% IF settings._reports_menu.$category.size %]
<li class="dropdown-submenu">
<a href="#">[% category | html_entity %]</a>
<ul class="dropdown-menu">
[% FOREACH item IN settings.reports_menu.$category %]
<li><a href="[% uri_for('/report/' _ item) %]">[% settings.reports.$item.label | html_entity %]</a></li>
[% FOREACH item IN settings._reports_menu.$category %]
<li><a href="[% uri_for('/report/' _ item) %]">[% settings._reports.$item.label | html_entity %]</a></li>
[% END %]
</ul>
</li>
@@ -81,15 +91,29 @@
<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 navbar_icon"></i>
<i id="navsearchgo" class="icon-search nd_navbar-icon"></i>
</span>
</form>
[% IF vars.user.admin AND settings._admin_tasks.size %]
<ul class="nav">
<li class="dropdown[% ' active' IF vars.nav == 'admin' %]">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Admin Tasks <b class="caret"></b></a>
<ul class="dropdown-menu">
[% FOREACH ai IN settings._admin_tasks.keys.sort %]
<li><a href="[% uri_for('/admin/' _ ai) %]">[% settings._admin_tasks.$ai.label | html_entity %]</a></li>
[% END %]
</ul>
</li> <!-- /dropdown -->
</ul>
[% END %]
<ul class="nav pull-right">
<li class="nd_navbartext">Logged in as &nbsp;</li>
<li class="nd_navbar-text">Logged in as &nbsp;</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
[% IF vars.user.port_control %]
<i class="icon-user-md"></i>
[% IF vars.user.admin %]
<i class="icon-user text-error"></i>
[% ELSIF vars.user.port_control %]
<i class="icon-user text-warning"></i>
[% ELSE %]
<i class="icon-user"></i>
[% END %]

View File

@@ -0,0 +1,6 @@
<a href="http://[% settings.plugin_observium.webhost | uri %]/device/hostname=[% device.dns || device.name | uri %]/tab=port/ifdescr=[% row.base64url_port %]/"
[% 'target="_blank"' IF settings.plugin_observium.open_in_new_window %]
class="btn nd_observium"
data-content='
<img src="http://[% settings.plugin_observium.webhost | uri %]/graph.php?type=port_bits&device=[% device.dns || device.name | uri %]&port=[% row.port | uri %]&from=-1w&to=now&width=208&height=100&title=yes"/>'
><i class="icon-bar-chart"></i></a>

View File

@@ -0,0 +1,6 @@
.nd_observium-style {
min-width: none;
max-width: none;
margin-top: 5px;
margin-left: 15px;
}

View File

@@ -0,0 +1,25 @@
$(document).ready(function() {
// bind qtip2 even to all future .observium buttons
$('#ports_pane').on('mouseover', '.nd_observium', function(event) {
$(this).qtip({
overwrite: false,
content: {
attr: 'data-content'
},
show: {
event: event.type,
ready: true
},
position: {
my: 'left center',
at: 'right centre',
target: 'mouse'
},
style: {
classes: 'qtip-bootstrap nd_observium-style'
}
});
});
});

View File

@@ -1,16 +1,16 @@
<i class="sidebar_toggle icon-wrench icon-large" id="sidebar_toggle_img_out"
<i class="nd_sidebar-toggle icon-wrench icon-large" id="nd_sidebar-toggle-img-out"
rel="tooltip" data-placement="left" data-offset="5" data-title="Show Sidebar"></i>
<div class="container-fluid">
<div class="sidebar sidebar_pinned">
<div class="nd_sidebar nd_sidebar-pinned">
<div class="well">
<i class="sidebar_toggle icon-signout" id="sidebar_toggle_img_in"
<i class="nd_sidebar-toggle icon-signout" id="nd_sidebar-toggle-img-in"
rel="tooltip" data-placement="left" data-offset="5" data-title="Hide Sidebar"></i>
<i class="sidebar_pin icon-pushpin sidebar_pin_clicked"
<i class="nd_sidebar-pin icon-pushpin nd_sidebar-pin-clicked"
rel="tooltip" data-placement="left" data-offset="5" data-title="Unpin Sidebar"></i>
<div class="tab-content">
<div id="[% report.tag %]_search" class="tab-pane active">
<form id="[% report.tag %]_form" class="nd_sidesearchform form-stacked"
<form id="[% report.tag %]_form" class="nd_sidebar-form form-stacked"
method="get" action="[% uri_for('/report') %]">
[% TRY %]
[% INCLUDE "sidebar/report/${report.tag}.tt" %]
@@ -25,8 +25,9 @@
</div>
<div class="content">
<ul id="search_results" class="nav nav-tabs">
<li class="active"><a id="[% report.tag %]_link" href="#[% report.tag %]_pane">[% report.label %]</a></li>
<ul id="nd_search-results" class="nav nav-tabs">
<li class="active"><a id="[% report.tag %]_link" class="nd_single-tab"
href="#[% report.tag %]_pane">[% report.label %]</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="[% report.tag %]_pane"></div>

View File

@@ -1,16 +1,16 @@
<i class="sidebar_toggle icon-wrench icon-large" id="sidebar_toggle_img_out"
<i class="nd_sidebar-toggle icon-wrench icon-large" id="nd_sidebar-toggle-img-out"
rel="tooltip" data-placement="left" data-offset="5" data-title="Show Sidebar"></i>
<div class="container-fluid">
<div class="sidebar">
<div class="nd_sidebar">
<div class="well">
<i class="sidebar_toggle icon-signout" id="sidebar_toggle_img_in"
<i class="nd_sidebar-toggle icon-signout" id="nd_sidebar-toggle-img-in"
rel="tooltip" data-placement="left" data-offset="5" data-title="Hide Sidebar"></i>
<i class="sidebar_pin icon-pushpin"
<i class="nd_sidebar-pin icon-pushpin"
rel="tooltip" data-placement="left" data-offset="5" data-title="Pin Sidebar"></i>
<div class="tab-content">
[% FOREACH tab IN settings.search_tabs %]
[% FOREACH tab IN settings._search_tabs %]
<div id="[% tab.tag %]_search" class="tab-pane [% 'active' IF params.tab == tab.tag %]">
<form id="[% tab.tag %]_form" class="nd_sidesearchform form-stacked" method="get" action="[% uri_for('/search') %]">
<form id="[% tab.tag %]_form" class="nd_sidebar-form form-stacked" method="get" action="[% uri_for('/search') %]">
<input name="tab" value="[% tab.tag %]" type="hidden"/>
[% TRY %]
[% INCLUDE "sidebar/search/${tab.tag}.tt" %]
@@ -28,13 +28,13 @@
</div>
<div class="content">
<ul id="search_results" class="nav nav-tabs">
[% FOREACH tab IN settings.search_tabs %]
<ul id="nd_search-results" class="nav nav-tabs">
[% FOREACH tab IN settings._search_tabs %]
<li[% ' class="active"' IF params.tab == tab.tag %]><a id="[% tab.tag %]_link" href="#[% tab.tag %]_pane">[% tab.label %]</a></li>
[% END %]
</ul>
<div class="tab-content">
[% FOREACH tab IN settings.search_tabs %]
[% FOREACH tab IN settings._search_tabs %]
<div class="tab-pane[% ' active' IF params.tab == tab.tag %]" id="[% tab.tag %]_pane"></div>
[% END %]
</div>

View File

@@ -1,20 +1,20 @@
<input name="q" value="[% params.q | html_entity %]" type="hidden"/>
<div class="clearfix">
<i class="field_clear_icon icon-trash icon-large"
<i class="nd_field-clear-icon icon-trash icon-large"
rel="tooltip" data-placement="bottom" data-offset="3" data-title="Show all Ports"
id="f_clear_btn" data-btn-for="port"></i>
<input id="nd_port_query" placeholder="Port, Name or VLAN"
<input id="nd_port-query" placeholder="Port, Name or VLAN"
name="f" value="[% params.f | html_entity %]" type="text"
rel="tooltip" data-placement="left" data-offset="5" data-title="Filter by Port, Name or VLAN"/>
</div>
<div class="clearfix">
<span data-toggle="collapse" data-target="#nd_legend">
<label class="nd_collapser">Legend
<i class="arrow-up-down icon-chevron-up icon-large"></i>
<i class="nd_arrow-up-down-right icon-chevron-up icon-large"></i>
</label></span>
<div id="nd_legend" class="collapse">
<ul class="inputs-list unstyled">
<ul class="nd_inputs-list unstyled">
<li>
<span class="label">S</span>&nbsp; Admin Disabled
</li>
@@ -27,18 +27,18 @@
<li>
<span class="label label-info">B</span>&nbsp; Blocking
</li>
<li>
<i class="icon-phone icon-large"></i>&nbsp; IP Phone
</li>
<li>
<span class="label label-important">N</span>&nbsp; Neighbor Inacessible
</li>
<li>
<span class="label label-warning">A</span>&nbsp; Archived Data
</li>
<li>
<i class="icon-phone"></i>&nbsp; IP Phone
</li>
[% IF vars.user.port_control %]
<li>
<span class="label"><i class="icon-refresh"></i></span>&nbsp; Click "Update View"
<i class="icon-refresh"></i>&nbsp; Click "Update View"
</li>
[% END %]
</ul>
@@ -47,10 +47,10 @@
<div class="clearfix">
<span data-toggle="collapse" data-target="#nd_columns">
<label class="nd_collapser">Display Columns
<i class="arrow-up-down icon-chevron-down icon-large"></i>
<i class="nd_arrow-up-down-right icon-chevron-down icon-large"></i>
</label></span>
<div id="nd_columns" class="collapse in">
<ul class="inputs-list unstyled">
<ul class="nd_inputs-list unstyled">
[% FOREACH item IN vars.port_columns %]
[% NEXT IF item.name == 'c_admin' AND NOT vars.user.port_control %]
<li>
@@ -71,18 +71,18 @@
<div class="clearfix">
<span data-toggle="collapse" data-target="#nd_portprops">
<label class="nd_collapser">Port Properties
<i class="arrow-up-down icon-chevron-up icon-large"></i>
<i class="nd_arrow-up-down-right icon-chevron-up icon-large"></i>
</label></span>
<div id="nd_portprops" class="collapse">
<ul class="inputs-list unstyled">
<ul class="nd_inputs-list unstyled">
<li>
<em>Mark as Free if Down for:</em><br/>
<select id="nd_days_select" name="age_num">
<em class="muted">Mark as Free if Down for:</em><br/>
<select id="nd_days-select" name="age_num">
[% FOREACH count IN [1..32] %]
<option[% ' selected="selected"' IF params.age_num == count %]>[% count %]</option>
[% END %]
</select>
<select id="nd_age_select" name="age_unit">
<select id="nd_age-select" name="age_unit">
[% FOREACH unit IN [ 'days', 'weeks', 'months', 'years' ] %]
<option[% ' selected="selected"' IF params.age_unit == unit %]>[% unit %]</option>
[% END %]
@@ -101,13 +101,13 @@
<div class="clearfix">
<span data-toggle="collapse" data-target="#nd_nodeprops">
<label class="nd_collapser">Node Properties
<i class="arrow-up-down icon-chevron-up icon-large"></i>
<i class="nd_arrow-up-down-right icon-chevron-up icon-large"></i>
</label></span>
<div id="nd_nodeprops" class="collapse">
<ul class="inputs-list unstyled">
<ul class="nd_inputs-list unstyled">
<li>
<em>MAC address format:</em><br/>
<select id="nd_mac_format" name="mac_format">
<em class="muted">MAC address format:</em><br/>
<select id="nd_mac-format" name="mac_format">
[% FOREACH format IN [ 'IEEE', 'Cisco', 'Microsoft', 'Sun' ] %]
<option[% ' selected="selected"' IF params.mac_format == format %]>[% format %]</option>
[% END %]

View File

@@ -1,48 +1,48 @@
<p class="nd_sidebar_title"><em>Device Search Options</em></p>
<p class="nd_sidebar-title"><em>Device Search Options</em></p>
<input name="q" value="[% params.q | html_entity %]" type="hidden"/>
<div class="clearfix">
<i data-btn-for="dns" class="field_copy_icon icon-copy icon-large"></i>
<i data-btn-for="dns" class="nd_field-copy-icon icon-copy icon-large"></i>
<i id="dns_clear_btn" data-btn-for="dns"
class="field_clear_icon icon-trash icon-large"></i>
<input class="nd_side_input" placeholder="DNS"
class="nd_field-clear-icon icon-trash icon-large"></i>
<input class="nd_side-input" placeholder="DNS"
type="text" name="dns" value="[% params.dns | html_entity %]"
rel="tooltip" data-placement="left" data-offset="5" data-title="DNS"/>
</div>
<div class="clearfix">
<i data-btn-for="ip" class="field_copy_icon icon-copy icon-large"></i>
<i data-btn-for="ip" class="nd_field-copy-icon icon-copy icon-large"></i>
<i id="ip_clear_btn" data-btn-for="ip"
class="field_clear_icon icon-trash icon-large"></i>
<input class="nd_side_input" placeholder="IP Address"
class="nd_field-clear-icon icon-trash icon-large"></i>
<input class="nd_side-input" placeholder="IP Address"
type="text" name="ip" value="[% params.ip | html_entity %]"
rel="tooltip" data-placement="left" data-offset="5" data-title="IP Address"/>
</div>
<div class="clearfix">
<i data-btn-for="name" class="field_copy_icon icon-copy icon-large"></i>
<i data-btn-for="name" class="nd_field-copy-icon icon-copy icon-large"></i>
<i id="name_clear_btn" data-btn-for="name"
class="field_clear_icon icon-trash icon-large"></i>
<input class="nd_side_input" placeholder="System Name"
class="nd_field-clear-icon icon-trash icon-large"></i>
<input class="nd_side-input" placeholder="System Name"
type="text" name="name" value="[% params.name | html_entity %]"
rel="tooltip" data-placement="left" data-offset="5" data-title="System Name"/>
</div>
<div class="clearfix">
<i data-btn-for="location" class="field_copy_icon icon-copy icon-large"></i>
<i data-btn-for="location" class="nd_field-copy-icon icon-copy icon-large"></i>
<i id="location_clear_btn" data-btn-for="location"
class="field_clear_icon icon-trash icon-large"></i>
<input class="nd_side_input" placeholder="Location"
class="nd_field-clear-icon icon-trash icon-large"></i>
<input class="nd_side-input" placeholder="Location"
type="text" name="location" value="[% params.location | html_entity %]"
rel="tooltip" data-placement="left" data-offset="5" data-title="Location"/>
</div>
<div class="clearfix">
<i data-btn-for="description" class="field_copy_icon icon-copy icon-large"></i>
<i data-btn-for="description" class="nd_field-copy-icon icon-copy icon-large"></i>
<i id="description_clear_btn" data-btn-for="description"
class="field_clear_icon icon-trash icon-large"></i>
<input class="nd_side_input" placeholder="Description"
class="nd_field-clear-icon icon-trash icon-large"></i>
<input class="nd_side-input" placeholder="Description"
type="text" name="description" value="[% params.description | html_entity %]"
rel="tooltip" data-placement="left" data-offset="5" data-title="Description"/>
</div>
<div class="clearfix">
<select class="nd_side_select" size="[% model_list.size > 5 ? 5 : model_list.size %]"
<select class="nd_side-select" size="[% model_list.size > 5 ? 5 : model_list.size %]"
multiple="on" name="model"
rel="tooltip" data-placement="left" data-offset="5" data-title="Model"/>
[% FOREACH opt IN model_list %]
@@ -51,7 +51,7 @@
</select>
</div>
<div class="clearfix">
<select class="nd_side_select" size="[% os_ver_list.size > 5 ? 5 : os_ver_list.size %]"
<select class="nd_side-select" size="[% os_ver_list.size > 5 ? 5 : os_ver_list.size %]"
multiple="on" name="os_ver"
rel="tooltip" data-placement="left" data-offset="5" data-title="OS Release"/>
[% FOREACH opt IN os_ver_list %]
@@ -60,7 +60,7 @@
</select>
</div>
<div class="clearfix">
<select class="nd_side_select" size="[% vendor_list.size > 5 ? 5 : vendor_list.size %]"
<select class="nd_side-select" size="[% vendor_list.size > 5 ? 5 : vendor_list.size %]"
multiple="on" name="vendor"
rel="tooltip" data-placement="left" data-offset="5" data-title="Vendor"/>
[% FOREACH opt IN vendor_list %]

View File

@@ -1,5 +1,5 @@
<p class="nd_sidebar_title"><em>Node Search Options</em></p>
<p class="nd_sidebar-title"><em>Node Search Options</em></p>
<input name="q" value="[% params.q | html_entity %]" type="hidden"/>
<div class="clearfix input-prepend">
<label class="add-on">
@@ -39,8 +39,8 @@
</label>
</div>
<div class="clearfix">
<em>MAC address format:</em><br/>
<select id="nd_node_mac_format" name="mac_format">
<em class="muted">MAC address format:</em><br/>
<select id="nd_node-mac-format" name="mac_format">
[% FOREACH format IN [ 'IEEE', 'Cisco', 'Microsoft', 'Sun' ] %]
<option[% ' selected="selected"' IF params.mac_format == format %]>[% format %]</option>
[% END %]

View File

@@ -1,5 +1,5 @@
<p class="nd_sidebar_title"><em>Port Search Options</em></p>
<p class="nd_sidebar-title"><em>Port Search Options</em></p>
<input name="q" value="[% params.q | html_entity %]" type="hidden"/>
<div class="clearfix input-prepend">
<label class="add-on">