Commit 03e336ba by Torkel Ödegaard

Fixed minor issue doing snapshot from home (root) dashboard

parent 76ea0f43
...@@ -66,9 +66,15 @@ function (angular, _) { ...@@ -66,9 +66,15 @@ function (angular, _) {
$scope.snapshotUrl = results.url; $scope.snapshotUrl = results.url;
$scope.saveExternalSnapshotRef(cmdData, results); $scope.saveExternalSnapshotRef(cmdData, results);
} else { } else {
var baseUrl = $location.absUrl().replace($location.url(), ""); var url = $location.url();
$scope.snapshotUrl = baseUrl + '/dashboard/snapshot/' + results.key; var baseUrl = $location.absUrl();
$scope.deleteUrl = baseUrl + '/api/snapshots-delete/' + results.deleteKey;
if (url !== '/') {
baseUrl = baseUrl.replace(url, '') + '/';
}
$scope.snapshotUrl = baseUrl + 'dashboard/snapshot/' + results.key;
$scope.deleteUrl = baseUrl + 'api/snapshots-delete/' + results.deleteKey;
} }
$scope.step = 2; $scope.step = 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment