Add new options when render proc is active. Tiquet: #2503
This commit is contained in:
parent
da80a1ad82
commit
a316419afa
|
@ -81,7 +81,7 @@ $table_behaviour->data[$row][1] = html_print_checkbox('paginate_module', 1,
|
|||
$config['paginate_module'], true);
|
||||
$row++;
|
||||
|
||||
$table_behaviour->data[$row][0] = __('Display proc modules in binary format (OK/FAIL).');
|
||||
$table_behaviour->data[$row][0] = __('Display data of proc modules in other format');
|
||||
$table_behaviour->data[$row][1] = __('Yes') . ' ' .
|
||||
html_print_radio_button ('render_proc', 1, '',
|
||||
$config["render_proc"], true) .
|
||||
|
@ -90,6 +90,15 @@ $table_behaviour->data[$row][1] .= __('No') . ' ' .
|
|||
html_print_radio_button ('render_proc', 0, '',
|
||||
$config["render_proc"], true);
|
||||
$row++;
|
||||
|
||||
$table_behaviour->data[$row][0] = __('Display text proc modules have state is ok');
|
||||
$table_behaviour->data[$row][1] = html_print_input_text ('render_proc_ok', $config["render_proc_ok"], '', 25, 25, true);
|
||||
$row++;
|
||||
|
||||
$table_behaviour->data[$row][0] = __('Display text when proc modules have state critical');
|
||||
$table_behaviour->data[$row][1] = html_print_input_text ('render_proc_fail', $config["render_proc_fail"], '', 25, 25, true);
|
||||
$row++;
|
||||
|
||||
echo "<fieldset>";
|
||||
echo "<legend>" . __('Behaviour configuration') . "</legend>";
|
||||
html_print_table ($table_behaviour);
|
||||
|
|
|
@ -903,9 +903,9 @@ if ($list_modules) {
|
|||
case 21:
|
||||
case 31:
|
||||
if ($module["datos"]>=1)
|
||||
$salida ='OK';
|
||||
$salida = $config["render_proc_ok"];
|
||||
else
|
||||
$salida = 'FAIL';
|
||||
$salida = $config["render_proc_fail"];
|
||||
break;
|
||||
default:
|
||||
$salida = format_numeric($module["datos"]);
|
||||
|
|
|
@ -468,7 +468,11 @@ function config_update_config () {
|
|||
if (!config_update_value ('type_module_charts', (string) get_parameter('type_module_charts', 'area')))
|
||||
$error_update[] = __('Default type of module charts.');
|
||||
if (!config_update_value ('render_proc', (bool) get_parameter('render_proc', false)))
|
||||
$error_update[] = __('Display proc modules in binary format (OK/FAIL)');
|
||||
$error_update[] = __('Display dara of proc modules in other format');
|
||||
if (!config_update_value ('render_proc_ok', (string) get_parameter('render_proc_ok', __('Ok') )))
|
||||
$error_update[] = __('Display text proc modules have state is ok');
|
||||
if (!config_update_value ('render_proc_fail', (string) get_parameter('render_proc_fail', __('Fail') )))
|
||||
$error_update[] = __('Display text when proc modules have state critical');
|
||||
|
||||
|
||||
|
||||
|
@ -1296,6 +1300,13 @@ function config_process_config () {
|
|||
config_update_value ('render_proc', 0);
|
||||
}
|
||||
|
||||
if (!isset($config["render_proc_ok"])) {
|
||||
config_update_value ('render_proc_ok', __('Ok') );
|
||||
}
|
||||
if (!isset($config["render_proc_fail"])) {
|
||||
config_update_value ('render_proc_fail', __('Fail') );
|
||||
}
|
||||
|
||||
if (!isset($config['command_snapshot'])) {
|
||||
config_update_value ('command_snapshot', 1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue