diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 534f6d7cf7..514fdb6bf8 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.747-200714 +Version: 7.0NG.747-200716 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 b904194dc1..c0e52fdb69 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.747-200714" +pandora_version="7.0NG.747-200716" 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 89268c6d22..12802ca9e3 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -55,7 +55,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '7.0NG.747'; -use constant AGENT_BUILD => '200714'; +use constant AGENT_BUILD => '200716'; # 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 4d81c061a5..6c8530073c 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.747 -%define release 200714 +%define release 200716 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 adc17caca9..fba0f66c63 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 7.0NG.747 -%define release 200714 +%define release 200716 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 8f5a0c0ded..2906e6f659 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -10,7 +10,7 @@ # ********************************************************************** PI_VERSION="7.0NG.747" -PI_BUILD="200714" +PI_BUILD="200716" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index bbaf77855b..2bd57d6c83 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{200714} +{200716} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 29d1d3adea..7239b191f1 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.747(Build 200714)") +#define PANDORA_VERSION ("7.0NG.747(Build 200716)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index ebd9e55a52..c375677c54 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.747(Build 200714))" + VALUE "ProductVersion", "(7.0NG.747(Build 200716))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 32229addf8..4042650114 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 7.0NG.747-200714 +Version: 7.0NG.747-200716 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 85d55170b8..8cef851478 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.747-200714" +pandora_version="7.0NG.747-200716" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/chart_generator.php b/pandora_console/include/chart_generator.php index 97fdf32b9c..1b3c352df9 100644 --- a/pandora_console/include/chart_generator.php +++ b/pandora_console/include/chart_generator.php @@ -189,6 +189,7 @@ if (file_exists('languages/'.$user_language.'.mo') === true) { echo '
'; switch ($type_graph_pdf) { case 'combined': + $params['pdf'] = true; echo graphic_combined_module( $module_list, $params, diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 40612336ca..1756c8f4c1 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 = 'PC200714'; +$build_version = 'PC200716'; $pandora_version = 'v7.0NG.747'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index a0a06473cc..bf09416cba 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -2058,6 +2058,12 @@ function graphic_combined_module( } } + if (isset($params['pdf']) === true && $params['pdf'] === true) { + $transitionDuration = 0; + } else { + $transitionDuration = 500; + } + $output = stacked_gauge( $graph_values, $new_width, @@ -2073,7 +2079,8 @@ function graphic_combined_module( $config['fontpath'], $fixed_font_size, '', - $homeurl + $homeurl, + $transitionDuration ); break; diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 970f81bbef..16f3319a06 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -6098,3 +6098,26 @@ function ui_get_full_external_url(string $url) return $url; } + + +function ui_print_message_dialog($title, $text, $id='', $img='', $text_button='', $hidden=true) +{ + if ($hidden == true) { + $style = 'display:none'; + } + + echo '
'; + echo '
'; + echo '
'; + echo html_print_image($img, true, ['alt' => $title, 'border' => 0]); + echo '
'; + echo '
'; + echo '
'; + echo '

'.$title.'

'; + echo '

'.$text.'

'; + echo '
'; + echo '
'; + echo '
'; + echo '
'; + echo '
'; +} diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php index 1d79129610..6f341381c5 100644 --- a/pandora_console/include/graphs/fgraph.php +++ b/pandora_console/include/graphs/fgraph.php @@ -638,7 +638,8 @@ function stacked_gauge( $font='', $font_size='', $unit='', - $homeurl='' + $homeurl='', + $transitionDuration=500 ) { include_once 'functions_d3.php'; @@ -656,7 +657,8 @@ function stacked_gauge( $unit, $font, ($font_size + 2), - $no_data_image + $no_data_image, + $transitionDuration ); } diff --git a/pandora_console/include/graphs/functions_d3.php b/pandora_console/include/graphs/functions_d3.php index 659270744a..8719531abc 100644 --- a/pandora_console/include/graphs/functions_d3.php +++ b/pandora_console/include/graphs/functions_d3.php @@ -294,7 +294,8 @@ function d3_gauges( $unit, $font, $font_size, - $no_data_image + $no_data_image, + $transitionDuration ) { global $config; @@ -310,7 +311,7 @@ function d3_gauges( $output .= ""; return $output; diff --git a/pandora_console/include/graphs/pandora.d3.js b/pandora_console/include/graphs/pandora.d3.js index bfebebe99c..d308514ce3 100644 --- a/pandora_console/include/graphs/pandora.d3.js +++ b/pandora_console/include/graphs/pandora.d3.js @@ -1005,7 +1005,8 @@ function createGauge( critical_inverse, font_size, height, - font + font, + transitionDuration ) { var gauges; @@ -1014,7 +1015,8 @@ function createGauge( label: etiqueta, min: undefined != min ? min : 0, max: undefined != max ? max : 100, - font_size: font_size + font_size: font_size, + transitionDuration: transitionDuration }; if (value == null) { @@ -1128,7 +1130,7 @@ function createGauge( gauges = new Gauge(name, config, font); gauges.render(); - gauges.redraw(value); + gauges.redraw(value, config.transitionDuration); $(".gauge>text").each(function() { label = $(this).text(); @@ -1155,12 +1157,17 @@ function createGauge( $(this).text(text); } }); - config = false; - max_warning2 = false; - min_warning2 = false; } -function createGauges(data, width, height, font_size, no_data_image, font) { +function createGauges( + data, + width, + height, + font_size, + no_data_image, + font, + transitionDuration +) { var nombre, label, minimun_warning, @@ -1211,7 +1218,8 @@ function createGauges(data, width, height, font_size, no_data_image, font) { critical_inverse, font_size, height, - font + font, + transitionDuration ); } } @@ -1247,7 +1255,7 @@ function Gauge(placeholderName, configuration, font) { this.config.yellowColor = configuration.yellowColor || "#FF9900"; this.config.redColor = configuration.redColor || "#DC3912"; - this.config.transitionDuration = configuration.transitionDuration || 500; + this.config.transitionDuration = configuration.transitionDuration; }; this.render = function() { @@ -1481,11 +1489,7 @@ function Gauge(placeholderName, configuration, font) { var pointer = pointerContainer.selectAll("path"); pointer .transition() - .duration( - undefined != transitionDuration - ? transitionDuration - : this.config.transitionDuration - ) + .duration(undefined != transitionDuration ? transitionDuration : 0) //.delay(0) //.ease("linear") //.attr("transform", function(d) diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index a154dd237a..169fafa201 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -1865,3 +1865,112 @@ function ajaxRequest(id, settings) { } }); } + +/** + * ------------------------------------- + * Connection Check + * -------------------------------------- + */ + +checkConnection(1); + +/** + * Performs connection tests every minutes and add connection listeners + * @param {integer} time in minutes + */ + +function checkConnection(minutes) { + var cicle = minutes * 60 * 1000; + var checkConnection = setInterval(handleConnection, cicle); + + // Connection listeters. + window.addEventListener("online", handleConnection); + window.addEventListener("offline", handleConnection); +} + +/** + * Handle connection status test. + * + * Test conectivity with server and shows modal message. + */ +function handleConnection() { + var connected; + var msg = "online"; + + if (navigator.onLine) { + isReachable(getServerUrl()) + .then(function(online) { + if (online) { + // handle online status + connected = true; + showConnectionMessage(connected, msg); + } else { + connected = false; + msg = "No connectivity with server"; + showConnectionMessage(connected, msg); + } + }) + .catch(function(err) { + connected = false; + msg = err; + showConnectionMessage(connected, msg); + }); + } else { + // handle offline status + connected = false; + msg = "Connection offline"; + showConnectionMessage(connected, msg); + } +} + +/** + * Test server reachibilty and get response. + * + * @param {String} url + * + * Return {promise} + */ +function isReachable(url) { + /** + * Note: fetch() still "succeeds" for 404s on subdirectories, + * which is ok when only testing for domain reachability. + * + * Example: + * https://google.com/noexist does not throw + * https://noexist.com/noexist does throw + */ + return fetch(url, { method: "HEAD", mode: "no-cors" }) + .then(function(resp) { + return resp && (resp.ok || resp.type === "opaque"); + }) + .catch(function(error) { + console.warn("[conn test failure]:", error); + }); +} + +/** + * Gets server origin url + */ +function getServerUrl() { + return $("#php_to_js_value_absolute_homeurl").val() || window.location.origin; +} + +/** + * Shows or hide connection infoMessage. + * + * @param {bool} conn + * @param {string} msg + */ +function showConnectionMessage(conn = true, msg = "") { + var data = {}; + if (conn) { + $("div#message_dialog_connection") + .closest(".ui-dialog-content") + .dialog("close"); + } else { + data.title = "Connection with server has been lost"; + data.text = "Connection status: " + msg; + + infoMessage(data, "message_dialog_connection"); + } +} diff --git a/pandora_console/include/javascript/pandora_events.js b/pandora_console/include/javascript/pandora_events.js index e176b863ad..a5e5b0c36e 100644 --- a/pandora_console/include/javascript/pandora_events.js +++ b/pandora_console/include/javascript/pandora_events.js @@ -713,7 +713,6 @@ function update_event(table, id_evento, type, event_rep, row) { }); var t1 = new Date(); - // Update events matching current filters and id_evento selected. $.ajax({ async: true, type: "POST", @@ -751,6 +750,7 @@ function update_event(table, id_evento, type, event_rep, row) { } }); } +// Update events matching current filters and id_evento selected. function validate_event(table, id_evento, event_rep, row) { var button = document.getElementById("val-" + id_evento); @@ -791,7 +791,39 @@ function delete_event(table, id_evento, event_rep, row) { processed += 1; return; } + var message = + "

Are you sure?

"; + confirmDialog({ + title: "ATTENTION", + message: message, + cancel: "Cancel", + ok: "Ok", + onAccept: function() { + button.children[0]; + button.children[0].src = "images/spinner.gif"; + return update_event( + table, + id_evento, + { delete_event: 1 }, + event_rep, + row + ); + }, + onDeny: function() { + button.children[0]; + button.children[0].src = "images/cross.png"; + return; + } + }); +} +function execute_delete_event_reponse(table, id_evento, event_rep, row) { + var button = document.getElementById("del-" + id_evento); + if (!button) { + // Button does not exist. Ignore. + processed += 1; + return; + } button.children[0]; button.children[0].src = "images/spinner.gif"; return update_event(table, id_evento, { delete_event: 1 }, event_rep, row); @@ -799,110 +831,126 @@ function delete_event(table, id_evento, event_rep, row) { // Imported from old files. function execute_event_response(event_list_btn) { - processed = 0; - $("#max_custom_event_resp_msg").hide(); - $("#max_custom_selected").hide(); + var message = + "

Are you sure?

"; + confirmDialog({ + title: "ATTENTION", + message: message, + cancel: "Cancel", + ok: "Ok", + onAccept: function() { + // Continue execution. + processed = 0; + $("#max_custom_event_resp_msg").hide(); + $("#max_custom_selected").hide(); - var response_id = $("select[name=response_id]").val(); + var response_id = $("select[name=response_id]").val(); - var total_checked = $(".chk_val:checked").length; + var total_checked = $(".chk_val:checked").length; - // Check select an event. - if (total_checked == 0) { - $("#max_custom_selected").show(); - return; - } + // Check select an event. + if (total_checked == 0) { + $("#max_custom_selected").show(); + return; + } - if (!isNaN(response_id)) { - // It is a custom response - var response = get_response(response_id); + if (!isNaN(response_id)) { + // It is a custom response + var response = get_response(response_id); - // If cannot get response abort it - if (response == null) { + // If cannot get response abort it + if (response == null) { + return; + } + + // Limit number of events to apply custom responses + // due performance reasons. + if (total_checked > $("#max_execution_event_response").val()) { + $("#max_custom_event_resp_msg").show(); + return; + } + + var response_command = []; + $(".response_command_input").each(function() { + response_command[$(this).attr("name")] = $(this).val(); + }); + + if (event_list_btn) { + $("#button-submit_event_response").hide(function() { + $("#response_loading_dialog").show(function() { + var check_params = get_response_params(response_id); + + if (check_params[0] !== "") { + show_event_response_command_dialog( + response_id, + response, + total_checked + ); + } else { + check_massive_response_event( + response_id, + response, + total_checked, + response_command + ); + } + }); + }); + } else { + $("#button-btn_str").hide(function() { + $("#execute_again_loading").show(function() { + check_massive_response_event( + response_id, + response, + total_checked, + response_command + ); + }); + }); + } + } else { + // It is not a custom response + switch (response_id) { + case "in_progress_selected": + $(".chk_val:checked").each(function() { + // Parent: TD. GrandParent: TR. + in_process_event( + dt_events, + $(this).val(), + $(this).attr("event_rep"), + this.parentElement.parentElement + ); + }); + break; + case "validate_selected": + $(".chk_val:checked").each(function() { + validate_event( + dt_events, + $(this).val(), + $(this).attr("event_rep"), + this.parentElement.parentElement + ); + }); + break; + case "delete_selected": + console.log($(this)); + $(".chk_val:checked").each(function() { + execute_delete_event_reponse( + dt_events, + $(this).val(), + $(this).attr("event_rep"), + this.parentElement.parentElement + ); + }); + break; + } + } + }, + onDeny: function() { + processed += 1; return; } - - // Limit number of events to apply custom responses - // due performance reasons. - if (total_checked > $("#max_execution_event_response").val()) { - $("#max_custom_event_resp_msg").show(); - return; - } - - var response_command = []; - $(".response_command_input").each(function() { - response_command[$(this).attr("name")] = $(this).val(); - }); - - if (event_list_btn) { - $("#button-submit_event_response").hide(function() { - $("#response_loading_dialog").show(function() { - var check_params = get_response_params(response_id); - - if (check_params[0] !== "") { - show_event_response_command_dialog( - response_id, - response, - total_checked - ); - } else { - check_massive_response_event( - response_id, - response, - total_checked, - response_command - ); - } - }); - }); - } else { - $("#button-btn_str").hide(function() { - $("#execute_again_loading").show(function() { - check_massive_response_event( - response_id, - response, - total_checked, - response_command - ); - }); - }); - } - } else { - // It is not a custom response - switch (response_id) { - case "in_progress_selected": - $(".chk_val:checked").each(function() { - // Parent: TD. GrandParent: TR. - in_process_event( - dt_events, - $(this).val(), - $(this).attr("event_rep"), - this.parentElement.parentElement - ); - }); - break; - case "validate_selected": - $(".chk_val:checked").each(function() { - validate_event( - dt_events, - $(this).val(), - $(this).attr("event_rep"), - this.parentElement.parentElement - ); - }); - break; - case "delete_selected": - $(".chk_val:checked").each(function() { - delete_event( - dt_events, - $(this).val(), - $(this).attr("event_rep"), - this.parentElement.parentElement - ); - }); - break; - } - } + }); } function check_massive_response_event( diff --git a/pandora_console/include/javascript/pandora_ui.js b/pandora_console/include/javascript/pandora_ui.js index 15b7f83217..2445473591 100644 --- a/pandora_console/include/javascript/pandora_ui.js +++ b/pandora_console/include/javascript/pandora_ui.js @@ -494,3 +494,61 @@ function generalShowMsg(data, idMsg) { ] }); } + +function infoMessage(data, idMsg) { + var title = data.title; + var err_messge = data.text; + + if (idMsg == null) { + idMsg = uniqId(); + } + + if ($("#" + idMsg).length === 0) { + $("body").append('
'); + $("#" + idMsg).empty(); + } + + $("#err_msg").empty(); + $("#err_msg").html("\n\n" + err_messge); + + $("#" + idMsg) + .dialog({ + height: 250, + width: 528, + opacity: 1, + modal: true, + position: { + my: "center", + at: "center", + of: window, + collision: "fit" + }, + title: data.title, + buttons: [ + { + class: + "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next", + text: "Retry", + click: function(e) { + handleConnection(); + } + }, + { + class: + "ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-cancel", + text: "Close", + click: function() { + $(this).dialog("close"); + } + } + ], + + open: function(event, ui) { + $(".ui-widget-overlay").addClass("error-modal-opened"); + }, + close: function(event, ui) { + $(".ui-widget-overlay").removeClass("error-modal-opened"); + } + }) + .show(); +} diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index b2da05d05f..2182348f86 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -6059,6 +6059,56 @@ form#modal_form_feedback ul.wizard li > textarea { margin-left: 3px; } +/* + * --------------------------------------------------------------------- + * - ERROR CONNECTION + * --------------------------------------------------------------------- + */ + +/*background dim */ + +.ui-widget-overlay.error-modal-opened { + background: rgb(0, 0, 0); + opacity: 0.5; + filter: Alpha(Opacity=50); +} + +/* --- Login page - modal windows --- */ +div.content_dialog { + width: 98%; + margin-top: 20px; +} + +div.icon_message_dialog { + float: left; + width: 25%; + text-align: center; +} + +div.icon_message_dialog img { + width: 85px; +} + +div.content_message_dialog { + width: 75%; + float: right; +} + +div.text_message_dialog { + width: 100%; + margin-top: 10px; +} + +div.text_message_dialog h1 { + margin: 0px; +} + +div.text_message_dialog p { + margin: 0px; + font-size: 10.3pt; + line-height: 14pt; +} + form#form-filter-interfaces { margin-left: -30px; } diff --git a/pandora_console/index.php b/pandora_console/index.php index 0f0d4581fb..71ae09e76c 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -1249,6 +1249,12 @@ echo '
'; echo '
'; echo '
'; + +// Connection lost alert. +$conn_title = __('Connection with server has been lost'); +$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.'); +ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png'); + if ($config['pure'] == 0) { echo ''; // Container div. diff --git a/pandora_console/install.php b/pandora_console/install.php index da49edc41e..9e6af3b018 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -129,7 +129,7 @@
'; +$url_css_modal = ui_get_full_url('include/styles/register.css', false, false, false); +echo ''; +// Connection lost alert. +$conn_title = __('Connection with server has been lost'); +$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.'); +ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png'); + require_once 'include/functions_visual_map.php'; $hash = get_parameter('hash'); @@ -148,6 +155,11 @@ echo ''; echo '
'; +// Connection lost alert. +$conn_title = __('Connection with server has been lost'); +$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.'); +ui_print_message_alert($conn_title, $conn_text, 'connection', '/images/error_1.png'); + ui_require_jquery_file('countdown', 'include/javascript/', true); ui_require_javascript_file('wz_jsgraphics', 'include/javascript/', true); ui_require_javascript_file('pandora_visual_console', 'include/javascript/', true); diff --git a/pandora_console/operation/visual_console/legacy_view.php b/pandora_console/operation/visual_console/legacy_view.php index 4f46a5f1c7..d4405876c4 100644 --- a/pandora_console/operation/visual_console/legacy_view.php +++ b/pandora_console/operation/visual_console/legacy_view.php @@ -320,8 +320,8 @@ $ignored_params['refr'] = ''; startCountDown(refr, false); var controls = document.getElementById('vc-controls'); - // autoHideElement(controls, 1000); - + autoHideElement(controls, 1000); + $('select#refr').change(function (event) { refr = Number.parseInt(event.target.value, 10); new_count = event.target.value; diff --git a/pandora_console/operation/visual_console/public_view.php b/pandora_console/operation/visual_console/public_view.php index 7e899c3718..1127614eed 100644 --- a/pandora_console/operation/visual_console/public_view.php +++ b/pandora_console/operation/visual_console/public_view.php @@ -29,6 +29,12 @@ if (file_exists(ENTERPRISE_DIR.'/include/functions_login.php')) { require_once $config['homedir'].'/vendor/autoload.php'; ui_require_css_file('visual_maps'); +ui_require_css_file('register'); + +// Connection lost alert. +$conn_title = __('Connection with server has been lost'); +$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.'); +ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png'); echo ''."\n"; echo ''."\n"; @@ -132,6 +138,11 @@ echo ''; echo ''; +// Connection lost alert. +$conn_title = __('Connection with server has been lost'); +$conn_text = __('Connection to the server has been lost. Please check your internet connection or contact with administrator.'); +ui_print_message_dialog($conn_title, $conn_text, 'connection', '/images/error_1.png'); + // Check groups can access user. $aclUserGroups = []; if (!users_can_manage_group_all('AR')) { diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec index b58821a1f2..ecafcd68bd 100644 --- a/pandora_console/pandora_console.redhat.spec +++ b/pandora_console/pandora_console.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.747 -%define release 200714 +%define release 200716 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.rhel7.spec b/pandora_console/pandora_console.rhel7.spec index 75ed51afed..221b7f2662 100644 --- a/pandora_console/pandora_console.rhel7.spec +++ b/pandora_console/pandora_console.rhel7.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.747 -%define release 200714 +%define release 200716 # User and Group under which Apache is running %define httpd_name httpd diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec index a36af14cde..65d2595534 100644 --- a/pandora_console/pandora_console.spec +++ b/pandora_console/pandora_console.spec @@ -3,7 +3,7 @@ # %define name pandorafms_console %define version 7.0NG.747 -%define release 200714 +%define release 200716 %define httpd_name httpd # User and Group under which Apache is running %define httpd_name apache2 diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control index 749703016b..a1bd8dc36a 100644 --- a/pandora_server/DEBIAN/control +++ b/pandora_server/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-server -Version: 7.0NG.747-200714 +Version: 7.0NG.747-200716 Architecture: all Priority: optional Section: admin diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh index 79fea7522a..c9e0e52987 100644 --- a/pandora_server/DEBIAN/make_deb_package.sh +++ b/pandora_server/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.747-200714" +pandora_version="7.0NG.747-200716" package_cpan=0 package_pandora=1 diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm index 36d569d5df..180c9fb087 100644 --- a/pandora_server/lib/PandoraFMS/Config.pm +++ b/pandora_server/lib/PandoraFMS/Config.pm @@ -45,7 +45,7 @@ our @EXPORT = qw( # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.747"; -my $pandora_build = "200714"; +my $pandora_build = "200716"; our $VERSION = $pandora_version." ".$pandora_build; # Setup hash diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index caee510481..e1013ab8cf 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -33,7 +33,7 @@ our @ISA = qw(Exporter); # version: Defines actual version of Pandora Server for this module only my $pandora_version = "7.0NG.747"; -my $pandora_build = "200714"; +my $pandora_build = "200716"; our $VERSION = $pandora_version." ".$pandora_build; our %EXPORT_TAGS = ( 'all' => [ qw() ] ); diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index 7ac50aaff8..2ff57c9e23 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.747 -%define release 200714 +%define release 200716 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index 61d11d7ec2..842490267c 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -3,7 +3,7 @@ # %define name pandorafms_server %define version 7.0NG.747 -%define release 200714 +%define release 200716 Summary: Pandora FMS Server Name: %{name} diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index bbc9ee03ce..c9b0d997dc 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -9,7 +9,7 @@ # ********************************************************************** PI_VERSION="7.0NG.747" -PI_BUILD="200714" +PI_BUILD="200716" MODE=$1 if [ $# -gt 1 ]; then diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 6cf564d4d9..77710c5e76 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -35,7 +35,7 @@ use PandoraFMS::Config; use PandoraFMS::DB; # version: define current version -my $version = "7.0NG.747 PS200714"; +my $version = "7.0NG.747 PS200716"; # Pandora server configuration my %conf; diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index d4aefe4cdf..bb20afd4d4 100755 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -36,7 +36,7 @@ use Encode::Locale; Encode::Locale::decode_argv; # version: define current version -my $version = "7.0NG.747 PS200714"; +my $version = "7.0NG.747 PS200716"; # save program name for logging my $progname = basename($0);