From d7b9bb447fd13b5413f0348b93660b15cb97a056 Mon Sep 17 00:00:00 2001 From: "Carlos V." <76731844+cvc90@users.noreply.github.com> Date: Fri, 24 Jan 2025 17:17:52 +0100 Subject: [PATCH] Update common.js Change absolute path url /php/server/query_json.php to relative path url php/server/query_json.php --- front/js/common.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/front/js/common.js b/front/js/common.js index ebe2a936..b91ec0fc 100755 --- a/front/js/common.js +++ b/front/js/common.js @@ -115,9 +115,9 @@ function cacheSettings() return new Promise((resolve, reject) => { if(!getCache('completedCalls').includes('cacheSettings')) { - $.get('/php/server/query_json.php', { file: 'table_settings.json', nocache: Date.now() }, function(resSet) { + $.get('php/server/query_json.php', { file: 'table_settings.json', nocache: Date.now() }, function(resSet) { - $.get('/php/server/query_json.php', { file: 'plugins.json', nocache: Date.now() }, function(resPlug) { + $.get('php/server/query_json.php', { file: 'plugins.json', nocache: Date.now() }, function(resPlug) { pluginsData = resPlug["data"]; settingsData = resSet["data"]; @@ -225,7 +225,7 @@ function cacheStrings() { }); // Fetch strings and translations from plugins - $.get('/php/server/query_json.php', { file: 'table_plugins_language_strings.json', nocache: Date.now() }) + $.get('php/server/query_json.php', { file: 'table_plugins_language_strings.json', nocache: Date.now() }) .done((pluginRes) => { const data = pluginRes["data"]; @@ -737,7 +737,7 @@ function forceLoadUrl(relativeUrl) { // ----------------------------------------------------------------------------- function navigateToDeviceWithIp (ip) { - $.get('/php/server/query_json.php', { file: 'table_devices.json', nocache: Date.now() }, function(res) { + $.get('php/server/query_json.php', { file: 'table_devices.json', nocache: Date.now() }, function(res) { devices = res["data"]; @@ -959,7 +959,7 @@ function cacheDevices() // if(!getCache('completedCalls').includes('cacheDevices')) // { - $.get('/php/server/query_json.php', { file: 'table_devices.json', nocache: Date.now() }, function(data) { + $.get('php/server/query_json.php', { file: 'table_devices.json', nocache: Date.now() }, function(data) { // console.log(data) @@ -1325,7 +1325,7 @@ function clearCache() { // ----------------------------------------------------------------------------- // Function to check if cache needs to be refreshed because of setting changes function checkSettingChanges() { - $.get('/php/server/query_json.php', { file: 'app_state.json', nocache: Date.now() }, function(appState) { + $.get('php/server/query_json.php', { file: 'app_state.json', nocache: Date.now() }, function(appState) { const importedMilliseconds = parseInt(appState["settingsImported"] * 1000); const lastReloaded = parseInt(sessionStorage.getItem(sessionStorageKey + '_time')); @@ -1380,7 +1380,7 @@ async function waitForGraphQLServer() { // Returns 1 if running, 0 otherwise async function isGraphQLServerRunning() { try { - const response = await $.get('/php/server/query_json.php', { file: 'app_state.json', nocache: Date.now()}); + const response = await $.get('php/server/query_json.php', { file: 'app_state.json', nocache: Date.now()}); console.log("graphQLServerStarted: " + response["graphQLServerStarted"]); setCache("graphQLServerStarted", response["graphQLServerStarted"]); return response["graphQLServerStarted"];