$value], 'device_graphs', '`device_id` = ? AND `graph` = ?', [$device['device_id'], $graph]); if ($updated) { print_success("Graph '$graph' " . ($value ? 'enabled' : 'disabled') . '.'); $graphs_sections[$config['graph_types']['device'][$graph]['section']][$graph] = (bool)$value; } } } } ?>
Name | Description | Section | Status | |
---|---|---|---|---|
' . $graph . ' | '); echo($config['graph_types']['device'][$graph]['descr'] . ' | '); echo(nicecase($section) . ' | '); if (!$enabled) { $attrib_status = 'disabled'; $toggle = 'Enable'; $btn_class = 'btn-success'; $btn_icon = 'icon-ok'; } else { $attrib_status = 'enabled'; $toggle = "Disable"; $btn_class = "btn-danger"; $btn_icon = 'icon-remove'; } echo($attrib_status . ' | '); if (!in_array($section, ['poller', 'system'])) { $form = ['type' => 'simple']; // Elements $form['row'][0]['toggle_graph'] = ['type' => 'hidden', 'value' => $graph]; $form['row'][0]['submit'] = ['type' => 'submit', 'name' => $toggle, 'class' => 'btn-mini ' . $btn_class, 'icon' => $btn_icon, 'right' => TRUE, 'readonly' => $readonly, 'value' => 'graph_toggle']; print_form($form); unset($form); } else { echo(''); } echo(' |