diff --git a/public/app/features/org/orgApiKeysCtrl.js b/public/app/features/org/orgApiKeysCtrl.js index 7d2bc4be1c6..d0b08b57d32 100644 --- a/public/app/features/org/orgApiKeysCtrl.js +++ b/public/app/features/org/orgApiKeysCtrl.js @@ -30,6 +30,7 @@ function (angular) { var modalScope = $scope.$new(true); modalScope.key = result.key; + modalScope.rootPath = window.location.origin + $scope.$root.appSubUrl; $scope.appEvent('show-modal', { src: 'public/app/features/org/partials/apikeyModal.html', diff --git a/public/app/features/org/partials/apikeyModal.html b/public/app/features/org/partials/apikeyModal.html index a4f59e1b86e..eeefcafc634 100644 --- a/public/app/features/org/partials/apikeyModal.html +++ b/public/app/features/org/partials/apikeyModal.html @@ -27,7 +27,7 @@

-curl -H "Authorization: Bearer your_key_above" http://your.grafana.com/api/dashboards/db/mydash
+curl -H "Authorization: Bearer {{key}}" {{rootPath}}/api/dashboards/home