Module | Last Poll | Global | Device | |
---|---|---|---|---|
'.$module.' | '); echo(''.$module_time.' | '); echo(($module_status ? 'enabled' : 'disabled')); echo(' | '); $attrib_status = 'disabled'; $toggle = 'Enable'; $btn_class = 'btn-success'; $btn_icon = 'icon-ok'; $disabled = FALSE; if ($module == 'os' || $module == 'system') { $attrib_status = 'locked'; $toggle = "Locked"; $btn_class = ''; $btn_icon = 'icon-lock'; $disabled = TRUE; } elseif (poller_module_excluded($device, $module)) { $attrib_status = 'excluded'; $toggle = "Excluded"; $btn_class = ''; $btn_icon = 'icon-lock'; $disabled = TRUE; } //elseif (($attrib_set && $attribs['poll_'.$module]) || (!$attrib_set && $module_status)) elseif (is_module_enabled($device, $module, 'poller')) { $attrib_status = 'enabled'; $toggle = "Disable"; $btn_class = "btn-danger"; $btn_icon = 'icon-remove'; } echo($attrib_status.' | '); $form = array('type' => 'simple'); // Elements $form['row'][0]['toggle_poller'] = array('type' => 'hidden', 'value' => $module); $form['row'][0]['submit'] = array('type' => 'submit', 'name' => $toggle, 'class' => 'btn-mini '.$btn_class, 'icon' => $btn_icon, 'right' => TRUE, 'readonly' => $readonly, 'disabled' => $disabled, 'value' => 'Toggle'); print_form($form); unset($form); echo(' |
Module | Last Poll | Global | Device | |
---|---|---|---|---|
'.$module_name.' | '); echo(''.$module_time.' | '); echo(($module_status ? 'enabled' : 'disabled')); echo(' | '); $attrib_status = 'disabled'; $toggle = 'Enable'; $btn_class = 'btn-success'; $btn_icon = 'icon-ok'; $value = 'Toggle'; $disabled = FALSE; if ($module === 'enable_ports_junoseatmvp' && $device['os'] !== 'junose') { /// FIXME. see here includes/discovery/junose-atm-vp.inc.php $attrib_status = 'excluded'; $toggle = "Excluded"; $btn_class = ''; $btn_icon = 'icon-lock'; $disabled = TRUE; } elseif (($attrib_set && $attribs[$module]) || (!$attrib_set && $module_status)) { $attrib_status = 'enabled'; $toggle = "Disable"; $btn_class = "btn-danger"; $btn_icon = 'icon-remove'; } elseif ($module === 'enable_ports_separate_walk' && !$attrib_set) { // Model definition can override os definition $model_separate_walk = isset($model['ports_separate_walk']) && $model['ports_separate_walk']; if ($model_separate_walk && $ports_total_count > 10) { $attrib_status = 'FORCED'; $toggle = "Disable"; $btn_class = "btn-danger"; $btn_icon = 'icon-remove'; $value = 'Disable'; } elseif ((int)$device['state']['poller_mod_perf']['ports'] < 20 && $ports_total_count <= 10) { $attrib_status = 'excluded'; $toggle = "Excluded"; $btn_class = ''; $btn_icon = 'icon-lock'; $disabled = TRUE; } } echo($attrib_status . ' | '); $form = array('type' => 'simple'); // Elements $form['row'][0]['toggle_ports'] = array('type' => 'hidden', 'value' => $module); $form['row'][0]['submit'] = array('type' => 'submit', 'name' => $toggle, 'class' => 'btn-mini '.$btn_class, 'icon' => $btn_icon, 'right' => TRUE, 'readonly' => $readonly, 'disabled' => $disabled, 'value' => $value); print_form($form); unset($form); echo(' |
Module | Last | Global | Device | |
---|---|---|---|---|
'.$module.' | '); echo(''.$module_time.' | '); echo(($module_status ? 'enabled' : 'disabled')); echo(' | '); $attrib_status = 'disabled'; $toggle = 'Enable'; $btn_class = 'btn-success'; $btn_icon = 'icon-ok'; $disabled = FALSE; if (in_array($module, (array)$config['os'][$device['os']]['discovery_blacklist'])) { $attrib_status = 'excluded'; $toggle = "Excluded"; $btn_class = ''; $btn_icon = 'icon-lock'; $disabled = TRUE; } //elseif (($attrib_set && $attribs['discover_'.$module]) || (!$attrib_set && $module_status)) elseif (is_module_enabled($device, $module, 'discovery')) { $attrib_status = 'enabled'; $toggle = "Disable"; $btn_class = "btn-danger"; $btn_icon = 'icon-remove'; } echo($attrib_status . ' | '); $form = array('type' => 'simple'); // Elements $form['row'][0]['toggle_discovery'] = array('type' => 'hidden', 'value' => $module); $form['row'][0]['submit'] = array('type' => 'submit', 'name' => $toggle, 'class' => 'btn-mini '.$btn_class, 'icon' => $btn_icon, 'right' => TRUE, 'readonly' => $readonly, 'disabled' => $disabled, 'value' => 'Toggle'); print_form($form); unset($form); echo(' |