diff --git a/src/kibana/apps/dashboard/index.js b/src/kibana/apps/dashboard/index.js
index 4eb2d9f68f19..076ff22c159b 100644
--- a/src/kibana/apps/dashboard/index.js
+++ b/src/kibana/apps/dashboard/index.js
@@ -62,10 +62,12 @@ define(function (require) {
$scope.configTemplate = new ConfigTemplate({
save: require('text!./partials/save_dashboard.html'),
load: require('text!./partials/load_dashboard.html'),
+ share: require('text!./partials/share.html'),
pickVis: require('text!./partials/pick_visualization.html')
});
$scope.openSave = _.partial($scope.configTemplate.toggle, 'save');
+ $scope.openShare = _.partial($scope.configTemplate.toggle, 'share');
$scope.openLoad = _.partial($scope.configTemplate.toggle, 'load');
$scope.openAdd = _.partial($scope.configTemplate.toggle, 'pickVis');
$scope.refresh = _.bindKey(courier, 'fetch');
@@ -115,7 +117,14 @@ define(function (require) {
$scope.opts = {
dashboard: dash,
save: $scope.save,
- addVis: $scope.addVis
+ addVis: $scope.addVis,
+ shareData: function () {
+ return {
+ link: $location.absUrl(),
+ // This sucks, but seems like the cleanest way. Uhg.
+ embed: $location.absUrl().replace('?', '?embed&')
+ };
+ }
};
$scope.$broadcast('application.load');
diff --git a/src/kibana/apps/dashboard/partials/panel.html b/src/kibana/apps/dashboard/partials/panel.html
index b057d8ded186..69f72e5ee590 100644
--- a/src/kibana/apps/dashboard/partials/panel.html
+++ b/src/kibana/apps/dashboard/partials/panel.html
@@ -2,8 +2,8 @@
diff --git a/src/kibana/apps/dashboard/partials/share.html b/src/kibana/apps/dashboard/partials/share.html
new file mode 100644
index 000000000000..879a25b776d1
--- /dev/null
+++ b/src/kibana/apps/dashboard/partials/share.html
@@ -0,0 +1,11 @@
+
\ No newline at end of file
diff --git a/src/kibana/apps/visualize/partials/share.html b/src/kibana/apps/visualize/partials/share.html
index 117929c1053f..c9703a72914e 100644
--- a/src/kibana/apps/visualize/partials/share.html
+++ b/src/kibana/apps/visualize/partials/share.html
@@ -1,7 +1,7 @@