Merge branch 'ent-9662-Restyling-fuentes-colores-botones' of brutus.artica.es:artica/pandorafms into ent-9662-Restyling-fuentes-colores-botones

This commit is contained in:
Jose Gonzalez 2023-02-23 16:48:02 +01:00
commit 344261eafa
8 changed files with 438 additions and 324 deletions

View File

@ -122,8 +122,6 @@ if ($fields_selected[0] != '') {
} }
} }
echo '<h3>'.__('Show monitor detail fields').'</h3>';
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox filters'; $table->class = 'databox filters';
@ -161,6 +159,12 @@ foreach ($fields_available as $key => $available) {
} }
} }
// General title.
$generalTitleContent = [];
$generalTitleContent[] = html_print_div([ 'style' => 'width: 10px; flex: 0 0 auto; margin-right: 5px;}', 'class' => 'section_table_title_line' ], true);
$generalTitleContent[] = html_print_div([ 'class' => 'section_table_title', 'content' => __('Show monitor detail fields')], true);
$titledata[0] = html_print_div(['class' => 'flex-row-center', 'content' => implode('', $generalTitleContent) ], true);
$table->data['general_title'] = $titledata;
$table->data[0][0] = '<b>'.__('Fields available').'</b>'; $table->data[0][0] = '<b>'.__('Fields available').'</b>';
$table->data[1][0] = html_print_select($fields_available, 'fields_available[]', true, '', '', 0, true, true, false, '', false, 'width: 300px'); $table->data[1][0] = html_print_select($fields_available, 'fields_available[]', true, '', '', 0, true, true, false, '', false, 'width: 300px');
$table->data[1][1] = '<a href="javascript:">'.html_print_image( $table->data[1][1] = '<a href="javascript:">'.html_print_image(
@ -202,19 +206,18 @@ $table->data[1][2] = html_print_select(
echo '<form id="custom_status_monitor" method="post" action="index.php?sec=view&sec2=operation/agentes/status_monitor&section=fields&amp;pure='.$config['pure'].'">'; echo '<form id="custom_status_monitor" method="post" action="index.php?sec=view&sec2=operation/agentes/status_monitor&section=fields&amp;pure='.$config['pure'].'">';
html_print_table($table); html_print_table($table);
html_print_div( html_print_action_buttons(
[ html_print_submit_button(
'class' => 'action-buttons w100p',
'content' => html_print_submit_button(
__('Update'), __('Update'),
'update_button', 'update_button',
false, false,
[ 'icon' => 'update' ], [ 'icon' => 'update' ],
true true
), )
]
); );
echo '</form>'; echo '</form>';
?> ?>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -9858,17 +9858,21 @@ div#err_msg_centralised {
.div-col { .div-col {
width: 33%; width: 33%;
display: flex; display: flex;
flex-direction: row; flex-direction: column;
align-items: center; align-items: flex-start;
padding-top: 15px;
} }
.div-span { .div-span {
width: 25%; width: 100%;
color: #161628;
font-size: 13px;
line-height: 16px;
text-align: left;
margin-bottom: 10px;
} }
.div-input { .div-input {
width: 75%; width: 90%;
} }
.renew_api_token_link { .renew_api_token_link {

View File

@ -557,7 +557,3 @@ table.filter-table-adv td > div .label-thin {
color: #3f3f3f; color: #3f3f3f;
font-weight: 400; font-weight: 400;
} }
/*
padding-right: calc(100% - 1024px);
*/

View File

@ -233,9 +233,8 @@ $searchForm .= '<form method="post" action="?sec=view&sec2=operation/agentes/est
$table = new stdClass(); $table = new stdClass();
$table->width = '100%'; $table->width = '100%';
$table->size = []; $table->size = [];
$table->size[0] = '33%'; $table->size[0] = '50%';
$table->size[1] = '33%'; $table->size[1] = '50%';
$table->size[2] = '33%';
$table->class = 'filter-table-adv'; $table->class = 'filter-table-adv';
$table->data['group'][0] = html_print_label_input_block( $table->data['group'][0] = html_print_label_input_block(

View File

@ -21,26 +21,26 @@
*/ */
function print_filters($sec) function print_filters($sec)
{ {
global $config;
$table = new StdClass(); $table = new StdClass();
$table->width = '100%'; $table->width = '100%';
$table->cellspacing = 0; $table->rowspan = [];
$table->cellpadding = 0; $table->size = [];
$table->class = 'databox filters'; $table->size[0] = '33%';
$table->size[1] = '33%';
$table->size[2] = '33%';
$table->class = 'filter-table-adv';
if ($sec === 'view') { if ($sec === 'view') {
$table->style[0] = 'font-weight: bold;'; $table->data[0][0] = html_print_label_input_block(
$table->style[1] = 'font-weight: bold;'; __('Group'),
$table->style[2] = 'font-weight: bold;'; html_print_select_groups(
$table->style[3] = 'font-weight: bold;';
$table->style[4] = 'font-weight: bold;';
$table->data[0][0] = __('Group');
$table->data[0][1] .= html_print_select_groups(
$config['id_user'], $config['id_user'],
'AR', 'AR',
true, true,
'group_id', 'group_id',
$ag_group, '',
'', '',
'', '',
'0', '0',
@ -54,30 +54,29 @@ function print_filters($sec)
false, false,
'id_grupo', 'id_grupo',
false false
)
); );
$table->data[0][2] = __('Recursion'); $table->data[0][0] .= html_print_label_input_block(
__('Recursion'),
$table->data[0][2] .= html_print_input( html_print_input(
[ [
'type' => 'checkbox', 'type' => 'switch',
'name' => 'recursion', 'name' => 'recursion',
'return' => true, 'return' => true,
'checked' => $recursion, 'checked' => false,
'value' => 1, 'value' => 1,
] ]
),
[
'div_class' => 'add-input-reverse',
'label_class' => 'label-thin',
]
); );
$table->rowspan[0][1] = 2;
$table->data[1][0] = __('Filter Agents'); $table->data[0][1] = html_print_label_input_block(
$table->data[1][1] = html_print_input_text('filter_agents', '', '', 20, 255, true); __('Agents'),
html_print_select(
$table->data[2][0] = __('Agents');
if (empty($agents) === true || $agents == -1) {
$agents = [];
}
$table->data[2][1] = html_print_select(
[], [],
'selected_agents[]', 'selected_agents[]',
'', '',
@ -89,15 +88,17 @@ function print_filters($sec)
true, true,
'', '',
false, false,
'min-width: 180px; max-width: 200px;' 'width:100%'
)
); );
// Interfaces. $table->rowspan[0][2] = 2;
$table->data[2][3] = '<b>'.__('Interfaces').'</b>'; $table->data[0][2] = html_print_label_input_block(
$table->data[2][4] = html_print_select( __('Interfaces'),
html_print_select(
[], [],
'selected_interfaces[]', 'selected_interfaces[]',
$selected_interfaces, '',
'', '',
'', '',
0, 0,
@ -106,26 +107,42 @@ function print_filters($sec)
true, true,
'', '',
false, false,
'min-width: 180px; max-width: 200px;' 'width:100%'
)
); );
$filters = '<form method="post" action="'.ui_get_url_refresh( $table->data[1][0] = html_print_label_input_block(
[ __('Filter Agents'),
'selected_agents' => $selected_agents, html_print_input_text(
'selected_interfaces' => $selected_interfaces, 'filter_agents',
'selected_group_id' => $selected_group_id, '',
] '',
).'">'; 20,
255,
true
)
);
$filters = '<form method="post" action="'.ui_get_url_refresh().'">';
$filters .= html_print_table($table, true); $filters .= html_print_table($table, true);
$filters .= "<div class='height_100p right'>".html_print_submit_button( $filters .= html_print_div(
__('Show'), [
'uptbutton', 'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Filter'),
'srcbutton',
false, false,
'class="sub search mgn_tp_0"', [
'icon' => 'search',
'mode' => 'mini',
],
true true
).'</div>'; ),
],
true
);
$filters .= '</form>'; $filters .= '</form>';
} else { } else {
@ -135,7 +152,7 @@ function print_filters($sec)
$table->data[0][1] = html_print_select( $table->data[0][1] = html_print_select(
[], [],
'selected_interfaces[]', 'selected_interfaces[]',
$selected_interfaces, '',
'', '',
'', '',
0, 0,
@ -147,13 +164,7 @@ function print_filters($sec)
'min-width: 180px; max-width: 200px;' 'min-width: 180px; max-width: 200px;'
); );
$filters = '<form method="post" action="'.ui_get_url_refresh( $filters = '<form method="post" action="'.ui_get_url_refresh().'">';
[
'selected_agents' => $selected_agents,
'selected_interfaces' => $selected_interfaces,
'selected_group_id' => $selected_group_id,
]
).'">';
$filters .= html_print_table($table, true); $filters .= html_print_table($table, true);
@ -170,7 +181,7 @@ function print_filters($sec)
ui_toggle( ui_toggle(
$filters, $filters,
__('Interface filter'), '<span class="subsection_header_title">'.__('Interface filter').'</span>',
__('Interface filter'), __('Interface filter'),
'ui_toggle_if_filter', 'ui_toggle_if_filter',
true, true,

View File

@ -99,7 +99,7 @@ if ($autosearch === true) {
$result = agents_get_network_interfaces($selected_agents); $result = agents_get_network_interfaces($selected_agents);
} }
if ($result === false) { if ($result === false || empty($result) === true) {
$result = []; $result = [];
} else { } else {
ui_pagination( ui_pagination(

View File

@ -542,7 +542,7 @@ if (empty($tags) === true) {
true, true,
'', '',
false, false,
'width: 150px;' 'width: 100%;'
); );
$tagsElement .= ui_print_input_placeholder( $tagsElement .= ui_print_input_placeholder(
__('Only it is show tags in use.'), __('Only it is show tags in use.'),
@ -744,22 +744,16 @@ $div_custom_fields .= '</div>';
$table = new stdClass(); $table = new stdClass();
$tableFilter = new StdClass(); $tableFilter = new StdClass();
$tableFilter->width = '100%'; $tableFilter->width = '100%';
$tableFilter->cellspacing = 0; $tableFilter->size = [];
$tableFilter->cellpadding = 0; $tableFilter->size[0] = '33%';
$tableFilter->size[1] = '33%';
$tableFilter->size[2] = '33%';
$tableFilter->id = 'main_status_monitor_filter'; $tableFilter->id = 'main_status_monitor_filter';
$tableFilter->class = 'filter_table'; $tableFilter->class = 'filter-table-adv';
$tableFilter->cellclass['inputs_second_line'][2] = 'flex flex_column wrap';
// Defined styles.
$tableFilter->style[0] = 'padding-right: 10px';
$tableFilter->style[1] = 'padding-right: 10px';
$tableFilter->style[2] = 'padding-right: 10px';
// Captions for first line. // Captions for first line.
$tableFilter->data['captions_first_line'][0] = __('Group'); $tableFilter->data['first_line'][0] = html_print_label_input_block(
$tableFilter->data['captions_first_line'][1] = __('Module group'); __('Group'),
$tableFilter->data['captions_first_line'][2] = __('Recursion'); html_print_select_groups(
$tableFilter->data['captions_first_line'][3] = __('Search');
// Inputs for first line.
$tableFilter->data['inputs_first_line'][0] = html_print_select_groups(
$config['id_user'], $config['id_user'],
'AR', 'AR',
true, true,
@ -784,8 +778,25 @@ $tableFilter->data['inputs_first_line'][0] = html_print_select_groups(
false, false,
false, false,
$not_condition $not_condition
)
); );
$tableFilter->data['inputs_first_line'][1] = html_print_select( $tableFilter->data['first_line'][0] .= html_print_label_input_block(
__('Recursion'),
html_print_checkbox_switch(
'recursion',
1,
($recursion === true || $recursion === 'true' || $recursion === '1') ? 'checked' : false,
true
),
[
'div_class' => 'add-input-reverse',
'label_class' => 'label-thin',
]
);
$tableFilter->data['first_line'][1] = html_print_label_input_block(
__('Module group'),
html_print_select(
$rows_select, $rows_select,
'modulegroup', 'modulegroup',
$modulegroup, $modulegroup,
@ -798,28 +809,19 @@ $tableFilter->data['inputs_first_line'][1] = html_print_select(
'', '',
false, false,
'width: 100%;' 'width: 100%;'
)
); );
$tableFilter->data['inputs_first_line'][2] = html_print_checkbox_switch(
'recursion', $tableFilter->rowspan['first_line'][2] = 3;
1, $tableFilter->data['first_line'][2] = html_print_label_input_block(
($recursion === true || $recursion === 'true' || $recursion === '1') ? 'checked' : false, __('Tags'),
true $tagsElement
); );
$tableFilter->data['inputs_first_line'][3] = html_print_input_text(
'ag_freestring',
$ag_freestring,
'',
40,
30,
true
);
// Captions for second line.
$tableFilter->data['captions_second_line'][0] = __('Monitor status');
$tableFilter->data['captions_second_line'][1] = __('Module name');
$tableFilter->data['captions_second_line'][2] = __('Tags');
// Inputs for second line. // Inputs for second line.
$tableFilter->rowstyle['inputs_second_line'] = 'vertical-align: top;'; $tableFilter->data['second_line'][0] = html_print_label_input_block(
$tableFilter->data['inputs_second_line'][0] = html_print_select( __('Monitor status'),
html_print_select(
$fields, $fields,
'status', 'status',
$status, $status,
@ -831,10 +833,13 @@ $tableFilter->data['inputs_second_line'][0] = html_print_select(
true, true,
'', '',
false, false,
'width: 150px;' 'width: 100%'
)
); );
$tableFilter->data['inputs_second_line'][1] = html_print_autocomplete_modules( $tableFilter->data['second_line'][1] = html_print_label_input_block(
__('Module name'),
html_print_autocomplete_modules(
'ag_modulename', 'ag_modulename',
$ag_modulename, $ag_modulename,
false, false,
@ -842,32 +847,80 @@ $tableFilter->data['inputs_second_line'][1] = html_print_autocomplete_modules(
'', '',
[], [],
true true
)
); );
$tableFilter->data['inputs_second_line'][2] = $tagsElement; $tableFilter->data['third_line'][0] = html_print_label_input_block(
__('Search'),
html_print_input_text(
'ag_freestring',
$ag_freestring,
'',
40,
30,
true
)
);
// Advanced filter. // Advanced filter.
$tableAdvancedFilter = new StdClass(); $tableAdvancedFilter = new StdClass();
$tableAdvancedFilter->width = '100%'; $tableAdvancedFilter->width = '100%';
$tableAdvancedFilter->class = 'filters'; $tableAdvancedFilter->class = 'filters';
$tableAdvancedFilter->style = []; $tableAdvancedFilter->size = [];
// $tableAdvancedFilter->style[0] = 'font-weight: bold;'; $tableAdvancedFilter->size[0] = '33%';
$tableAdvancedFilter->cellclass['fields_advancedField_1'][4] = 'flex flex_column wrap'; $tableAdvancedFilter->size[1] = '33%';
$tableAdvancedFilter->rowstyle['fields_advancedField_1'] = 'vertical-align: top;'; $tableAdvancedFilter->size[2] = '33%';
// $tableAdvancedFilter->style[1] = 'font-weight: bold;'; $tableAdvancedFilter->data['advancedField_1'][0] = html_print_label_input_block(
$tableAdvancedFilter->data['captions_advancedField_1'][0] = '<span>'.__('Server type').'</span>'; __('Server type'),
$tableAdvancedFilter->data['captions_advancedField_1'][1] = '<span>'.__('Show monitors...').'</span>'; html_print_select(
$tableAdvancedFilter->data['captions_advancedField_1'][2] = '<span>'.__('Min. hours in current status').'</span>'; $typemodules,
$tableAdvancedFilter->data['captions_advancedField_1'][3] = '<span>'.__('Data type').'</span>'; 'moduletype',
$tableAdvancedFilter->data['captions_advancedField_1'][4] = '<span>'.__('Not condition').'</span>'; $moduletype,
'',
__($is_none),
'',
true,
false,
true,
'',
false,
'width: 100%;'
)
);
$tableAdvancedFilter->data['fields_advancedField_1'][0] = html_print_select($typemodules, 'moduletype', $moduletype, '', __($is_none), '', true, false, true, '', false, 'width: 150px;'); $tableAdvancedFilter->data['advancedField_1'][1] = html_print_label_input_block(
$tableAdvancedFilter->data['fields_advancedField_1'][1] = html_print_select($monitor_options, 'module_option', $module_option, '', '', '', true, false, true, '', false, 'width: 150px;'); __('Show monitors...'),
$tableAdvancedFilter->data['fields_advancedField_1'][2] = html_print_input_text('min_hours_status', $min_hours_val, '', 12, 20, true); html_print_select(
$tableAdvancedFilter->data['fields_advancedField_1'][3] = html_print_select_from_sql($sqlModuleType, 'datatype', '', '', __('All'), 0, true); $monitor_options,
$tableAdvancedFilter->data['fields_advancedField_1'][4] = html_print_div( 'module_option',
$module_option,
'',
'',
'',
true,
false,
true,
'',
false,
'width: 100%;'
)
);
$tableAdvancedFilter->data['advancedField_1'][2] = html_print_label_input_block(
__('Min. hours in current status'),
html_print_input_text('min_hours_status', $min_hours_val, '', 12, 20, true)
);
$tableAdvancedFilter->data['advancedField_2'][0] = html_print_label_input_block(
__('Data type'),
html_print_select_from_sql($sqlModuleType, 'datatype', '', '', __('All'), 0, true)
);
$tableAdvancedFilter->data['advancedField_2'][1] = html_print_label_input_block(
__('Not condition'),
html_print_div(
[ [
'class' => 'w120px mrgn_5px mrgn_lft_0px mrgn_right_0px flex wrap', 'class' => 'mrgn_5px mrgn_lft_0px mrgn_right_0px flex wrap',
'content' => html_print_input( 'content' => html_print_input(
[ [
'type' => 'switch', 'type' => 'switch',
@ -878,37 +931,16 @@ $tableAdvancedFilter->data['fields_advancedField_1'][4] = html_print_div(
'id' => 'not_condition_switch', 'id' => 'not_condition_switch',
'onclick' => 'changeNotConditionStatus(this)', 'onclick' => 'changeNotConditionStatus(this)',
] ]
).ui_print_input_placeholder(__('If you check this option, those elements that do NOT meet any of the requirements will be shown'), true), ).ui_print_input_placeholder(
__('If you check this option, those elements that do NOT meet any of the requirements will be shown'),
true
),
], ],
true true
)
); );
/*
'<div id="datatypebox">';
$a = db_get_all_rows_sql($sql); $tableAdvancedFilter->colspan[2][0] = 3;
$tableAdvancedFilter->data[1][1] .= '<select id="datatype" name="datatype" style="height: 28px;" ';
$tableAdvancedFilter->data[1][1] .= '>';
$tableAdvancedFilter->data[1][1] .= '<option name="datatype" value="">'.__($is_none).'</option>';
foreach ($a as $valor) {
$tableAdvancedFilter->data[1][1] .= '<option name="datatype" value="'.$valor['id_tipo'].'" ';
if ($valor['id_tipo'] == $datatype) {
$tableAdvancedFilter->data[1][1] .= 'selected';
}
$tableAdvancedFilter->data[1][1] .= '>'.$valor['descripcion'].'</option>';
}
$tableAdvancedFilter->data[1][1] .= '</select>';
$tableAdvancedFilter->data[1][1] .= '</div>';
*/
$tableAdvancedFilter->colspan[2][0] = 7;
$tableAdvancedFilter->cellstyle[2][0] = 'padding-left: 10px;';
$tableAdvancedFilter->data[2][0] = ui_toggle( $tableAdvancedFilter->data[2][0] = ui_toggle(
$div_custom_fields, $div_custom_fields,
__('Agent custom fields'), __('Agent custom fields'),
@ -917,12 +949,10 @@ $tableAdvancedFilter->data[2][0] = ui_toggle(
true, true,
true, true,
'', '',
'white-box-content', 'white-box-content'
'white_table_graph'
); );
$tableFilter->colspan[3][0] = 7; $tableFilter->colspan[3][0] = 3;
$tableFilter->cellstyle[3][0] = 'padding-left: 10px;padding-bottom: 0px;';
$tableFilter->data[3][0] = ui_toggle( $tableFilter->data[3][0] = ui_toggle(
html_print_table( html_print_table(
$tableAdvancedFilter, $tableAdvancedFilter,
@ -934,13 +964,23 @@ $tableFilter->data[3][0] = ui_toggle(
true, true,
true, true,
'', '',
'white-box-content', 'white-box-content'
'white_table_graph'
); );
// $tableFilter->colspan[4][0] = 2; $filters = '<form method="post" action="index.php?sec='.$section.'&sec2=operation/agentes/status_monitor&refr='.$refr.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&module_option='.$module_option.'&ag_modulename='.$ag_modulename.'&moduletype='.$moduletype.'&datatype='.$datatype.'&status='.$status.'&sort_field='.$sortField.'&sort='.$sort.'&pure='.$config['pure'].$ag_custom_fields_params.'">';
$tableFilter->cellstyle[4][0] = 'padding-top: 0px;'; $filters .= html_print_table($tableFilter, true);
$tableFilter->data[4][0] = html_print_button( $buttons = html_print_submit_button(
__('Filter'),
'uptbutton',
false,
[
'icon' => 'search',
'mode' => 'mini',
],
true
);
$buttons .= html_print_button(
__('Load filter'), __('Load filter'),
'load-filter', 'load-filter',
false, false,
@ -953,8 +993,7 @@ $tableFilter->data[4][0] = html_print_button(
true true
); );
$buttons .= html_print_button(
$tableFilter->data[4][1] = html_print_button(
__('Save filter'), __('Save filter'),
'save-filter', 'save-filter',
false, false,
@ -967,21 +1006,14 @@ $tableFilter->data[4][1] = html_print_button(
true true
); );
$tableFilter->colspan[4][2] = 5; $filters .= html_print_div(
$tableFilter->cellstyle[4][2] = 'padding-top: 0px;';
$tableFilter->data[4][2] = html_print_submit_button(
__('Filter'),
'uptbutton',
false,
[ [
'icon' => 'next', 'class' => 'action-buttons',
'mode' => 'mini', 'content' => $buttons,
], ],
true true
); );
$filters = '<form method="post" action="index.php?sec='.$section.'&sec2=operation/agentes/status_monitor&refr='.$refr.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&module_option='.$module_option.'&ag_modulename='.$ag_modulename.'&moduletype='.$moduletype.'&datatype='.$datatype.'&status='.$status.'&sort_field='.$sortField.'&sort='.$sort.'&pure='.$config['pure'].$ag_custom_fields_params.'">';
$filters .= html_print_table($tableFilter, true);
$filters .= '</form>'; $filters .= '</form>';
ui_toggle( ui_toggle(
$filters, $filters,
@ -2164,7 +2196,7 @@ if (is_metaconsole() !== true) {
} }
// End Build List Result. // End Build List Result.
echo "<div id='monitor_details_window' class='filter_table'></div>"; echo "<div id='monitor_details_window'></div>";
// Load filter div for dialog. // Load filter div for dialog.
echo '<div id="load-modal-filter" style="display:none"></div>'; echo '<div id="load-modal-filter" style="display:none"></div>';

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>');