Skip to content

Commit

Permalink
time picker should be displayed only if index pattern has time field (#…
Browse files Browse the repository at this point in the history
…13640) (#13749)

* time picker should be displayed only if index pattern has time field

* fixing based on review from lukas
  • Loading branch information
ppisljar authored Aug 29, 2017
1 parent 4a2d318 commit 826ca44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core_plugins/kibana/public/visualize/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,10 @@ function VisEditor($scope, $route, timefilter, AppState, $window, kbnUrl, courie
};

$scope.$watchMulti([
'searchSource.get("index").timeFieldName',
'searchSource.get("index")',
'vis.type.options.showTimePicker',
], function ([timeField, requiresTimePicker]) {
timefilter.enabled = Boolean(timeField || requiresTimePicker);
], function ([index, requiresTimePicker]) {
timefilter.enabled = Boolean((!index || index.timeFieldName) && requiresTimePicker);
});

// update the searchSource when filters update
Expand Down
3 changes: 3 additions & 0 deletions src/core_plugins/markdown_vis/public/markdown_vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ function MarkdownVisProvider(Private) {
editorConfig: {
optionsTemplate: markdownVisParamsTemplate
},
options: {
showTimePicker: false,
},
requestHandler: 'none',
implementsRenderComplete: true,
});
Expand Down

0 comments on commit 826ca44

Please sign in to comment.