From 86a504e675ebe76392af914b53bf38add658de84 Mon Sep 17 00:00:00 2001 From: Mark Westerterp <1002588+westerterp@users.noreply.github.com> Date: Sun, 27 Feb 2022 10:56:33 +0100 Subject: [PATCH] Fix Oxidized Config tab showing when Device OS or Device Type is disabled (#13809) * Fix Oxidized Config tab showing when Device OS or Device Type is disabled Fixes https://github.com/librenms/librenms/issues/13808 * StyleCI * Apply Jellyfrogs suggestion to simplify the code --- app/Http/Controllers/Device/Tabs/ShowConfigController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Device/Tabs/ShowConfigController.php b/app/Http/Controllers/Device/Tabs/ShowConfigController.php index e70050ef31..e3dd84a73c 100644 --- a/app/Http/Controllers/Device/Tabs/ShowConfigController.php +++ b/app/Http/Controllers/Device/Tabs/ShowConfigController.php @@ -71,8 +71,10 @@ class ShowConfigController extends Controller implements DeviceTab private function oxidizedEnabled(Device $device) { return Config::get('oxidized.enabled') === true - && Config::has('oxidized.url') - && $device->getAttrib('override_Oxidized_disable') !== 'true'; + && Config::has('oxidized.url') + && $device->getAttrib('override_Oxidized_disable') !== 'true' + && ! in_array($device->type, Config::get('oxidized.ignore_types', [])) + && ! in_array($device->os, Config::get('oxidized.ignore_os', [])); } private function getRancidPath()