From 936c9bcafbbabc44194b15d3ead0e1b93276cf80 Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Mon, 27 Feb 2023 10:12:42 +0100 Subject: [PATCH 1/6] 10454-Events --- pandora_console/operation/events/events.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 6dbc7f1615..8ca05f2489 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -1835,7 +1835,7 @@ $buttons[] = [ 'class' => 'float-left margin-right-2', 'text' => __('Load filter'), 'onclick' => '', - 'icon' => 'search', + 'icon' => 'load', ]; if ($event_w === true || $event_m === true) { @@ -1844,7 +1844,7 @@ if ($event_w === true || $event_m === true) { 'class' => 'margin-right-2', 'text' => __('Save filter'), 'onclick' => '', - 'icon' => 'search', + 'icon' => 'save', ]; } From 74c0dbb39f4e4f12578409157a3262060ae3c929 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 27 Feb 2023 10:31:50 +0100 Subject: [PATCH 2/6] SNMP black theme --- pandora_console/include/class/SnmpConsole.class.php | 8 ++++---- pandora_console/include/styles/pandora.css | 4 ---- pandora_console/include/styles/pandora_black.css | 4 ++++ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pandora_console/include/class/SnmpConsole.class.php b/pandora_console/include/class/SnmpConsole.class.php index b7d235398e..ff3005aa1a 100644 --- a/pandora_console/include/class/SnmpConsole.class.php +++ b/pandora_console/include/class/SnmpConsole.class.php @@ -565,11 +565,11 @@ class SnmpConsole extends HTML echo '
'; echo '

'.__('Action').'

'; echo '
'; - echo html_print_image('images/validate.svg', true, ['class' => 'main_menu_icon']).' - '.__('Validate'); + echo html_print_image('images/validate.svg', true, ['class' => 'main_menu_icon invert_filter']).' - '.__('Validate'); echo '
'; echo '
'; echo '
'; - echo html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon']).' - '.__('Delete'); + echo html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).' - '.__('Delete'); echo '
'; echo '
'; @@ -905,7 +905,7 @@ class SnmpConsole extends HTML 'border' => '0', 'title' => __('Validate'), 'onclick' => 'validate_trap(\''.$tmp->id_trap.'\')', - 'class' => 'main_menu_icon', + 'class' => 'invert_filter main_menu_icon', ] ).' '; } @@ -945,7 +945,7 @@ class SnmpConsole extends HTML 'class' => 'invert_filter main_menu_icon', ] ).''; - $tmp->action .= ''.html_print_image('images/edit.svg', true, ['alt' => __('SNMP trap editor'), 'title' => __('SNMP trap editor'), 'class' => 'main_menu_icon']).''; + $tmp->action .= ''.html_print_image('images/edit.svg', true, ['alt' => __('SNMP trap editor'), 'title' => __('SNMP trap editor'), 'class' => 'main_menu_icon invert_filter']).''; $tmp->m = html_print_checkbox_extended('snmptrapid[]', $tmp->id_trap, false, false, '', 'class="chk"', true); diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 8bafdbcfc9..056ce563fd 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -11330,10 +11330,6 @@ div[role="dialog"] { z-index: 1115; } -button[name="go"] { - margin-left: 10px; - display: inline !important; -} .module_background_state { mask: url(../../images/modules@svg.svg) no-repeat center / contain; -webkit-mask: url(../../images/modules@svg.svg) no-repeat center / contain; diff --git a/pandora_console/include/styles/pandora_black.css b/pandora_console/include/styles/pandora_black.css index fe829dd3f3..7c15fd03a9 100644 --- a/pandora_console/include/styles/pandora_black.css +++ b/pandora_console/include/styles/pandora_black.css @@ -1419,3 +1419,7 @@ div.white_box_opened[style*="height:0"] { div.white_box.white_box_opened.no_border { border-radius: 0px; } + +table.filter-table-adv td > div label { + color: white !important; +} From 87f17890f96c1d771f80baf3fe56128c9216f00e Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 27 Feb 2023 12:13:38 +0100 Subject: [PATCH 3/6] SNMP visual changes --- .../godmode/snmpconsole/snmp_filters.php | 1 + .../include/class/SnmpConsole.class.php | 17 +++++++++++++---- pandora_console/include/styles/pandora.css | 11 ++++++++++- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/pandora_console/godmode/snmpconsole/snmp_filters.php b/pandora_console/godmode/snmpconsole/snmp_filters.php index 2dee984233..f6c1f48f66 100644 --- a/pandora_console/godmode/snmpconsole/snmp_filters.php +++ b/pandora_console/godmode/snmpconsole/snmp_filters.php @@ -208,6 +208,7 @@ if ($edit_filter > -2) { 'alt' => __('Click to add new filter'), 'title' => __('Click to add new filter'), 'style' => 'height:20px', + 'class' => 'invert_filter', ] ); $table->data[1][0] = __('Filter'); diff --git a/pandora_console/include/class/SnmpConsole.class.php b/pandora_console/include/class/SnmpConsole.class.php index ff3005aa1a..4a2d5343cb 100644 --- a/pandora_console/include/class/SnmpConsole.class.php +++ b/pandora_console/include/class/SnmpConsole.class.php @@ -542,14 +542,23 @@ class SnmpConsole extends HTML ['type' => 'form_action'] ); - echo '
'; - echo '

'.__('Severity').'

'; - foreach (get_priorities() as $num => $name) { + echo ''; + echo ''; echo '
'; + echo '

'.__('Severity').'

'; + echo '
'; + $priorities = get_priorities(); + $half = (count($priorities) / 2); + $count = 0; + foreach ($priorities as $num => $name) { + if ($count == $half) { + echo '
'; + } + echo ''.$name.''; echo '
'; + $count++; } - echo '
'; echo '

'.__('Status').'

'; echo ''.__('Validated').''; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index b37864d0b4..86d1eb910c 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -966,6 +966,14 @@ select:-internal-list-box { margin-left: 0.5em; } +.flex-50 { + flex: 50%; +} + +.display-flex { + display: flex; +} + .no-border { border: none; } @@ -7035,7 +7043,8 @@ div.graph div.legend table { position: relative; } -.snmp_view_div > span { +.snmp_view_div > span, +.snmp_view_div > div > div > span { padding: 2px 10px 2px 10px; border-radius: 10px; } From 12212fff02211c60561ebbd660eee52373435ced Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 27 Feb 2023 13:41:44 +0100 Subject: [PATCH 4/6] restyling --- pandora_console/extensions/agents_modules.php | 2 +- pandora_console/extensions/module_groups.php | 29 +- pandora_console/include/ajax/module.php | 275 +++++++++--------- .../include/class/AgentsAlerts.class.php | 25 +- pandora_console/include/styles/tables.css | 7 +- pandora_console/include/styles/tactical.css | 2 +- .../operation/agentes/group_view.php | 8 +- .../operation/agentes/status_monitor.php | 35 ++- 8 files changed, 203 insertions(+), 180 deletions(-) diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index 604bb3a3f5..a99087e85d 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -834,7 +834,7 @@ function mainAgentsModules() return; } - echo ''; + echo '
'; echo ''; diff --git a/pandora_console/extensions/module_groups.php b/pandora_console/extensions/module_groups.php index 8c10de81c2..e554b34b51 100644 --- a/pandora_console/extensions/module_groups.php +++ b/pandora_console/extensions/module_groups.php @@ -343,26 +343,35 @@ function mainModuleGroups() if ($info && $array_module_group) { $table = new StdClass(); - $table->style[0] = 'color: #ffffff; background-color: #373737; font-weight: bolder; min-width: 230px;'; + $table->class = 'info_table'; + $table->style[0] = 'font-weight: bolder; min-width: 230px;'; $table->width = '100%'; - if ($config['style'] === 'pandora_black' && !is_metaconsole()) { - $background_color = '#333'; - } else { - $background_color = '#fff'; - } - $head[0] = __('Groups'); $headstyle[0] = 'width: 20%; font-weight: bolder;'; foreach ($array_module_group as $key => $value) { - $headstyle[] = 'min-width: 60px;max-width: 5%;text-align:center; color: #ffffff; background-color: #373737; font-weight: bolder;'; - $head[] = ui_print_truncate_text($value, GENERIC_SIZE_TEXT, true, true, true, '…', 'color:#FFF'); + $headstyle[] = 'min-width: 60px;max-width: 5%;text-align:center; font-weight: bolder;'; + $head[] = ui_print_truncate_text( + $value, + GENERIC_SIZE_TEXT, + true, + true, + true, + '…' + ); } $i = 0; foreach ($array_for_defect as $key => $value) { $deep = groups_get_group_deep($key); - $data[$i][0] = $deep.ui_print_truncate_text($value['data']['name'], GENERIC_SIZE_TEXT, true, true, true, '…', 'color:#FFF'); + $data[$i][0] = $deep.ui_print_truncate_text( + $value['data']['name'], + GENERIC_SIZE_TEXT, + true, + true, + true, + '…' + ); $j = 1; if (isset($array_data[$key])) { foreach ($value['gm'] as $k => $v) { diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index 7efb4d832b..ab5695e6f3 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -1802,56 +1802,54 @@ if (check_login()) { $filters[$event_filter['id_filter']] = $event_filter['id_name']; } - echo '
'; + echo '
'; echo '
'; $table = new StdClass; $table->id = 'load_filter_form'; $table->width = '100%'; - $table->cellspacing = 4; - $table->cellpadding = 4; - $table->class = 'databox'; - if (is_metaconsole()) { - $table->cellspacing = 0; - $table->cellpadding = 0; - $table->class = 'databox filters'; - } - - $table->styleTable = 'font-weight: bold; color: #555; text-align:left;'; - $filter_id_width = '200px'; - if (is_metaconsole()) { - $filter_id_width = '150px'; - } + $table->class = 'filter-table-adv'; $data = []; $table->rowid[3] = 'update_filter_row1'; - $data[0] = __('Load filter').$jump; - $data[0] .= html_print_select( - $filters, - 'filter_id', - $current, - '', - __('None'), - 0, - true, - false, - true, - '', - false, - 'margin-left:5px; width:'.$filter_id_width.';' - ); - $data[1] = html_print_submit_button( + $data[0] = html_print_label_input_block( __('Load filter'), - 'load_filter', - false, - 'class="sub upd"', - true + html_print_select( + $filters, + 'filter_id', + $current, + '', + __('None'), + 0, + true, + false, + true, + '', + false + ) ); - $data[1] .= html_print_input_hidden('load_filter', 1, true); + $table->data[] = $data; $table->rowclass[] = ''; html_print_table($table); + html_print_div( + [ + 'class' => 'action-buttons', + 'content' => html_print_submit_button( + __('Load filter'), + 'srcbutton', + false, + [ + 'icon' => 'search', + 'mode' => 'mini', + ], + true + ), + ], + false + ); + echo html_print_input_hidden('load_filter', 1, true); echo ''; echo '
'; ?> @@ -1877,55 +1875,49 @@ if (check_login()) { } if ($save_filter_modal) { - echo '
'; + echo '
'; if (check_acl($config['id_user'], 0, 'AW')) { echo '
'; $table = new StdClass; $table->id = 'save_filter_form'; - $table->width = '100%'; - $table->cellspacing = 4; - $table->cellpadding = 4; - $table->class = 'databox'; - if (is_metaconsole()) { - $table->class = 'databox filters'; - $table->cellspacing = 0; - $table->cellpadding = 0; - } - - $table->styleTable = 'font-weight: bold; text-align:left;'; - if (!is_metaconsole()) { - $table->style[0] = 'width: 50%; width:50%;'; - } - + $table->size = []; + $table->size[0] = '50%'; + $table->size[1] = '50%'; + $table->class = 'filter-table-adv'; $data = []; + $table->rowid[0] = 'update_save_selector'; - $data[0] = html_print_radio_button( - 'filter_mode', - 'new', - '', - true, - true - ).__('New filter').''; + $data[0][0] = html_print_label_input_block( + __('New filter'), + html_print_radio_button( + 'filter_mode', + 'new', + '', + true, + true + ) + ); - $data[1] = html_print_radio_button( - 'filter_mode', - 'update', - '', - false, - true - ).__('Update filter').''; + $data[0][1] = html_print_label_input_block( + __('Update filter'), + html_print_radio_button( + 'filter_mode', + 'update', + '', + false, + true + ) + ); - $table->data[] = $data; - $table->rowclass[] = ''; - - $data = []; $table->rowid[1] = 'save_filter_row1'; - $data[0] = __('Filter name').$jump; - $data[0] .= html_print_input_text('id_name', '', '', 15, 255, true); - if (is_metaconsole()) { - $data[1] = __('Save in Group').$jump; - } else { - $data[1] = __('Filter group').$jump; + $data[1][0] = html_print_label_input_block( + __('Filter name'), + html_print_input_text('id_name', '', '', 15, 255, true) + ); + + $labelInput = __('Filter group'); + if (is_metaconsole() === true) { + $labelInput = __('Save in Group'); } $user_groups_array = users_get_groups_for_select( @@ -1935,32 +1927,22 @@ if (check_login()) { true ); - $data[1] .= html_print_select( - $user_groups_array, - 'id_group_filter_dialog', - $id_group_filter, - '', - '', - 0, - true, - false, - false, - 'w130' + $data[1][1] = html_print_label_input_block( + $labelInput, + html_print_select( + $user_groups_array, + 'id_group_filter_dialog', + $id_group_filter, + '', + '', + 0, + true, + false, + false + ) ); - $table->data[] = $data; - $table->rowclass[] = ''; - - $data = []; $table->rowid[2] = 'save_filter_row2'; - - $table->data[] = $data; - $table->rowclass[] = ''; - - $data = []; - $table->rowid[3] = 'update_filter_row1'; - $data[0] = __('Overwrite filter').$jump; - $sql = 'SELECT id_filter, id_name FROM tmonitor_filter'; $monitor_filters = db_get_all_rows_sql($sql); @@ -1972,36 +1954,60 @@ if (check_login()) { } } - $data[0] .= html_print_select( - $_filters_update, - 'overwrite_filter', - '', - '', - '', - 0, - true - ); - $data[1] = html_print_submit_button( - __('Update filter'), - 'update_filter', - false, - 'class="sub upd" onclick="save_update_filter();"', - true + $data[2][0] = html_print_label_input_block( + __('Overwrite filter'), + html_print_select( + $_filters_update, + 'overwrite_filter', + '', + '', + '', + 0, + true + ) ); - $table->data[] = $data; - $table->rowclass[] = ''; + $table->data = $data; html_print_table($table); - echo '
'; - echo html_print_submit_button( - __('Save filter'), - 'save_filter', - false, - 'class="sub upd float-right" onclick="save_new_filter();"', - true - ); - echo '
'; + + html_print_div( + [ + 'id' => 'submit-save_filter', + 'class' => 'action-buttons', + 'content' => html_print_submit_button( + __('Save filter'), + 'srcbutton', + false, + [ + 'icon' => 'search', + 'mode' => 'mini', + 'onclick' => 'save_new_filter();', + ], + true + ), + ], + false + ); + + html_print_div( + [ + 'id' => 'update_filter_row', + 'class' => 'action-buttons', + 'content' => html_print_submit_button( + __('Update filter'), + 'srcbutton', + false, + [ + 'icon' => 'search', + 'mode' => 'mini', + 'onclick' => 'save_update_filter();', + ], + true + ), + ], + false + ); } else { include 'general/noaccess.php'; } @@ -2010,21 +2016,18 @@ if (check_login()) { ?>