diff --git a/pandora_console/include/class/AgentWizard.class.php b/pandora_console/include/class/AgentWizard.class.php
index 3865a809b4..f638092930 100644
--- a/pandora_console/include/class/AgentWizard.class.php
+++ b/pandora_console/include/class/AgentWizard.class.php
@@ -341,18 +341,19 @@ class AgentWizard extends HTML
'return' => true,
],
];
-
- $output = '
';
- $output .= $this->printForm(
+ // Prints main form.
+ html_print_div(
[
- 'form' => $form,
- 'inputs' => $inputs,
- ],
- true
+ 'class' => 'white_box',
+ 'content' => $this->printForm(
+ [
+ 'form' => $form,
+ 'inputs' => $inputs,
+ ],
+ true
+ ),
+ ]
);
- $output .= '
';
-
- echo $output;
}
@@ -392,7 +393,8 @@ class AgentWizard extends HTML
];
}
- $output = '';
+ // Lets generate the block tables.
+ $output = '';
foreach ($blockTables as $id_group => $blockTable) {
// Data with all components.
$blockData = $blockTable['data'];
@@ -405,9 +407,21 @@ class AgentWizard extends HTML
$blockComponentList = chop($blockComponentList, ',');
// Title of Block.
$blockTitle = $blockTable['name'];
- $blockTitle .= '';
+ $blockTitle .= html_print_div(
+ [
+ 'class' => 'white_table_header_checkbox',
+ 'content' => html_print_checkbox_switch_extended(
+ 'sel_block_'.$id_group,
+ 1,
+ 0,
+ false,
+ 'switchBlockControl(event)',
+ '',
+ true
+ ),
+ ],
+ true
+ );
$table = new StdClasS();
$table->class = 'databox data';
@@ -422,12 +436,12 @@ class AgentWizard extends HTML
$table->class = 'info_table';
$table->head = [];
- $table->head[0] = '
'.__('Module Name').'
';
- $table->head[1] = '
'.__('Type').'
';
- $table->head[2] = '
'.__('Module info').'
';
- $table->head[3] = '
'.__('Warning').'
';
- $table->head[4] = '
'.__('Critical').'
';
- $table->head[5] = '
'.__('Active').'
';
+ $table->head[0] = html_print_div(['style' => 'font-weight:700;', 'content' => __('Module Name')], true);
+ $table->head[1] = html_print_div(['style' => 'font-weight:700;text-align:center;', 'content' => __('Type')], true);
+ $table->head[2] = html_print_div(['style' => 'font-weight:700;', 'content' => __('Module info')], true);
+ $table->head[3] = html_print_div(['style' => 'font-weight:700;text-align:center;', 'content' => __('Warning')], true);
+ $table->head[4] = html_print_div(['style' => 'font-weight:700;text-align:center;', 'content' => __('Critical')], true);
+ $table->head[5] = html_print_div(['style' => 'font-weight:700;margin-right:1.2em;', 'content' => __('Active')], true);
$table->size = [];
$table->size[0] = '15%';
@@ -449,69 +463,92 @@ class AgentWizard extends HTML
// Module info column.
$data[2] = mb_strimwidth(io_safe_output($module['description']), 0, 150, '...');
// Warning column.
- $data[3] = '
Min: ';
- $data[3] .= html_print_input_text(
- 'txt_min_warn_'.$module['component_id'],
- '0',
- '',
- 3,
- 4,
+ $data[3] = html_print_div(
+ [
+ 'class' => 'wizard-column-levels',
+ 'content' => 'Min: '.html_print_input_text(
+ 'warning_min_'.$module['component_id'],
+ '0',
+ '',
+ 3,
+ 4,
+ true
+ ).' ',
+ ],
true
);
- $data[3] .= '
';
- $data[3] .= ' ';
- $data[3] .= '
Max: ';
- $data[3] .= html_print_input_text(
- 'txt_max_warn_'.$module['component_id'],
- '0',
- '',
- 3,
- 4,
+ $data[3] .= html_print_div(
+ [
+ 'class' => 'wizard-column-levels',
+ 'content' => 'Max: '.html_print_input_text(
+ 'warning_max_'.$module['component_id'],
+ '0',
+ '',
+ 3,
+ 4,
+ true
+ ),
+ ],
true
);
- $data[3] .= '
';
- $data[3] .= '
Inv: ';
- $data[3] .= html_print_checkbox(
- 'chk_inv_warn_'.$module['component_id'],
- 0,
- false,
- true,
- false
+ $data[3] .= html_print_div(
+ [
+ 'class' => 'wizard-column-levels',
+ 'style' => 'margin-top: 0.3em;',
+ 'content' => 'Inv: '.html_print_checkbox(
+ 'warning_inv_'.$module['component_id'],
+ 0,
+ false,
+ true,
+ false
+ ),
+ ],
+ true
);
- $data[3] .= '
';
// Critical column.
- $data[4] = '
Min: ';
- $data[4] .= html_print_input_text(
- 'txt_min_crit_'.$module['component_id'],
- '0',
- '',
- 3,
- 4,
+ $data[4] = html_print_div(
+ [
+ 'class' => 'wizard-column-levels',
+ 'content' => 'Min: '.html_print_input_text(
+ 'critical_min_'.$module['component_id'],
+ '0',
+ '',
+ 3,
+ 4,
+ true
+ ).' ',
+ ],
true
);
- $data[4] .= '
';
- $data[4] .= ' ';
- $data[4] .= '
Max: ';
- $data[4] .= html_print_input_text(
- 'txt_max_crit_'.$module['component_id'],
- '0',
- '',
- 3,
- 4,
+ $data[4] .= html_print_div(
+ [
+ 'class' => 'wizard-column-levels',
+ 'content' => 'Max: '.html_print_input_text(
+ 'critical_max_'.$module['component_id'],
+ '0',
+ '',
+ 3,
+ 4,
+ true
+ ),
+ ],
true
);
- $data[4] .= '
';
- $data[4] .= ' ';
- $data[4] .= '
Inv: ';
- $data[4] .= html_print_checkbox(
- 'chk_inv_crit_'.$module['component_id'],
- 0,
- false,
- true,
- false
+ $data[4] .= html_print_div(
+ [
+ 'class' => 'wizard-column-levels',
+ 'style' => 'margin-top: 0.3em;',
+ 'content' => 'Inv: '.html_print_checkbox(
+ 'critical_inv_'.$module['component_id'],
+ 0,
+ false,
+ true,
+ false
+ ),
+ ],
+ true
);
- $data[4] .= '
';
- // Activavion column.
+ // Activation column.
$data[5] = html_print_checkbox_switch_extended('sel_module_'.$id_group.'_'.$module['component_id'], 1, 0, false, 'switchBlockControl(event)', '', true);
array_push($table->data, $data);
@@ -522,10 +559,15 @@ class AgentWizard extends HTML
$output .= ui_toggle($content, $blockTitle, '', '', false, true);
}
- $output .= '
';
+ html_print_div(
+ [
+ 'class' => 'white_box',
+ 'style' => 'margin-top: 20px;',
+ 'content' => $output,
+ ]
+ );
- echo $output;
- // Main form.
+ // Form. Not used at this moment.
$form = [
'action' => $this->baseUrl,
'id' => 'modal_form_action_response',
@@ -594,7 +636,7 @@ class AgentWizard extends HTML
// The functions goes here!
/**
- * Loads modal from AJAX to perform the required action.
+ * WIP: Loads modal from AJAX to perform the required action.
*/
function performAction() {
var btn_ok_text = '';
@@ -632,7 +674,7 @@ class AgentWizard extends HTML
}
/**
- * Process ajax responses and shows a dialog with results.
+ * WIP: Process ajax responses and shows a dialog with results.
*/
function showMsg(data) {
var title = "";
diff --git a/pandora_console/include/styles/wizard.css b/pandora_console/include/styles/wizard.css
index f80b0078b1..0609010dfb 100644
--- a/pandora_console/include/styles/wizard.css
+++ b/pandora_console/include/styles/wizard.css
@@ -110,3 +110,9 @@ ul.wizard li > textarea {
.wizard #interval_manual_container #interval_manual > * {
flex: 1 1 auto;
}
+
+.wizard-column-levels {
+ float: left;
+ width: 33%;
+ text-align: center;
+}