diff --git a/public/app/features/dashboard/dashnav/dashnav.html b/public/app/features/dashboard/dashnav/dashnav.html
index bd084050c77..af84bf5c587 100644
--- a/public/app/features/dashboard/dashnav/dashnav.html
+++ b/public/app/features/dashboard/dashnav/dashnav.html
@@ -24,8 +24,16 @@
-
-
+
+
+
diff --git a/public/app/features/dashboard/dashnav/dashnav.ts b/public/app/features/dashboard/dashnav/dashnav.ts
index 1b1424018f9..9df3ea03eb2 100644
--- a/public/app/features/dashboard/dashnav/dashnav.ts
+++ b/public/app/features/dashboard/dashnav/dashnav.ts
@@ -42,10 +42,13 @@ export class DashNavCtrl {
}
};
- $scope.shareDashboard = function() {
+ $scope.shareDashboard = function(tabIndex) {
+ var modalScope = $scope.$new();
+ modalScope.tabIndex = tabIndex;
+
$scope.appEvent('show-modal', {
src: './app/features/dashboard/partials/shareModal.html',
- scope: $scope.$new(),
+ scope: modalScope
});
};
diff --git a/public/app/features/dashboard/shareModalCtrl.js b/public/app/features/dashboard/shareModalCtrl.js
index b723660abe7..336600975dc 100644
--- a/public/app/features/dashboard/shareModalCtrl.js
+++ b/public/app/features/dashboard/shareModalCtrl.js
@@ -12,7 +12,7 @@ function (angular, _, require, config) {
module.controller('ShareModalCtrl', function($scope, $rootScope, $location, $timeout, timeSrv, $element, templateSrv, linkSrv) {
$scope.options = { forCurrent: true, includeTemplateVars: true, theme: 'current' };
- $scope.editor = { index: 0 };
+ $scope.editor = { index: $scope.tabIndex || 0};
$scope.init = function() {
$scope.modeSharePanel = $scope.panel ? true : false;