diff --git a/file_echo.php b/file_echo.php index 1f6d91663b..21b59a6f82 100644 --- a/file_echo.php +++ b/file_echo.php @@ -9,14 +9,7 @@ define('PMA_MINIMUM_COMMON', true); require_once 'libraries/common.inc.php'; -if (isset($_REQUEST['monitorconfig'])) { - /* For monitor chart config export */ - PMA_downloadHeader('monitor.cfg', 'application/json; charset=UTF-8'); - header('X-Content-Type-Options: nosniff'); - - echo urldecode($_REQUEST['monitorconfig']); - -} else if (isset($_REQUEST['import'])) { +if (isset($_REQUEST['import'])) { /* For monitor chart config import */ header('Content-Type: application/json; charset=UTF-8'); header('X-Content-Type-Options: nosniff'); diff --git a/js/server_status_monitor.js b/js/server_status_monitor.js index 5872f2cbd2..e332c33601 100644 --- a/js/server_status_monitor.js +++ b/js/server_status_monitor.js @@ -569,22 +569,11 @@ AJAX.registerOnload('server_status_monitor.js', function () { monitorCharts: gridCopy, monitorSettings: monitorSettings }; - $('
', { - "class": "disableAjax", - method: "post", - action: "file_echo.php" + PMA_commonParams.get('common_query') + "&filename=1", - style: "display:none;" - }) - .append( - $('', { - type: "hidden", - name: "monitorconfig", - value: JSON.stringify(exportData) - }) - ) - .appendTo('body') - .submit() - .remove(); + + var blob = new Blob([JSON.stringify(exportData)], {type: "application/octet-stream"}); + var url = window.URL.createObjectURL(blob); + window.location.href = url; + window.URL.revokeObjectURL(url); }); $('a[href="#importMonitorConfig"]').click(function (event) {