Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webui: Don't disable the applications check boxes in settings if the … #7615

Merged
merged 1 commit into from Nov 2, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions html/pages/device/edit/apps.inc.php
@@ -1,9 +1,11 @@
<h3> Applications </h3>
<?php

use LibreNMS\Config;

// Load our list of available applications
$applications = array();
foreach (glob($config['install_dir'] . '/includes/polling/applications/*.inc.php') as $file) {
foreach (glob(Config::get('install_dir') . '/includes/polling/applications/*.inc.php') as $file) {
$name = basename($file, '.inc.php');
$applications[$name] = $name;
}
Expand All @@ -25,7 +27,9 @@
// check if the app exists in the enable apps array and check if it was automatically enabled
if (isset($enabled_apps[$app])) {
$modifiers = ' checked';
if ($enabled_apps[$app]) {
if ($enabled_apps[$app]
&& is_dev_attrib_enabled($device, "poll_applications", Config::getOsSetting($device['os'], "poller_modules.applications"))
) {
$app_text .= '<span class="text-success"> (Discovered)</span>';
$modifiers .= ' disabled';
}
Expand Down