Skip to content

Commit

Permalink
hides the embed section on the discover tab
Browse files Browse the repository at this point in the history
Fixes #5497
  • Loading branch information
BigFunger authored and Jim Unger committed Dec 18, 2015
1 parent 8534e67 commit d77aafd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<share
object-type="search"
object-id="{{opts.savedSearch.id}}">
object-id="{{opts.savedSearch.id}}"
allow-embed="false">
</share>
16 changes: 8 additions & 8 deletions src/ui/public/share/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<form role="form" class="vis-share">
<p ng-show="objectId">
<div ng-show="objectId">
<input type="checkbox" ng-model="ignoreState" id="ignoreState" />
<label for="ignoreState">
Link to saved {{objectType}}
<small>By selecting this option, future changes to this saved {{objectType}} will be reflected in the shared view. Note: Shared URLs always include globally persisted state such as time picker and auto refresh.</small>
</label>
</p>
<p>
</div>
<div>
<input type="checkbox" ng-model="shortenUrls" id="shortenUrls" />
<label for="shortenUrls">Shorten URLs</label>
</p>
<p>
</div>
<div ng-if="allowEmbed">
<div class="input-group">
<label>
Embed this {{objectType}}
Expand All @@ -26,8 +26,8 @@
Generating Short URL...
</div>
</div>
</p>
<p>
</div>
<div>
<div class="input-group">
<label>
Share a link
Expand All @@ -42,5 +42,5 @@
Generating Short URL...
</div>
</div>
</p>
</div>
</form>
5 changes: 4 additions & 1 deletion src/ui/public/share/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const app = require('ui/modules').get('kibana');
const _ = require('lodash');
const { parse } = require('querystring');
const angular = require('angular');

app.directive('share', function (Private) {
const urlShortener = Private(require('./url_shortener'));
Expand All @@ -9,10 +10,12 @@ app.directive('share', function (Private) {
restrict: 'E',
scope: {
objectType: '@',
objectId: '@'
objectId: '@',
setAllowEmbed: '&?allowEmbed'
},
template: require('ui/share/index.html'),
controller: function ($scope, $rootScope, $location) {
$scope.allowEmbed = $scope.setAllowEmbed ? $scope.setAllowEmbed() : true;
$scope.shortUrlsLoading = false;

function updateUrl(url) {
Expand Down

0 comments on commit d77aafd

Please sign in to comment.