diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index e540a163a1..4c590f0928 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -261,12 +261,11 @@ function agents_modules_load_js() } function select_selected () { - $('#id_agents2 option').each(function(){ - if($(this).attr('selected') === 'selected'){ - $(this).prop('selected', true); - } - }); - + // $('#id_agents2 option').each(function(){ + // if($(this).attr('selected') === 'selected'){ + // $(this).prop('selected', true); + // } + // }); } '; - echo ''; + echo ''; + echo ''; if ($config['style'] !== 'pandora_black') { - echo ''; + echo ''; } // Store servers timezone offset to be retrieved from js. diff --git a/pandora_console/general/pandora_help.php b/pandora_console/general/pandora_help.php index c78c006a9f..e9dc0e0398 100644 --- a/pandora_console/general/pandora_help.php +++ b/pandora_console/general/pandora_help.php @@ -25,7 +25,7 @@ echo __('%s help system', get_product_name()); -'; ?> +'; ?> "; +echo ''; // Define a custom action to save the OID selected // in the SNMP browser to the form. diff --git a/pandora_console/godmode/reporting/graph_builder.graph_editor.php b/pandora_console/godmode/reporting/graph_builder.graph_editor.php index aed04e3089..d6e5b3d75b 100644 --- a/pandora_console/godmode/reporting/graph_builder.graph_editor.php +++ b/pandora_console/godmode/reporting/graph_builder.graph_editor.php @@ -204,9 +204,142 @@ if ($count_module_array > $config['items_combined_charts']) { ); } +$table = new stdClass(); +$table->width = '100%'; +$table->colspan[0][0] = 3; +$table->size = []; + +if (defined('METACONSOLE')) { + $table->class = 'databox data'; + $table->head[0] = __('Sort items'); + $table->head_colspan[0] = 4; + $table->headstyle[0] = 'text-align: center'; + $table->size[0] = '25%'; + $table->size[1] = '25%'; + $table->size[2] = '25%'; + $table->size[3] = '25%'; +} else { + $table->class = 'filter-table-adv'; + $table->size[0] = '50%'; + $table->size[1] = '50%'; +} + +$table->data[0][0] = html_print_label_input_block( + __('Sort selected items'), + html_print_select_style( + [ + 'before' => __('before to'), + 'after' => __('after to'), + ], + 'move_to', + '', + '', + '', + '', + 0, + true + ) +); +$table->data[0][1] = html_print_label_input_block( + __('Position'), + html_print_input_text_extended( + 'position_to_sort', + 1, + 'text-position_to_sort', + '', + 3, + 10, + false, + "only_numbers('position_to_sort');", + '', + true + ).html_print_input_hidden('ids_items_to_sort', '', true) +); + + +$SortItems = "
"; +$SortItems .= html_print_table($table, true); +$SortItems .= html_print_input_hidden('action', 'sort_items', true); +$SortItems .= html_print_div( + [ + 'class' => 'action-buttons', + 'content' => html_print_submit_button( + __('Sort'), + 'srcbutton', + false, + [ + 'class' => 'mini', + 'icon' => 'search', + 'mode' => 'secondary', + ], + true + ), + ], + true +); +$SortItems .= '
'; + +ui_toggle( + $SortItems, + ''.__('Sort items').'', + '', + '', + false, + false, + '', + 'white-box-content no_border', + 'filter-datatable-main box-flat white_table_graph max_floating_element_size' +); + + +// Configuration form. +echo ''; +echo "
"; + +echo ""; +echo ''; +echo ''; +echo ''; +echo "'; +echo ''; +echo ""; +echo '
'.html_print_input( + [ + 'type' => 'select_multiple_modules_filtered', + 'uniqId' => 'modules', + 'class' => 'flex flex-row', + 'searchBar' => true, + ] +).'
"; +echo ""; +echo ''; +echo '
'; +echo html_print_label_input_block( + __('Weight'), + '' +); +echo '
'; +echo '
'; +$ActionButtons[] = html_print_submit_button( + __('Add'), + 'submit-add', + false, + [ + 'class' => 'sub ok', + 'icon' => 'next', + ], + true +); +html_print_action_buttons( + implode('', $ActionButtons), + ['type' => 'form_action'] +); + +echo '
'; + // Modules table. if ($count_module_array > 0) { - echo ""; + echo "
"; echo ' @@ -290,124 +423,6 @@ if ($count_module_array > 0) { echo '
'.__('P.').' '.__('Agent').'
'; } - -$table = new stdClass(); -$table->width = '100%'; -$table->colspan[0][0] = 3; -$table->size = []; - -if (defined('METACONSOLE')) { - $table->class = 'databox data'; - $table->head[0] = __('Sort items'); - $table->head_colspan[0] = 4; - $table->headstyle[0] = 'text-align: center'; - $table->size[0] = '25%'; - $table->size[1] = '25%'; - $table->size[2] = '25%'; - $table->size[3] = '25%'; -} else { - $table->class = 'filter-table-adv'; - $table->size[0] = '50%'; - $table->size[1] = '50%'; -} - -$table->data[0][0] = html_print_label_input_block( - __('Sort selected items'), - html_print_select_style( - [ - 'before' => __('before to'), - 'after' => __('after to'), - ], - 'move_to', - '', - '', - '', - '', - 0, - true - ) -); -$table->data[0][1] = html_print_label_input_block( - __('Position'), - html_print_input_text_extended( - 'position_to_sort', - 1, - 'text-position_to_sort', - '', - 3, - 10, - false, - "only_numbers('position_to_sort');", - '', - true - ).html_print_input_hidden('ids_items_to_sort', '', true) -); - - -$SortItems = "
"; -$SortItems .= html_print_table($table, true); -$SortItems .= html_print_input_hidden('action', 'sort_items', true); -$SortItems .= html_print_div( - [ - 'class' => 'action-buttons', - 'content' => html_print_submit_button( - __('Sort'), - 'srcbutton', - false, - [ - 'class' => 'mini', - 'icon' => 'search', - 'mode' => 'secondary', - ], - true - ), - ], - true -); -$SortItems .= '
'; - -ui_toggle($SortItems, __('Sort items'), '', '', false); - - -// Configuration form. -echo ''; -echo "
"; - -echo ""; -echo ''; -echo ''; -echo ''; -echo "'; -echo ''; -echo ""; -echo '
'.html_print_input( - [ - 'type' => 'select_multiple_modules_filtered', - 'uniqId' => 'modules', - 'class' => 'flex flex-row', - 'searchBar' => true, - ] -).'
"; -echo ""; -echo ''; -echo ""; -echo '
'.__('Weight').'
'; -echo '
'; -$ActionButtons[] = html_print_submit_button( - __('Add'), - 'submit-add', - false, - [ - 'class' => 'sub ok', - 'icon' => 'next', - ], - true -); -html_print_action_buttons( - implode('', $ActionButtons), - ['type' => 'form_action'] -); - ui_require_jquery_file('pandora.controls'); ui_require_jquery_file('ajaxqueue'); ui_require_jquery_file('bgiframe'); diff --git a/pandora_console/images/alerts.svg b/pandora_console/images/alerts.svg new file mode 100644 index 0000000000..8a155e89dc --- /dev/null +++ b/pandora_console/images/alerts.svg @@ -0,0 +1,9 @@ + + + + Dark / 20 / Menu Alerts@svg + Created with Sketch. + + + + \ No newline at end of file diff --git a/pandora_console/include/chart_generator.php b/pandora_console/include/chart_generator.php index 2e9ec50479..62701365e5 100644 --- a/pandora_console/include/chart_generator.php +++ b/pandora_console/include/chart_generator.php @@ -75,13 +75,13 @@ if (check_login(false) === false) { Access denied - - - - - - - + + + + + + +

Access is not granted

@@ -137,31 +137,31 @@ if (file_exists('languages/'.$user_language.'.mo') === true) { Pandora FMS Graph - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + ;'> '; + $output .= '?v='.$config['current_package'].'" type="text/javascript">'; $output .= ''; + $output .= '?v='.$config['current_package'].'"/>'; } else { ui_require_css_file($select2_css); ui_require_javascript_file('select2.min'); @@ -977,7 +977,7 @@ function html_print_select( false, false ); - $output .= '" type="text/javascript">'; + $output .= '?v='.$config['current_package'].'" type="text/javascript">'; $output .= ''; + $output .= '?v='.$config['current_package'].'"/>'; } else { ui_require_css_file($select2); ui_require_javascript_file('select2.min'); @@ -1559,6 +1559,7 @@ function html_print_select_multiple_modules_filtered(array $data):string $output .= html_print_input( [ 'label' => __('Group'), + 'label_class' => 'font-title-font', 'name' => 'filtered-module-group-'.$uniqId, 'returnAllGroup' => $return_all_group, 'privilege' => 'AR', @@ -1572,14 +1573,15 @@ function html_print_select_multiple_modules_filtered(array $data):string // Recursion. $output .= html_print_input( [ - 'label' => __('Recursion'), - 'type' => 'switch', - 'name' => 'filtered-module-recursion-'.$uniqId, - 'value' => (empty($data['mRecursion']) === true) ? false : true, - 'checked' => (empty($data['mRecursion']) === true) ? false : true, - 'return' => true, - 'id' => 'filtered-module-recursion-'.$uniqId, - 'onchange' => 'fmAgentChange(\''.$uniqId.'\')', + 'label' => __('Recursion'), + 'label_class' => 'font-title-font', + 'type' => 'switch', + 'name' => 'filtered-module-recursion-'.$uniqId, + 'value' => (empty($data['mRecursion']) === true) ? false : true, + 'checked' => (empty($data['mRecursion']) === true) ? false : true, + 'return' => true, + 'id' => 'filtered-module-recursion-'.$uniqId, + 'onchange' => 'fmAgentChange(\''.$uniqId.'\')', ] ); @@ -1598,6 +1600,7 @@ function html_print_select_multiple_modules_filtered(array $data):string $output .= html_print_input( [ 'label' => __('Module group'), + 'label_class' => 'font-title-font', 'type' => 'select', 'fields' => $module_groups, 'name' => 'filtered-module-module-group-'.$uniqId, @@ -1682,15 +1685,16 @@ function html_print_select_multiple_modules_filtered(array $data):string $output .= html_print_input( [ - 'label' => __('Agents'), - 'type' => 'select', - 'fields' => $agents, - 'name' => 'filtered-module-agents-'.$uniqId, - 'selected' => explode(',', $data['mAgents']), - 'return' => true, - 'multiple' => true, - 'style' => 'min-width: 200px;max-width:200px;', - 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', + 'label' => __('Agents'), + 'label_class' => 'font-title-font', + 'type' => 'select', + 'fields' => $agents, + 'name' => 'filtered-module-agents-'.$uniqId, + 'selected' => explode(',', $data['mAgents']), + 'return' => true, + 'multiple' => true, + 'style' => 'min-width: 200px;max-width:200px;', + 'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', ] ); @@ -1701,14 +1705,15 @@ function html_print_select_multiple_modules_filtered(array $data):string $output .= html_print_input( [ - 'label' => __('Only common modules'), - 'type' => 'switch', - 'checked' => $commonModules, - 'value' => $commonModules, - 'name' => 'filtered-module-show-common-modules-'.$uniqId, - 'id' => 'filtered-module-show-common-modules-'.$uniqId, - 'return' => true, - 'onchange' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', + 'label' => __('Only common modules'), + 'label_class' => 'font-title-font', + 'type' => 'switch', + 'checked' => $commonModules, + 'value' => $commonModules, + 'name' => 'filtered-module-show-common-modules-'.$uniqId, + 'id' => 'filtered-module-show-common-modules-'.$uniqId, + 'return' => true, + 'onchange' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')', ] ); @@ -1742,14 +1747,15 @@ function html_print_select_multiple_modules_filtered(array $data):string $output .= html_print_input( [ - 'label' => __('Modules'), - 'type' => 'select', - 'fields' => $all_modules, - 'name' => 'filtered-module-modules-'.$uniqId, - 'selected' => $result, - 'return' => true, - 'multiple' => true, - 'style' => 'min-width: 200px;max-width:200px;', + 'label' => __('Modules'), + 'label_class' => 'font-title-font', + 'type' => 'select', + 'fields' => $all_modules, + 'name' => 'filtered-module-modules-'.$uniqId, + 'selected' => $result, + 'return' => true, + 'multiple' => true, + 'style' => 'min-width: 200px;max-width:200px;', ] ); diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 42ad5f4e36..72f945cf6e 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1287,38 +1287,44 @@ function ui_format_alert_row( $additionUrl = ''; } - $forceExecButtons[] = html_print_button( - $forceTitle, - 'force_execution_'.$alert['id'], - false, - 'window.location.assign("'.$url.'&id_alert='.$alert['id'].'&refr=60'.$additionUrl.'");', - [ 'mode' => 'link' ], + $forceExecButtons[] = html_print_anchor( + [ + 'href' => $url.'&id_alert='.$alert['id'].'&refr=60'.$additionUrl, + 'content' => html_print_image( + 'images/force@svg.svg', + true, + [ + 'title' => $forceTitle, + 'class' => 'main_menu_icon invert_filter', + ] + ), + ], true ); } - $forceExecButtons[] = html_print_button( - __('View'), - 'view_template_'.$alert['id'], - false, - '', + $forceExecButtons[] = html_print_anchor( [ - 'mode' => 'link', - 'class' => 'template_details', - 'href' => 'ajax.php?page=godmode/alerts/alert_templates&get_template_tooltip=1&id_template='.$template['id'], + 'href' => 'ajax.php?page=godmode/alerts/alert_templates&get_template_tooltip=1&id_template='.$template['id'], + 'class' => 'template_details', + 'content' => html_print_image( + 'images/details.svg', + true, + ['class' => 'main_menu_icon invert_filter'] + ), ], true ); } else { - $forceExecButtons[] = html_print_button( - __('View'), - 'view_template_'.$alert['id'], - false, - '', + $forceExecButtons[] = html_print_anchor( [ - 'mode' => 'link', - 'class' => 'template_details', - 'href' => ui_get_full_url('/', false, false, false).'/ajax.php?page=enterprise/meta/include/ajax/tree_view.ajax&action=get_template_tooltip&id_template='.$template['id'].'&server_name='.$alert['server_data']['server_name'], + 'href' => ui_get_full_url('/', false, false, false).'/ajax.php?page=enterprise/meta/include/ajax/tree_view.ajax&action=get_template_tooltip&id_template='.$template['id'].'&server_name='.$alert['server_data']['server_name'], + 'class' => 'template_details', + 'content' => html_print_image( + 'images/details.svg', + true, + ['class' => 'main_menu_icon invert_filter'] + ), ], true ); @@ -2034,7 +2040,7 @@ function ui_process_page_head($string, $bitfield) array_push($loaded, $name); $url_css = ui_get_full_url($filename, false, false, false); - $output .= ''."\n\t"; + $output .= ''."\n\t"; } /* @@ -2091,7 +2097,7 @@ function ui_process_page_head($string, $bitfield) array_push($loaded, $name); $url_js = ui_get_full_url($filename, false, false, false); - $output .= ''."\n\t"; + $output .= ''."\n\t"; } /* @@ -2136,7 +2142,7 @@ function ui_process_page_head($string, $bitfield) array_push($loaded, $name); $url_js = ui_get_full_url($filename, false, false, false); - $output .= ''."\n\t"; + $output .= ''."\n\t"; } /* @@ -4147,7 +4153,7 @@ function ui_print_datatable(array $parameters) false, false ); - $output .= '"/>'; + $output .= '?v='.$config['current_package'].'"/>'; // Load tables.css. $output .= ''; + $output .= '?v='.$config['current_package'].'"/>'; if (is_metaconsole() === true) { // Load meta_tables.css. $output .= ''; + $output .= '?v='.$config['current_package'].'"/>'; } // Load datatables.js. diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index 94bb58b260..9ea3abda95 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -51,7 +51,7 @@ function include_javascript_dependencies_flot_graph($return=false, $mobile=false - '; + '; // Chartjs. $output .= ''; diff --git a/pandora_console/include/styles/form.css b/pandora_console/include/styles/form.css index 972b8de4ef..c5da46c1a1 100644 --- a/pandora_console/include/styles/form.css +++ b/pandora_console/include/styles/form.css @@ -340,3 +340,28 @@ div.ui-tooltip.ui-corner-all.ui-widget-shadow.ui-widget.ui-widget-content.uitool top: auto; } /* END Tooltip message errors*/ + +form.modal { + position: initial !important; + display: initial !important; +} + +form#modal_form_feedback > ul > li { + visibility: initial !important; + + display: initial !important; + flex-direction: initial !important; + width: initial !important; + margin: initial !important; + justify-items: initial !important; + align-items: initial !important; + flex-wrap: initial !important; +} + +form#modal_form_feedback > ul > li > textarea { + width: 575px !important; +} + +form#modal_form_feedback > ul > li:not(:first-child) > label { + margin-top: 20px !important; +} diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 4bad6cf027..64d0d9cae4 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -931,6 +931,10 @@ select:-internal-list-box { justify-content: flex-start; } +.flex-align-start { + align-items: start; +} + .flex-baseline { align-self: baseline; } @@ -7404,6 +7408,10 @@ div.graph div.legend table { /* * PADDING RIGHT */ +.pdd_r_0px { + padding-right: 0px !important; +} + .pdd_r_2px { padding-right: 2px; } @@ -7475,6 +7483,10 @@ div.graph div.legend table { /* * PADDING LEFT */ +.pdd_l_0px { + padding-left: 0px !important; +} + .pdd_l_4px { padding-left: 4px; } @@ -11800,9 +11812,9 @@ span.help_icon_15px > img { /* ==== Spinner ==== */ .spinner-fixed { - position: fixed; - left: 50%; - bottom: 50%; + position: absolute; + left: 40%; + top: 40%; z-index: 1; width: 100px; height: 100px; diff --git a/pandora_console/index.php b/pandora_console/index.php index 0387928e63..98b3ce716e 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -233,7 +233,7 @@ ob_start('ui_process_page_head'); enterprise_include_once('index.php'); // Load event.css to display the about section dialog with correct styles. -echo ''; +echo ''; echo ' - - - - + + + + + + + + '; +echo ''; ?> @@ -83,13 +83,13 @@ echo ' <?php echo __('%s Realtime Module Graph', get_product_name()); ?> - - - - - - - + + + + + + + '; if ($config['style'] === 'pandora_black' && !is_metaconsole()) { - echo ''; + echo ''; } else { - echo ''; + echo ''; } } ?> <?php echo __('%s Snapshot data view for module (%s)', get_product_name(), $label); ?> - + '; +echo ''; if ($config['style'] === 'pandora_black' && !is_metaconsole()) { - echo ''; + echo ''; } @@ -114,16 +114,16 @@ ui_print_message_dialog( ?> <?php echo __('%s Graph', get_product_name()).' ('.$alias.' - '.$label; ?>) - - - - - - - - - - + + + + + + + + + + '; if ($config['style'] === 'pandora_black' && !is_metaconsole()) { - echo ''; + echo ''; } else { - echo ''; + echo ''; } echo ''; diff --git a/pandora_console/operation/visual_console/legacy_public_view.php b/pandora_console/operation/visual_console/legacy_public_view.php index e8edbae7db..d5321b7a1b 100644 --- a/pandora_console/operation/visual_console/legacy_public_view.php +++ b/pandora_console/operation/visual_console/legacy_public_view.php @@ -45,12 +45,12 @@ ob_start('ui_process_page_head'); enterprise_include('index.php'); $url_css = ui_get_full_url('include/styles/visual_maps.css', false, false, false); -echo ''; +echo ''; html_print_input_hidden('homeurl', $config['homeurl']); $url_css_modal = ui_get_full_url('include/styles/register.css', false, false, false); -echo ''; +echo ''; // Connection lost alert. ui_require_javascript_file('connection_check', 'include/javascript/', true); set_js_value('absolute_homeurl', ui_get_full_url(false, false, false, false)); diff --git a/pandora_console/operation/visual_console/public_view.php b/pandora_console/operation/visual_console/public_view.php index 062c9419e2..ddf6811930 100644 --- a/pandora_console/operation/visual_console/public_view.php +++ b/pandora_console/operation/visual_console/public_view.php @@ -56,7 +56,7 @@ ob_start('ui_process_page_head'); enterprise_include('index.php'); $url_css = ui_get_full_url('include/styles/visual_maps.css', false, false, false); -echo ''; +echo ''; require_once 'include/functions_visual_map.php'; diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 03ac46b18c..ed6f12fe99 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -51,16 +51,16 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('show_lastalerts','1'), ('style','pandora'), ('graph_image_height', '250'), -('graph_color1', '#1c7973'), -('graph_color2', '#82b92f'), -('graph_color3', '#e82a2a'), -('graph_color4', '#8577cf'), -('graph_color5', '#f5a623'), -('graph_color6', '#14524f'), -('graph_color7', '#024eff'), -('graph_color8', '#18c7c5'), -('graph_color9', '#ec7175'), -('graph_color10', '#c0ccdc'), +('graph_color1', '#1d7773'), +('graph_color2', '#82b92d'), +('graph_color3', '#fa4143'), +('graph_color4', '#c0d7ea'), +('graph_color5', '#f3712a'), +('graph_color6', '#7151cb'), +('graph_color7', '#287ca2'), +('graph_color8', '#42aa8b'), +('graph_color9', '#d54f6b'), +('graph_color10', '#f9c64e'), ('trap2agent', '0'), ('date_format', 'F j, Y, g:i a'), ('event_view_hr', 8), diff --git a/pandora_console/update_manager_client/views/offline.php b/pandora_console/update_manager_client/views/offline.php index ae64d92fde..5d8027725c 100644 --- a/pandora_console/update_manager_client/views/offline.php +++ b/pandora_console/update_manager_client/views/offline.php @@ -27,7 +27,7 @@ * GNU General Public License for more details. * ============================================================================ */ - +global $config; ?> @@ -39,12 +39,12 @@ document.write(' - - + + - +
diff --git a/pandora_console/update_manager_client/views/online.php b/pandora_console/update_manager_client/views/online.php index d588fa8e6e..f60b0f5e52 100644 --- a/pandora_console/update_manager_client/views/online.php +++ b/pandora_console/update_manager_client/views/online.php @@ -27,11 +27,11 @@ * GNU General Public License for more details. * ============================================================================ */ - +global $config; ?> - - + + diff --git a/pandora_console/update_manager_client/views/register.php b/pandora_console/update_manager_client/views/register.php index 4fffc0f88f..d93d25045a 100644 --- a/pandora_console/update_manager_client/views/register.php +++ b/pandora_console/update_manager_client/views/register.php @@ -28,6 +28,7 @@ * ============================================================================ */ +global $config; $product_name = get_product_name(); ?> @@ -39,8 +40,8 @@ $product_name = get_product_name(); ?> } - - + +