Allow Port Control users to see Port Config Log report

This commit is contained in:
Oliver Gorwits
2014-02-14 19:38:54 +00:00
parent e2fef8285b
commit e3ae76cea2
12 changed files with 31 additions and 18 deletions

View File

@@ -40,12 +40,6 @@
<span id="nd_device-name">
<a class="nd_adminbutton" name="delall" href="#"><i class="icon-trash text-error"></i></a>
</span>
[% ELSIF task.tag == 'portlog' %]
<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 %]&f=[% params.f | uri %]&c_admin=on">[% params.f %]</a>
</span>
[% ELSIF task.provides_csv %]
<span id="nd_device-name">
<a id="nd_csv-download" href="#" download="netdisco.csv">

View File

@@ -67,7 +67,7 @@
data-animation="" data-title="Click to Enable"></i>
[% END %]
<a class="nd_log-icon"
href="[% uri_for('/admin/portlog') %]?q=[% device.ip | uri %]&f=[% row.port | uri %]">
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>
@@ -342,7 +342,7 @@
role="dialog" aria-hidden="true">
<div class="modal-body">
<blockquote>
<ul><li><p>Please provide a reason for chainging the Port Configuration</p></li></ul>
<ul><li><p>Please provide a reason for changing the Port Configuration</p></li></ul>
</blockquote>
<select id="nd_portlog-reason" class="input-block-level" name="reason">
[% FOREACH pair IN settings.port_control_reasons.pairs %]

View File

@@ -18,8 +18,8 @@
method="get" action="[% uri_for('/device') %]">
<input name="tab" value="[% tab.tag %]" type="hidden"/>
[% TRY %]
[% INCLUDE "sidebar/device/${tab.tag}.tt" %]
<script type="text/javascript">has_sidebar["[% tab.tag %]"] = 1;</script>
[% INCLUDE "sidebar/device/${tab.tag}.tt" %]
[% CATCH %]
<!-- no "[% tab.tag %]" search options -->
<input name="q" value="[% params.q | html_entity %]" type="hidden"/>

View File

@@ -77,6 +77,7 @@
<a href="#">[% category | html_entity %]</a>
<ul class="dropdown-menu">
[% FOREACH item IN settings._reports_menu.$category %]
[% NEXT IF settings._reports.$item.hidden %]
<li><a href="[% uri_for('/report/' _ item) %]">[% settings._reports.$item.label | html_entity %]</a></li>
[% END %]
</ul>

View File

@@ -13,8 +13,8 @@
<form id="[% report.tag %]_form" class="nd_sidebar-form 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>
[% INCLUDE "sidebar/report/${report.tag}.tt" %]
[% CATCH %]
<script type="text/javascript">has_sidebar["[% report.tag %]"] = 0;</script>
[% END %]
@@ -28,7 +28,13 @@
<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>
[% IF report.provides_csv %]
[% IF report.tag == 'portlog' %]
<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 %]&f=[% params.f | uri %]&c_admin=on">[% params.f %]</a>
</span>
[% ELSIF report.provides_csv %]
<span id="nd_device-name">
<a id="nd_csv-download" href="#" download="netdisco.csv">
<i id="nd_csv-download-icon" class="text-info icon-file-text-alt icon-large"

View File

@@ -13,8 +13,8 @@
<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" %]
<script type="text/javascript">has_sidebar["[% tab.tag %]"] = 1;</script>
[% INCLUDE "sidebar/search/${tab.tag}.tt" %]
[% CATCH %]
<!-- no "[% tab.tag %]" search options -->
<input name="q" value="[% params.q | html_entity %]" type="hidden"/>