diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index ce7f261fb8..87a88442db 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.770-230330 +Version: 7.0NG.770-230403 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 01499b516c..11348cc214 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.770-230330" +pandora_version="7.0NG.770-230403" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index ba2d92f954..97a5bb36df 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1023,7 +1023,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.770'; -use constant AGENT_BUILD => '230330'; +use constant AGENT_BUILD => '230403'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 37260dc4ea..31c3d1c181 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.770 -%define release 230330 +%define release 230403 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index 6b0c9c4c19..71cad24f1c 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -4,7 +4,7 @@ %global __os_install_post %{nil} %define name pandorafms_agent_linux %define version 7.0NG.770 -%define release 230330 +%define release 230403 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 25f4bbff8b..ba346ac89f 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.770" -PI_BUILD="230330" +PI_BUILD="230403" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index f8a720b9a0..d61f08596d 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{230330} +{230403} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index d330ab6c9e..a8f234db7f 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.770 Build 230330") +#define PANDORA_VERSION ("7.0NG.770 Build 230403") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 2b8c5c52c2..d872c5b795 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.770(Build 230330))" + VALUE "ProductVersion", "(7.0NG.770(Build 230403))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 2132e41504..e6b49d2f61 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.770-230330 +Version: 7.0NG.770-230403 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 09dea86864..786198bcaa 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.770-230330" +pandora_version="7.0NG.770-230403" package_pear=0 package_pandora=1 diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index 5bf3d18ab5..4c590f0928 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -259,6 +259,14 @@ function agents_modules_load_js() return results[1]; } } + + function select_selected () { + // $('#id_agents2 option').each(function(){ + // if($(this).attr('selected') === 'selected'){ + // $(this).prop('selected', true); + // } + // }); + } $offset, 'hor_offset' => $offset, 'group_id' => $group_id, 'modulegroup' => $modulegroup]).'" class="w100p">'; + $show_filters = '
'; $show_filters .= ''; $show_filters .= ''; $show_filters .= ''; @@ -666,8 +674,9 @@ function mainAgentsModules() 'srcbutton', false, [ - 'icon' => 'search', - 'mode' => 'mini', + 'icon' => 'search', + 'mode' => 'mini', + 'onclick' => 'select_selected()', ], true ), @@ -729,7 +738,7 @@ function mainAgentsModules() if (isset($modules_selected[0]) === true && $modules_selected[0]) { $all_modules = []; foreach ($modules_selected as $key => $value) { - if (is_int($value)) { + if ((int) $value > 0) { $name = modules_get_agentmodule_name($value); $sql = "SELECT id_agente_modulo FROM tagente_modulo diff --git a/pandora_console/extensions/realtime_graphs.php b/pandora_console/extensions/realtime_graphs.php index 133af5b3f8..d0b5ef5e95 100644 --- a/pandora_console/extensions/realtime_graphs.php +++ b/pandora_console/extensions/realtime_graphs.php @@ -280,10 +280,10 @@ function pandora_realtime_graphs() ); html_print_input_hidden('incremental_base', '0'); - echo ''; - 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/news_dialog.php b/pandora_console/general/news_dialog.php index 82986e2c89..f44eb97faa 100644 --- a/pandora_console/general/news_dialog.php +++ b/pandora_console/general/news_dialog.php @@ -39,7 +39,6 @@ if (!empty($news)) { // Prints news dialog template echo ''; -ui_require_javascript_file('encode_decode_base64'); -?> + ui_require_javascript_file('encode_decode_base64'); + ?> "; +echo ''; // Define a custom action to save the OID selected // in the SNMP browser to the form. diff --git a/pandora_console/godmode/agentes/status_monitor_custom_fields.php b/pandora_console/godmode/agentes/status_monitor_custom_fields.php index a960c32bf2..2dfb79185d 100644 --- a/pandora_console/godmode/agentes/status_monitor_custom_fields.php +++ b/pandora_console/godmode/agentes/status_monitor_custom_fields.php @@ -30,6 +30,26 @@ if (! check_acl($config['id_user'], 0, 'AR') $update = get_parameter('upd_button', ''); $default = (int) get_parameter('default', 0); +// Header. +ui_print_standard_header( + __('Monitor detail').$subpage, + 'images/agent.png', + false, + '', + true, + $buttons, + [ + [ + 'link' => '', + 'label' => __('Monitoring'), + ], + [ + 'link' => '', + 'label' => __('Views'), + ], + ], + (empty($fav_menu) === true) ? [] : $fav_menu +); if ($default != 0) { $fields_selected = explode(',', $config['status_monitor_fields']); @@ -161,11 +181,11 @@ foreach ($fields_available as $key => $available) { // General title. $generalTitleContent = []; -$generalTitleContent[] = html_print_div([ 'style' => 'width: 10px; flex: 0 0 auto; margin-right: 5px;}', 'class' => 'section_table_title_line' ], true); +// $generalTitleContent[] = html_print_div([ 'style' => 'width: 10px; flex: 0 0 auto; margin-right: 5px;}', 'class' => 'section_table_title_line' ], true); $generalTitleContent[] = html_print_div([ 'class' => 'section_table_title', 'content' => __('Show monitor detail fields')], true); $titledata[0] = html_print_div(['class' => 'flex-row-center', 'content' => implode('', $generalTitleContent) ], true); $table->data['general_title'] = $titledata; -$table->data[0][0] = ''.__('Fields available').''; +$table->data[0][0] = ''.__('Fields available').''; $table->data[1][0] = html_print_select($fields_available, 'fields_available[]', true, '', '', 0, true, true, false, '', false, 'width: 300px'); $table->data[1][1] = ''.html_print_image( 'images/darrowright.png', @@ -187,7 +207,7 @@ $table->data[1][1] .= '



'.html_print_image( ).''; $table->data[0][1] = ''; -$table->data[0][2] = ''.__('Fields selected').''; +$table->data[0][2] = ''.__('Fields selected').''; $table->data[1][2] = html_print_select( $result_selected, 'fields_selected[]', @@ -203,7 +223,7 @@ $table->data[1][2] = html_print_select( 'width: 300px' ); -echo ''; +echo ''; html_print_table($table); html_print_action_buttons( diff --git a/pandora_console/godmode/consoles/consoles.php b/pandora_console/godmode/consoles/consoles.php index 02bbe981aa..0158dfe14c 100644 --- a/pandora_console/godmode/consoles/consoles.php +++ b/pandora_console/godmode/consoles/consoles.php @@ -54,12 +54,6 @@ $results = db_get_all_rows_in_table('tconsole'); $message = ''; -if ($results === false) { - $message = ui_print_info_message( - __('If you want to have your consoles registered, you must define them by editing config.php in each individual console and wait for cron to run in order to be registered.') - ); -} - View::render( 'consoles/list', [ @@ -67,3 +61,9 @@ View::render( 'message' => $message, ] ); + +if ($results === false) { + $message = ui_print_info_message( + __('If you want to have your consoles registered, you must define them by editing config.php in each individual console and wait for cron to run in order to be registered.') + ); +} diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index a6bb7a9322..41c8a9d816 100755 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -1257,11 +1257,11 @@ echo ''; html_print_input_hidden('id_agente', $id_agente); +echo ''; attachActionButton('update_agents', 'update', $table->width, false, $SelectAction); +echo ''; // Shown and hide div. -echo ''; - ui_require_jquery_file('form'); ui_require_jquery_file('pandora.controls'); ui_require_jquery_file('ajaxqueue'); diff --git a/pandora_console/godmode/massive/massive_edit_users.php b/pandora_console/godmode/massive/massive_edit_users.php index 928b761694..46022c2833 100644 --- a/pandora_console/godmode/massive/massive_edit_users.php +++ b/pandora_console/godmode/massive/massive_edit_users.php @@ -555,6 +555,7 @@ echo sprintf( $status ); echo ''; +echo ''; attachActionButton('edit_users', 'update', '100%', false, $SelectAction); diff --git a/pandora_console/godmode/massive/massive_enable_disable_alerts.php b/pandora_console/godmode/massive/massive_enable_disable_alerts.php index 78d84d6b57..120fae61b2 100644 --- a/pandora_console/godmode/massive/massive_enable_disable_alerts.php +++ b/pandora_console/godmode/massive/massive_enable_disable_alerts.php @@ -249,6 +249,8 @@ $table->data[5][1] .= ''; html_print_table($table); +html_print_action_buttons('', ['right_content' => $SelectAction, 'class' => 'pdd_b_10px_important pdd_t_10px_important']); + echo ''; ui_require_jquery_file('form'); diff --git a/pandora_console/godmode/massive/massive_operations.php b/pandora_console/godmode/massive/massive_operations.php index fb2331a5dd..b4d4474c20 100755 --- a/pandora_console/godmode/massive/massive_operations.php +++ b/pandora_console/godmode/massive/massive_operations.php @@ -448,7 +448,9 @@ if ($option === 'edit_agents' || $option === 'edit_modules') { $tip = ui_print_help_tip(__('The blank fields will not be updated'), true); } -$SelectAction = ''; +global $SelectAction; + +$SelectAction = ''; $SelectAction .= ''._('Action').''; $SelectAction .= html_print_select( $options, diff --git a/pandora_console/godmode/massive/massive_standby_alerts.php b/pandora_console/godmode/massive/massive_standby_alerts.php index 704f17bfc8..9de731f40e 100644 --- a/pandora_console/godmode/massive/massive_standby_alerts.php +++ b/pandora_console/godmode/massive/massive_standby_alerts.php @@ -277,6 +277,8 @@ $table->data[5][1] .= ''; html_print_table($table); +html_print_action_buttons('', ['right_content' => $SelectAction, 'class' => 'pdd_b_10px_important pdd_t_10px_important']); + echo ''; ui_require_jquery_file('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 "
'.$filter_type.'
"; +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/godmode/servers/servers.build_table.php b/pandora_console/godmode/servers/servers.build_table.php index a010e5d26a..57569ac956 100644 --- a/pandora_console/godmode/servers/servers.build_table.php +++ b/pandora_console/godmode/servers/servers.build_table.php @@ -208,7 +208,7 @@ foreach ($servers as $server) { if ($server['type'] === 'data') { $data[8] .= ''; $data[8] .= html_print_image( - 'images/change-active.svg', + 'images/force@svg.svg', true, [ 'title' => __('Reset module status and fired alert counts'), @@ -219,7 +219,7 @@ foreach ($servers as $server) { } else if ($server['type'] === 'enterprise snmp') { $data[8] .= ''; $data[8] .= html_print_image( - 'images/change-active.svg', + 'images/force@svg.svg', true, [ 'title' => __('Claim back SNMP modules'), diff --git a/pandora_console/godmode/setup/news.php b/pandora_console/godmode/setup/news.php index e388d8034c..16e034f024 100644 --- a/pandora_console/godmode/setup/news.php +++ b/pandora_console/godmode/setup/news.php @@ -289,7 +289,7 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) { 'text', 25, 100, - $text, + io_safe_output($text), '', true, 'w100p' @@ -442,9 +442,19 @@ ui_require_javascript_file('pandora'); dateFormat: "", changeMonth: true, changeYear: true, - showAnim: "slideDown"}); + showAnim: "slideDown"} + ); - defineTinyMCE({"elements": "textarea_text",}); + var added_config = { + "elements":"textarea_text", + "plugins": "preview, print, table, searchreplace, nonbreaking, xhtmlxtras, noneditable", + "theme_advanced_buttons1": "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect", + "theme_advanced_buttons2": "search,replace,|,bullist,numlist,|,undo,redo,|,link,unlink,image,|,cleanup,code,preview,|,forecolor,backcolor", + "valid_children": "+body[style]", + "width": "90%", + } + + defineTinyMCE(added_config); $("#checkbox-expire").click(function() { check_expire(); diff --git a/pandora_console/godmode/users/user_management.php b/pandora_console/godmode/users/user_management.php index 43e41745de..9e648a7a03 100644 --- a/pandora_console/godmode/users/user_management.php +++ b/pandora_console/godmode/users/user_management.php @@ -764,10 +764,9 @@ html_print_table($userManagementTable); $vcard_data = []; $vcard_data['version'] = '3.0'; -$vcard_data['firstName'] = $user_info['firstname']; -$vcard_data['lastName'] = $user_info['lastname']; -$vcard_data['middleName'] = ($user_info['middlename'] === '1') ? '' : $user_info['middlename']; -$vcard_data['nickname'] = $user_info['fullname']; +$vcard_data['firstName'] = $user_info['fullname']; +$vcard_data['lastName'] = ''; +$vcard_data['middleName'] = ''; $vcard_data['workPhone'] = $user_info['phone']; $vcard_data['email'] = $user_info['email']; $vcard_data['organization'] = io_safe_output(get_product_name()); diff --git a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php index 120eeda293..12e557de87 100644 --- a/pandora_console/godmode/wizards/DiscoveryTaskList.class.php +++ b/pandora_console/godmode/wizards/DiscoveryTaskList.class.php @@ -673,7 +673,7 @@ class DiscoveryTaskList extends HTML $data[0] .= ');" >'; $data[0] .= html_print_image( - 'images/change-active.svg', + 'images/force@svg.svg', true, [ 'title' => __('Force'), diff --git a/pandora_console/godmode/wizards/HostDevices.class.php b/pandora_console/godmode/wizards/HostDevices.class.php index 2f7c5cd692..a2836b0d72 100755 --- a/pandora_console/godmode/wizards/HostDevices.class.php +++ b/pandora_console/godmode/wizards/HostDevices.class.php @@ -810,10 +810,7 @@ class HostDevices extends Wizard 'name' => 'interval_manual_defined', 'return' => true, ], - 'extra' => '
'.ui_print_help_tip( - __('The minimum recomended interval for Recon Task is 5 minutes'), - true - ).html_print_extended_select_for_time( + 'extra' => '
'.html_print_extended_select_for_time( 'interval', $this->task['interval_sweep'], '', 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/ajax/audit_log.php b/pandora_console/include/ajax/audit_log.php index 4d92704852..dbb842047c 100644 --- a/pandora_console/include/ajax/audit_log.php +++ b/pandora_console/include/ajax/audit_log.php @@ -160,7 +160,7 @@ if ($load_filter_modal) { true, '', false, - 'margin-left:5px; width:'.$filter_id_width.';' + 'width:'.$filter_id_width.';' ); $table->rowclass[] = 'display-grid'; @@ -169,8 +169,9 @@ if ($load_filter_modal) { 'load_filter', false, [ - 'class' => 'mini w25p', - 'style' => 'margin-left: 73%', + 'class' => 'mini w30p', + 'icon' => 'load', + 'style' => 'margin-left: 208px; width: 130px;', 'onclick' => 'load_filter_values();', ], true @@ -189,7 +190,7 @@ function show_filter() { draggable: true, modal: false, closeOnEscape: true, - width: 500 + width: 380 }); } @@ -293,8 +294,9 @@ if ($save_filter_modal) { 'save_filter', false, [ - 'class' => 'mini w25p', - 'style' => 'margin-left: 56%', + 'class' => 'mini ', + 'icon' => 'save', + 'style' => 'margin-left: 175px; width: 125px;', 'onclick' => 'save_new_filter();', ], true @@ -330,8 +332,9 @@ if ($save_filter_modal) { 'update_filter', false, [ - 'class' => 'mini w25p', - 'style' => 'margin-left: 56%', + 'class' => 'mini ', + 'icon' => 'save', + 'style' => 'margin-left: 155px; width: 145px;', 'onclick' => 'save_update_filter();', ], true diff --git a/pandora_console/include/ajax/heatmap.ajax.php b/pandora_console/include/ajax/heatmap.ajax.php index dd22fcdfef..37806fb4a4 100644 --- a/pandora_console/include/ajax/heatmap.ajax.php +++ b/pandora_console/include/ajax/heatmap.ajax.php @@ -45,73 +45,101 @@ if (is_ajax() === true) { $group = get_parameter('group', true); echo ''; - echo '
'; - echo '

'.__('Refresh').'

'; - echo html_print_select( + echo html_print_label_input_block( + __('Refresh'), + html_print_select( + [ + '30' => __('30 seconds'), + (string) SECONDS_1MINUTE => __('1 minute'), + '180' => __('3 minutes'), + (string) SECONDS_5MINUTES => __('5 minutes'), + ], + 'refresh', + $refresh, + '', + '', + 0, + true, + false, + false, + '', + false, + 'width: 100%; margin-top: 10px;' + ), [ - '30' => __('30 seconds'), - (string) SECONDS_1MINUTE => __('1 minute'), - '180' => __('3 minutes'), - (string) SECONDS_5MINUTES => __('5 minutes'), - ], - 'refresh', - $refresh, - '', - '', - 0, - true, - false, - false, - '', - false, - 'margin-top: 3px;' + 'label_class' => 'font-title-font', + 'div_class' => 'mrgn_top_10px', + ] ); - echo '
'; - echo '
'; - echo '

'.__('Search').'

'; - echo html_print_input_text('search', $search, '', 30, 255, true); - echo '
'; - - echo '
'; - echo '

'.__('Type').'

'; - echo html_print_select( + echo html_print_label_input_block( + __('Search'), + html_print_input_text( + 'search', + $search, + '', + 30, + 255, + true, + false, + false, + '', + 'w100p' + ), [ - 0 => __('Group agents'), - 1 => __('Group modules by tag'), - 2 => __('Group modules by module group'), - 3 => __('Group modules by agents'), - ], - 'type', - $type, - '', - '', - 0, - true, - false, - false, - '', - false, - 'margin-top: 3px;width:70%' + 'label_class' => 'font-title-font', + 'div_class' => 'mrgn_top_10px', + ] ); - echo '
'; - echo '
'; - echo '

'.__('Show groups').'

'; - echo html_print_checkbox('group', 1, $group, true); - echo '
'; + echo html_print_label_input_block( + __('Type'), + html_print_select( + [ + 0 => __('Group agents'), + 1 => __('Group modules by tag'), + 2 => __('Group modules by module group'), + 3 => __('Group modules by agents'), + ], + 'type', + $type, + '', + '', + 0, + true, + false, + false, + '', + false, + 'width: 100%; margin-top: 10px;' + ), + [ + 'label_class' => 'font-title-font', + 'div_class' => 'mrgn_top_10px', + ] + ); + + echo html_print_label_input_block( + __('Show groups'), + '
'.html_print_checkbox('group', 1, $group, true).'
', + [ + 'label_class' => 'font-title-font', + 'div_class' => 'mrgn_top_10px', + ] + ); echo ''; } if ($getFilterType === true) { $filter = get_parameter('filter', 0); - echo '
'; + $label = ' '; + switch ($type) { case 0: default: - echo '

'.__('Group').'

'; - echo html_print_input( + $label = __('Group'); + $input = html_print_input( [ 'type' => 'select_groups', 'returnAllGroup' => true, @@ -126,9 +154,9 @@ if (is_ajax() === true) { break; case 1: - echo '

'.__('Tag').'

'; + $label = __('Tag'); if (tags_has_user_acl_tags($config['id_user']) === false) { - echo html_print_select_from_sql( + $input = html_print_select_from_sql( 'SELECT id_tag, name FROM ttag WHERE id_tag @@ -142,7 +170,7 @@ if (is_ajax() === true) { true, false, false, - 'width: 200px', + 'width: 100%', '5' ); } else { @@ -150,7 +178,7 @@ if (is_ajax() === true) { if (!empty($user_tags)) { $id_user_tags = array_keys($user_tags); - echo html_print_select_from_sql( + $input = html_print_select_from_sql( 'SELECT id_tag, name FROM ttag WHERE id_tag IN ('.implode(',', $id_user_tags).') @@ -164,11 +192,11 @@ if (is_ajax() === true) { true, false, false, - 'width: 200px', + 'width: 100%', '5' ); } else { - echo html_print_select_from_sql( + $input = html_print_select_from_sql( 'SELECT id_tag, name FROM ttag WHERE id_tag @@ -182,7 +210,7 @@ if (is_ajax() === true) { true, false, false, - 'width: 200px', + 'width: 100%', '5' ); } @@ -190,8 +218,8 @@ if (is_ajax() === true) { break; case 2: - echo '

'.__('Module group').'

'; - echo html_print_select_from_sql( + $label = __('Module group'); + $input = html_print_select_from_sql( 'SELECT id_mg, name FROM tmodule_group ORDER BY name', 'filter[]', $filter, @@ -202,7 +230,7 @@ if (is_ajax() === true) { true, true, false, - 'width: 200px', + 'width: 100%', '5' ); break; @@ -212,7 +240,14 @@ if (is_ajax() === true) { break; } - echo '
'; + echo html_print_label_input_block( + $label, + $input, + [ + 'label_class' => 'font-title-font', + 'div_class' => 'mrgn_top_10px', + ] + ); } if ($getInfo === true) { diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index 296971bfc5..450faa0e9a 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -1279,7 +1279,7 @@ if (check_login()) { if ((int) $module['flag'] === 0) { $additionalLinkAction = '&flag=1'; $linkCaption = __('Force checks'); - $imgaction = 'images/target.png'; + $imgaction = 'images/force@svg.svg'; } else { $additionalLinkAction = ''; $linkCaption = __('Refresh'); 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 - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + ;'> width = '100%'; $table->class = 'info_table'; // Subheaders for Warning and Critical columns. - $subheaders = 'Min.'; - $subheaders .= 'Max.'; - $subheaders .= 'Inv.'; - $subheaders .= '%.'; + $subheaders = 'Min.'; + $subheaders .= 'Max.'; + $subheaders .= 'Inv.'; + $subheaders .= '%.'; // Warning header. $warning_header = html_print_div( @@ -4352,8 +4352,7 @@ class AgentWizard extends HTML ); $data_warning .= html_print_div( [ - 'class' => 'wizard-column-levels-check', - 'style' => 'margin-top: 0.3em;', + 'class' => 'wizard-column-levels-check mrgn_top_10px', 'content' => html_print_checkbox( 'module-warning-inv-'.$uniqueId, $module['inv_warning'], @@ -4369,8 +4368,7 @@ class AgentWizard extends HTML ); $data_warning .= html_print_div( [ - 'class' => 'wizard-column-levels-check', - 'style' => 'margin-top: 0.3em;', + 'class' => 'wizard-column-levels-check mrgn_top_10px', 'content' => html_print_checkbox( 'module-warning-perc-'.$uniqueId, $module['perc_warning'], @@ -4436,8 +4434,7 @@ class AgentWizard extends HTML $data[4] .= html_print_div( [ - 'class' => 'wizard-column-levels-check', - 'style' => 'margin-top: 0.3em;', + 'class' => 'wizard-column-levels-check mrgn_top_10px', 'content' => html_print_checkbox( 'module-critical-inv-'.$uniqueId, $module['inv_critical'], @@ -4454,8 +4451,7 @@ class AgentWizard extends HTML $data[4] .= html_print_div( [ - 'class' => 'wizard-column-levels-check', - 'style' => 'margin-top: 0.3em;', + 'class' => 'wizard-column-levels-check mrgn_top_10px', 'content' => html_print_checkbox( 'module-critical-perc-'.$uniqueId, $module['perc_critical'], @@ -4490,7 +4486,7 @@ class AgentWizard extends HTML '', true, '', - 'pdd_0px' + 'pdd_0px mrgn_top-8px' ); } else { // WIP. Current value of this module. diff --git a/pandora_console/include/class/AgentsAlerts.class.php b/pandora_console/include/class/AgentsAlerts.class.php index 379b595d5a..1e3dc705b8 100644 --- a/pandora_console/include/class/AgentsAlerts.class.php +++ b/pandora_console/include/class/AgentsAlerts.class.php @@ -771,7 +771,7 @@ class AgentsAlerts extends HTML $headerInputs = []; $headerInputs[] = [ - 'label' => __('Group'), + 'label' => ''.__('Group').'', 'id' => 'select-group-id', 'arguments' => [ 'name' => 'group-id', @@ -788,8 +788,9 @@ class AgentsAlerts extends HTML ]; $headerInputs[] = [ - 'label' => __('Show modules without alerts'), + 'label' => ''.__('Show modules without alerts').'', 'id' => 'txt-use-agent-ip', + 'class' => 'display-grid mrgn_lft_15px mrgn_btn_5px', 'arguments' => [ 'name' => 'show-modules-without-alerts', 'checked' => $this->showWithoutAlertModules, diff --git a/pandora_console/include/class/CustomNetScan.class.php b/pandora_console/include/class/CustomNetScan.class.php index e0fd3708ac..2fec9d8b9a 100644 --- a/pandora_console/include/class/CustomNetScan.class.php +++ b/pandora_console/include/class/CustomNetScan.class.php @@ -524,7 +524,7 @@ class CustomNetScan extends Wizard // Schedule. $form['inputs'][] = [ 'label' => __('Interval').ui_print_help_tip( - __('Manual interval means that it will be executed only On-demand'), + __('Manual interval means that it will be executed only On-demand').', '.__('The minimum recomended interval for Recon Task is 5 minutes'), true ), 'class' => 'input-interval', @@ -549,9 +549,6 @@ class CustomNetScan extends Wizard true, false, false - ).ui_print_help_tip( - __('The minimum recomended interval for Recon Task is 5 minutes'), - true ).'', ]; diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index a98acabbf4..e729b8bf14 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,7 +20,7 @@ /** * Pandora build version and version */ -$build_version = 'PC230330'; +$build_version = 'PC230403'; $pandora_version = 'v7.0NG.770'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/include/functions_cron.php b/pandora_console/include/functions_cron.php index 3467ff9184..5e47040449 100644 --- a/pandora_console/include/functions_cron.php +++ b/pandora_console/include/functions_cron.php @@ -530,7 +530,7 @@ function cron_list_table() $task['id'] ), 'content' => html_print_image( - 'images/change-active.svg', + 'images/force@svg.svg', true, [ 'title' => __('Force run'), @@ -568,7 +568,7 @@ function cron_list_table() $task['id'] ), 'content' => html_print_image( - 'images/change-active.svg', + 'images/force@svg.svg', true, [ 'title' => __('Force run'), @@ -623,7 +623,7 @@ function cron_list_table() $task['id'] ), 'content' => html_print_image( - 'images/change-active.svg', + 'images/force@svg.svg', true, [ 'title' => __('Force run'), @@ -715,7 +715,7 @@ function cron_list_table() $task['id'] ), 'content' => html_print_image( - 'images/change-active.svg', + 'images/force@svg.svg', true, [ 'title' => __('Force run'), @@ -751,7 +751,7 @@ function cron_list_table() $task['id'] ), 'content' => html_print_image( - 'images/change-active.svg', + 'images/force@svg.svg', true, [ 'title' => __('Force run'), @@ -797,7 +797,7 @@ function cron_list_table() $task['id'] ), 'content' => html_print_image( - 'images/change-active.svg', + 'images/force@svg.svg', true, [ 'title' => __('Force run'), @@ -839,7 +839,7 @@ function cron_list_table() $task['id'] ), 'content' => html_print_image( - 'images/change-active.svg', + 'images/force@svg.svg', true, [ 'title' => __('Force run'), @@ -873,7 +873,7 @@ function cron_list_table() $task['id'] ), 'content' => html_print_image( - 'images/change-active.svg', + 'images/force@svg.svg', true, [ 'title' => __('Force run'), diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 8afc257399..9616634adb 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -4560,7 +4560,7 @@ function events_page_details($event, $server_id=0) true, [ 'title' => __('Go to data overview'), - 'class' => 'invert_filter', + 'class' => 'invert_filter main_menu_icon', ] ); } else { @@ -4569,7 +4569,7 @@ function events_page_details($event, $server_id=0) true, [ 'title' => __('Go to data overview'), - 'class' => 'invert_filter', + 'class' => 'invert_filter main_menu_icon', 'style' => 'opacity: .5', ] ); diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index a1b12f1ff3..305d2c5d7d 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -515,7 +515,7 @@ function html_print_select_groups( 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_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_inventory.php b/pandora_console/include/functions_inventory.php index 761e8bba9e..0a8c31c512 100644 --- a/pandora_console/include/functions_inventory.php +++ b/pandora_console/include/functions_inventory.php @@ -812,6 +812,10 @@ function get_data_basic_info_sql($params, $count=false) $where .= sprintf(' AND id_agente = %d', $params['id_agent']); } + if ($params['id_group'] > 0) { + $where .= sprintf(' AND id_grupo = %d', $params['id_group']); + } + if ($params['search'] > 0) { $where .= sprintf( ' AND ( alias LIKE "%%%s%%" )', diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 3bf0799599..7a04cbf30a 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -57,7 +57,7 @@ function menu_print_menu(&$menu) $sec = (string) get_parameter('sec'); $sec2 = (string) get_parameter('sec2'); if ($sec2 === 'operation/agentes/ver_agente') { - $sec2 = 'godmode/agentes/configurar_agente'; + $sec2 = 'operation/agentes/estado_agente'; } else if ($sec2 === 'godmode/alerts/configure_alert_template') { $sec2 = 'godmode/alerts/alert_templates'; } else if ($sec2 === 'godmode/events/events') { diff --git a/pandora_console/include/functions_snmp_browser.php b/pandora_console/include/functions_snmp_browser.php index 0e51faa66c..1d7fffd922 100644 --- a/pandora_console/include/functions_snmp_browser.php +++ b/pandora_console/include/functions_snmp_browser.php @@ -97,7 +97,7 @@ function snmp_browser_get_html_tree( // Id used to expand leafs. $sub_id = time().rand(0, getrandmax()); // Display the branch. - $output .= '
  • '; + $output .= '
  • '; // Indent sub branches. for ($i = 1; $i <= $depth; $i++) { diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 3c05eb613a..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"; } /* @@ -3628,6 +3634,11 @@ function ui_print_datatable(array $parameters) $parameters['csv'] = 1; } + $dom_elements = '"plfrtiB"'; + if (isset($parameters['dom_elements'])) { + $dom_elements = '"'.$parameters['dom_elements'].'"'; + } + $filter = ''; // Datatable filter. if (isset($parameters['form']) && is_array($parameters['form'])) { @@ -3790,6 +3801,34 @@ function ui_print_datatable(array $parameters) } $table .= ''; + + if (isset($parameters['data_element']) === true) { + $table .= ''; + foreach ($parameters['data_element'] as $row) { + $table .= ''; + foreach ($row as $td_data) { + $table .= ''.$td_data.''; + } + + $table .= ''; + } + + $table .= ''; + + $js = ''; + } + $table .= ''; $pagination_class = 'pandora_pagination'; @@ -3813,279 +3852,276 @@ function ui_print_datatable(array $parameters) $export_columns = ',columns: \'th:not(:last-child)\''; } - if (isset($parameters['ajax_url'])) { - $type_data = 'ajax: { - url: "'.ui_get_full_url('ajax.php', false, false, false).'", - type: "POST", - dataSrc: function (json) { - if($("#'.$form_id.'_search_bt") != undefined) { - $("#'.$form_id.'_loading").remove(); - } + if (isset($parameters['data_element']) === false) { + if (isset($parameters['ajax_url'])) { + $type_data = 'ajax: { + url: "'.ui_get_full_url('ajax.php', false, false, false).'", + type: "POST", + dataSrc: function (json) { + if($("#'.$form_id.'_search_bt") != undefined) { + $("#'.$form_id.'_loading").remove(); + } - if (json.error) { - console.error(json.error); - $("#error-'.$table_id.'").html(json.error); - $("#error-'.$table_id.'").dialog({ - title: "Filter failed", - width: 630, - resizable: true, - draggable: true, - modal: false, - closeOnEscape: true, - buttons: { - "Ok" : function () { - $(this).dialog("close"); + if (json.error) { + console.error(json.error); + $("#error-'.$table_id.'").html(json.error); + $("#error-'.$table_id.'").dialog({ + title: "Filter failed", + width: 630, + resizable: true, + draggable: true, + modal: false, + closeOnEscape: true, + buttons: { + "Ok" : function () { + $(this).dialog("close"); + } } - } - }).parent().addClass("ui-state-error"); - } else {'; + }).parent().addClass("ui-state-error"); + } else {'; - if (isset($parameters['ajax_return_operation']) === true - && empty($parameters['ajax_return_operation']) === false - && isset($parameters['ajax_return_operation_function']) === true - && empty($parameters['ajax_return_operation_function']) === false - ) { - $type_data .= ' - if (json.'.$parameters['ajax_return_operation'].' !== undefined) { - '.$parameters['ajax_return_operation_function'].'(json.'.$parameters['ajax_return_operation'].'); - } - '; - } + if (isset($parameters['ajax_return_operation']) === true + && empty($parameters['ajax_return_operation']) === false + && isset($parameters['ajax_return_operation_function']) === true + && empty($parameters['ajax_return_operation_function']) === false + ) { + $type_data .= ' + if (json.'.$parameters['ajax_return_operation'].' !== undefined) { + '.$parameters['ajax_return_operation_function'].'(json.'.$parameters['ajax_return_operation'].'); + } + '; + } + + if (isset($parameters['ajax_postprocess'])) { + $type_data .= ' + if (json.data) { + json.data.forEach(function(item) { + '.$parameters['ajax_postprocess'].' + }); + } else { + json.data = {}; + }'; + } - if (isset($parameters['ajax_postprocess'])) { $type_data .= ' - if (json.data) { - json.data.forEach(function(item) { - '.$parameters['ajax_postprocess'].' + return json.data; + } + }, + data: function (data) { + if($("#button-'.$form_id.'_search_bt") != undefined) { + var loading = \''.html_print_image( + 'images/spinner.gif', + true, + [ + 'id' => $form_id.'_loading', + 'class' => 'loading-search-datatables-button', + ] + ).'\'; + $("#button-'.$form_id.'_search_bt").parent().append(loading); + } + + inputs = $("#'.$form_id.' :input"); + + values = {}; + inputs.each(function() { + values[this.name] = $(this).val(); + }) + + $.extend(data, { + filter: values,'."\n"; + + if (is_array($parameters['ajax_data'])) { + foreach ($parameters['ajax_data'] as $k => $v) { + $type_data .= $k.':'.json_encode($v).",\n"; + } + } + + $type_data .= 'page: "'.$parameters['ajax_url'].'" }); - } else { - json.data = {}; - }'; + + return data; + } + },'; + } else { + $type_data = 'data: '.json_encode($parameters['data_element']).','; } - $type_data .= ' - return json.data; - } - }, - data: function (data) { - if($("#button-'.$form_id.'_search_bt") != undefined) { - var loading = \''.html_print_image( - 'images/spinner.gif', - true, - [ - 'id' => $form_id.'_loading', - 'class' => 'loading-search-datatables-button', - ] - ).'\'; - $("#button-'.$form_id.'_search_bt").parent().append(loading); - } + $serverside = 'true'; + if (isset($parameters['data_element'])) { + $serverside = 'false'; + } - inputs = $("#'.$form_id.' :input"); + // Javascript controller. + $js = ''; } - if (isset($parameters['csv']) === true) { - $js."'$('#".$table_id."').on( 'buttons-processing', function ( e, indicator ) { - if ( indicator ) { - console.log('a'); - } - else { - console.log('b'); - }"; - } - - $js .= '$("table#'.$table_id.'").removeClass("invisible"); - });'; - $js .= ' - $(function() { - $(document).on("preInit.dt", function (ev, settings) { - $("div.dataTables_length").hide(); - $("div.dt-buttons").hide(); - }); - }); - - '; - - $js .= ''; - // Order. $info_msg_arr = []; $info_msg_arr['message'] = $emptyTable; @@ -4117,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/javascript/pandora_ui.js b/pandora_console/include/javascript/pandora_ui.js index 95ffe898b0..45ca47e92b 100644 --- a/pandora_console/include/javascript/pandora_ui.js +++ b/pandora_console/include/javascript/pandora_ui.js @@ -351,11 +351,86 @@ function load_modal(settings) { AJAX_RUNNING = 0; } } else { - // No onsumbit configured. Directly close. - if (document.getElementById(settings.form) != undefined) { - document.getElementById(settings.form).submit(); + if (Array.isArray(settings.form) === false) { + $("#" + settings.form + " :input").each(function() { + if (this.checkValidity() === false) { + var select2 = $(this).attr("data-select2-id"); + if (typeof select2 !== typeof undefined && select2 !== false) { + $(this) + .next() + .attr("title", this.validationMessage); + $(this) + .next() + .tooltip({ + tooltipClass: "uitooltip", + position: { + my: "right bottom", + at: "right top", + using: function(position, feedback) { + $(this).css(position); + $("
    ") + .addClass("arrow") + .addClass(feedback.vertical) + .addClass(feedback.horizontal) + .appendTo(this); + } + } + }); + $(this) + .next() + .tooltip("open"); + + var element = $(this).next(); + setTimeout( + function(element) { + element.tooltip("destroy"); + element.removeAttr("title"); + }, + 3000, + element + ); + } else { + $(this).attr("title", this.validationMessage); + $(this).tooltip({ + tooltipClass: "uitooltip", + position: { + my: "right bottom", + at: "right top", + using: function(position, feedback) { + $(this).css(position); + $("
    ") + .addClass("arrow") + .addClass(feedback.vertical) + .addClass(feedback.horizontal) + .appendTo(this); + } + } + }); + $(this).tooltip("open"); + + var element = $(this); + setTimeout( + function(element) { + element.tooltip("destroy"); + element.removeAttr("title"); + }, + 3000, + element + ); + } + + flagError = true; + } + }); + } + + if (!flagError) { + // No onsumbit configured. Directly close. + if (document.getElementById(settings.form) != undefined) { + document.getElementById(settings.form).submit(); + } + d.dialog("close"); } - d.dialog("close"); } }; diff --git a/pandora_console/include/lib/Dashboard/Widgets/ModulesByStatus.php b/pandora_console/include/lib/Dashboard/Widgets/ModulesByStatus.php index 53d996607c..01a8781606 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/ModulesByStatus.php +++ b/pandora_console/include/lib/Dashboard/Widgets/ModulesByStatus.php @@ -453,6 +453,7 @@ class ModulesByStatus extends Widget 1000, ], ], + 'dom_elements' => 'frtilp', ] ); } catch (\Exception $e) { diff --git a/pandora_console/include/styles/dashboards.css b/pandora_console/include/styles/dashboards.css index 3ac49172d4..1a276fcdfd 100644 --- a/pandora_console/include/styles/dashboards.css +++ b/pandora_console/include/styles/dashboards.css @@ -22,7 +22,7 @@ } #menu_tab { - margin: 0px; + margin: 0; } #menu_tab li.nomn.tab_operation img, @@ -426,12 +426,21 @@ li#search_input_widget { top: 2px; } -div#dashboard-controls { +.select2-search--dropdown .select2-search__field { + width: auto; +} + +div#dashboard-controls-slides { + width: 720px !important; +} + +div#dashboard-controls, +div#dashboard-controls-slides { position: fixed; z-index: 1; top: 10px; right: 10px; - width: 800px; + width: 450px; height: 70px; display: flex; flex-direction: row; @@ -443,27 +452,32 @@ div#dashboard-controls { padding: 0px 10px; } -div#dashboard-controls div { - flex: 0.5; +div#dashboard-controls div, +div#dashboard-controls-slides div { + margin-left: 10px; text-align: center; } -div#dashboard-controls div#dashboard-slides-form-countdown { +div#dashboard-controls div#dashboard-slides-form-countdown, +div#dashboard-controls-slides div#dashboard-slides-form-countdown { flex: 7; } -div#dashboard-controls div#dashboard-slides-name { +div#dashboard-controls div#dashboard-slides-name, +div#dashboard-controls-slides div#dashboard-slides-name { flex: 3; } -div#dashboard-controls div.dashboard-mode { +div#dashboard-controls div.dashboard-mode, +div#dashboard-controls-slides div.dashboard-mode { flex: 1; display: flex; flex-direction: row; justify-content: center; } -div#dashboard-controls div.dashboard-mode a { +div#dashboard-controls div.dashboard-mode a, +div#dashboard-controls-slides div.dashboard-mode a { margin: 0px; } diff --git a/pandora_console/include/styles/events.css b/pandora_console/include/styles/events.css index c3f91a1588..e4dfbe428d 100644 --- a/pandora_console/include/styles/events.css +++ b/pandora_console/include/styles/events.css @@ -124,7 +124,6 @@ td > input[id^="checkbox-multi"] { padding-right: 9px; padding-top: 7px; padding-bottom: 7px; - border-bottom: 2px solid #dedede; word-break: break-all; } 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 933e341e30..3035ac0321 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -805,6 +805,11 @@ select:-internal-list-box { max-height: 400px; } +.mx_height85 { + height: 85px !important; + max-height: 85px !important; +} + .no-text-imp { font-size: 0 !important; } @@ -926,6 +931,10 @@ select:-internal-list-box { justify-content: flex-start; } +.flex-align-start { + align-items: start; +} + .flex-baseline { align-self: baseline; } @@ -7002,6 +7011,10 @@ div.graph div.legend table { margin-top: -2px !important; } +.mrgn_top-8px { + margin-top: -8px !important; +} + .mrgn_top-10px { margin-top: -10px; } @@ -7395,6 +7408,10 @@ div.graph div.legend table { /* * PADDING RIGHT */ +.pdd_r_0px { + padding-right: 0px !important; +} + .pdd_r_2px { padding-right: 2px; } @@ -7466,6 +7483,10 @@ div.graph div.legend table { /* * PADDING LEFT */ +.pdd_l_0px { + padding-left: 0px !important; +} + .pdd_l_4px { padding-left: 4px; } @@ -7537,6 +7558,10 @@ div.graph div.legend table { padding-bottom: 10px; } +.pdd_b_10px_important { + padding-bottom: 10px !important; +} + .pdd_b_20px { padding-bottom: 20px; } @@ -7607,6 +7632,10 @@ div.graph div.legend table { padding-top: 10px; } +.pdd_t_10px_important { + padding-top: 10px !important; +} + .pdd_t_15px { padding-top: 15px; } @@ -10120,10 +10149,6 @@ select:focus { border-color: #8a96a6; } -.dataTables_length > label > select { - min-height: 42px; -} - .dataTables_length > label { font-size: 0px; } @@ -11787,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; @@ -11859,3 +11884,11 @@ li.input-interval .extra-container-input .select2 { .scale-0-8 { transform: scale(0.8); } + +label:has(span.label-alert-agent) { + margin-bottom: 10px; +} + +.info_table.events > tbody > tr > td { + border-bottom: 1px solid #dedede !important; +} diff --git a/pandora_console/include/styles/pandora_black.css b/pandora_console/include/styles/pandora_black.css index f716688e75..f657e9d910 100644 --- a/pandora_console/include/styles/pandora_black.css +++ b/pandora_console/include/styles/pandora_black.css @@ -1234,10 +1234,6 @@ a.pandora_pagination:hover { box-shadow: 0px 3px 6px #111; } -.info_table.events > tbody > tr > td { - border-bottom: 2px solid #707070; -} - .info_table tr th, .databox.data > tbody > tr > td { border-bottom: 1px solid #707070 !important; @@ -1560,7 +1556,7 @@ a.autorefresh_txt, } .info_table.events > tbody > tr > td { - border-bottom: 1px solid #333; + border-bottom: 1px solid #333 !important; } .info_table, @@ -1600,3 +1596,7 @@ a.pandora_pagination, .info_table > tbody > tr > td { border-bottom: 1px solid #3f3f3f; } + +.font-title-font { + color: #fff; +} diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css index 4dd0c2e410..fc421444d5 100644 --- a/pandora_console/include/styles/tables.css +++ b/pandora_console/include/styles/tables.css @@ -313,7 +313,7 @@ table.dataTable.info_table.no-footer { a.pandora_pagination { background-color: #f6f7fb; - padding: 11px; + padding: 9px; color: #000; border: 1px solid #cacaca; border-left: none; @@ -362,7 +362,7 @@ a.pandora_pagination.current:hover { background-color: transparent; color: var(--primary-color); font-size: 20px; - height: 42px; + height: 38px; /* height: 32px; */ width: 80px; margin-left: 10px; @@ -816,14 +816,6 @@ div[id^="auto-os-"] > img { height: 20px; } -.dataTables_paginate { - margin-right: 10px; -} - -.dataTables_paginate.paging_simple_numbers { - margin-right: 0; -} - .w22px { width: 22px; } @@ -842,3 +834,13 @@ td.FF-thresholds-pdd { padding: 0px !important; padding-left: 13px !important; } + +div.grid-stack-item-content a.pandora_pagination, +a.mini-pandora-pagination { + padding: 7px; + font-size: 9pt; +} + +input.mini-search-input { + height: 30px; +} 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; ?>) - - - - - - - - - - + + + + + + + + + + data['second_line'][1] = html_print_label_input_block( true, '', [], + true, + 0, + '30', true ) ); diff --git a/pandora_console/operation/events/sound_events.php b/pandora_console/operation/events/sound_events.php index 956282b045..f2a8c62432 100644 --- a/pandora_console/operation/events/sound_events.php +++ b/pandora_console/operation/events/sound_events.php @@ -154,9 +154,9 @@ ui_require_css_file('discovery'); '; if ($config['style'] === 'pandora_black' && !is_metaconsole()) { - echo ''; + echo ''; } else { - echo ''; + echo ''; } echo ''; diff --git a/pandora_console/operation/heatmap.php b/pandora_console/operation/heatmap.php index 1e063d3c3d..a982bffb9a 100644 --- a/pandora_console/operation/heatmap.php +++ b/pandora_console/operation/heatmap.php @@ -149,13 +149,13 @@ if ($is_ajax === false && $pure === false) { if ($is_ajax === false && $pure === true) { // Floating menu - Start. - echo '
    '; + echo '
    '; echo '