css audit
This commit is contained in:
@@ -2,11 +2,11 @@ body {
|
||||
padding-top: 0px !important;
|
||||
}
|
||||
|
||||
#search_results > li:not(.active) {
|
||||
#nd_search-results > li:not(.active) {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.navbar, .sidebar {
|
||||
.navbar, .nd_sidebar {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
/* for the fixed navbar make sure content stops short of page top*/
|
||||
/* style common to all pages in the site */
|
||||
|
||||
/* for the fixed navbar make sure content stops short of page top*/
|
||||
body {
|
||||
padding-top: 50px;
|
||||
}
|
||||
|
||||
/* magnifying glass icon for search box */
|
||||
.navbar_icon {
|
||||
.nd_navbar-icon {
|
||||
vertical-align: sub;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* for the "logged in as..." text */
|
||||
.nd_navbartext {
|
||||
.nd_navbar-text {
|
||||
color: #666;
|
||||
padding-top: 11px;
|
||||
}
|
||||
@@ -31,49 +32,32 @@ body {
|
||||
.ui-autocomplete {
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
/* prevent horizontal scrollbar */
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
/* various styles to adjust the hero box used for homepage + login */
|
||||
/* styles to adjust the hero box used for homepage + login */
|
||||
|
||||
.nd_herorow {
|
||||
/* space between hero box and navbar */
|
||||
.nd_hero-row {
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
/* alter proportions of hero unit to make it "tighter" on content */
|
||||
.hero-unit {
|
||||
padding: 30px 60px 40px 90px;
|
||||
}
|
||||
|
||||
.nd_loginform {
|
||||
/* push user/pass/login form down+away from the Netdisco banner text */
|
||||
.nd_login-form {
|
||||
margin-top: 15px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
/* styles for Reports */
|
||||
/* styles for device inventory */
|
||||
|
||||
/* from Bootstrap doc style sheet */
|
||||
.nd_show-grid [class*="span"] {
|
||||
background-color: cornsilk;
|
||||
text-align: center;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
min-height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
/* styles for Inventory */
|
||||
|
||||
#nd_dev_age_form {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.nd_inv_tbl_head {
|
||||
.nd_inventory-table-head {
|
||||
text-align: center;
|
||||
color: lightSlateGray;
|
||||
margin-top: 6px;
|
||||
@@ -81,12 +65,7 @@ body {
|
||||
}
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
/* results table links */
|
||||
|
||||
.nd_stealthlink {
|
||||
text-decoration: none !important;
|
||||
color: #404040;
|
||||
}
|
||||
/* styles for links in results tables */
|
||||
|
||||
/* make the whole cell become a hyperlink in results table */
|
||||
.nd_linkcell {
|
||||
@@ -95,119 +74,57 @@ body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* special placing for edit icon in details tab */
|
||||
.nd_device_details_edit {
|
||||
float: right !important;
|
||||
font-size: 14px;
|
||||
/* still a link, but styled like normal text */
|
||||
.nd_stealth-link {
|
||||
text-decoration: none !important;
|
||||
color: #404040;
|
||||
}
|
||||
|
||||
/* port admin up/down control */
|
||||
.nd_edit_icon, .nd_hand_icon {
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.nd_power_icon {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.icon-off {
|
||||
vertical-align: middle;
|
||||
color: darkRed;
|
||||
}
|
||||
|
||||
.nd_power_on {
|
||||
color: darkGreen;
|
||||
}
|
||||
|
||||
/* placement of port link when port admin hint is enabled */
|
||||
.nd_editable_cell > .nd_this_port_only {
|
||||
/* nudge cell content to the right when port_control controls are enabled */
|
||||
.nd_editable-cell > .nd_this-port-only {
|
||||
margin-left: 18px;
|
||||
}
|
||||
.nd_editable_cell > .nd_editable_cell_content {
|
||||
.nd_editable-cell > .nd_editable-cell-content {
|
||||
margin-left: 18px;
|
||||
}
|
||||
|
||||
/* style of editable content in table */
|
||||
[contenteditable]:focus {
|
||||
background: #FFFFD3 !important;
|
||||
}
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
/* many styles for the collapsing lists */
|
||||
|
||||
/* mouse-over should be pointer to show JS collapser is clickable */
|
||||
.nd_collapser {
|
||||
cursor: pointer;
|
||||
color: #0088CC;
|
||||
}
|
||||
|
||||
/* collapser label should not have any decoration even though it's clickable */
|
||||
.clearfix > a {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
/* collapser label should not have any decoration even though it's clickable */
|
||||
.nd_collapse_vlans {
|
||||
text-decoration: none !important;
|
||||
cursor: pointer;
|
||||
color: #0088CC;
|
||||
}
|
||||
|
||||
/* class to control default state of collapsible lists on page load */
|
||||
.nd_collapse_pre_hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* for the tagged vlans total when hiding the full list */
|
||||
.vlan_total {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* little up/down chevron to the right of some collapser link */
|
||||
.arrow-up-down {
|
||||
float: right;
|
||||
margin-top: 1px;
|
||||
margin-right: 1px;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
/* draw little up arrow to the left of a label for collapsed list */
|
||||
.cell-arrow-up-down {
|
||||
float: left;
|
||||
margin-right: 6px;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
/* for table and to position cell content */
|
||||
/* styles to position table cell content */
|
||||
|
||||
td {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
.center_cell {
|
||||
.nd_center-cell {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* manage pseudo devices table form */
|
||||
.center_cell input {
|
||||
margin-bottom: 2px;
|
||||
/* fix layout of form fields inside the (topology) table */
|
||||
td div.input-append {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.nd_inline_form {
|
||||
/* fix layout of form fields inside the (pseudo devices) table */
|
||||
.nd_center-cell input {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* with two forms inside one cell, make the submit buttons side-by-side */
|
||||
.nd_inline-form {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
/* tabs */
|
||||
/* styles for "tabs" and surrounding content */
|
||||
|
||||
#search_results {
|
||||
|
||||
/* add a small bottom margin (gutter) below all pages */
|
||||
#nd_search-results {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#nd_device_name {
|
||||
/* for any label which we want to appear alongside tabs, floated to the right */
|
||||
#nd_device-name {
|
||||
float: right;
|
||||
margin-bottom: 0px;
|
||||
margin-top: 9px;
|
||||
@@ -215,90 +132,255 @@ td {
|
||||
color: #6D5720;
|
||||
}
|
||||
|
||||
.nd_single_tab {
|
||||
/* when there's only one tab (report, task etc) change the text color */
|
||||
.nd_single-tab {
|
||||
color: rgb(187,112,0) !important;
|
||||
}
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
/* style for port_control controls */
|
||||
|
||||
/* edit icon in details tab is in the label (not content) cell so nudge to RHS*/
|
||||
.nd_device-details-edit {
|
||||
float: right !important;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* port admin up/down control */
|
||||
.nd_edit-icon, .nd_hand-icon {
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
display: none;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
/* port power control */
|
||||
.nd_power-icon {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* the port power icon, whether it's on or off */
|
||||
.icon-off {
|
||||
vertical-align: middle;
|
||||
color: darkRed;
|
||||
}
|
||||
|
||||
/* change color of icon from default of red (which is OK for power-off) */
|
||||
.nd_power-on {
|
||||
color: darkGreen;
|
||||
}
|
||||
|
||||
/* style of editable content in any table - yellow background */
|
||||
[contenteditable]:focus {
|
||||
background: #FFFFD3 !important;
|
||||
}
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
/* styles for collapsing lists - sidebar or main table cell content */
|
||||
|
||||
/* sidebar collapser is clickable and deep grey */
|
||||
.nd_collapser {
|
||||
cursor: pointer;
|
||||
color: #0088CC;
|
||||
}
|
||||
|
||||
/* vlans collapser also clickable and deep grey but with no link styling */
|
||||
.nd_collapse-vlans {
|
||||
cursor: pointer;
|
||||
color: #0088CC;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
/* set default state of collapsible lists as collapsed (hidden) */
|
||||
.nd_collapse-pre-hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* for the tagged vlans total when hiding the full list */
|
||||
.nd_vlan-total {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* little up/down chevron to the right of some collapsed list */
|
||||
.nd_arrow-up-down-right {
|
||||
float: right;
|
||||
margin-top: 1px;
|
||||
margin-right: 1px;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
/* little up arrow to the left of a label for collapsed list */
|
||||
.nd_arrow-up-down-left {
|
||||
float: left;
|
||||
margin-right: 6px;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
/* styles for sidebar placement and sizing */
|
||||
|
||||
/* make the sidebar fixed on the screen */
|
||||
.container-fluid > .nd_sidebar {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
width: 200px;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
/* nudge content in the sidebar closer to the left */
|
||||
.nd_sidebar-form {
|
||||
padding-left: 0px;
|
||||
margin-top: -9px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* reduce padding at the bottom of the sidebar content */
|
||||
.container-fluid > .nd_sidebar > .well {
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
/* pull tab content away from the sidebar */
|
||||
.container-fluid > .content {
|
||||
margin-right: 215px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
/* styles for sidebar position controls (collapse, pin) */
|
||||
|
||||
.nd_sidebar-pinned {
|
||||
position: fixed !important;
|
||||
}
|
||||
|
||||
.nd_sidebar-pin-clicked {
|
||||
color: rgba(255,0,0,0.8) !important;
|
||||
}
|
||||
|
||||
.nd_sidebar-pin {
|
||||
float: left;
|
||||
margin-top: 6px;
|
||||
margin-left: -16px;
|
||||
font-size: 15px;
|
||||
color: #555;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#nd_sidebar-toggle-img-in {
|
||||
float: left;
|
||||
margin-top: -9px;
|
||||
margin-left: -16px;
|
||||
font-size: 15px;
|
||||
color: #555;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#nd_sidebar-toggle-img-out {
|
||||
position: fixed;
|
||||
top: 60px;
|
||||
right: 7px;
|
||||
z-index: 1;
|
||||
color: #555;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* question mark image with popover for netmap instructions */
|
||||
#nd_netmap-help {
|
||||
position: fixed;
|
||||
top: 160px;
|
||||
right: 7px;
|
||||
z-index: 1;
|
||||
color: #555;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
/* style customization for many items which appear in the sidebar */
|
||||
|
||||
/* fixups for prepended checkbox in sidebar */
|
||||
.nd_sidebar-title {
|
||||
margin-left: 10px;
|
||||
margin-top: 6px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
/* fixup for prepended checkbox in sidebar */
|
||||
.nd_searchcheckbox {
|
||||
width: 123px;
|
||||
padding-left: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* fixup for prepended checkbox in sidebar */
|
||||
.nd_sidebar .input-prepend {
|
||||
margin-left: -2px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* for some reason bootstrap 2.1.0 displays add-on as block - no check supprt? */
|
||||
.nd_checkboxlabel {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
/* fixups for placing the Archived "A" inside the prepended checkbox */
|
||||
/* fixup for placing the Archived "A" inside the prepended checkbox */
|
||||
.nd_legendlabel {
|
||||
float: right;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.nd_side_input {
|
||||
/* placement of form field in sidebar */
|
||||
.nd_side-input {
|
||||
margin-left: -3px;
|
||||
width: 152px;
|
||||
}
|
||||
|
||||
.nd_side_select {
|
||||
/* placement of form field in sidebar */
|
||||
.nd_side-select {
|
||||
margin-left: -3px;
|
||||
width: 165px;
|
||||
}
|
||||
|
||||
.sidebar .input-prepend {
|
||||
margin-left: -2px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* nudge the port name/vlan filter over a little */
|
||||
#nd_port_query {
|
||||
/* nudge the port name/vlan filter over a little (as compared to nd_side-select) */
|
||||
#nd_port-query {
|
||||
margin-left: 5px !important;
|
||||
width: 152px;
|
||||
}
|
||||
|
||||
/* somewhere between span1 and span2 is desirable */
|
||||
#nd_days_select {
|
||||
/* set the day/mon/year drop-down width */
|
||||
#nd_days-select {
|
||||
margin-top: 4px;
|
||||
width: 56px;
|
||||
}
|
||||
|
||||
/* set the day/mon/year drop-down width */
|
||||
#nd_age_select {
|
||||
#nd_age-select {
|
||||
margin-top: 4px;
|
||||
width: 95px;
|
||||
}
|
||||
|
||||
/* set the MAC format drop-down width */
|
||||
#nd_mac_format {
|
||||
#nd_mac-format {
|
||||
margin-top: 4px;
|
||||
width: 154px;
|
||||
}
|
||||
|
||||
/* set the MAC format drop-down width */
|
||||
#nd_node_mac_format {
|
||||
#nd_node-mac-format {
|
||||
margin-left: -2px;
|
||||
margin-top: 4px;
|
||||
width: 165px;
|
||||
}
|
||||
|
||||
/* sidebar submit button width and spacing from Node Props */
|
||||
.sidebar button {
|
||||
/* sidebar submit button width and spacing */
|
||||
.nd_sidebar button {
|
||||
margin-top: 9px;
|
||||
margin-left: -3px;
|
||||
width: 165px;
|
||||
}
|
||||
.sidebar #ports_submit {
|
||||
margin-top: 9px;
|
||||
width: 165px;
|
||||
}
|
||||
|
||||
/* little icon inside of search input fields */
|
||||
.field_clear_icon, .field_copy_icon {
|
||||
.nd_field-clear-icon, .nd_field-copy-icon {
|
||||
position: absolute;
|
||||
margin-left: 140px;
|
||||
margin-top: 5px;
|
||||
@@ -307,22 +389,24 @@ td {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.field_copy_icon {
|
||||
/* little icon inside of search input fields */
|
||||
.nd_field-copy-icon {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.field_clear_icon {
|
||||
/* little icon inside of search input fields */
|
||||
.nd_field-clear-icon {
|
||||
background-color: #A9DBA9;
|
||||
color: #3A87AD;
|
||||
}
|
||||
|
||||
/* for the ports form, but the positioning is slightly different */
|
||||
#ports_form .field_clear_icon {
|
||||
/* same for the ports form, but the positioning is slightly different */
|
||||
#ports_form .nd_field-clear-icon {
|
||||
margin-left: 149px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
/* change highlighting for form fields which are being used in a search */
|
||||
/* change bg color for form fields which are being used in a search */
|
||||
form .clearfix.success select {
|
||||
background-color: #A9DBA9;
|
||||
}
|
||||
@@ -339,109 +423,21 @@ form .clearfix.success input {
|
||||
}
|
||||
|
||||
/* bring sidebar items closer together */
|
||||
.inputs-list label {
|
||||
.nd_inputs-list label {
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
.inputs-list i {
|
||||
/* compact icons for the sidebar legend */
|
||||
.nd_inputs-list i {
|
||||
margin-right: 5px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
/* nudge content closer to the header labels in the sidebar */
|
||||
.inputs-list li:first-child {
|
||||
.nd_inputs-list li:first-child {
|
||||
padding-top: 3px !important;
|
||||
}
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
/* sidebar collapser */
|
||||
|
||||
.nd_sidebar_title {
|
||||
margin-left: 10px;
|
||||
margin-top: 6px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.sidebar_pinned {
|
||||
position: fixed !important;
|
||||
}
|
||||
|
||||
.sidebar_pin_clicked {
|
||||
color: rgba(255,0,0,0.8) !important;
|
||||
}
|
||||
|
||||
/* for placing the sidebar pin icons */
|
||||
.sidebar_pin {
|
||||
float: left;
|
||||
margin-top: 6px;
|
||||
margin-left: -16px;
|
||||
font-size: 15px;
|
||||
color: #555;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* for placing the sidebar toggle icons */
|
||||
#sidebar_toggle_img_in {
|
||||
float: left;
|
||||
margin-top: -9px;
|
||||
margin-left: -16px;
|
||||
font-size: 15px;
|
||||
color: #555;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* for placing the sidebar toggle icons */
|
||||
#sidebar_toggle_img_out {
|
||||
position: fixed;
|
||||
top: 60px;
|
||||
right: 7px;
|
||||
z-index: 1;
|
||||
color: #555;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* question mark image with popover for netmap instructions */
|
||||
#netmap_help_img {
|
||||
position: fixed;
|
||||
top: 160px;
|
||||
right: 7px;
|
||||
z-index: 1;
|
||||
color: #555;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
/* sidebar placement and sizing */
|
||||
|
||||
/* make the sidebar fixed on the screen */
|
||||
.container-fluid > .sidebar {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
width: 200px;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
/* smaller padding below form button in sidebar well */
|
||||
.container-fluid > .sidebar > .well {
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
/* make the content start more to the left now the sidebar is narrower */
|
||||
.container-fluid > .content {
|
||||
margin-right: 215px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
/* nudge content in the sidebar closer to the left */
|
||||
.nd_sidesearchform {
|
||||
padding-left: 0px;
|
||||
margin-top: -9px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
/* D3 SVG */
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ function do_search (event, tab) {
|
||||
|
||||
// page title
|
||||
var pgtitle = 'Netdisco';
|
||||
if ($('#nd_device_name').text().length) {
|
||||
var pgtitle = $('#nd_device_name').text() +' - '+ $('#'+ tab + '_link').text();
|
||||
if ($('#nd_device-name').text().length) {
|
||||
var pgtitle = $('#nd_device-name').text() +' - '+ $('#'+ tab + '_link').text();
|
||||
}
|
||||
|
||||
// each sidebar search form has a hidden copy of the main navbar search
|
||||
@@ -26,16 +26,16 @@ function do_search (event, tab) {
|
||||
// hide or show sidebars depending on previous state,
|
||||
// and whether the sidebar contains any content (detected by TT)
|
||||
if (has_sidebar[tab] == 0) {
|
||||
$('.sidebar, #sidebar_toggle_img_out').hide();
|
||||
$('.nd_sidebar, #nd_sidebar-toggle-img-out').hide();
|
||||
$('.content').css('margin-right', '10px');
|
||||
}
|
||||
else {
|
||||
if (sidebar_hidden) {
|
||||
$('#sidebar_toggle_img_out').show();
|
||||
$('#nd_sidebar-toggle-img-out').show();
|
||||
}
|
||||
else {
|
||||
$('.content').css('margin-right', '215px');
|
||||
$('.sidebar').show();
|
||||
$('.nd_sidebar').show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,8 +104,8 @@ function update_content(from, to) {
|
||||
|
||||
// page title
|
||||
var pgtitle = 'Netdisco';
|
||||
if ($('#nd_device_name').text().length) {
|
||||
var pgtitle = $('#nd_device_name').text() +' - '+ $('#'+ to + '_link').text();
|
||||
if ($('#nd_device-name').text().length) {
|
||||
var pgtitle = $('#nd_device-name').text() +' - '+ $('#'+ to + '_link').text();
|
||||
}
|
||||
|
||||
if (window.History && window.History.enabled && is_from_state_event == 0) {
|
||||
@@ -144,7 +144,7 @@ function device_form_state(e) {
|
||||
$('#nq').css('text-decoration', 'line-through');
|
||||
|
||||
if (e.attr('type') == 'text') {
|
||||
$('.field_copy_icon').hide();
|
||||
$('.nd_field-copy-icon').hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,15 +160,15 @@ function device_form_state(e) {
|
||||
function(n,i) {return($(n).val() != "")}).length;
|
||||
if (num_empty === 3) {
|
||||
$('#nq').css('text-decoration', 'none');
|
||||
$('.field_copy_icon').show();
|
||||
$('.nd_field-copy-icon').show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
// sidebar form fields should change colour and have bin/copy icon
|
||||
$('.field_copy_icon').hide();
|
||||
$('.field_clear_icon').hide();
|
||||
$('.nd_field-copy-icon').hide();
|
||||
$('.nd_field-clear-icon').hide();
|
||||
|
||||
// activate typeahead on the main search box, for device names only
|
||||
$('#nq').typeahead({
|
||||
@@ -197,30 +197,30 @@ $(document).ready(function() {
|
||||
$('.add-on :checkbox').each(syncCheckBox).click(syncCheckBox);
|
||||
|
||||
// sidebar toggle - pinning
|
||||
$('.sidebar_pin').click(function() {
|
||||
$('.sidebar').toggleClass('sidebar_pinned');
|
||||
$('.sidebar_pin').toggleClass('sidebar_pin_clicked');
|
||||
$('.nd_sidebar-pin').click(function() {
|
||||
$('.nd_sidebar').toggleClass('nd_sidebar-pinned');
|
||||
$('.nd_sidebar-pin').toggleClass('nd_sidebar-pin-clicked');
|
||||
// update tooltip note for current state
|
||||
if ($('.sidebar_pin').hasClass('sidebar_pin_clicked')) {
|
||||
$('.sidebar_pin').first().data('tooltip').options.title = 'Unpin Sidebar';
|
||||
if ($('.nd_sidebar-pin').hasClass('nd_sidebar-pin-clicked')) {
|
||||
$('.nd_sidebar-pin').first().data('tooltip').options.title = 'Unpin Sidebar';
|
||||
}
|
||||
else {
|
||||
$('.sidebar_pin').first().data('tooltip').options.title = 'Pin Sidebar';
|
||||
$('.nd_sidebar-pin').first().data('tooltip').options.title = 'Pin Sidebar';
|
||||
}
|
||||
});
|
||||
|
||||
// sidebar toggle - trigger in/out on image click()
|
||||
$('#sidebar_toggle_img_in').click(function() {
|
||||
$('.sidebar').toggle(250);
|
||||
$('#sidebar_toggle_img_out').toggle();
|
||||
$('#nd_sidebar-toggle-img-in').click(function() {
|
||||
$('.nd_sidebar').toggle(250);
|
||||
$('#nd_sidebar-toggle-img-out').toggle();
|
||||
$('.content').css('margin-right', '10px');
|
||||
sidebar_hidden = 1;
|
||||
});
|
||||
$('#sidebar_toggle_img_out').click(function() {
|
||||
$('#sidebar_toggle_img_out').toggle();
|
||||
$('#nd_sidebar-toggle-img-out').click(function() {
|
||||
$('#nd_sidebar-toggle-img-out').toggle();
|
||||
$('.content').css('margin-right', '215px');
|
||||
$('.sidebar').toggle(250);
|
||||
if (! $('.sidebar').hasClass('sidebar_pinned')) {
|
||||
$('.nd_sidebar').toggle(250);
|
||||
if (! $('.nd_sidebar').hasClass('nd_sidebar-pinned')) {
|
||||
$(window).scrollTop(0);
|
||||
}
|
||||
sidebar_hidden = 0;
|
||||
@@ -228,7 +228,7 @@ $(document).ready(function() {
|
||||
|
||||
// could not get twitter bootstrap tabs to behave, so implemented this
|
||||
// but warning! will probably not work for dropdowns in tabs
|
||||
$('#search_results li').delegate('a', 'click', function(event) {
|
||||
$('#nd_search-results li').delegate('a', 'click', function(event) {
|
||||
event.preventDefault();
|
||||
var from_li = $('.nav-tabs').find('> .active').first();
|
||||
var to_li = $(this).parent('li')
|
||||
|
||||
@@ -32,12 +32,12 @@ function port_control (e) {
|
||||
}
|
||||
else if ($.trim(td.attr('data-action')) == 'false') {
|
||||
$(e).next('span').text('');
|
||||
$(e).toggleClass('nd_power_on');
|
||||
$(e).toggleClass('nd_power-on');
|
||||
$(e).data('tooltip').options.title = 'Click to Enable';
|
||||
td.attr('data-action', 'true');
|
||||
}
|
||||
else if ($.trim(td.attr('data-action')) == 'true') {
|
||||
$(e).toggleClass('nd_power_on');
|
||||
$(e).toggleClass('nd_power-on');
|
||||
$(e).data('tooltip').options.title = 'Click to Disable';
|
||||
td.attr('data-action', 'false');
|
||||
}
|
||||
|
||||
@@ -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="[% task.tag %]_search" class="tab-pane active">
|
||||
<form id="[% task.tag %]_form" class="nd_sidesearchform form-stacked"
|
||||
<form id="[% task.tag %]_form" class="nd_sidebar-form form-stacked"
|
||||
method="get" action="[% uri_for('/admin') %]">
|
||||
[% TRY %]
|
||||
[% INCLUDE "sidebar/admintask/${task.tag}.tt" %]
|
||||
@@ -25,11 +25,11 @@
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<ul id="search_results" class="nav nav-tabs">
|
||||
<li class="active"><a id="[% task.tag %]_link" class="nd_single_tab"
|
||||
<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>
|
||||
<span id="nd_device-name"></span>
|
||||
[% END %]
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<table class="table table-bordered table-condensed table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="center_cell">Entered</th>
|
||||
<th class="center_cell">Action</th>
|
||||
<th class="center_cell">Status</th>
|
||||
<th class="center_cell">Device</th>
|
||||
<th class="center_cell">Port</th>
|
||||
<th class="center_cell">Param</th>
|
||||
<th class="center_cell">User</th>
|
||||
<th class="center_cell">Started</th>
|
||||
<th class="center_cell">Finished</th>
|
||||
<th class="center_cell">Action</th>
|
||||
<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>
|
||||
@@ -20,26 +20,26 @@
|
||||
[% ' class="error"' IF row.status == 'error' %]
|
||||
[% ' class="info"' IF row.status.search('^queued-') %]
|
||||
>
|
||||
<td class="center_cell">[% row.entered_stamp | html_entity %]</td>
|
||||
<td class="center_cell">
|
||||
<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 %]
|
||||
[% END %]
|
||||
</td>
|
||||
[% IF row.status.search('^queued-') %]
|
||||
<td class="center_cell">Running on "[% row.status.remove('^queued-') | html_entity %]"</td>
|
||||
<td class="nd_center-cell">Running on "[% row.status.remove('^queued-') | html_entity %]"</td>
|
||||
[% ELSE %]
|
||||
<td class="center_cell">[% row.status.ucfirst | html_entity %]</td>
|
||||
<td class="nd_center-cell">[% row.status.ucfirst | html_entity %]</td>
|
||||
[% END %]
|
||||
<td class="center_cell"><a class="nd_linkcell"
|
||||
<td class="nd_center-cell"><a class="nd_linkcell"
|
||||
href="[% device_ports %]&q=[% row.device | uri %]">[% row.device | html_entity %]</a></td>
|
||||
<td class="center_cell">[% row.port | html_entity %]</td>
|
||||
<td class="center_cell">[% row.subaction | html_entity %]</td>
|
||||
<td class="center_cell">[% row.username | html_entity %]</td>
|
||||
<td class="center_cell">[% row.started_stamp | html_entity %]</td>
|
||||
<td class="center_cell">[% row.finished_stamp | html_entity %]</td>
|
||||
<td class="center_cell">
|
||||
<form name="del" class="nd_inline_form">
|
||||
<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>
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<table class="table-bordered table-condensed table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="center_cell">Device Name</th>
|
||||
<th class="center_cell">Device IP</th>
|
||||
<th class="center_cell">Number of Ports</th>
|
||||
<th class="center_cell">Action</th>
|
||||
<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="center_cell"><input name="dns" type="text"></td>
|
||||
<td class="center_cell"><input name="ip" type="text"></td>
|
||||
<td class="center_cell"><input name="ports" type="number"></td>
|
||||
<td class="center_cell">
|
||||
<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>
|
||||
@@ -21,16 +21,16 @@
|
||||
[% WHILE (row = results.next) %]
|
||||
<tr>
|
||||
<form name="update">
|
||||
<td class="center_cell"><a class="nd_linkcell"
|
||||
<td class="nd_center-cell"><a class="nd_linkcell"
|
||||
href="[% device_ports %]&q=[% row.dns | uri %]">[% row.dns | html_entity %]</a></td>
|
||||
<td class="center_cell">[% row.ip | html_entity %]</td>
|
||||
<td class="center_cell"><input name="ports" type="number" value="[% row.port_count | html_entity %]"></td>
|
||||
<td class="center_cell">
|
||||
<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">
|
||||
<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 %]">
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
<table class="table-bordered table-condensed table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="center_cell">Left Device</th>
|
||||
<th class="center_cell">Left Port</th>
|
||||
<th class="center_cell">Right Device</th>
|
||||
<th class="center_cell">Right Port</th>
|
||||
<th class="center_cell">Action</th>
|
||||
<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="center_cell">
|
||||
<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="center_cell">
|
||||
<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="center_cell">
|
||||
<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="center_cell">
|
||||
<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="center_cell">
|
||||
<td class="nd_center-cell">
|
||||
<button class="btn btn-small" name="add" type="submit"><i class="icon-plus-sign"></i> Add</button>
|
||||
</td>
|
||||
</form>
|
||||
@@ -43,13 +43,13 @@
|
||||
[% WHILE (row = results.next) %]
|
||||
<tr>
|
||||
<form name="del">
|
||||
<td class="center_cell"><a class="nd_linkcell"
|
||||
<td class="nd_center-cell"><a class="nd_linkcell"
|
||||
href="[% device_ports %]&q=[% row.dev1 | uri %]">[% row.dev1 | html_entity %]</a></td>
|
||||
<td class="center_cell">[% row.port1 | html_entity %]</td>
|
||||
<td class="center_cell"><a class="nd_linkcell"
|
||||
<td class="nd_center-cell">[% row.port1 | html_entity %]</td>
|
||||
<td class="nd_center-cell"><a class="nd_linkcell"
|
||||
href="[% device_ports %]&q=[% row.dev2 | uri %]">[% row.dev2 | html_entity %]</a></td>
|
||||
<td class="center_cell">[% row.port2 | html_entity %]</td>
|
||||
<td class="center_cell">
|
||||
<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 %]">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<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"
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
[% 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_center-cell"' IF NOT loop.first %]>[% item.label | html_entity %]</th>
|
||||
[% END %]
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -28,37 +28,37 @@
|
||||
[% 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"
|
||||
<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"
|
||||
<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"
|
||||
<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"
|
||||
<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 %]
|
||||
|
||||
[% IF params.c_descr %]
|
||||
<td nowrap class="center_cell">[% row.descr | html_entity %]</td>
|
||||
<td nowrap class="nd_center-cell">[% row.descr | html_entity %]</td>
|
||||
[% END %]
|
||||
|
||||
[% IF params.c_type %]
|
||||
<td class="center_cell">[% row.type | html_entity %]</td>
|
||||
<td class="nd_center-cell">[% row.type | html_entity %]</td>
|
||||
[% END %]
|
||||
|
||||
[% IF params.c_duplex %]
|
||||
<td class="center_cell">
|
||||
<td class="nd_center-cell">
|
||||
[% IF row.up == 'up' AND row.duplex %]
|
||||
[% row.duplex_admin | html_entity %] / [% row.duplex | html_entity %]
|
||||
[% END %]
|
||||
@@ -66,46 +66,46 @@
|
||||
[% END %]
|
||||
|
||||
[% IF params.c_lastchange %]
|
||||
<td class="center_cell">[% row.lastchange_stamp | html_entity %]</td>
|
||||
<td class="nd_center-cell">[% 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"
|
||||
<td nowrap class="nd_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>
|
||||
<i class="icon-edit nd_edit-icon"></i>
|
||||
[% ELSE %]
|
||||
<td nowrap class="center_cell">
|
||||
<td nowrap class="nd_center-cell">
|
||||
[% 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 class="nd_center-cell">[% row.speed | html_entity %]</td>
|
||||
[% END %]
|
||||
|
||||
[% IF params.c_mac %]
|
||||
<td class="center_cell">[% row.mac | html_entity %]</td>
|
||||
<td class="nd_center-cell">[% row.mac | html_entity %]</td>
|
||||
[% END %]
|
||||
|
||||
[% IF params.c_mtu %]
|
||||
<td class="center_cell">[% row.mtu | html_entity %]</td>
|
||||
<td class="nd_center-cell">[% 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"
|
||||
<td class="nd_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">
|
||||
<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 class="nd_center-cell">
|
||||
<a class="nd_linkcell"
|
||||
href="[% uri_for('/search') %]?tab=vlan&q=[% row.vlan | uri %]">
|
||||
[% row.vlan | html_entity %]</a>
|
||||
@@ -123,11 +123,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 %]
|
||||
@@ -143,12 +142,12 @@
|
||||
data-field="c_power" data-for-device="[% device | 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 %]
|
||||
@@ -163,7 +162,7 @@
|
||||
data-field="c_power" data-for-device="[% device | 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 %]
|
||||
@@ -216,11 +215,11 @@
|
||||
[% END %]
|
||||
|
||||
[% IF params.c_stp %]
|
||||
<td class="center_cell">[% row.stp | html_entity %]</td>
|
||||
<td class="nd_center-cell">[% row.stp | html_entity %]</td>
|
||||
[% END %]
|
||||
|
||||
[% IF params.c_up %]
|
||||
<td class="center_cell">
|
||||
<td class="nd_center-cell">
|
||||
[% row.up_admin | html_entity %] / [% row.up | html_entity %]
|
||||
</td>
|
||||
[% END %]
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
<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>
|
||||
<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>
|
||||
|
||||
@@ -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 %]
|
||||
|
||||
@@ -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 %]
|
||||
<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,11 +41,11 @@
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<ul id="search_results" class="nav nav-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 %]
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
[% IF models.count %]
|
||||
<div class="row">
|
||||
<div class="span6">
|
||||
<h3 class="nd_inv_tbl_head">By Platform</h3>
|
||||
<h3 class="nd_inventory-table-head">By Platform</h3>
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -32,7 +32,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<h3 class="nd_inv_tbl_head">By Software Release</h3>
|
||||
<h3 class="nd_inventory-table-head">By Software Release</h3>
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -9,16 +9,16 @@
|
||||
|
||||
// reload this table every 10 seconds
|
||||
if (tab == 'jobqueue') {
|
||||
$('#nd_device_name').text('10');
|
||||
setTimeout(function() { $('#nd_device_name').text('9') }, 1000 );
|
||||
setTimeout(function() { $('#nd_device_name').text('8') }, 2000 );
|
||||
setTimeout(function() { $('#nd_device_name').text('7') }, 3000 );
|
||||
setTimeout(function() { $('#nd_device_name').text('6') }, 4000 );
|
||||
setTimeout(function() { $('#nd_device_name').text('5') }, 5000 );
|
||||
setTimeout(function() { $('#nd_device_name').text('4') }, 6000 );
|
||||
setTimeout(function() { $('#nd_device_name').text('3') }, 7000 );
|
||||
setTimeout(function() { $('#nd_device_name').text('2') }, 8000 );
|
||||
setTimeout(function() { $('#nd_device_name').text('1') }, 9000 );
|
||||
$('#nd_device-name').text('10');
|
||||
setTimeout(function() { $('#nd_device-name').text('9') }, 1000 );
|
||||
setTimeout(function() { $('#nd_device-name').text('8') }, 2000 );
|
||||
setTimeout(function() { $('#nd_device-name').text('7') }, 3000 );
|
||||
setTimeout(function() { $('#nd_device-name').text('6') }, 4000 );
|
||||
setTimeout(function() { $('#nd_device-name').text('5') }, 5000 );
|
||||
setTimeout(function() { $('#nd_device-name').text('4') }, 6000 );
|
||||
setTimeout(function() { $('#nd_device-name').text('3') }, 7000 );
|
||||
setTimeout(function() { $('#nd_device-name').text('2') }, 8000 );
|
||||
setTimeout(function() { $('#nd_device-name').text('1') }, 9000 );
|
||||
setTimeout(function() {
|
||||
$('#' + tab + '_form').trigger('submit');
|
||||
}, 10000);
|
||||
|
||||
@@ -12,31 +12,19 @@
|
||||
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();
|
||||
|
||||
// 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() {
|
||||
$(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');
|
||||
});
|
||||
|
||||
// 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') {
|
||||
$('#netmap_help_img').show();
|
||||
$('#nd_netmap-help').show();
|
||||
}
|
||||
else {
|
||||
$('#netmap_help_img').hide();
|
||||
$('#nd_netmap-help').hide();
|
||||
}
|
||||
|
||||
// activate tooltips and popovers
|
||||
@@ -55,18 +43,18 @@
|
||||
|
||||
// sidebar collapser events trigger change of up/down arrow
|
||||
$('.collapse').on('show', function() {
|
||||
$(this).siblings().find('.arrow-up-down')
|
||||
$(this).siblings().find('.nd_arrow-up-down-right')
|
||||
.toggleClass('icon-chevron-up icon-chevron-down');
|
||||
});
|
||||
|
||||
$('.collapse').on('hide', function() {
|
||||
$(this).siblings().find('.arrow-up-down')
|
||||
$(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]");
|
||||
$('.field_clear_icon').click(function() {
|
||||
$('.nd_field-clear-icon').click(function() {
|
||||
portfilter.val('');
|
||||
$('#ports_form').trigger('submit');
|
||||
device_form_state(portfilter); // will hide copy icons
|
||||
@@ -74,53 +62,65 @@
|
||||
|
||||
// clickable device port names can simply resubmit AJAX rather than
|
||||
// fetch the whole page again.
|
||||
$(target).on('click', '.nd_this_port_only', function() {
|
||||
$('#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);
|
||||
|
||||
$('.field_clear_icon').show();
|
||||
$('.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
|
||||
$('#ports_pane').on('click', '.nd_collapse-vlans', function() {
|
||||
$(this).siblings('.nd_collapsing').toggle();
|
||||
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
|
||||
$(target).on('mouseenter', '.nd_editable_cell', 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
|
||||
}
|
||||
});
|
||||
$(target).on('mouseleave', '.nd_editable_cell', 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
|
||||
}
|
||||
});
|
||||
$(target).on('focus', '[contenteditable=true]', 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
|
||||
$(target).on('click', '.icon-hand-up', function() {
|
||||
$('#ports_pane').on('click', '.icon-hand-up', function() {
|
||||
port_control(this); // save
|
||||
});
|
||||
$(target).on('click', '.icon-hand-down', function() {
|
||||
$('#ports_pane').on('click', '.icon-hand-down', function() {
|
||||
port_control(this); // save
|
||||
});
|
||||
|
||||
// activity for power enable/disable control
|
||||
$(target).on('click', '.nd_power_icon', function() {
|
||||
$('#ports_pane').on('click', '.nd_power-icon', function() {
|
||||
port_control(this); // save
|
||||
});
|
||||
|
||||
// activity for contenteditable control
|
||||
$(target).on('keydown', '[contenteditable=true]', function() {
|
||||
$('.tab-content').on('keydown', '[contenteditable=true]', function() {
|
||||
var esc = event.which == 27,
|
||||
nl = event.which == 13;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
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() );
|
||||
@@ -30,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('');
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<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 %]
|
||||
@@ -99,7 +99,7 @@
|
||||
</ul>
|
||||
[% END %]
|
||||
<ul class="nav pull-right">
|
||||
<li class="nd_navbartext">Logged in as </li>
|
||||
<li class="nd_navbar-text">Logged in as </li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
[% IF vars.user.admin %]
|
||||
|
||||
@@ -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,8 @@
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<ul id="search_results" class="nav nav-tabs">
|
||||
<li class="active"><a id="[% report.tag %]_link" class="nd_single_tab"
|
||||
<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">
|
||||
|
||||
@@ -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 %]
|
||||
<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,7 +28,7 @@
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<ul id="search_results" class="nav nav-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 %]
|
||||
|
||||
@@ -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> Admin Disabled
|
||||
</li>
|
||||
@@ -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 class="muted">Mark as Free if Down for:</em><br/>
|
||||
<select id="nd_days_select" name="age_num">
|
||||
<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 class="muted">MAC address format:</em><br/>
|
||||
<select id="nd_mac_format" name="mac_format">
|
||||
<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 %]
|
||||
|
||||
@@ -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 %]
|
||||
|
||||
@@ -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">
|
||||
@@ -40,7 +40,7 @@
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<em class="muted">MAC address format:</em><br/>
|
||||
<select id="nd_node_mac_format" name="mac_format">
|
||||
<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 %]
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user