Squashed commit of the following:
commitb054119d9cAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sun Mar 17 14:29:58 2013 +0000 hide Reports menu if there are no reports commitd86e670600Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Mar 17 14:23:59 2013 +0000 add Report docs for developers commitee8351eb30Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Mar 17 14:06:39 2013 +0000 split Plugin docs into user and developer pages commit5e4b8f3063Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Mar 17 12:59:47 2013 +0000 add duplex report into default config commit8fd622f50cAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sun Mar 17 12:56:51 2013 +0000 update query for duplex mismatch to check left and right are both not DOWN commit6d9170598cAuthor: Oliver Gorwits <oliver@cpan.org> Date: Mon Mar 11 23:10:38 2013 +0000 use the new duplex mismatch query in a template commit786977354bAuthor: Oliver Gorwits <oliver@cpan.org> Date: Mon Mar 11 22:54:21 2013 +0000 add VIEW for duplex mismatches commitf37ae8568eAuthor: Oliver Gorwits <oliver@cpan.org> Date: Mon Mar 11 22:54:01 2013 +0000 remove unecessary assign commit13af853582Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Mar 10 23:40:53 2013 +0000 fixes to main app to support reports commit55a0f3d8dcAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sun Mar 10 22:18:48 2013 +0000 also update fontawesome to match bootstrap version commit83a2c74242Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Mar 10 22:07:23 2013 +0000 update bootstrap again, to include glyphicons with correct path commit25be8bfa92Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Mar 10 19:27:37 2013 +0000 implement first report - duplex mismatch - as a placeholder only commit00265a9323Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Mar 10 18:41:40 2013 +0000 report error on failure to load a plugin commitaf8f124bb2Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Mar 10 18:37:19 2013 +0000 change id for tag in device and search tab plugins commitb818d4156fAuthor: Oliver Gorwits <oliver@cpan.org> Date: Sun Mar 10 18:29:57 2013 +0000 change id for tag in navbar plugins commitf513000f08Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Mar 10 17:21:23 2013 +0000 implement register_report() and replace More menu with Reports menu commit4a16e3fde3Author: Oliver Gorwits <oliver@cpan.org> Date: Sun Mar 10 17:00:44 2013 +0000 Upgraded to Twitter Bootstrap 2.3.1 - customized for 13px font 18px line
This commit is contained in:
30
Netdisco/share/views/ajax/report/duplexmismatch.tt
Normal file
30
Netdisco/share/views/ajax/report/duplexmismatch.tt
Normal file
@@ -0,0 +1,30 @@
|
||||
<table class="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>
|
||||
</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"
|
||||
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="center_cell">[% row.right_dns || row.right_ip | html_entity %]</a>
|
||||
<td class="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>
|
||||
</tr>
|
||||
[% END %]
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -20,18 +20,18 @@
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Unpin Sidebar"></i>
|
||||
<div class="tab-content">
|
||||
[% FOREACH tab IN settings.device_tabs %]
|
||||
<div id="[% tab.id %]_search" class="tab-pane [% 'active' IF params.tab == tab.id %]">
|
||||
<form id="[% tab.id %]_form" class="nd_sidesearchform form-stacked"
|
||||
<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('/device') %]">
|
||||
<input name="tab" value="[% tab.id %]" type="hidden"/>
|
||||
<input name="tab" value="[% tab.tag %]" type="hidden"/>
|
||||
[% TRY %]
|
||||
[% INCLUDE "sidebar/device/${tab.id}.tt" %]
|
||||
<script type="text/javascript">has_sidebar["[% tab.id %]"] = 1;</script>
|
||||
[% INCLUDE "sidebar/device/${tab.tag}.tt" %]
|
||||
<script type="text/javascript">has_sidebar["[% tab.tag %]"] = 1;</script>
|
||||
[% CATCH %]
|
||||
<!-- no "[% tab.id %]" search options -->
|
||||
<!-- no "[% tab.tag %]" search options -->
|
||||
<input name="q" value="[% params.q | html_entity %]" type="hidden"/>
|
||||
<input name="f" value="[% params.f | html_entity %]" type="hidden"/>
|
||||
<script type="text/javascript">has_sidebar["[% tab.id %]"] = 0;</script>
|
||||
<script type="text/javascript">has_sidebar["[% tab.tag %]"] = 0;</script>
|
||||
[% END %]
|
||||
</form>
|
||||
</div> <!-- /tab-pane -->
|
||||
@@ -43,13 +43,13 @@
|
||||
<div class="content">
|
||||
<ul id="search_results" class="nav nav-tabs">
|
||||
[% FOREACH tab IN settings.device_tabs %]
|
||||
<li[% ' class="active"' IF params.tab == tab.id %]><a id="[% tab.id %]_link" href="#[% tab.id %]_pane">[% tab.label %]</a></li>
|
||||
<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>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
[% FOREACH tab IN settings.device_tabs %]
|
||||
<div class="tab-pane[% ' active' IF params.tab == tab.id %]" id="[% tab.id %]_pane"></div>
|
||||
<div class="tab-pane[% ' active' IF params.tab == tab.tag %]" id="[% tab.tag %]_pane"></div>
|
||||
[% END %]
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
$(document).ready(function() {
|
||||
// search hook for each tab
|
||||
[% FOREACH tab IN settings.search_tabs %]
|
||||
$('[% "#${tab.id}_form" %]').submit(function(event){ do_search(event, '[% tab.id %]'); });
|
||||
$('[% "#${tab.tag}_form" %]').submit(function(event){ do_search(event, '[% tab.tag %]'); });
|
||||
[% END %]
|
||||
[% FOREACH tab IN settings.device_tabs %]
|
||||
$('[% "#${tab.id}_form" %]').submit(function(event){ do_search(event, '[% tab.id %]'); });
|
||||
$('[% "#${tab.tag}_form" %]').submit(function(event){ do_search(event, '[% tab.tag %]'); });
|
||||
[% END %]
|
||||
|
||||
// and for the reports page
|
||||
[% IF report %]
|
||||
$('[% "#${report.tag}_form" %]').submit(function(event){ do_search(event, '[% report.tag %]'); });
|
||||
[% END %]
|
||||
|
||||
// on page load, load the content for the active tab
|
||||
|
||||
11
Netdisco/share/views/js/report.js
Normal file
11
Netdisco/share/views/js/report.js
Normal file
@@ -0,0 +1,11 @@
|
||||
// used by the tabbing interface to make sure the correct
|
||||
// ajax content is loaded
|
||||
var path = 'report';
|
||||
|
||||
// this is called by do_search to support local code
|
||||
// here, when tab changes need to strike/unstrike the navbar search
|
||||
function inner_view_processing(tab) { }
|
||||
|
||||
// on load, check initial Device Search Options form state,
|
||||
// and on each change to the form fields
|
||||
$(document).ready(function() { });
|
||||
@@ -31,14 +31,13 @@
|
||||
[% END %]
|
||||
|
||||
<link rel="stylesheet" href="[% uri_base %]/css/bootstrap.min.css"/>
|
||||
<link rel="stylesheet" href="[% uri_base %]/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="[% uri_base %]/css/font-awesome.min.css"/>
|
||||
<link rel="stylesheet" href="[% uri_base %]/css/netdisco.css"/>
|
||||
<link rel="stylesheet" href="[% uri_base %]/css/nd_print.css" media="print"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
[%
|
||||
more_dd = { "Reports" = "/reports" }
|
||||
user_dd = [
|
||||
{ "title" = "Settings", "link" = "/settings" },
|
||||
{ "title" = "Help", "link" = "/help" },
|
||||
@@ -53,18 +52,26 @@
|
||||
[% IF session.user %]
|
||||
<ul class="nav">
|
||||
[% FOREACH ni IN settings.navbar_items %]
|
||||
<li[% ' class="active"' IF vars.nav == ni.id %]>
|
||||
<li[% ' class="active"' IF vars.nav == ni.tag %]>
|
||||
<a href="[% uri_for(ni.path) %]">[% ni.label | html_entity %]</a>
|
||||
</li>
|
||||
[% END %]
|
||||
[% IF more_dd.size %]
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
More <b class="caret"></b></a>
|
||||
[% 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 title IN more_dd.keys.sort %]
|
||||
<li><a href="[% uri_for(more_dd.$title) %]">[% title | html_entity %]</a></li>
|
||||
[% 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>
|
||||
[% END %]
|
||||
</ul>
|
||||
</li>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</ul>
|
||||
</li> <!-- /dropdown -->
|
||||
[% END %]
|
||||
|
||||
@@ -1,31 +1,38 @@
|
||||
<div class="container">
|
||||
<div class="row nd_show-grid">
|
||||
<div class="span10 offset1">
|
||||
<form id="nd_dev_age_form" class="form-inline">
|
||||
Find Devices
|
||||
<select name="age_type" class="span2">
|
||||
<option value="first">First Discovered</option>
|
||||
<option value="last" selected="selected">Last Updated</option>
|
||||
</select>
|
||||
<select name="age_bool" class="span2">
|
||||
<option value="in">less than</option>
|
||||
<option value="not_in" selected="selected">more than</option>
|
||||
</select>
|
||||
<select name="age_num" class="span1">
|
||||
[% FOREACH count IN [1..32] %]
|
||||
<option[% ' selected="selected"' IF count == 3 %]>[% count %]</option>
|
||||
[% END %]
|
||||
</select>
|
||||
<select name="age_unit" class="span2">
|
||||
<option>days</option>
|
||||
<option>weeks</option>
|
||||
<option selected="selected">months</option>
|
||||
<option>years</option>
|
||||
</select>
|
||||
ago.
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="icon-search icon-white"></i></button>
|
||||
</form>
|
||||
<i class="sidebar_toggle icon-wrench icon-large" id="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="well">
|
||||
<i class="sidebar_toggle icon-signout" id="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"
|
||||
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"
|
||||
method="get" action="[% uri_for('/report') %]">
|
||||
[% TRY %]
|
||||
[% INCLUDE "sidebar/report/${report.tag}.tt" %]
|
||||
<script type="text/javascript">has_sidebar["[% report.tag %]"] = 1;</script>
|
||||
[% CATCH %]
|
||||
<script type="text/javascript">has_sidebar["[% report.tag %]"] = 0;</script>
|
||||
[% END %]
|
||||
</form>
|
||||
</div> <!-- /tab-pane -->
|
||||
</div> <!-- /tab-content -->
|
||||
</div>
|
||||
</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>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="[% report.tag %]_pane"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
[%+ INCLUDE 'js/report.js' -%]
|
||||
</script>
|
||||
|
||||
@@ -9,16 +9,16 @@
|
||||
rel="tooltip" data-placement="left" data-offset="5" data-title="Pin Sidebar"></i>
|
||||
<div class="tab-content">
|
||||
[% FOREACH tab IN settings.search_tabs %]
|
||||
<div id="[% tab.id %]_search" class="tab-pane [% 'active' IF params.tab == tab.id %]">
|
||||
<form id="[% tab.id %]_form" class="nd_sidesearchform form-stacked" method="get" action="[% uri_for('/search') %]">
|
||||
<input name="tab" value="[% tab.id %]" type="hidden"/>
|
||||
<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') %]">
|
||||
<input name="tab" value="[% tab.tag %]" type="hidden"/>
|
||||
[% TRY %]
|
||||
[% INCLUDE "sidebar/search/${tab.id}.tt" %]
|
||||
<script type="text/javascript">has_sidebar["[% tab.id %]"] = 1;</script>
|
||||
[% INCLUDE "sidebar/search/${tab.tag}.tt" %]
|
||||
<script type="text/javascript">has_sidebar["[% tab.tag %]"] = 1;</script>
|
||||
[% CATCH %]
|
||||
<!-- no "[% tab.id %]" search options -->
|
||||
<!-- no "[% tab.tag %]" search options -->
|
||||
<input name="q" value="[% params.q | html_entity %]" type="hidden"/>
|
||||
<script type="text/javascript">has_sidebar["[% tab.id %]"] = 0;</script>
|
||||
<script type="text/javascript">has_sidebar["[% tab.tag %]"] = 0;</script>
|
||||
[% END %]
|
||||
</form>
|
||||
</div> <!-- /tab-pane -->
|
||||
@@ -30,12 +30,12 @@
|
||||
<div class="content">
|
||||
<ul id="search_results" class="nav nav-tabs">
|
||||
[% FOREACH tab IN settings.search_tabs %]
|
||||
<li[% ' class="active"' IF params.tab == tab.id %]><a id="[% tab.id %]_link" href="#[% tab.id %]_pane">[% tab.label %]</a></li>
|
||||
<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 %]
|
||||
<div class="tab-pane[% ' active' IF params.tab == tab.id %]" id="[% tab.id %]_pane"></div>
|
||||
<div class="tab-pane[% ' active' IF params.tab == tab.tag %]" id="[% tab.tag %]_pane"></div>
|
||||
[% END %]
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user