mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[indexPattern] copy excluded field property when refreshing fields
This commit is contained in:
parent
0d062209fb
commit
c3c1d4823b
1 changed files with 10 additions and 0 deletions
|
@ -310,8 +310,18 @@ export default function IndexPatternFactory(Private, timefilter, Notifier, confi
|
|||
};
|
||||
|
||||
self._fetchFields = function () {
|
||||
const existingFieldsByName = self.fields.byName;
|
||||
|
||||
return mapper.getFieldsForIndexPattern(self, true)
|
||||
.then(function (fields) {
|
||||
// copy over kibana-added properties from existing fields
|
||||
fields.forEach(function (field) {
|
||||
var existingField = existingFieldsByName[field.name];
|
||||
if (existingField) {
|
||||
field.exclude = existingField.exclude;
|
||||
}
|
||||
});
|
||||
|
||||
// append existing scripted fields
|
||||
fields = fields.concat(self.getScriptedFields());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue