relative urls
This commit is contained in:
parent
5a485666cc
commit
fbd8f30e05
|
@ -24,7 +24,7 @@
|
||||||
<h1>Metadata Store Manager</h1>
|
<h1>Metadata Store Manager</h1>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<a href="/doc" target="_blank">API documentation</a>
|
<a href="./swagger-ui.html" target="_blank">API documentation</a>
|
||||||
<hr />
|
<hr />
|
||||||
<a href="javascript:void(0)" data-toggle="modal" data-target="#newMdstoreModal">create a new mdstore</a>
|
<a href="javascript:void(0)" data-toggle="modal" data-target="#newMdstoreModal">create a new mdstore</a>
|
||||||
<hr />
|
<hr />
|
||||||
|
|
|
@ -9,7 +9,7 @@ app.controller('mdstoreManagerController', function($scope, $http) {
|
||||||
$scope.forceVersionDelete = false;
|
$scope.forceVersionDelete = false;
|
||||||
|
|
||||||
$scope.reload = function() {
|
$scope.reload = function() {
|
||||||
$http.get('/mdstores/?' + $.now()).success(function(data) {
|
$http.get('./mdstores/?' + $.now()).success(function(data) {
|
||||||
$scope.mdstores = data;
|
$scope.mdstores = data;
|
||||||
}).error(function(err) {
|
}).error(function(err) {
|
||||||
alert('ERROR: ' + err.message);
|
alert('ERROR: ' + err.message);
|
||||||
|
@ -17,7 +17,7 @@ app.controller('mdstoreManagerController', function($scope, $http) {
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.newMdstore = function(format, layout, interpretation, dsName, dsId, apiId) {
|
$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) {
|
if (dsName || dsId || apiId) {
|
||||||
url += '?dsName=' + encodeURIComponent(dsName) + '&dsId=' + encodeURIComponent(dsId) + '&apiId=' + encodeURIComponent(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) {
|
$scope.deleteMdstore = function(mdId) {
|
||||||
if (confirm("Are you sure ?")) {
|
if (confirm("Are you sure ?")) {
|
||||||
$http.delete('/mdstores/mdstore/' + mdId).success(function(data) {
|
$http.delete('./mdstores/mdstore/' + mdId).success(function(data) {
|
||||||
$scope.reload();
|
$scope.reload();
|
||||||
}).error(function(err) {
|
}).error(function(err) {
|
||||||
alert('ERROR: ' + err.message);
|
alert('ERROR: ' + err.message);
|
||||||
|
@ -40,7 +40,7 @@ app.controller('mdstoreManagerController', function($scope, $http) {
|
||||||
|
|
||||||
$scope.prepareVersion = function(mdId, currentVersion) {
|
$scope.prepareVersion = function(mdId, currentVersion) {
|
||||||
$scope.versions = [];
|
$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.reload();
|
||||||
$scope.listVersions(mdId, currentVersion);
|
$scope.listVersions(mdId, currentVersion);
|
||||||
}).error(function(err) {
|
}).error(function(err) {
|
||||||
|
@ -51,7 +51,7 @@ app.controller('mdstoreManagerController', function($scope, $http) {
|
||||||
$scope.commitVersion = function(versionId) {
|
$scope.commitVersion = function(versionId) {
|
||||||
var size = parseInt(prompt("New Size", "0"));
|
var size = parseInt(prompt("New Size", "0"));
|
||||||
if (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.reload();
|
||||||
$scope.openCurrentVersion = versionId;
|
$scope.openCurrentVersion = versionId;
|
||||||
$scope.refreshVersions();
|
$scope.refreshVersions();
|
||||||
|
@ -62,7 +62,7 @@ app.controller('mdstoreManagerController', function($scope, $http) {
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.abortVersion = function(versionId) {
|
$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.reload();
|
||||||
$scope.refreshVersions();
|
$scope.refreshVersions();
|
||||||
}).error(function(err) {
|
}).error(function(err) {
|
||||||
|
@ -71,7 +71,7 @@ app.controller('mdstoreManagerController', function($scope, $http) {
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.resetReading = function(versionId) {
|
$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.reload();
|
||||||
$scope.refreshVersions();
|
$scope.refreshVersions();
|
||||||
}).error(function(err) {
|
}).error(function(err) {
|
||||||
|
@ -87,7 +87,7 @@ app.controller('mdstoreManagerController', function($scope, $http) {
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.refreshVersions = function() {
|
$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) {
|
angular.forEach(data, function(value, key) {
|
||||||
value.current = (value.id == $scope.openCurrentVersion);
|
value.current = (value.id == $scope.openCurrentVersion);
|
||||||
});
|
});
|
||||||
|
@ -99,7 +99,7 @@ app.controller('mdstoreManagerController', function($scope, $http) {
|
||||||
|
|
||||||
$scope.deleteVersion = function(versionId, force) {
|
$scope.deleteVersion = function(versionId, force) {
|
||||||
if (confirm("Are you sure ?")) {
|
if (confirm("Are you sure ?")) {
|
||||||
var url = '/mdstores/version/' + versionId;
|
var url = './mdstores/version/' + versionId;
|
||||||
if (force) { url += '?force=true'; }
|
if (force) { url += '?force=true'; }
|
||||||
|
|
||||||
$http.delete(url).success(function(data) {
|
$http.delete(url).success(function(data) {
|
||||||
|
|
Loading…
Reference in New Issue