diff --git a/pandora_console/extensions/resource_exportation.php b/pandora_console/extensions/resource_exportation.php index b6e594c744..ba9f6e5480 100755 --- a/pandora_console/extensions/resource_exportation.php +++ b/pandora_console/extensions/resource_exportation.php @@ -1,16 +1,32 @@ \n"; break; @@ -224,18 +209,6 @@ function output_xml_report($id) echo '\n"; break; - case 'event_report_module': - break; - - case 'alert_report_module': - break; - - case 'alert_report_agent': - break; - - case 'alert_report_group': - break; - case 'url': echo ''; break; @@ -245,6 +218,29 @@ function output_xml_report($id) echo ''; echo ''; break; + + case 1: + case 'simple_graph': + case 'simple_baseline_graph': + case 6: + case 'monitor_report': + case 7: + case 'avg_value': + case 8: + case 'max_value': + case 9: + case 'min_value': + case 10: + case 'sumatory': + case 'agent_detailed_event': + case 'event_report_agent': + case 'event_report_module': + case 'alert_report_module': + case 'alert_report_agent': + case 'alert_report_group': + default: + // Do nothing. + break; } echo "\n"; @@ -417,25 +413,42 @@ function resource_exportation_extension_main() $hook_enterprise = enterprise_include('extensions/resource_exportation/functions.php'); - ui_print_page_header(__('Resource exportation'), 'images/extensions.png', false, '', true, ''); + ui_print_standard_header( + __('Resource exportation'), + 'images/extensions.png', + false, + '', + true, + [], + [ + [ + 'link' => '', + 'label' => __('Resources'), + ], + [ + 'link' => '', + 'label' => __('Resource exporting'), + ], + ] + ); - echo '
'; - echo __('This extension makes exportation of resource template more easy.').' '.__('You can export resource templates in .ptr format.'); - echo '
'; - - echo '

'; + ui_print_warning_message( + __('This extension makes exportation of resource template more easy.').'
'.__('You can export resource templates in .ptr format.') + ); $table = new stdClass(); - $table->width = '100%'; - $table->style[0] = 'width: 30%;'; - $table->style[1] = 'width: 10%;'; - $table->class = 'databox filters'; + $table->class = 'databox m2020'; + $table->id = 'resource_exportation_table'; + $table->style = []; + $table->style[0] = 'width: 0'; + $table->style[1] = 'width: 0'; + $table->data = []; $table->data[0][0] = __('Report'); $table->data[0][1] = html_print_select_from_sql('SELECT id_report, name FROM treport', 'report', '', '', '', 0, true); - $table->data[0][2] = html_print_button(__('Export'), '', false, 'export_to_ptr(\'report\');', 'class="sub config"', true); + $table->data[0][2] = html_print_button(__('Export'), '', false, 'export_to_ptr(\'report\');', ['icon' => 'cog', 'mode' => 'secondary mini'], true); $table->data[1][0] = __('Visual console'); $table->data[1][1] = html_print_select_from_sql('SELECT id, name FROM tlayout', 'visual_console', '', '', '', 0, true); - $table->data[1][2] = html_print_button(__('Export'), '', false, 'export_to_ptr(\'visual_console\');', 'class="sub config"', true); + $table->data[1][2] = html_print_button(__('Export'), '', false, 'export_to_ptr(\'visual_console\');', ['icon' => 'cog', 'mode' => 'secondary mini'], true); if ($hook_enterprise === true) { add_rows_for_enterprise($table->data); diff --git a/pandora_console/godmode/servers/modificar_server.php b/pandora_console/godmode/servers/modificar_server.php index 0ab1377747..7d09120ca8 100644 --- a/pandora_console/godmode/servers/modificar_server.php +++ b/pandora_console/godmode/servers/modificar_server.php @@ -84,8 +84,8 @@ if (isset($_GET['server']) === true) { $table->cellpadding = 4; $table->cellspacing = 4; - $table->width = '100%'; - $table->class = 'databox filters'; + $table->class = 'databox m2020'; + $table->id = 'server_update_form'; $table->data[] = [ __('Name'), @@ -129,17 +129,24 @@ if (isset($_GET['server']) === true) { html_print_table($table); - html_print_div( - [ - 'class' => 'action-buttons w100p', - 'content' => html_print_submit_button( - __('Update'), - '', - false, - [ 'icon' => 'update' ], - true - ), - ] + $actionButtons = []; + $actionButtons[] = html_print_submit_button( + __('Update'), + '', + false, + [ 'icon' => 'update' ], + true + ); + + $actionButtons[] = html_print_go_back_button( + 'index.php?sec=gservers&sec2=godmode/servers/modificar_server', + ['button_class' => ''], + true + ); + + html_print_action_buttons( + implode('', $actionButtons), + ['type' => 'form_action'], ); echo ''; @@ -250,6 +257,10 @@ if (isset($_GET['server']) === true) { 'link' => '', 'label' => __('Servers'), ], + [ + 'link' => '', + 'label' => __('Manage Servers'), + ], ] ); diff --git a/pandora_console/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index eb6943eccc..5940bcd5fd 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -14,7 +14,7 @@ * |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______| * * ============================================================================ - * Copyright (c) 2005-2022 Artica Soluciones Tecnologicas + * Copyright (c) 2005-2023 Artica Soluciones Tecnologicas * Please see http://pandorafms.org for full contribution list * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -54,15 +54,13 @@ if ($servers === false) { } $table = new StdClass(); -$table->width = '100%'; -$table->class = 'info_table'; +$table->class = 'info_table m2020'; $table->cellpadding = 0; $table->cellspacing = 0; $table->size = []; $table->style = []; -$table->style[0] = 'font-weight: bold'; - +// $table->style[0] = 'font-weight: bold'; $table->align = []; $table->align[1] = 'center'; $table->align[3] = 'center'; @@ -196,12 +194,11 @@ foreach ($servers as $server) { if ($server['type'] === 'recon') { $data[8] .= ''; $data[8] .= html_print_image( - 'images/first_task/icono_grande_reconserver.png', + 'images/snmp-trap@svg.svg', true, [ 'title' => __('Manage Discovery tasks'), - 'style' => 'width:21px;height:21px;', - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); @@ -211,22 +208,22 @@ foreach ($servers as $server) { if ($server['type'] === 'data') { $data[8] .= ''; $data[8] .= html_print_image( - 'images/target.png', + 'images/change-active.svg', true, [ 'title' => __('Reset module status and fired alert counts'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $data[8] .= ''; } else if ($server['type'] === 'enterprise snmp') { $data[8] .= ''; $data[8] .= html_print_image( - 'images/target.png', + 'images/change-active.svg', true, [ 'title' => __('Claim back SNMP modules'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $data[8] .= ''; @@ -234,11 +231,11 @@ foreach ($servers as $server) { $data[8] .= ''; $data[8] .= html_print_image( - 'images/config.png', + 'images/edit.svg', true, [ 'title' => __('Edit'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $data[8] .= ''; @@ -246,22 +243,22 @@ foreach ($servers as $server) { if (($names_servers[$safe_server_name] === true) && ($server['type'] === 'data' || $server['type'] === 'enterprise satellite')) { $data[8] .= ''; $data[8] .= html_print_image( - 'images/agent.png', + 'images/agents@svg.svg', true, [ 'title' => __('Manage satellite hosts'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $data[8] .= ''; $data[8] .= ''; $data[8] .= html_print_image( - 'images/remote_configuration.png', + 'images/remote_configuration@svg.svg', true, [ 'title' => __('Remote configuration'), - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $data[8] .= ''; @@ -270,12 +267,12 @@ foreach ($servers as $server) { $data[8] .= ''; $data[8] .= html_print_image( - 'images/cross.png', + 'images/delete.svg', true, [ 'title' => __('Delete'), 'onclick' => "if (! confirm ('".__('Modules run by this server will stop working. Do you want to continue?')."')) return false", - 'class' => 'invert_filter', + 'class' => 'main_menu_icon invert_filter', ] ); $data[8] .= ''; diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index 9913438275..7efb4d832b 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -1149,7 +1149,7 @@ if (check_login()) { $last_status_change_text = __('Time elapsed since last status change: '); $last_status_change_text .= (empty($module['last_status_change']) === false) ? human_time_comparation($module['last_status_change']) : __('N/A'); - $data[4] .= ui_print_status_image($status, htmlspecialchars($title), true, false, false, false, $last_status_change_text); + $data[4] .= ui_print_status_image($status, htmlspecialchars($title), true, false, false, true, $last_status_change_text); if ($show_context_help_first_time === false) { $show_context_help_first_time = true; @@ -1158,6 +1158,7 @@ if (check_login()) { } } + hd($data[4], true); // Module thresholds. $data[5] = ''; if ((int) $module['id_tipo_modulo'] !== 25) { diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 9b3060d1f8..b97b828979 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -343,7 +343,7 @@ function ui_print_message($message, $class='', $attributes='', $return=false, $t [ 'href' => 'javascript: close_info_box(\''.$id.'\')', 'content' => html_print_image( - 'images/svg/fail.svg', + 'images/close@svg.svg', true, false, false,