mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
Added support for excluding devices from Oxidized api
This commit is contained in:
@@ -36,6 +36,7 @@ else {
|
||||
}
|
||||
|
||||
$panes['storage'] = 'Storage';
|
||||
$panes['misc'] = 'Misc';
|
||||
|
||||
print_optionbar_start();
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
echo '
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="oxidized" class="col-sm-2 control-label">Exclude from Oxidized?</label>
|
||||
<div class="col-sm-10">
|
||||
'.dynamic_override_config('checkbox','override_Oxidized_disable', $device).'
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
';
|
||||
|
||||
?>
|
||||
|
||||
<script>
|
||||
$("[name='override_config']").bootstrapSwitch('offColor','danger');
|
||||
$('input[name="override_config"]').on('switchChange.bootstrapSwitch', function(event, state) {
|
||||
event.preventDefault();
|
||||
var $this = $(this);
|
||||
var attrib = $this.data('attrib');
|
||||
var device_id = $this.data('device_id');
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'ajax_form.php',
|
||||
data: { type: 'override-config', device_id: device_id, attrib: attrib, state: state },
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data.status == 'ok') {
|
||||
toastr.success(data.message);
|
||||
}
|
||||
else {
|
||||
toastr.error(data.message);
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
toastr.error('Could not set this override');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user