From fbd8f30e052d192a580be4079819caf07aab67e9 Mon Sep 17 00:00:00 2001 From: "michele.artini" Date: Wed, 10 Feb 2021 12:34:21 +0100 Subject: [PATCH] relative urls --- .../src/main/resources/static/index.html | 2 +- .../main/resources/static/js/mdstoremanager.js | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/dhp-mdstore-manager/src/main/resources/static/index.html b/apps/dhp-mdstore-manager/src/main/resources/static/index.html index 04893b3d..22a4a10a 100644 --- a/apps/dhp-mdstore-manager/src/main/resources/static/index.html +++ b/apps/dhp-mdstore-manager/src/main/resources/static/index.html @@ -24,7 +24,7 @@

Metadata Store Manager


- API documentation + API documentation
create a new mdstore
diff --git a/apps/dhp-mdstore-manager/src/main/resources/static/js/mdstoremanager.js b/apps/dhp-mdstore-manager/src/main/resources/static/js/mdstoremanager.js index 0a79fb5d..797a8ddc 100644 --- a/apps/dhp-mdstore-manager/src/main/resources/static/js/mdstoremanager.js +++ b/apps/dhp-mdstore-manager/src/main/resources/static/js/mdstoremanager.js @@ -9,7 +9,7 @@ app.controller('mdstoreManagerController', function($scope, $http) { $scope.forceVersionDelete = false; $scope.reload = function() { - $http.get('/mdstores/?' + $.now()).success(function(data) { + $http.get('./mdstores/?' + $.now()).success(function(data) { $scope.mdstores = data; }).error(function(err) { alert('ERROR: ' + err.message); @@ -17,7 +17,7 @@ app.controller('mdstoreManagerController', function($scope, $http) { }; $scope.newMdstore = function(format, layout, interpretation, dsName, dsId, apiId) { - var url = '/mdstores/new/' + encodeURIComponent(format) + '/' + encodeURIComponent(layout) + '/' + encodeURIComponent(interpretation); + var url = './mdstores/new/' + encodeURIComponent(format) + '/' + encodeURIComponent(layout) + '/' + encodeURIComponent(interpretation); if (dsName || dsId || apiId) { url += '?dsName=' + encodeURIComponent(dsName) + '&dsId=' + encodeURIComponent(dsId) + '&apiId=' + encodeURIComponent(apiId); } @@ -30,7 +30,7 @@ app.controller('mdstoreManagerController', function($scope, $http) { $scope.deleteMdstore = function(mdId) { if (confirm("Are you sure ?")) { - $http.delete('/mdstores/mdstore/' + mdId).success(function(data) { + $http.delete('./mdstores/mdstore/' + mdId).success(function(data) { $scope.reload(); }).error(function(err) { alert('ERROR: ' + err.message); @@ -40,7 +40,7 @@ app.controller('mdstoreManagerController', function($scope, $http) { $scope.prepareVersion = function(mdId, currentVersion) { $scope.versions = []; - $http.get('/mdstores/mdstore/' + mdId + '/newVersion?' + $.now()).success(function(data) { + $http.get('./mdstores/mdstore/' + mdId + '/newVersion?' + $.now()).success(function(data) { $scope.reload(); $scope.listVersions(mdId, currentVersion); }).error(function(err) { @@ -51,7 +51,7 @@ app.controller('mdstoreManagerController', function($scope, $http) { $scope.commitVersion = function(versionId) { var size = parseInt(prompt("New Size", "0")); if (size >= 0) { - $http.get("/mdstores/version/" + versionId + "/commit/" + size + '?' + $.now()).success(function(data) { + $http.get("./mdstores/version/" + versionId + "/commit/" + size + '?' + $.now()).success(function(data) { $scope.reload(); $scope.openCurrentVersion = versionId; $scope.refreshVersions(); @@ -62,7 +62,7 @@ app.controller('mdstoreManagerController', function($scope, $http) { }; $scope.abortVersion = function(versionId) { - $http.get("/mdstores/version/" + versionId + "/abort?" + $.now()).success(function(data) { + $http.get("./mdstores/version/" + versionId + "/abort?" + $.now()).success(function(data) { $scope.reload(); $scope.refreshVersions(); }).error(function(err) { @@ -71,7 +71,7 @@ app.controller('mdstoreManagerController', function($scope, $http) { }; $scope.resetReading = function(versionId) { - $http.get("/mdstores/version/" + versionId + "/resetReading" + '?' + $.now()).success(function(data) { + $http.get("./mdstores/version/" + versionId + "/resetReading" + '?' + $.now()).success(function(data) { $scope.reload(); $scope.refreshVersions(); }).error(function(err) { @@ -87,7 +87,7 @@ app.controller('mdstoreManagerController', function($scope, $http) { }; $scope.refreshVersions = function() { - $http.get('/mdstores/mdstore/' + $scope.openMdstore + '/versions?' + $.now()).success(function(data) { + $http.get('./mdstores/mdstore/' + $scope.openMdstore + '/versions?' + $.now()).success(function(data) { angular.forEach(data, function(value, key) { value.current = (value.id == $scope.openCurrentVersion); }); @@ -99,7 +99,7 @@ app.controller('mdstoreManagerController', function($scope, $http) { $scope.deleteVersion = function(versionId, force) { if (confirm("Are you sure ?")) { - var url = '/mdstores/version/' + versionId; + var url = './mdstores/version/' + versionId; if (force) { url += '?force=true'; } $http.delete(url).success(function(data) {