From f1a8c4b31de5c05c0bd3f7603a920efcc74c2e29 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Wed, 29 Nov 2023 16:12:12 +0100 Subject: [PATCH] #12541 change message export graph --- .../include/javascript/graph_analytics.js | 4 +- .../operation/reporting/graph_analytics.php | 52 +++++++++++-------- 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/pandora_console/include/javascript/graph_analytics.js b/pandora_console/include/javascript/graph_analytics.js index 742e43201e..475a310ebc 100644 --- a/pandora_console/include/javascript/graph_analytics.js +++ b/pandora_console/include/javascript/graph_analytics.js @@ -800,10 +800,10 @@ function exportCustomGraph() { group }, success: function(data) { - if (data) { + if (data === "created") { confirmDialog({ title: titleExportConfirm, - message: data + " " + messageExportConfirm, + message: messageExportConfirm, hideCancelButton: true, onAccept: function() { $( diff --git a/pandora_console/operation/reporting/graph_analytics.php b/pandora_console/operation/reporting/graph_analytics.php index b85a0cb84d..ff6272bdd6 100644 --- a/pandora_console/operation/reporting/graph_analytics.php +++ b/pandora_console/operation/reporting/graph_analytics.php @@ -364,7 +364,11 @@ if (is_ajax()) { } } - echo $counter; + if ($id_graph > 0) { + echo 'created'; + } else { + echo ''; + } } if (empty($load_list_filters) === false) { @@ -827,30 +831,31 @@ $left_content .= '
+ '.__('Agents').'
'.ui_toggle( - '', - __('Agents'), - 'agents-toggle', - 'agents-toggle', - true, - true, - '', - 'white-box-content', - 'box-flat white_table_graph', - 'images/arrow@svg.svg', - 'images/arrow@svg.svg', - false, - false, - false, - '', - '', - null, - null, - false, - false, - 'static' + '', + __('Agents'), + 'agents-toggle', + 'agents-toggle', + true, + true, + '', + 'white-box-content', + 'box-flat white_table_graph', + 'images/arrow@svg.svg', + 'images/arrow@svg.svg', + false, + false, + false, + '', + '', + null, + null, + false, + false, + 'static' ).ui_toggle( '', __('Groups'), @@ -898,6 +903,7 @@ $left_content .= ' ).'
+ '.__('Modules').' @@ -1000,7 +1006,7 @@ const messageLoadConfirm = ""; const titleExport = ""; const titleExportConfirm = ""; -const messageExportConfirm = ""; +const messageExportConfirm = ""; const titleExportError = ""; const messageExportError = "";