diff --git a/src/core_plugins/kibana/public/dashboard/dashboard.html b/src/core_plugins/kibana/public/dashboard/dashboard.html
index 0549942b48582..7f3357c6ded70 100644
--- a/src/core_plugins/kibana/public/dashboard/dashboard.html
+++ b/src/core_plugins/kibana/public/dashboard/dashboard.html
@@ -70,6 +70,7 @@
@@ -40,6 +43,9 @@
search-source="savedObj.searchSource"
sorting="panel.sort"
columns="panel.columns"
+ shared-item
+ data-title="{{savedObj.title}}"
+ data-description="{{savedObj.description}}"
render-counter
class="panel-content"
filter="filter">
diff --git a/src/core_plugins/kibana/public/discover/index.html b/src/core_plugins/kibana/public/discover/index.html
index 3584ef747bcaf..a386ad6b0df86 100644
--- a/src/core_plugins/kibana/public/discover/index.html
+++ b/src/core_plugins/kibana/public/discover/index.html
@@ -126,6 +126,9 @@ Searching
columns="state.columns"
infinite-scroll="true"
filter="filterQuery"
+ shared-item
+ data-title="{{opts.savedSearch.lastSavedTitle}}"
+ data-description="{{opts.savedSearch.description}}"
render-counter>
diff --git a/src/core_plugins/kibana/public/visualize/editor/editor.html b/src/core_plugins/kibana/public/visualize/editor/editor.html
index db4e89fcffec0..c94de8fa94c58 100644
--- a/src/core_plugins/kibana/public/visualize/editor/editor.html
+++ b/src/core_plugins/kibana/public/visualize/editor/editor.html
@@ -81,6 +81,9 @@
{
ngMock.module('kibana');
ngMock.inject(($compile, $rootScope) => {
+ scope = $rootScope.$new();
compile = () => {
const $el = $('');
$el.data('$kbnTopNavController', {}); // Mock the kbnTopNav
- $rootScope.$apply();
- $compile($el)($rootScope);
+ $compile($el)(scope);
+ scope.$apply();
return $el;
};
});
@@ -22,4 +24,18 @@ describe('kbnGlobalTimepicker', function () {
const $el = compile();
expect($el.attr('data-test-subj')).to.be('globalTimepicker');
});
+ it('sets shared-timefilter to false when timefilter.enabled is false', function () {
+ scope.timefilter = {
+ enabled: false
+ };
+ const $el = compile();
+ expect($el.attr('shared-timefilter')).to.eql('false');
+ });
+ it('sets shared-timefilter to true when timefilter.enabled is true', function () {
+ scope.timefilter = {
+ enabled: true
+ };
+ const $el = compile();
+ expect($el.attr('shared-timefilter')).to.eql('true');
+ });
});
diff --git a/src/ui/public/timepicker/kbn_global_timepicker.html b/src/ui/public/timepicker/kbn_global_timepicker.html
index 970632bad56e5..681d5b5c6f5bb 100644
--- a/src/ui/public/timepicker/kbn_global_timepicker.html
+++ b/src/ui/public/timepicker/kbn_global_timepicker.html
@@ -1,4 +1,4 @@
-