Ask for Reason when changing Port up/down Status, or VLAN
This commit is contained in:
@@ -75,6 +75,8 @@ extra_web_plugins: []
|
||||
# mibdirs defaults to contents of mibhome
|
||||
community: ['public']
|
||||
community_rw: ['private']
|
||||
snmp_auth: []
|
||||
get_community: ''
|
||||
bulkwalk_off: false
|
||||
bulkwalk_no: []
|
||||
bulkwalk_repeaters: 20
|
||||
@@ -122,6 +124,17 @@ portctl_nophones: false
|
||||
portctl_vlans: false
|
||||
portctl_uplinks: false
|
||||
check_userlog: true
|
||||
port_control_reasons:
|
||||
address: 'Address Allocation Abuse'
|
||||
copyright: 'Copyright Violation'
|
||||
dos: 'Denial of Service'
|
||||
bandwidth: 'Excessive Bandwidth'
|
||||
polling: 'Excessive Polling of DNS/DHCP/SNMP'
|
||||
noserv: 'Not In Service'
|
||||
exploit: 'Remote Exploit Possible'
|
||||
compromised: 'System Compromised'
|
||||
other: 'Other'
|
||||
resolved: 'Issue Resolved'
|
||||
|
||||
# --------------
|
||||
# BACKEND DAEMON
|
||||
|
||||
@@ -4,6 +4,7 @@ var nd_save_ok = false;
|
||||
// user clicked or asked for port changes to be submitted via ajax
|
||||
function port_control (e) {
|
||||
var td = $(e).closest('td'),
|
||||
reason = $('#nd_portlog-reason').val(),
|
||||
logmessage = $('#nd_portlog-log').val();
|
||||
$('#nd_portlog-log').val('');
|
||||
|
||||
@@ -23,7 +24,8 @@ function port_control (e) {
|
||||
,field: td.data('field')
|
||||
,action: td.data('action')
|
||||
,value: td.text().trim()
|
||||
,log: logmessage,
|
||||
,reason: reason
|
||||
,log: logmessage
|
||||
}
|
||||
,success: function() {
|
||||
toastr.info('Submitted change request');
|
||||
@@ -119,6 +121,12 @@ $(document).ready(function() {
|
||||
$('#nd_portlog').one('hidden', function() {
|
||||
port_control(clicked); // save
|
||||
});
|
||||
if ($(this).hasClass('icon-hand-up')) {
|
||||
$('#nd_portlog-reason').val('resolved');
|
||||
}
|
||||
else {
|
||||
$('#nd_portlog-reason').val('other');
|
||||
}
|
||||
$('#nd_portlog').modal('show');
|
||||
});
|
||||
|
||||
|
||||
@@ -279,6 +279,15 @@
|
||||
<div id="nd_portlog" class="nd_modal nd_deep-horizon modal hide fade" tabindex="-1"
|
||||
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>
|
||||
</blockquote>
|
||||
<select id="nd_portlog-reason" class="input-block-level" name="reason">
|
||||
[% FOREACH pair IN settings.port_control_reasons.pairs %]
|
||||
<option[% ' selected="selected"' IF pair.key == 'other' %] value="[% pair.key | html_entity %]">
|
||||
[% pair.value | html_entity %]</option>
|
||||
[% END %]
|
||||
</select>
|
||||
<textarea id="nd_portlog-log" class="input-block-level" rows="2" name="log"
|
||||
placeholder="Enter a log message"></textarea>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user