mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Merge pull request #8719 from elastic/jasper/backport/8694/5.0
[backport] PR #8694 to 5.0
This commit is contained in:
commit
2e0a83366f
2 changed files with 7 additions and 2 deletions
|
@ -44,6 +44,7 @@
|
|||
|
||||
<a
|
||||
ng-href="{{vizLocation(field)}}"
|
||||
ng-show="field.visualizable"
|
||||
class="sidebar-item-button primary">
|
||||
Visualize
|
||||
<span class="discover-field-vis-warning" ng-show="warnings.length" tooltip="{{warnings.join(' ')}}">
|
||||
|
|
|
@ -42,6 +42,9 @@ export default function FieldObjectProvider(Private, shortDotsFilter, $rootScope
|
|||
let scripted = !!spec.scripted;
|
||||
let sortable = spec.name === '_score' || ((indexed || scripted) && type.sortable);
|
||||
let filterable = spec.name === '_id' || scripted || (indexed && type.filterable);
|
||||
let searchable = !!spec.searchable || scripted;
|
||||
let aggregatable = !!spec.aggregatable || scripted;
|
||||
let visualizable = aggregatable;
|
||||
|
||||
obj.fact('name');
|
||||
obj.fact('type');
|
||||
|
@ -58,13 +61,14 @@ export default function FieldObjectProvider(Private, shortDotsFilter, $rootScope
|
|||
obj.fact('doc_values', !!spec.doc_values);
|
||||
|
||||
// stats
|
||||
obj.fact('searchable', !!spec.searchable || scripted);
|
||||
obj.fact('aggregatable', !!spec.aggregatable || scripted);
|
||||
obj.fact('searchable', searchable);
|
||||
obj.fact('aggregatable', aggregatable);
|
||||
|
||||
// usage flags, read-only and won't be saved
|
||||
obj.comp('format', format);
|
||||
obj.comp('sortable', sortable);
|
||||
obj.comp('filterable', filterable);
|
||||
obj.comp('visualizable', visualizable);
|
||||
|
||||
// computed values
|
||||
obj.comp('indexPattern', indexPattern);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue