title = __('Configurations'); } /** * Get total groups from automonitorization. * * @return string */ public function getTotalGroups():string { $value = $this->valueMonitoring('total_groups'); $total = round($value[0]['datos']); $image = html_print_image('images/Tactical_Groups.svg', true); $text = ''.__('Groups').''; $number = html_print_div( [ 'content' => $total, 'class' => 'text-l text_center', 'style' => '', ], true ); $output = $image.$text.$number; return $output; } /** * Get total modules from automonitorization. * * @return string */ public function getTotalModules():string { $value = $this->valueMonitoring('total_modules'); $total = round($value[0]['datos']); $image = html_print_image('images/Tactical_Modules.svg', true); $text = ''.__('Modules').''; $number = html_print_div( [ 'content' => $total, 'class' => 'text-l text_center', 'style' => '', ], true ); $output = $image.$text.$number; return $output; } /** * Get total policies from automonitorization. * * @return string */ public function getTotalPolicies():string { $totalPolicies = db_get_value( 'count(*)', 'tpolicies' ); $image = html_print_image('images/Tactical_Policies.svg', true); $text = ''.__('Policies').''; $number = html_print_div( [ 'content' => $totalPolicies, 'class' => 'text-l text_center', 'style' => '', ], true ); $output = $image.$text.$number; return $output; } /** * Get total remote plugins from automonitorization. * * @return string */ public function getTotalRemotePlugins():string { $totalPLugins = db_get_value( 'count(*)', 'tplugin', 'plugin_type', 1, ); $sql = 'SELECT count(*) AS total FROM tplugin WHERE plugin_type = 1;'; $rows = db_process_sql($sql); $totalPLugins = 0; if (is_array($rows) === true && count($rows) > 0) { $totalPLugins = $rows[0]['total']; } $image = html_print_image('images/Tactical_Plugins.svg', true); $text = ''.__('Remote plugins').''; $number = html_print_div( [ 'content' => $totalPLugins, 'class' => 'text-l text_center', 'style' => '', ], true ); $output = $image.$text.$number; return $output; } /** * Get total module templates from automonitorization. * * @return string */ public function getTotalModuleTemplate():string { $countModuleTemplates = db_get_value( 'count(*)', 'tnetwork_profile' ); $image = html_print_image('images/Tactical_Module_template.svg', true); $text = ''.__('Module templates').''; $number = html_print_div( [ 'content' => $countModuleTemplates, 'class' => 'text-l text_center', 'style' => '', ], true ); $output = $image.$text.$number; return $output; } /** * Get total not unit modules from automonitorization. * * @return string */ public function getNotInitModules():string { $value = $this->valueMonitoring('total_notinit'); $total = round($value[0]['datos']); $image = html_print_image('images/Tactical_Not_init_module.svg', true); $text = ''.__('Not-init modules').''; $number = html_print_div( [ 'content' => $total, 'class' => 'text-l text_center', 'style' => '', ], true ); $output = $image.$text.$number; return $output; } /** * Get total unknow agents from automonitorization. * * @return string */ public function getTotalUnknowAgents():string { $value = $this->valueMonitoring('total_unknown'); $total = round($value[0]['datos']); $image = html_print_image('images/Tactical_Unknown_agent.svg', true); $text = ''.__('Unknown agents').''; $number = html_print_div( [ 'content' => $total, 'class' => 'text-l text_center', 'style' => '', ], true ); $output = $image.$text.$number; return $output; } }