"" . html_print_image("images/tag.png", true, array("title" => __('Tags'))) . "", 'active' => ($tab == "tag")); $tabs['os'] = array( 'text' => "" . html_print_image("images/operating_system.png", true, array("title" => __('OS'))) . "", 'active' => ($tab == "os")); $tabs['group'] = array( 'text' => "" . html_print_image("images/group.png", true, array("title" => __('Groups'))) . "", 'active' => ($tab == "group")); $tabs['module_group'] = array( 'text' => "" . html_print_image("images/module_group.png", true, array("title" => __('Module groups'))) . "", 'active' => ($tab == "module_group")); $tabs['module'] = array( 'text' => "" . html_print_image("images/brick.png", true, array("title" => __('Modules'))) . "", 'active' => ($tab == "module")); if ($enterpriseEnable) { $tabs['policies'] = array( 'text' => "" . html_print_image("images/policies_mc.png", true, array("title" => __('Policies'))) . "", '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 (!defined('METACONSOLE')) { if (!$strict_acl) $header_title = $header_title ." - ". $header_sub_title; ui_print_page_header($header_title, "images/extensions.png", false, "", false, $tabs); } // ---------------------Tabs ------------------------------------------- // --------------------- form filter ----------------------------------- $table = new StdClass(); $table->width = "100%"; $table->class='databox filters'; $table->data = array(); $table->rowspan = array(); $table->style[0] = 'font-weight: bold;'; $table->style[2] = 'font-weight: bold;'; // Agent filter $agent_status_arr = array(); $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 = array(); $row[] = __('Agent status'); $row[] = html_print_select($agent_status_arr, "status_agent", $status_agent, '', '', 0, true); $row[] = __('Search agent'); if (defined('METACONSOLE')) $row[] = html_print_input_text("search_agent", $search_agent, '', 70, 30, true); else $row[] = html_print_input_text("search_agent", $search_agent, '', 40, 30, true); // Button $row[] = html_print_submit_button(__('Filter'), "uptbutton", false, 'class="sub search"', true); $table->rowspan[][count($row)-1] = 2; $table->data[] = $row; if (!defined('METACONSOLE')) { // Module filter $module_status_arr = array(); $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 = array(); $row[] = __('Module status'); $row[] = html_print_select($module_status_arr, "status_module", $status_module, '', '', 0, true); $row[] = __('Search module'); $row[] = html_print_input_text("search_module", $search_module, '', 40, 30, true); $table->data[] = $row; } if (defined('METACONSOLE')) { $table->width = "96%"; $table->cellpadding = "0"; $table->cellspacing = "0"; $table->class='databox_filters'; $table->styleTable='padding:0px;margin-bottom:0px; '; } $form_html = ''; if (defined('METACONSOLE')) { echo "
"; ui_toggle($form_html, __('Show Options')); echo "
"; } else { //echo "
"; ui_toggle($form_html, __('Tree search')); } html_print_input_hidden("group-id", $group_id); html_print_input_hidden("tag-id", $tag_id); // --------------------- form filter ----------------------------------- ui_include_time_picker(); ui_require_jquery_file("ui.datepicker-" . get_user_language(), "include/javascript/i18n/"); ui_require_javascript_file("TreeController", "include/javascript/tree/"); html_print_image('images/spinner.gif', false, array('class' => "loading_tree", 'style' => 'display: none;')); echo "
"; echo "
"; echo "
"; echo "
"; echo "
"; echo "
"; echo "
"; echo "
"; echo "
"; echo "
"; echo "
"; echo "
"; if (defined('METACONSOLE')) { echo "
"; } enterprise_hook('close_meta_frame'); ?>