restyling

This commit is contained in:
daniel 2023-02-23 16:00:13 +01:00
parent fa81a4e744
commit 929680eb17
1 changed files with 104 additions and 35 deletions

View File

@ -199,22 +199,18 @@ if (is_metaconsole() === false) {
// --------------------- form filter ----------------------------------- // --------------------- form filter -----------------------------------
$table = new StdClass(); $table = new StdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'filter_table'; $table->class = 'filter-table-adv';
$table->cellstyle['captions_agent_row'][0] = 'width: 0';
$table->cellstyle['captions_agent_row'][1] = 'width: 200px';
$table->cellstyle['captions_agent_row'][2] = 'width: 200px';
$table->data = []; $table->data = [];
$table->rowspan = []; $table->rowspan = [];
$table->size = []; $table->size = [];
if (is_metaconsole() === true) { // if (is_metaconsole() === true) {
$table->width = '96%'; // $table->width = '96%';
$table->cellpadding = '0'; // $table->cellpadding = '0';
$table->cellspacing = '0'; // $table->cellspacing = '0';
$table->class = 'databox_filters'; // $table->class = 'databox_filters';
$table->styleTable = 'padding:0px;margin-bottom:0px; '; // $table->styleTable = 'padding:0px;margin-bottom:0px; ';
} // }
// Agent filter. // Agent filter.
$agent_status_arr = []; $agent_status_arr = [];
$agent_status_arr[AGENT_STATUS_ALL] = __('All'); $agent_status_arr[AGENT_STATUS_ALL] = __('All');
@ -225,22 +221,76 @@ $agent_status_arr[AGENT_STATUS_CRITICAL] = __('Critical');
$agent_status_arr[AGENT_STATUS_UNKNOWN] = __('Unknown'); $agent_status_arr[AGENT_STATUS_UNKNOWN] = __('Unknown');
$agent_status_arr[AGENT_STATUS_NOT_INIT] = __('Not init'); $agent_status_arr[AGENT_STATUS_NOT_INIT] = __('Not init');
$table->data['captions_group_row'][] = __('Search group'); $table->data['group_row'][] = html_print_label_input_block(
$table->data['inputs_group_row'][] = html_print_input_text('search_group', $search_group, '', 25, 30, true); __('Search group'),
html_print_input_text('search_group', $search_group, '', 25, 30, true)
);
if (is_metaconsole() === true) { if (is_metaconsole() === true) {
$table->data['captions_group_row'][] = __('Show not init modules'); $table->data['group_row'][] = html_print_label_input_block(
$table->data['inputs_group_row'][] = html_print_checkbox('show_not_init_modules', $show_not_init_modules, true, true); __('Show not init modules'),
html_print_checkbox(
'show_not_init_modules',
$show_not_init_modules,
true,
true
)
);
} }
$table->data['captions_agent_row'][] = __('Search agent'); $table->data['agent_row'][] = html_print_label_input_block(
$table->data['captions_agent_row'][] = __('Show not init agents'); __('Search agent'),
$table->data['captions_agent_row'][] = __('Show full hirearchy'); html_print_input_text(
$table->data['captions_agent_row'][] = __('Agent status'); 'search_agent',
$table->data['inputs_agent_row'][] = html_print_input_text('search_agent', $search_agent, '', 25, 30, true); $search_agent,
$table->data['inputs_agent_row'][] = html_print_checkbox_switch('show_not_init_agents', $show_not_init_agents, true, true); '',
$table->data['inputs_agent_row'][] = html_print_checkbox_switch('serach_hirearchy', $serach_hirearchy, false, true); 25,
$table->data['inputs_agent_row'][] = html_print_select($agent_status_arr, 'status_agent', $status_agent, '', '', 0, true, false, true, '', false, 'width:10em').html_print_input_hidden('show_not_init_modules_hidden', $show_not_init_modules, true); 30,
true
)
);
$table->data['agent_row'][] = html_print_label_input_block(
__('Show not init agents'),
html_print_checkbox_switch(
'show_not_init_agents',
$show_not_init_agents,
true,
true
)
);
$table->data['agent_row'][] = html_print_label_input_block(
__('Show full hirearchy'),
html_print_checkbox_switch(
'serach_hirearchy',
$serach_hirearchy,
false,
true
)
);
$table->data['agent_row'][] = html_print_label_input_block(
__('Agent status'),
html_print_select(
$agent_status_arr,
'status_agent',
$status_agent,
'',
'',
0,
true,
false,
true,
'',
false,
'width:100%'
).html_print_input_hidden(
'show_not_init_modules_hidden',
$show_not_init_modules,
true
)
);
// Button. // Button.
if (is_metaconsole() === true) { if (is_metaconsole() === true) {
@ -259,17 +309,38 @@ if (is_metaconsole() === false) {
$module_status_arr[AGENT_MODULE_STATUS_UNKNOWN] = __('Unknown'); $module_status_arr[AGENT_MODULE_STATUS_UNKNOWN] = __('Unknown');
$module_status_arr[AGENT_MODULE_STATUS_NOT_INIT] = __('Not init'); $module_status_arr[AGENT_MODULE_STATUS_NOT_INIT] = __('Not init');
$table->data['captions_last_row'][] = __('Search module'); $table->data['last_row'][] = html_print_label_input_block(
$table->data['inputs_last_row'][] = html_print_input_text('search_module', $search_module, '', 25, 30, true); __('Search module'),
html_print_input_text('search_module', $search_module, '', 25, 30, true)
);
$table->data['captions_last_row'][] = __('Show not init modules'); $table->data['last_row'][] = html_print_label_input_block(
$table->data['inputs_last_row'][] = html_print_checkbox_switch('show_not_init_modules', $show_not_init_modules, true, true); __('Show not init modules'),
html_print_checkbox_switch('show_not_init_modules', $show_not_init_modules, true, true)
);
$table->data['captions_last_row'][] = __('Module status'); $table->data['last_row'][] = html_print_label_input_block(
$table->data['inputs_last_row'][] = html_print_select($module_status_arr, 'status_module', $status_module, '', '', 0, true); __('Module status'),
html_print_select(
$module_status_arr,
'status_module',
$status_module,
'',
'',
0,
true,
false,
true,
'',
false,
'width:100%'
)
);
} }
$table->data['inputs_last_row'][] = html_print_div( $form_html = '<form id="tree_search" method="post" action="index.php?sec=monitoring&sec2=operation/tree&refr=0&tab='.$tab.'&pure='.$config['pure'].'">';
$form_html .= html_print_table($table, true);
$form_html .= html_print_div(
[ [
'class' => 'action-buttons', 'class' => 'action-buttons',
'content' => html_print_submit_button( 'content' => html_print_submit_button(
@ -278,17 +349,15 @@ $table->data['inputs_last_row'][] = html_print_div(
false, false,
[ [
'icon' => 'search', 'icon' => 'search',
'mode' => 'secondary mini', 'mode' => 'mini',
], ],
true true
), ),
], ],
true true
); );
$form_html = '<form id="tree_search" method="post" action="index.php?sec=monitoring&sec2=operation/tree&refr=0&tab='.$tab.'&pure='.$config['pure'].'">';
$form_html .= html_print_table($table, true);
$form_html .= '</form>'; $form_html .= '</form>';
if (is_metaconsole() === true) { if (is_metaconsole() === true) {
echo "<div class='view_tree'>"; echo "<div class='view_tree'>";
ui_toggle($form_html, '<span class="subsection_header_title">'.__('Show Options').'</span>'); ui_toggle($form_html, '<span class="subsection_header_title">'.__('Show Options').'</span>');