"".html_print_image( 'images/tag@svg.svg', true, [ 'title' => __('Tags'), 'class' => 'invert_filter', ] ).'', 'active' => ($tab == 'tag'), ]; $tabs['os'] = [ 'text' => "".html_print_image( 'images/workstation@groups.svg', true, [ 'title' => __('OS'), 'class' => 'invert_filter', ] ).'', 'active' => ($tab == 'os'), ]; $tabs['group'] = [ 'text' => "".html_print_image( 'images/groups@svg.svg', true, [ 'title' => __('Groups'), 'class' => 'invert_filter', ] ).'', 'active' => ($tab == 'group'), ]; $tabs['module_group'] = [ 'text' => "".html_print_image( 'images/modules-group@svg.svg', true, [ 'title' => __('Module groups'), 'class' => 'invert_filter', ] ).'', 'active' => ($tab == 'module_group'), ]; $tabs['module'] = [ 'text' => "".html_print_image( 'images/modules@svg.svg', true, [ 'title' => __('Modules'), 'class' => 'invert_filter', ] ).'', 'active' => ($tab == 'module'), ]; if ($enterpriseEnable) { $tabs['policies'] = [ 'text' => "".html_print_image( 'images/policy@svg.svg', true, [ 'title' => __('Policies'), 'class' => 'invert_filter', ] ).'', 'active' => ($tab == 'policies'), ]; } } enterprise_hook('open_meta_frame'); $header_title = __('Tree view'); $header_sub_title = __('Sort the agents by %s'); switch ($tab) { case 'tag': $header_sub_title = sprintf($header_sub_title, __('tags')); break; case 'os': $header_sub_title = sprintf($header_sub_title, __('OS')); break; case 'group': $header_sub_title = sprintf($header_sub_title, __('groups')); break; case 'module_group': $header_sub_title = sprintf($header_sub_title, __('module groups')); break; case 'module': $header_sub_title = sprintf($header_sub_title, __('modules')); break; case 'policies': if ($enterpriseEnable) { $header_sub_title = sprintf($header_sub_title, __('policies')); } break; } if (is_metaconsole() === false) { if (!$strict_acl) { $header_title = $header_title.' » '.$header_sub_title; } ui_print_standard_header( $header_title, 'images/extensions.png', false, '', false, $tabs, [ [ 'link' => '', 'label' => __('Monitoring'), ], [ 'link' => '', 'label' => __('View'), ], ] ); } // ---------------------Tabs ------------------------------------------- // --------------------- form filter ----------------------------------- $table = new StdClass(); $table->width = '100%'; $table->class = 'filter_table'; $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->rowspan = []; $table->size = []; if (is_metaconsole() === true) { $table->width = '96%'; $table->cellpadding = '0'; $table->cellspacing = '0'; $table->class = 'databox_filters'; $table->styleTable = 'padding:0px;margin-bottom:0px; '; } // Agent filter. $agent_status_arr = []; $agent_status_arr[AGENT_STATUS_ALL] = __('All'); // Default. $agent_status_arr[AGENT_STATUS_NORMAL] = __('Normal'); $agent_status_arr[AGENT_STATUS_WARNING] = __('Warning'); $agent_status_arr[AGENT_STATUS_CRITICAL] = __('Critical'); $agent_status_arr[AGENT_STATUS_UNKNOWN] = __('Unknown'); $agent_status_arr[AGENT_STATUS_NOT_INIT] = __('Not init'); $table->data['captions_group_row'][] = __('Search group'); $table->data['inputs_group_row'][] = html_print_input_text('search_group', $search_group, '', 25, 30, true); if (is_metaconsole() === true) { $table->data['captions_group_row'][] = __('Show not init modules'); $table->data['inputs_group_row'][] = html_print_checkbox('show_not_init_modules', $show_not_init_modules, true, true); } $table->data['captions_agent_row'][] = __('Search agent'); $table->data['captions_agent_row'][] = __('Show not init agents'); $table->data['captions_agent_row'][] = __('Show full hirearchy'); $table->data['captions_agent_row'][] = __('Agent status'); $table->data['inputs_agent_row'][] = html_print_input_text('search_agent', $search_agent, '', 25, 30, true); $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); $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); // Button. if (is_metaconsole() === true) { $table->data['captions_disabled_row'][] = __('Show only disabled'); $table->data['inputs_disabled_row'][] = html_print_checkbox('show_disabled', $show_disabled, false, true); } if (is_metaconsole() === false) { // Module filter. $module_status_arr = []; $module_status_arr[-1] = __('All'); // Default. $module_status_arr[AGENT_MODULE_STATUS_NORMAL] = __('Normal'); $module_status_arr[AGENT_MODULE_STATUS_WARNING] = __('Warning'); $module_status_arr[AGENT_MODULE_STATUS_CRITICAL_BAD] = __('Critical'); $module_status_arr[AGENT_MODULE_STATUS_UNKNOWN] = __('Unknown'); $module_status_arr[AGENT_MODULE_STATUS_NOT_INIT] = __('Not init'); $table->data['captions_last_row'][] = __('Search module'); $table->data['inputs_last_row'][] = html_print_input_text('search_module', $search_module, '', 25, 30, true); $table->data['captions_last_row'][] = __('Show not init modules'); $table->data['inputs_last_row'][] = html_print_checkbox_switch('show_not_init_modules', $show_not_init_modules, true, true); $table->data['captions_last_row'][] = __('Module status'); $table->data['inputs_last_row'][] = html_print_select($module_status_arr, 'status_module', $status_module, '', '', 0, true); } $table->data['inputs_last_row'][] = html_print_div( [ 'class' => 'action-buttons', 'content' => html_print_submit_button( __('Filter'), 'uptbutton', false, [ 'icon' => 'search', 'mode' => 'secondary mini', ], true ), ], true ); $form_html = '
'; if (is_metaconsole() === true) { echo "