From ef4ffe1c5cb865e20b236192e1acf15fb36e4eed Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Thu, 24 Nov 2016 16:40:22 +0800 Subject: webui: Use new ".getJSONUncached()" instead of ".getJSON()" --- fg21sim/webui/static/js/configs.js | 6 +++--- fg21sim/webui/static/js/console.js | 2 +- fg21sim/webui/static/js/products.js | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fg21sim/webui/static/js/configs.js b/fg21sim/webui/static/js/configs.js index 781e334..f7419c9 100644 --- a/fg21sim/webui/static/js/configs.js +++ b/fg21sim/webui/static/js/configs.js @@ -285,7 +285,7 @@ var showModalConfigs = function (data) { */ var getServerConfigs = function (url, keys) { keys = typeof keys !== "undefined" ? keys : null; - return $.getJSON(url, {action: "get", keys: JSON.stringify(keys)}, + return $.getJSONUncached(url, {action: "get", keys: JSON.stringify(keys)}, function (response) { setFormConfigs(response.data, {}); }); @@ -297,7 +297,7 @@ var getServerConfigs = function (url, keys) { * and mark the corresponding form fields to be invalid with details. */ var validateServerConfigs = function (url) { - return $.getJSON(url, {action: "validate"}, + return $.getJSONUncached(url, {action: "validate"}, function (response) { setFormConfigs({}, response.errors); }); @@ -434,7 +434,7 @@ var saveServerConfigFile = function (url, clobber) { var existsServerFile = function (url, filepath, callback) { var data = {action: "exists", filepath: JSON.stringify(filepath)}; - return $.getJSON(url, data, callback) + return $.getJSONUncached(url, data, callback) .fail(function (jqxhr) { var modalData = {}; modalData.icon = "times-circle"; diff --git a/fg21sim/webui/static/js/console.js b/fg21sim/webui/static/js/console.js index 2bb9525..5100c7a 100644 --- a/fg21sim/webui/static/js/console.js +++ b/fg21sim/webui/static/js/console.js @@ -145,7 +145,7 @@ var deleteLogMessages = function () { * @param {String} url - The URL that handles the "console" AJAX requests. */ var getServerTaskStatus = function (url) { - return $.getJSON(url) + return $.getJSONUncached(url) .fail(function (jqxhr) { var modalData = {}; modalData.icon = "times-circle"; diff --git a/fg21sim/webui/static/js/products.js b/fg21sim/webui/static/js/products.js index 1de8ffd..2cbd400 100644 --- a/fg21sim/webui/static/js/products.js +++ b/fg21sim/webui/static/js/products.js @@ -181,7 +181,7 @@ var saveServerManifest = function (url, clobber) { * Get the products manifest from server */ var getServerManifest = function (url) { - return $.getJSON(url) + return $.getJSONUncached(url) .fail(function (jqxhr) { var modalData = {}; modalData.icon = "times-circle"; @@ -200,7 +200,7 @@ var getServerManifest = function (url) { * @param {String} cmd - The command name or path. */ var whichExecutable = function (url, cmd) { - return $.getJSON(url, {action: "which", cmd: JSON.stringify(cmd)}); + return $.getJSONUncached(url, {action: "which", cmd: JSON.stringify(cmd)}); }; @@ -261,7 +261,7 @@ var openProductHPX = function (url, compID, freqID, viewer) { freqID: JSON.stringify(freqID), viewer: JSON.stringify(viewer) }; - return $.getJSON(url, data) + return $.getJSONUncached(url, data) .fail(function (jqxhr) { showModalProducts({ icon: "times-circle", -- cgit v1.2.2