From 6d2af0d84838fdfc99dedd7feff5cb6a6d091c0b Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Thu, 28 Feb 2013 15:35:44 -0700 Subject: [PATCH] Added share link for ES stored dashboards --- panels/dashcontrol/load.html | 2 ++ panels/dashcontrol/module.html | 4 ++-- panels/dashcontrol/module.js | 9 +++++++++ panels/dashcontrol/save.html | 1 + panels/dashcontrol/share.html | 13 +++++++++++++ 5 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 panels/dashcontrol/share.html diff --git a/panels/dashcontrol/load.html b/panels/dashcontrol/load.html index 34dc7335524..bcff6188bb7 100644 --- a/panels/dashcontrol/load.html +++ b/panels/dashcontrol/load.html @@ -1,5 +1,6 @@
× +

Load

Local File
@@ -32,6 +33,7 @@ {{dashboard._id}} +
diff --git a/panels/dashcontrol/module.html b/panels/dashcontrol/module.html index bf02f5e51fe..246e0791294 100644 --- a/panels/dashcontrol/module.html +++ b/panels/dashcontrol/module.html @@ -1,5 +1,5 @@ - - + + \ No newline at end of file diff --git a/panels/dashcontrol/module.js b/panels/dashcontrol/module.js index 2f62f5afdfd..7b38acc75c6 100644 --- a/panels/dashcontrol/module.js +++ b/panels/dashcontrol/module.js @@ -89,6 +89,15 @@ angular.module('kibana.dashcontrol', []) } } + $scope.share_link = function(title,type,id) { + $scope.share = { + location : location.href.replace(location.hash,""), + type : type, + id : id, + link : location.href.replace(location.hash,"")+"#dashboard/"+type+"/"+id + }; + } + $scope.purge = function() { if (Modernizr.localstorage) { localStorage['dashboard'] = ''; diff --git a/panels/dashcontrol/save.html b/panels/dashcontrol/save.html index dd1fe78c0cd..e0d2b6b7bff 100644 --- a/panels/dashcontrol/save.html +++ b/panels/dashcontrol/save.html @@ -1,5 +1,6 @@
× +

Save

Locally
diff --git a/panels/dashcontrol/share.html b/panels/dashcontrol/share.html new file mode 100644 index 00000000000..8cd827e0035 --- /dev/null +++ b/panels/dashcontrol/share.html @@ -0,0 +1,13 @@ + + + \ No newline at end of file