"".html_print_image( 'images/tag.png', true, [ 'title' => __('Tags'), 'class' => 'invert_filter', ] ).'', 'active' => ($tab == 'tag'), ]; $tabs['os'] = [ 'text' => "".html_print_image( 'images/operating_system.png', true, [ 'title' => __('OS'), 'class' => 'invert_filter', ] ).'', 'active' => ($tab == 'os'), ]; $tabs['group'] = [ 'text' => "".html_print_image( 'images/group.png', true, [ 'title' => __('Groups'), 'class' => 'invert_filter', ] ).'', 'active' => ($tab == 'group'), ]; $tabs['module_group'] = [ 'text' => "".html_print_image( 'images/module_group.png', true, [ 'title' => __('Module groups'), 'class' => 'invert_filter', ] ).'', 'active' => ($tab == 'module_group'), ]; $tabs['module'] = [ 'text' => "".html_print_image( 'images/brick.png', true, [ 'title' => __('Modules'), 'class' => 'invert_filter', ] ).'', 'active' => ($tab == 'module'), ]; if ($enterpriseEnable) { $tabs['policies'] = [ 'text' => "".html_print_image( 'images/policies_mc.png', 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 = 'databox filters'; $table->data = []; $table->rowspan = []; $table->style[0] = 'font-weight: bold;'; $table->style[2] = 'font-weight: bold;'; $table->size = []; $table->size[0] = '10%'; $table->size[1] = '20%'; $table->size[2] = '10%'; $table->size[3] = '5%'; $table->size[4] = '10%'; // 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'); $row = []; $row[] = __('Search group'); $row[] = html_print_input_text('search_group', $search_group, '', is_metaconsole() ? 50 : 25, 30, true); if (is_metaconsole()) { $row[] = __('Show not init modules'); $row[] = html_print_checkbox('show_not_init_modules', $show_not_init_modules, true, true); } $table->data[] = $row; $row = []; $row[] = __('Search agent'); $row[] = html_print_input_text('search_agent', $search_agent, '', is_metaconsole() ? 50 : 25, 30, true); $row[] = __('Show not init agents'); $row[] = html_print_checkbox('show_not_init_agents', $show_not_init_agents, true, true); $row[] = __('Show full hirearchy'); $row[] = html_print_checkbox('serach_hirearchy', $serach_hirearchy, false, true); $row[] = __('Agent status'); $row[] = html_print_select($agent_status_arr, 'status_agent', $status_agent, '', '', 0, true, false, true, '', false, 'width:10em'); $row[] = html_print_input_hidden('show_not_init_modules_hidden', $show_not_init_modules, true); // Button $row[] = html_print_submit_button(__('Filter'), 'uptbutton', false, 'class="sub search"', true); $table->rowspan[][(count($row) - 1)] = 2; $table->data[] = $row; if (!is_metaconsole()) { // 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'); $row = []; $row[] = __('Search module'); $row[] = html_print_input_text('search_module', $search_module, '', 25, 30, true); $row[] = __('Show not init modules'); $row[] = html_print_checkbox('show_not_init_modules', $show_not_init_modules, true, true); $row[] = ''; $row[] = ''; $row[] = __('Module status'); $row[] = html_print_select($module_status_arr, 'status_module', $status_module, '', '', 0, true); $table->data[] = $row; } if (is_metaconsole()) { $table->width = '96%'; $table->cellpadding = '0'; $table->cellspacing = '0'; $table->class = 'databox_filters'; $table->styleTable = 'padding:0px;margin-bottom:0px; '; } $form_html = '
'; if (is_metaconsole()) { echo "