diff --git a/pandora_console/include/javascript/graph_analytics.js b/pandora_console/include/javascript/graph_analytics.js index e63540ae08..6c14f3f8c8 100644 --- a/pandora_console/include/javascript/graph_analytics.js +++ b/pandora_console/include/javascript/graph_analytics.js @@ -653,7 +653,8 @@ $("[data-button=export]").click(function(e) { }); }); -$("#button-export-modal").click(function(e) { +// Export graph. +function exportCustomGraph() { const filter = parseInt($("#export-filter-id").val()); const group = parseInt($("#export-group-id").val()); @@ -682,8 +683,19 @@ $("#button-export-modal").click(function(e) { } } }); + } else { + confirmDialog({ + title: titleExportError, + message: messageExportError, + hideCancelButton: true, + onAccept: function() { + $( + "button.ui-button.ui-corner-all.ui-widget.ui-button-icon-only.ui-dialog-titlebar-close" + ).click(); + } + }); } -}); +} // Remove graph. function removeGraph(e) { diff --git a/pandora_console/operation/reporting/graph_analytics.php b/pandora_console/operation/reporting/graph_analytics.php index 9b2fa5347d..8797376070 100644 --- a/pandora_console/operation/reporting/graph_analytics.php +++ b/pandora_console/operation/reporting/graph_analytics.php @@ -636,7 +636,7 @@ $data[2] = html_print_submit_button( 'class' => 'mini w30p', 'icon' => 'next', 'style' => 'margin-left: 208px; width: 130px;', - 'onclick' => '', + 'onclick' => 'exportCustomGraph()', ], true ); @@ -937,6 +937,10 @@ const titleExport = ""; const titleExportConfirm = ""; const messageExportConfirm = ""; +const titleExportError = ""; +const messageExportError = ""; + const titleRemoveConfirm = ""; const messageRemoveConfirm = ""; + \ No newline at end of file