[#208] Always show port log icon
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
* Allow filtering out of Device Ports on Node (MAC) search
|
* Allow filtering out of Device Ports on Node (MAC) search
|
||||||
* Display Voice VLAN on Cisco devices
|
* Display Voice VLAN on Cisco devices
|
||||||
* [#202] Detect failed OUI and MIB downloads
|
* [#202] Detect failed OUI and MIB downloads
|
||||||
|
* [#208] Always show port log icon
|
||||||
|
|
||||||
[BUG FIXES]
|
[BUG FIXES]
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ ajax '/ajax/control/report/portlog/add' => require_login sub {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
ajax '/ajax/content/report/portlog' => require_role port_control => sub {
|
ajax '/ajax/content/report/portlog' => require_login sub {
|
||||||
my $device = param('q');
|
my $device = param('q');
|
||||||
my $port = param('f');
|
my $port = param('f');
|
||||||
send_error('Bad Request', 400) unless $device and $port;
|
send_error('Bad Request', 400) unless $device and $port;
|
||||||
|
|||||||
@@ -162,18 +162,15 @@ div.content > div.tab-content table.nd_floatinghead thead {
|
|||||||
|
|
||||||
/* nudge cell content to the right when port_control controls are enabled */
|
/* nudge cell content to the right when port_control controls are enabled */
|
||||||
.nd_editable-cell > .nd_this-port-only {
|
.nd_editable-cell > .nd_this-port-only {
|
||||||
margin-left: 18px;
|
margin-left: 14px;
|
||||||
margin-right: 18px;
|
margin-right: 35px;
|
||||||
}
|
}
|
||||||
.nd_editable-cell > .nd_port-only-first {
|
.nd_editable-cell > .nd_port-only-first {
|
||||||
margin-left: 9px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nd_editable-cell > .nd_editable-cell-content {
|
.nd_editable-cell > .nd_editable-cell-content {
|
||||||
margin-right: 18px;
|
margin-right: 25px;
|
||||||
}
|
|
||||||
.table .nd_nudge-for-icon {
|
|
||||||
padding-left: 25px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||||
@@ -269,13 +266,17 @@ td > form.nd_inline-form {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nd_hand-icon {
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
/* port admin log view */
|
/* port admin log view */
|
||||||
.nd_log-icon {
|
.nd_log-icon {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: black;
|
color: black;
|
||||||
float: left;
|
float: right;
|
||||||
visibility: hidden;
|
padding-left: 10px;
|
||||||
margin-top: 3px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
.nd_log-icon:hover, .nd_log-icon:focus {
|
.nd_log-icon:hover, .nd_log-icon:focus {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ $(document).ready(function() {
|
|||||||
// toggle visibility of port up/down and edit controls
|
// toggle visibility of port up/down and edit controls
|
||||||
$('.tab-content').on('mouseenter', '.nd_editable-cell', function() {
|
$('.tab-content').on('mouseenter', '.nd_editable-cell', function() {
|
||||||
$(this).children('.nd_hand-icon').show();
|
$(this).children('.nd_hand-icon').show();
|
||||||
$(this).children('.nd_log-icon').css('visibility', 'visible');
|
|
||||||
if (! $(this).is(':focus')) {
|
if (! $(this).is(':focus')) {
|
||||||
$(this).children('.nd_edit-icon').show(); // ports
|
$(this).children('.nd_edit-icon').show(); // ports
|
||||||
$(this).siblings('td').find('.nd_device-details-edit').show(); // details
|
$(this).siblings('td').find('.nd_device-details-edit').show(); // details
|
||||||
@@ -105,7 +104,6 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
$('.tab-content').on('mouseleave', '.nd_editable-cell', function() {
|
$('.tab-content').on('mouseleave', '.nd_editable-cell', function() {
|
||||||
$(this).children('.nd_hand-icon').hide();
|
$(this).children('.nd_hand-icon').hide();
|
||||||
$(this).children('.nd_log-icon').css('visibility', 'hidden');
|
|
||||||
if (! $(this).is(':focus')) {
|
if (! $(this).is(':focus')) {
|
||||||
$(this).children('.nd_edit-icon').hide(); // ports
|
$(this).children('.nd_edit-icon').hide(); // ports
|
||||||
$(this).siblings('td').find('.nd_device-details-edit').hide(); // details
|
$(this).siblings('td').find('.nd_device-details-edit').hide(); // details
|
||||||
|
|||||||
@@ -8,9 +8,7 @@
|
|||||||
[% NEXT IF item.name == 'c_nodes' AND params.c_nodes AND params.c_neighbors %]
|
[% NEXT IF item.name == 'c_nodes' AND params.c_nodes AND params.c_neighbors %]
|
||||||
[% NEXT UNLESS params.${item.name} %]
|
[% NEXT UNLESS params.${item.name} %]
|
||||||
[% SET th_class = '' %]
|
[% SET th_class = '' %]
|
||||||
[% IF (user_can_port_control AND params.c_admin AND (item.name == 'c_port' OR item.name == 'c_name')) %]
|
[% IF (item.name == 'c_port' OR item.name == 'c_descr' OR item.name == 'c_name') %]
|
||||||
[% th_class = ' class="nd_nudge-for-icon portsort"' %]
|
|
||||||
[% ELSIF (item.name == 'c_port' OR item.name == 'c_descr' OR item.name == 'c_name') %]
|
|
||||||
[% th_class = ' class="portsort"' %]
|
[% th_class = ' class="portsort"' %]
|
||||||
[% END %]
|
[% END %]
|
||||||
<th[% th_class %]>
|
<th[% th_class %]>
|
||||||
@@ -62,6 +60,22 @@
|
|||||||
<td nowrap class="nd_editable-cell" data-action="down"
|
<td nowrap class="nd_editable-cell" data-action="down"
|
||||||
data-order="[% row.port | html_entity %]" data-filter="[% row.port | html_entity %]"
|
data-order="[% row.port | html_entity %]" data-filter="[% row.port | html_entity %]"
|
||||||
data-field="c_port" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
|
data-field="c_port" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
|
||||||
|
[% ELSE %]
|
||||||
|
<td nowrap class="nd_editable-cell" data-action="up"
|
||||||
|
data-order="[% row.port | html_entity %]" data-filter="[% row.port | html_entity %]"
|
||||||
|
data-field="c_port" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
|
||||||
|
[% END %]
|
||||||
|
[% ELSE %]
|
||||||
|
<td nowrap data-order="[% row.port | html_entity %]" data-filter="[% row.port | html_entity %]">
|
||||||
|
[% END %]
|
||||||
|
<a class="nd_log-icon"
|
||||||
|
href="[% uri_for('/report/portlog') %]?q=[% device.ip | uri %]&f=[% row.port | uri %]">
|
||||||
|
<i class="icon-file-text-alt"
|
||||||
|
rel="tooltip" data-placement="top" data-offset="3"
|
||||||
|
data-animation="" data-title="View Port Log"></i>
|
||||||
|
</a>
|
||||||
|
[% IF user_can_port_control AND params.c_admin %]
|
||||||
|
[% IF row.up_admin == 'up' %]
|
||||||
<span class="nd_hand-icon">
|
<span class="nd_hand-icon">
|
||||||
<i class="icon-bullseye" data-action="bounce"
|
<i class="icon-bullseye" data-action="bounce"
|
||||||
rel="tooltip" data-placement="top" data-offset="3"
|
rel="tooltip" data-placement="top" data-offset="3"
|
||||||
@@ -71,9 +85,6 @@
|
|||||||
data-animation="" data-title="Disable Port"></i>
|
data-animation="" data-title="Disable Port"></i>
|
||||||
</span>
|
</span>
|
||||||
[% ELSE %]
|
[% ELSE %]
|
||||||
<td nowrap class="nd_editable-cell" data-action="up"
|
|
||||||
data-order="[% row.port | html_entity %]" data-filter="[% row.port | html_entity %]"
|
|
||||||
data-field="c_port" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
|
|
||||||
<span class="nd_hand-icon">
|
<span class="nd_hand-icon">
|
||||||
<i class="icon-bullseye" data-action="bounce" style="display: none"
|
<i class="icon-bullseye" data-action="bounce" style="display: none"
|
||||||
rel="tooltip" data-placement="top" data-offset="3"
|
rel="tooltip" data-placement="top" data-offset="3"
|
||||||
@@ -83,14 +94,6 @@
|
|||||||
data-animation="" data-title="Enable Port"></i>
|
data-animation="" data-title="Enable Port"></i>
|
||||||
</span>
|
</span>
|
||||||
[% END %]
|
[% END %]
|
||||||
<a class="nd_log-icon"
|
|
||||||
href="[% uri_for('/report/portlog') %]?q=[% device.ip | uri %]&f=[% row.port | uri %]">
|
|
||||||
<i class="icon-file-text-alt"
|
|
||||||
rel="tooltip" data-placement="top" data-offset="3"
|
|
||||||
data-animation="" data-title="View Port Log"></i>
|
|
||||||
</a>
|
|
||||||
[% ELSE %]
|
|
||||||
<td nowrap data-order="[% row.port | html_entity %]" data-filter="[% row.port | html_entity %]">
|
|
||||||
[% END %]
|
[% END %]
|
||||||
<a class="nd_this-port-only nd_port-only-first" href="[% uri_for('/device',
|
<a class="nd_this-port-only nd_port-only-first" href="[% uri_for('/device',
|
||||||
self_options) %]&q=[% params.q | uri %]&f=[% row.port | uri %]&prefer=port">
|
self_options) %]&q=[% params.q | uri %]&f=[% row.port | uri %]&prefer=port">
|
||||||
@@ -147,7 +150,7 @@
|
|||||||
data-field="c_name" data-for-device="[% device.ip | html_entity %]" data-for-port="[% row.port | html_entity %]">
|
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>
|
<i class="icon-edit nd_edit-icon"></i>
|
||||||
[% ELSE %]
|
[% ELSE %]
|
||||||
<td nowrap>
|
<td nowrap class="nd_editable-cell">
|
||||||
[% END %]
|
[% END %]
|
||||||
<div class="nd_editable-cell-content">
|
<div class="nd_editable-cell-content">
|
||||||
[% row.name | html_entity %]
|
[% row.name | html_entity %]
|
||||||
|
|||||||
@@ -31,9 +31,9 @@
|
|||||||
href="#[% report.tag %]_pane">[% report.label %]</a></li>
|
href="#[% report.tag %]_pane">[% report.label %]</a></li>
|
||||||
[% IF report.tag == 'portlog' %]
|
[% IF report.tag == 'portlog' %]
|
||||||
<span id="nd_device-name">
|
<span id="nd_device-name">
|
||||||
<a href="[% device_ports %]&q=[% params.q | uri %]&c_admin=on">[% params.q %]</a>
|
<a href="[% device_ports %]&q=[% params.q | uri %]">[% params.q %]</a>
|
||||||
-
|
-
|
||||||
<a href="[% device_ports %]&q=[% params.q | uri %]&f=[% params.f | uri %]&c_admin=on">[% params.f %]</a>
|
<a href="[% device_ports %]&q=[% params.q | uri %]&f=[% params.f | uri %]">[% params.f %]</a>
|
||||||
</span>
|
</span>
|
||||||
[% ELSIF report.provides_csv %]
|
[% ELSIF report.provides_csv %]
|
||||||
<span id="nd_device-name">
|
<span id="nd_device-name">
|
||||||
|
|||||||
Reference in New Issue
Block a user