'', 'label' => __('Monitoring'), ], [ 'link' => '', 'label' => __('Tactical group view'), ], ], [ 'id_element' => $id_group, 'url' => 'gagent&sec2=godmode/groups/tactical&id_group='.$id_group, 'label' => groups_get_name($id_group), 'section' => 'Groups', ] ); } ui_require_css_file('tactical_groups'); ui_require_javascript_file('tactical_groups'); $groups = groups_get_children($id_group); $id_groups = []; if (count($groups) > 0) { foreach ($groups as $key => $value) { $id_groups[] = $value['id_grupo']; } } else { $id_groups[] = $id_group; } echo '
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
'; $table_col1 = new stdClass(); $table_col1->class = 'no-class'; $table_col1->data = []; $table_col1->rowclass[] = ''; $table_col1->headstyle[0] = 'text-align:center;'; $table_col1->width = '100%'; $table_col1->data[0][0] = groups_get_heat_map_agents($id_groups, 450, 100); $table_col1->data[1][0] = tactical_groups_get_agents_and_monitoring($id_groups); $distribution_by_so = '
'; $distribution_by_so .= '
'; $distribution_by_so .= ''.__('Distribution by os').''; $distribution_by_so .= html_print_image('images/spinner.gif', true, ['id' => 'spinner_distribution_by_so_graph']); $distribution_by_so .= '
'; $distribution_by_so .= '
'; $table_col1->data[2][0] = $distribution_by_so; ui_toggle( html_print_table($table_col1, true), __('Monitoring'), '', '', false, false ); echo '
'; $table_col2 = new stdClass(); $table_col2->class = 'no-class'; $table_col2->data = []; $table_col2->rowclass[] = ''; $table_col2->headstyle[0] = 'text-align:center;'; $table_col2->width = '100%'; $table_col2->data[0][0] = tactical_groups_get_stats_alerts($id_groups); $table_col2->data[1][0] = groups_get_stats_modules_status($id_groups); $events_by_agents_group = '
'; $events_by_agents_group .= '
'; $events_by_agents_group .= ''.__('Events by agent').''; $events_by_agents_group .= html_print_image('images/spinner.gif', true, ['id' => 'spinner_events_by_agents_group_graph']); $events_by_agents_group .= '
'; $events_by_agents_group .= '
'; $table_col2->data[2][0] = $events_by_agents_group; ui_toggle( html_print_table($table_col2, true), __('Alerts and events'), '', '', false, false ); echo '
'; $table_col3 = new stdClass(); $table_col3->class = 'no-class'; $table_col3->data = []; $table_col3->rowclass[] = ''; $table_col3->headstyle[0] = 'text-align:center;'; $table_col3->width = '100%'; try { $columns = [ 'alias', 'status', 'alerts', 'ultimo_contacto_remoto', ]; $columnNames = [ __('Alias'), __('Status'), __('Alerts'), __('Ultimo contacto remoto'), ]; // Load datatables user interface. $table_col3->data[3][0] = ui_print_datatable( [ 'id' => 'list_agents_tactical', 'class' => 'info_table', 'style' => 'width: 99%', 'columns' => $columns, 'column_names' => $columnNames, 'return' => true, 'ajax_url' => 'include/ajax/group', 'ajax_data' => [ 'method' => 'getAgentsByGroup', 'id_group' => $id_group, ], 'dom_elements' => 'lpfti', 'no_sortable_columns' => [-1], 'order' => [ 'field' => 'alias', 'direction' => 'asc', ], ] ); } catch (Exception $e) { echo $e->getMessage(); } ui_toggle( html_print_table($table_col3, true), __('Agents'), '', '', false, false ); echo '
'; echo '' ?>