mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
webui: Added support for skipping snmp check on edit snmp page for devices (#4896)
This commit is contained in:
committed by
Daniel Preussker
parent
126f82843e
commit
d5b20dbd1f
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
if ($_POST['editing']) {
|
if ($_POST['editing']) {
|
||||||
if ($_SESSION['userlevel'] > '7') {
|
if ($_SESSION['userlevel'] > '7') {
|
||||||
|
$no_checks = ($_POST['no_checks'] == 'on');
|
||||||
$community = mres($_POST['community']);
|
$community = mres($_POST['community']);
|
||||||
$snmpver = mres($_POST['snmpver']);
|
$snmpver = mres($_POST['snmpver']);
|
||||||
$transport = $_POST['transport'] ? mres($_POST['transport']) : $transport = 'udp';
|
$transport = $_POST['transport'] ? mres($_POST['transport']) : $transport = 'udp';
|
||||||
@@ -46,7 +47,7 @@ if ($_POST['editing']) {
|
|||||||
$update = array_merge($update, $v3);
|
$update = array_merge($update, $v3);
|
||||||
|
|
||||||
$device_tmp = deviceArray($device['hostname'], $community, $snmpver, $port, $transport, $v3, $port_assoc_mode);
|
$device_tmp = deviceArray($device['hostname'], $community, $snmpver, $port, $transport, $v3, $port_assoc_mode);
|
||||||
if (isSNMPable($device_tmp)) {
|
if ($no_checks === true || isSNMPable($device_tmp)) {
|
||||||
$rows_updated = dbUpdate($update, 'devices', '`device_id` = ?', array($device['device_id']));
|
$rows_updated = dbUpdate($update, 'devices', '`device_id` = ?', array($device['device_id']));
|
||||||
|
|
||||||
$max_repeaters_set = false;
|
$max_repeaters_set = false;
|
||||||
@@ -240,6 +241,18 @@ echo " </select>
|
|||||||
</div>
|
</div>
|
||||||
</div>";
|
</div>";
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-offset-2 col-sm-9">
|
||||||
|
<div class="checkbox">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" name="no_checks" id="no_checks"> Don't perform ICMP or SNMP checks?
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
|
||||||
if ($config['distributed_poller'] === true) {
|
if ($config['distributed_poller'] === true) {
|
||||||
echo '
|
echo '
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -269,7 +282,7 @@ if ($config['distributed_poller'] === true) {
|
|||||||
echo '
|
echo '
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-1 col-md-offset-2">
|
<div class="col-md-1 col-md-offset-2">
|
||||||
<button type="submit" name="Submit" class="btn btn-default"><i class="fa fa-check"></i> Save</button>
|
<button type="submit" name="Submit" class="btn btn-success"><i class="fa fa-check"></i> Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
Reference in New Issue
Block a user