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 '<table cellpadding="4" cellspacing="4" border="0" class="agents_modules_table w100p mrgn_btn_20px">'; + echo '<table cellpadding="4" cellspacing="4" border="0" class="info_table mrgn_btn_20px">'; echo '<tr>'; 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/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/godmode/snmpconsole/snmp_trap_generator.php b/pandora_console/godmode/snmpconsole/snmp_trap_generator.php index 746d52a12d..36d3246901 100755 --- a/pandora_console/godmode/snmpconsole/snmp_trap_generator.php +++ b/pandora_console/godmode/snmpconsole/snmp_trap_generator.php @@ -134,7 +134,7 @@ $table->data[1][2] = html_print_label_input_block( ) ); -$table->data[2][1] = html_print_label_input_block( +$table->data[2][0] = html_print_label_input_block( __('SNMP Agent'), html_print_input_text( 'snmp_agent', @@ -155,7 +155,7 @@ $types = [ 5 => 'EGP neighbor loss (5)', 6 => 'Enterprise (6)', ]; -$table->data[2][2] = html_print_label_input_block( +$table->data[2][1] = html_print_label_input_block( __('SNMP Type'), html_print_select( $types, 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 '<div id="load-filter-select" class="load-filter-modal">'; + echo '<div id="load-filter-select" class="load-filter-modal" title="'.__('Load').'">'; echo '<form method="post" id="form_load_filter" action="index.php?sec=view&sec2=operation/agentes/status_monitor&pure=">'; $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 '</form>'; echo '</div>'; ?> @@ -1877,55 +1875,49 @@ if (check_login()) { } if ($save_filter_modal) { - echo '<div id="save-filter-select">'; + echo '<div id="save-filter-select" title="'.__('Save').'">'; if (check_acl($config['id_user'], 0, 'AW')) { echo '<div id="#info_box"></div>'; $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 '<div>'; - echo html_print_submit_button( - __('Save filter'), - 'save_filter', - false, - 'class="sub upd float-right" onclick="save_new_filter();"', - true - ); - echo '</div>'; + + 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()) { ?> <script type="text/javascript"> function show_save_filter() { - $('#save_filter_row1').show(); - $('#save_filter_row2').show(); - $('#update_filter_row1').hide(); + $('#save_filter_row2').hide(); + $('#update_filter_row').hide(); // Filter save mode selector $("[name='filter_mode']").click(function() { if ($(this).val() == 'new') { - $('#save_filter_row1').show(); - $('#save_filter_row2').show(); + $('#save_filter_row2').hide(); $('#submit-save_filter').show(); - $('#update_filter_row1').hide(); + $('#update_filter_row').hide(); } else { - $('#save_filter_row1').hide(); - $('#save_filter_row2').hide(); - $('#update_filter_row1').show(); + $('#save_filter_row2').show(); + $('#update_filter_row').show(); $('#submit-save_filter').hide(); } }); @@ -2032,7 +2035,9 @@ if (check_login()) { resizable: true, draggable: true, modal: false, - closeOnEscape: true + closeOnEscape: true, + width: 450, + height: 350 }); } diff --git a/pandora_console/include/class/AgentsAlerts.class.php b/pandora_console/include/class/AgentsAlerts.class.php index b1b28342f5..be42be3e11 100644 --- a/pandora_console/include/class/AgentsAlerts.class.php +++ b/pandora_console/include/class/AgentsAlerts.class.php @@ -781,27 +781,28 @@ class AgentsAlerts extends HTML ], ]; - if ($this->pure == 0) { + /* + if ($this->pure == 0) { $screenSwitchTitle = __('Full screen mode'); $screenSwitchClass = 'pure_full'; $screenSwitchPure = 1; $refreshVisibility = false; - } else { + } else { $screenSwitchTitle = __('Back to normal mode'); $screenSwitchClass = 'pure_normal'; $screenSwitchPure = 0; $refreshVisibility = true; - } + } - $refreshComboRates = [ + $refreshComboRates = [ '30' => __('30 seconds'), (string) SECONDS_1MINUTE => __('1 minute'), (string) SECONDS_2MINUTES => __('2 minutes'), (string) SECONDS_5MINUTES => __('5 minutes'), (string) SECONDS_10MINUTES => __('10 minutes'), - ]; + ]; - $headerInputs[] = [ + $headerInputs[] = [ 'id' => 'pure', 'arguments' => [ 'name' => 'pure', @@ -809,9 +810,9 @@ class AgentsAlerts extends HTML 'value' => $this->pure, 'return' => true, ], - ]; + ]; - $headerInputs[] = [ + $headerInputs[] = [ 'label' => __('Full screen'), 'id' => 'img-full-screen', 'surround_start' => '<div id="full_screen_refresh_box">', @@ -823,9 +824,9 @@ class AgentsAlerts extends HTML 'name' => 'pure', 'attributes' => 'class="full_screen_button '.$screenSwitchClass.'" title="'.$screenSwitchTitle.'"', ], - ]; + ]; - $headerInputs[] = [ + $headerInputs[] = [ 'label' => __('Refresh'), 'id' => 'slc-refresh-rate', 'class' => ($refreshVisibility === true) ? '' : 'invisible', @@ -840,7 +841,9 @@ class AgentsAlerts extends HTML 'script' => 'this.form.submit()', 'sort' => false, ], - ]; + ]; + + */ $filterForm = $this->printForm( [ diff --git a/pandora_console/include/class/AuditLog.class.php b/pandora_console/include/class/AuditLog.class.php index 0a8add5775..f05277d184 100644 --- a/pandora_console/include/class/AuditLog.class.php +++ b/pandora_console/include/class/AuditLog.class.php @@ -162,6 +162,7 @@ class AuditLog extends HTML 'id' => 'load-filter', 'class' => 'float-left margin-right-2 margin-left-2 sub config', 'text' => __('Load filter'), + 'icon' => 'load', 'onclick' => '', ]; @@ -169,6 +170,7 @@ class AuditLog extends HTML 'id' => 'save-filter', 'class' => 'float-left margin-right-2 sub wand', 'text' => __('Save filter'), + 'icon' => 'save', 'onclick' => '', ]; @@ -181,7 +183,7 @@ class AuditLog extends HTML [ 'id' => $this->tableId, 'class' => 'info_table', - 'style' => 'width: 100%', + 'style' => 'width: 99%', 'columns' => $columns, 'column_names' => $column_names, 'ajax_url' => $this->ajaxController, @@ -199,21 +201,21 @@ class AuditLog extends HTML [ 'label' => __('Free search').ui_print_help_tip(__('Search filter by User, Action, Date, Source IP or Comments fields content'), true), 'type' => 'text', - 'class' => 'w200px', + 'class' => 'w100p', 'id' => 'filter_text', 'name' => 'filter_text', ], [ 'label' => __('Max. hours old'), 'type' => 'text', - 'class' => 'w100px', + 'class' => 'w100p', 'id' => 'filter_period', 'name' => 'filter_period', ], [ 'label' => __('IP'), 'type' => 'text', - 'class' => 'w100px', + 'class' => 'w100p', 'id' => 'filter_ip', 'name' => 'filter_ip', ], @@ -241,6 +243,7 @@ class AuditLog extends HTML ], ], ], + 'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar', ] ); } catch (Exception $e) { @@ -254,6 +257,8 @@ class AuditLog extends HTML // Load own javascript file. echo $this->loadJS(); + + html_print_action_buttons([], ['type' => 'form_action']); } diff --git a/pandora_console/include/class/SnmpConsole.class.php b/pandora_console/include/class/SnmpConsole.class.php index b7d235398e..d6c1e5c764 100644 --- a/pandora_console/include/class/SnmpConsole.class.php +++ b/pandora_console/include/class/SnmpConsole.class.php @@ -532,7 +532,7 @@ class SnmpConsole extends HTML [ 'icon' => 'delete', 'mode' => 'secondary', - 'onClick' => "javascript:return confirm(\''.__('Are you sure?').'\')", + 'onClick' => "javascript:return confirm('".__('Are you sure?')."')", ], true ); @@ -542,36 +542,47 @@ class SnmpConsole extends HTML ['type' => 'form_action'] ); - echo '<table id="legend_snmp_browser"><td><div class="snmp_view_div">'; - echo '<h3>'.__('Severity').'</h3>'; - foreach (get_priorities() as $num => $name) { - echo '<span class="'.get_priority_class($num).'">'.$name.'</span>'; - echo '<br />'; + $legend = '<table id="legend_snmp_browser"class="w100p"><td><div class="snmp_view_div w100p legend_white">'; + $legend .= '<h3 style="position: relative;left: 50%;">'.__('Severity').'</h3>'; + $legend .= '<div class="display-flex"><div class="flex-50">'; + $priorities = get_priorities(); + $half = (count($priorities) / 2); + $count = 0; + foreach ($priorities as $num => $name) { + if ($count == $half) { + $legend .= '</div><div class="mrgn_lft_5px flex-50">'; + } + + $legend .= '<span class="'.get_priority_class($num).'">'.$name.'</span>'; + $legend .= '<br />'; + $count++; } - echo '</div></td>'; - echo '<td><div class="snmp_view_div">'; - echo '<h3>'.__('Status').'</h3>'; - echo '<span class="datos_green">'.__('Validated').'</span>'; - echo '<br />'; - echo '<span class="datos_red">'.__('Not validated').'</span>'; - echo '</div></td>'; - echo '<td><div class="snmp_view_div">'; - echo '<h3>'.__('Alert').'</h3>'; - echo '<span class="datos_yellow">'.__('Alert').'</span>'; - echo '<br />'; - echo '<span class="datos_grey">'.__('Not fired').'</span>'; - echo '</div></td>'; - echo '<td><div class="snmp_view_div">'; - echo '<h3>'.__('Action').'</h3>'; - echo '<div style=" display : flex;align-items : center;">'; - echo html_print_image('images/validate.svg', true, ['class' => 'main_menu_icon']).' - '.__('Validate'); - echo '</div>'; - echo '<br />'; - echo '<div style=" display : flex;align-items : center;">'; - echo html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon']).' - '.__('Delete'); - echo '</div>'; - echo '</div></div></td>'; + $legend .= '</div></div></div></td>'; + $legend .= '<td><div class="snmp_view_div">'; + $legend .= '<h3>'.__('Status').'</h3>'; + $legend .= '<span class="datos_green">'.__('Validated').'</span>'; + $legend .= '<br />'; + $legend .= '<span class="datos_red">'.__('Not validated').'</span>'; + $legend .= '</div></td>'; + $legend .= '<td><div class="snmp_view_div">'; + $legend .= '<h3>'.__('Alert').'</h3>'; + $legend .= '<span class="datos_yellow">'.__('Alert').'</span>'; + $legend .= '<br />'; + $legend .= '<span class="datos_grey">'.__('Not fired').'</span>'; + $legend .= '</div></td>'; + $legend .= '<td><div class="snmp_view_div">'; + $legend .= '<h3>'.__('Action').'</h3>'; + $legend .= '<div style=" display : flex;align-items : center;">'; + $legend .= html_print_image('images/validate.svg', true, ['class' => 'main_menu_icon invert_filter']).' - '.__('Validate'); + $legend .= '</div>'; + $legend .= '<br />'; + $legend .= '<div style=" display : flex;align-items : center;">'; + $legend .= html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).' - '.__('Delete'); + $legend .= '</div>'; + $legend .= '</div></div></td>'; + + ui_toggle($legend, __('Legend')); // Load own javascript file. echo $this->loadJS(); @@ -905,7 +916,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', ] ).'</a> '; } @@ -945,7 +956,7 @@ class SnmpConsole extends HTML 'class' => 'invert_filter main_menu_icon', ] ).'</a>'; - $tmp->action .= '<a href="index.php?sec=snmpconsole&sec2=enterprise/godmode/snmpconsole/snmp_trap_editor_form&oid='.$tmp->oid.'&custom_oid='.urlencode($tmp->oid_custom).'&severity='.$tmp->severity.'&text='.io_safe_input($tmp->text).'&description='.io_safe_input($tmp->description, ENT_QUOTES).'" title="'.io_safe_input($tmp->description, ENT_QUOTES).'">'.html_print_image('images/edit.svg', true, ['alt' => __('SNMP trap editor'), 'title' => __('SNMP trap editor'), 'class' => 'main_menu_icon']).'</a>'; + $tmp->action .= '<a href="index.php?sec=snmpconsole&sec2=enterprise/godmode/snmpconsole/snmp_trap_editor_form&oid='.$tmp->oid.'&custom_oid='.urlencode($tmp->oid_custom).'&severity='.$tmp->severity.'&text='.io_safe_input($tmp->text).'&description='.io_safe_input($tmp->description, ENT_QUOTES).'" title="'.io_safe_input($tmp->description, ENT_QUOTES).'">'.html_print_image('images/edit.svg', true, ['alt' => __('SNMP trap editor'), 'title' => __('SNMP trap editor'), 'class' => 'main_menu_icon invert_filter']).'</a>'; $tmp->m = html_print_checkbox_extended('snmptrapid[]', $tmp->id_trap, false, false, '', 'class="chk"', true); @@ -1484,7 +1495,7 @@ class SnmpConsole extends HTML } }); - $('#submit-updatebt').click(function() { + $('#button-updatebt').click(function() { let array = []; $('input[name="snmptrapid[]"]:checked').each(function() { array.push(this.value); @@ -1511,7 +1522,7 @@ class SnmpConsole extends HTML } }); - $('#submit-deletebt').click(function() { + $('#button-deletebt').click(function() { let array = []; $('input[name="snmptrapid[]"]:checked').each(function() { array.push(this.value); diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php index 52d01ae76d..1f1f57c832 100644 --- a/pandora_console/include/functions_filemanager.php +++ b/pandora_console/include/functions_filemanager.php @@ -542,7 +542,7 @@ function filemanager_file_explorer( break; <?php if ($allowCreateText === true) : ?> case 'create_text_file': - title_action = "<?php echo __('Create a Text'); ?>"; + title_action = "<?php echo __('Create File'); ?>"; break; <?php endif ?> case 'upload_file': @@ -791,7 +791,7 @@ function filemanager_file_explorer( && (is_dir($fileinfo['realpath']) === false || count(scandir($fileinfo['realpath'])) < 3) && ($readOnly === false) ) { - $data[4] .= '<a href="javascript: show_modal_real_path(`'.$fileinfo['realpath'].'`);">'.html_print_image('images/book_edit.png', true, ['style' => 'margin-top: 2px;', 'title' => __('Real path'), 'class' => 'invert_filter']).'</a>'; + $data[4] .= '<a href="javascript: show_modal_real_path(`'.$fileinfo['realpath'].'`);">'.html_print_image('images/enable.svg', true, ['style' => 'margin-top: 2px;', 'title' => __('Real path'), 'class' => 'invert_filter main_menu_icon']).'</a>'; } $data[4] .= '</span>'; @@ -830,10 +830,10 @@ function filemanager_file_explorer( 'images/create_file.png', true, [ - 'title' => __('Create a Text'), + 'title' => __('Create File'), 'class' => 'invert_filter', ] - ).'<span>'.__('Create a Text').'</span> + ).'<span>'.__('Create File').'</span> </a> </li>'; } @@ -937,40 +937,46 @@ function filemanager_file_explorer( echo "<div style='width: ".$table->width.";' class='file_table_buttons'>"; - echo "<a href='javascript: show_form_create_folder();'>"; - echo html_print_image( - 'images/create_directory.png', - true, + $buttons[] = html_print_button( + __('Create directory'), + 'create_directory', + false, + 'show_form_create_folder()', [ - 'title' => __('Create directory'), - 'class' => 'invert_filter', - ] + 'class' => 'margin-right-2 invert_filter secondary', + 'icon' => 'create_directory', + ], + true, + false ); - echo '</a>'; if ($allowCreateText === true) { - echo "<a href='javascript: show_create_text_file();'>"; - echo html_print_image( - 'images/create_file.png', - true, + $buttons[] = html_print_button( + __('Create file'), + 'create_text', + false, + 'show_create_text_file()', [ - 'title' => __('Create text'), - 'class' => 'invert_filter', - ] + 'class' => 'margin-right-2 invert_filter secondary', + 'icon' => 'create_file', + ], + true, + false ); - echo '</a>'; } - echo "<a href='javascript: show_upload_file();'>"; - echo html_print_image( - 'images/upload_file.png', - true, + $buttons[] = html_print_button( + __('Upload file/s'), + 'upload_file', + false, + 'show_upload_file()', [ - 'title' => __('Upload file/s'), - 'class' => 'invert_filter', - ] + 'class' => 'margin-right-2 invert_filter secondary', + 'icon' => 'upload_file', + ], + true, + false ); - echo '</a>'; // Show Modal Real Path $modal_real_path = "<div><b>Real path to plugin execution is:</b></div> @@ -997,6 +1003,11 @@ function filemanager_file_explorer( } html_print_table($table); + + html_print_action_buttons( + implode('', $buttons), + ['type' => 'form_action'] + ); } diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 42ecc8ed7c..da70181771 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -6754,9 +6754,13 @@ function html_print_label_input_block( if (isset($options['label_class']) === true) { $label_class = $options['label_class']; } + + if (isset($options['div_id']) === true) { + $div_id = 'id="'.$options['div_id'].'"'; + } } - $output = '<div class="'.$div_class.'">'; + $output = '<div class="'.$div_class.'" '.$div_id.'>'; if ($label !== null) { $output .= '<label class="'.$label_class.'">'.$label.'</label>'; } diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 7eb5aa24d8..d2592424d7 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -3574,8 +3574,7 @@ function ui_print_datatable(array $parameters) $filter .= html_print_input(($input + ['return' => true]), 'li'); } - $filter .= '<li>'; - + $filter .= '</ul>'; // Extra buttons. $extra_buttons = ''; if (isset($parameters['form']['extra_buttons']) === true @@ -3617,9 +3616,7 @@ function ui_print_datatable(array $parameters) true ); - $filter .= '</li>'; - - $filter .= '</ul><div id="both"></div></form>'; + $filter .= '<div id="both"></div></form>'; if (isset($parameters['form']['no_toggle']) === false) { $filter = ui_toggle( $filter, diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 8cf19a0b6c..6b92aa2713 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; } @@ -10412,6 +10421,22 @@ button div.fail { -webkit-mask: url(../../images/fail@svg.svg) no-repeat center / contain; } +button div.upload_file { + mask: url(../../images/upload_file.png) no-repeat center / contain; + -webkit-mask: url(../../images/upload_file.png) no-repeat center / contain; +} + +button div.create_file { + mask: url(../../images/create_file.png) no-repeat center / contain; + -webkit-mask: url(../../images/create_file.png) no-repeat center / contain; +} + +button div.create_directory { + mask: url(../../images/create_directory.png) no-repeat center / contain; + -webkit-mask: url(../../images/create_directory.png) no-repeat center / + contain; +} + button div.cog.rotation { animation: rotation 4s infinite linear; } @@ -11341,10 +11366,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; +} diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css index eb4eeaf096..29acb29f3c 100644 --- a/pandora_console/include/styles/tables.css +++ b/pandora_console/include/styles/tables.css @@ -561,12 +561,13 @@ table.filter-table-adv td > div .label-thin { font-weight: 400; } +table.filter-table-adv td input[type="radio"] { + height: 20px; +} + table.databox.filter-table-adv { padding: 10px; } -/* -padding-right: calc(100% - 1024px); -*/ div.filter-datatable-submain { padding: 10px 25px; diff --git a/pandora_console/include/styles/tactical.css b/pandora_console/include/styles/tactical.css index 9c0639b90d..cea398f3ac 100644 --- a/pandora_console/include/styles/tactical.css +++ b/pandora_console/include/styles/tactical.css @@ -1,5 +1,5 @@ .white-box-content { - padding: 0px; + padding: 5px; border-radius: 5px; } diff --git a/pandora_console/operation/agentes/group_view.php b/pandora_console/operation/agentes/group_view.php index 33b87830f8..3e602658df 100644 --- a/pandora_console/operation/agentes/group_view.php +++ b/pandora_console/operation/agentes/group_view.php @@ -175,7 +175,7 @@ if ($total_agentes > 0) { $total_not_init = format_numeric((($agents_notinit * 100) / $total_agentes), 2); } -echo '<table cellpadding="0" cellspacing="0" border="0" width="100%" class="databox">'; +echo '<table width="100%" class="info_table">'; echo '<tr>'; echo "<th colspan=2 class='center'>".__('Summary of the status groups').'</th>'; echo '</tr>'; @@ -223,11 +223,11 @@ if (empty($result_groups) === false) { [ 'right_content' => $pagination ] ); - echo '<table cellpadding="0" cellspacing="0" class="databox data mrgn_top_10px" border="0" width="100%">'; + echo '<table class="info_table mrgn_top_10px" border="0" width="100%">'; echo '<tr>'; echo '<th colspan=2 ></th>'; - echo "<th colspan=6 class='difference center'>".__('Agents').'</th>'; - echo "<th colspan=6 class='center'>".__('Modules').'</th>'; + echo '<th colspan=6>'.__('Agents').'</th>'; + echo '<th colspan=6>'.__('Modules').'</th>'; echo '</tr>'; echo '<tr>'; diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 78924bda8f..a6ce6576c2 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -2168,25 +2168,30 @@ if (empty($result) === false) { } if (check_acl_one_of_groups($config['id_user'], $agent_groups, 'AW')) { - if (defined('METACONSOLE')) { - $url_edit_module = $row['server_url'].'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&'; - $url_edit_module .= 'loginhash=auto&id_agente='.$row['id_agent']; - $url_edit_module .= '&tab=module&id_agent_module='.$row['id_agente_modulo'].'&edit_module=1&'; - $url_edit_module .= 'loginhash_data='.$row['hashdata'].'&loginhash_user='.str_rot13($row['user']); + $url_edit_module = $row['server_url']; + $url_edit_module .= 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&'; + $url_edit_module .= '&id_agente='.$row['id_agent']; + $url_edit_module .= '&tab=module&id_agent_module='.$row['id_agente_modulo'].'&edit_module=1'; + if (is_metaconsole() === true) { + $url_edit_module .= '&loginhash=auto'; + $url_edit_module .= '&loginhash_data='.$row['hashdata'].'&loginhash_user='.str_rot13($row['user']); + } + $table->cellclass[][2] = 'action_buttons'; + $data[12] .= '<a href="'.$url_edit_module.'">'.html_print_image( + 'images/config.png', + true, + [ + 'alt' => '0', + 'border' => '', + 'title' => __('Edit'), + ] + ).'</a>'; + + if (is_metaconsole() === false) { $url_delete_module = $row['server_url'].'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente'; $url_delete_module .= '&id_agente='.$row['id_agent'].'&delete_module='.$row['id_agente_modulo']; - $table->cellclass[][2] = 'action_buttons'; - $data[12] .= '<a href="'.$url_edit_module.'">'.html_print_image( - 'images/config.png', - true, - [ - 'alt' => '0', - 'border' => '', - 'title' => __('Edit'), - ] - ).'</a>'; $onclick = 'onclick="javascript: if (!confirm(\''.__('Are you sure to delete?').'\')) return false;'; $data[12] .= '<a href="'.$url_delete_module.'" '.$onclick.'" target="_blank">'.html_print_image( 'images/delete.png', 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', ]; }