mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Backport PR #8505
---------
**Commit 1:**
[ingest/register_fields_capabilities] prevent calling reply() twice
* Original sha: e06e659035
* Authored by spalger <email@spalger.com> on 2016-09-30T12:29:46Z
This commit is contained in:
parent
aad5e9a5fe
commit
da19bc1683
1 changed files with 12 additions and 10 deletions
|
@ -15,17 +15,19 @@ export function registerFieldCapabilities(server) {
|
|||
index: indices,
|
||||
allowNoIndices: false
|
||||
})
|
||||
.catch((error) => {
|
||||
reply(handleESError(error));
|
||||
})
|
||||
.then((res) => {
|
||||
const fields = _.get(res, 'indices._all.fields', {});
|
||||
const fieldsFilteredValues = _.mapValues(fields, (value) => {
|
||||
return _.pick(value, ['searchable', 'aggregatable']);
|
||||
});
|
||||
.then(
|
||||
(res) => {
|
||||
const fields = _.get(res, 'indices._all.fields', {});
|
||||
const fieldsFilteredValues = _.mapValues(fields, (value) => {
|
||||
return _.pick(value, ['searchable', 'aggregatable']);
|
||||
});
|
||||
|
||||
reply({fields: fieldsFilteredValues});
|
||||
});
|
||||
reply({fields: fieldsFilteredValues});
|
||||
},
|
||||
(error) => {
|
||||
reply(handleESError(error));
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue