From f38adff73a9f52ec46af34a043d04affa7718f87 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 27 Feb 2023 18:05:51 +0100 Subject: [PATCH] fixed styles --- .../include/class/AgentsAlerts.class.php | 102 +++++++++++------- .../agentes/interface_view.functions.php | 11 +- .../operation/agentes/status_monitor.php | 6 +- .../operation/inventory/inventory.php | 7 -- 4 files changed, 72 insertions(+), 54 deletions(-) diff --git a/pandora_console/include/class/AgentsAlerts.class.php b/pandora_console/include/class/AgentsAlerts.class.php index be42be3e11..379b595d5a 100644 --- a/pandora_console/include/class/AgentsAlerts.class.php +++ b/pandora_console/include/class/AgentsAlerts.class.php @@ -254,8 +254,8 @@ class AgentsAlerts extends HTML $table->head[2] = __('Actions'); $table->style[0] = 'width: 25%;'; - $table->style[1] = 'width: 33%;'; - $table->style[2] = 'width: 33%;'; + $table->style[1] = 'width: 70%;'; + $table->style[2] = 'width: 5%;'; foreach ($agent_modules as $agent_module) { // Let's build the table. @@ -268,7 +268,11 @@ class AgentsAlerts extends HTML 'javascript:show_add_alerts(\'%s\')', $uniqid ), - 'content' => html_print_image('images/add_mc.png', true), + 'content' => html_print_image( + 'images/add_mc.png', + true, + ['class' => 'main_menu_icon invert_filter'] + ), ], true ); @@ -276,14 +280,14 @@ class AgentsAlerts extends HTML array_push($table->data, $data); $table2 = new stdClass(); - $table2->width = '100%'; $table2->id = 'table_add_alert'; - $table2->class = 'databox filters'; + $table2->class = 'filter-table-adv'; + $table2->size = []; + $table2->size[0] = '50%'; + $table2->size[1] = '50%'; $table2->data = []; - $table2->data[0][0] = __('Actions'); - $groups_user = users_get_groups($this->idUser); if (!empty($groups_user)) { @@ -296,7 +300,7 @@ class AgentsAlerts extends HTML $actions = db_get_all_rows_sql($sql); } - $table2->data[0][1] = html_print_select( + $input_actions = html_print_select( index_array($actions, 'id', 'name'), 'action_select', '', @@ -308,24 +312,30 @@ class AgentsAlerts extends HTML true, '', false, - 'width: 250px;' + 'width: 100%;' ); - $table2->data[0][1] .= ''; + + $table2->data[0][0] = html_print_label_input_block( + __('Actions'), + $input_actions + ); // Check ACLs for LM users. if (check_acl($this->idUser, 0, 'LM')) { - $table2->data[0][1] .= html_print_anchor( + $table2->data[0][1] = html_print_anchor( [ 'href' => 'index.php?sec=galertas&sec2=godmode/alerts/configure_alert_action&pure='.$this->pure, 'class' => 'mrgn_lft_5px', @@ -335,7 +345,6 @@ class AgentsAlerts extends HTML ); } - $table2->data[1][0] = __('Template'); $own_info = get_user_info($this->idUser); if ($own_info['is_admin'] || check_acl($this->idUser, 0, 'PM')) { $templates = alerts_get_alert_templates(false, ['id', 'name']); @@ -346,22 +355,25 @@ class AgentsAlerts extends HTML $templates = alerts_get_alert_templates(['id_group IN ('.$filter_groups.')'], ['id', 'name']); } - $table2->data[1][1] = html_print_select( - index_array($templates, 'id', 'name'), - 'template', - '', - '', - __('Select'), - 0, - true, - false, - true, - '', - false, - 'width: 250px;' + $table2->data[1][0] = html_print_label_input_block( + __('Template'), + html_print_select( + index_array($templates, 'id', 'name'), + 'template', + '', + '', + __('Select'), + 0, + true, + false, + true, + '', + false, + 'width: 100%;' + ) ); - $table2->data[1][1] .= html_print_anchor( + $table2->data[1][1] = html_print_anchor( [ 'href' => '#', 'class' => 'template_details invisible', @@ -372,7 +384,7 @@ class AgentsAlerts extends HTML // Check ACLs for LM users. if (check_acl($this->idUser, 0, 'LM')) { - $table2->data[1][1] .= html_print_anchor( + $table2->data[1][1] = html_print_anchor( [ 'href' => 'index.php?sec=galertas&sec2=godmode/alerts/configure_alert_template&pure='.$this->pure, 'style' => 'margin-left:5px;', @@ -382,18 +394,26 @@ class AgentsAlerts extends HTML ); } - $table2->data[2][0] = __('Threshold'); - $table2->data[2][1] = html_print_input_text('module_action_threshold', '0', '', 5, 7, true); - $table2->data[2][1] .= ' '.__('seconds'); + $table2->data[2][0] = html_print_label_input_block( + __('Threshold'), + html_print_input_text('module_action_threshold', '0', '', 5, 7, true) + ); $content2 = '
'; - $content2 .= html_print_table($table2, true); $content2 .= html_print_div( [ 'class' => 'action-buttons', - 'style' => 'width: '.$table2->width, - 'content' => html_print_submit_button(__('Add alert'), 'add', false, 'class="sub wand"', true).html_print_input_hidden('create_alert', $uniqid, true), + 'content' => html_print_submit_button( + __('Add alert'), + 'add', + false, + [ + 'icon' => 'add', + 'mode' => 'mini', + ], + true + ).html_print_input_hidden('create_alert', $uniqid, true), ], true ); @@ -1041,8 +1061,8 @@ class AgentsAlerts extends HTML resizable: true, draggable: true, modal: true, - height: 270, - width: 600, + height: 370, + width: 450, overlay: { opacity: 0.5, background: "black" diff --git a/pandora_console/operation/agentes/interface_view.functions.php b/pandora_console/operation/agentes/interface_view.functions.php index f470dabe18..591346c526 100644 --- a/pandora_console/operation/agentes/interface_view.functions.php +++ b/pandora_console/operation/agentes/interface_view.functions.php @@ -716,18 +716,21 @@ function print_table( $graph_link .= $params_encoded."','"; $graph_link .= $win_handle."', 800, 480)\">"; $graph_link .= html_print_image( - 'images/chart.png', + 'images/graph@svg.svg', true, [ 'title' => __('Interface traffic'), - 'class' => 'invert_filter', + 'class' => 'invert_filter main_menu_icon', ] ).''; } else { $graph_link = html_print_image( - 'images/chart_curve.disabled.png', + 'images/graph@svg.svg', true, - ['title' => __('inOctets and outOctets must be enabled.')] + [ + 'title' => __('inOctets and outOctets must be enabled.'), + 'class' => 'invert_filter main_menu_icon alpha50', + ] ); } } else { diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index a6ce6576c2..bdb96133db 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -2179,12 +2179,13 @@ if (empty($result) === false) { $table->cellclass[][2] = 'action_buttons'; $data[12] .= ''.html_print_image( - 'images/config.png', + 'images/edit.svg', true, [ 'alt' => '0', 'border' => '', 'title' => __('Edit'), + 'class' => 'main_menu_icon invert_filter', ] ).''; @@ -2194,12 +2195,13 @@ if (empty($result) === false) { $onclick = 'onclick="javascript: if (!confirm(\''.__('Are you sure to delete?').'\')) return false;'; $data[12] .= ''.html_print_image( - 'images/delete.png', + 'images/delete.svg', true, [ 'alt' => '0', 'border' => '', 'title' => __('Delete'), + 'class' => 'main_menu_icon invert_filter', ] ).''; } diff --git a/pandora_console/operation/inventory/inventory.php b/pandora_console/operation/inventory/inventory.php index 0a1cd508bd..7e17ffff3d 100755 --- a/pandora_console/operation/inventory/inventory.php +++ b/pandora_console/operation/inventory/inventory.php @@ -446,13 +446,6 @@ html_print_table($table); echo '
'; -// No agent selected or no search performed. -if ($inventory_id_agent < 0 || $submit_filter === false) { - echo ' '; - - return; -} - if ($is_metaconsole === false) { // Single agent selected. if ($inventory_id_agent > 0 && isset($agents[$inventory_id_agent]) === true) {