UNPKG

kibana-with-account

Version:

kibana-with-account is develop based kibana project

28 lines (25 loc) 776 B
define(function (require) { return function FetchStrategyForDoc(Promise) { return { clientMethod: 'mget', /** * Flatten a series of requests into as ES request body * @param {array} requests - an array of flattened requests * @return {Promise} - a promise that is fulfilled by the request body */ reqsFetchParamsToBody: function (reqsFetchParams) { return Promise.resolve({ docs: reqsFetchParams }); }, /** * fetch the multiple responses from the ES Response * @param {object} resp - The response sent from Elasticsearch * @return {array} - the list of responses */ getResponses: function (resp) { return resp.docs; } }; }; });