forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tabify responeHandler for table (elastic#13877)
* adding tabify response handler * tabify should be the default response handler * asAggResultConfig should be configurable for BWC * update table to work with new tabify response handler * region map needs to define responseHandler: none * fixing tests * markdown should set responseHandler to none
- Loading branch information
1 parent
9293b4b
commit 45d6ab0
Showing
8 changed files
with
57 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import _ from 'lodash'; | ||
import { AggResponseIndexProvider } from 'ui/agg_response/index'; | ||
import { VisResponseHandlersRegistryProvider } from 'ui/registry/vis_response_handlers'; | ||
|
||
const TabifyResponseHandlerProvider = function (Private) { | ||
const aggResponse = Private(AggResponseIndexProvider); | ||
|
||
return { | ||
name: 'tabify', | ||
handler: function (vis, response) { | ||
return new Promise((resolve) => { | ||
|
||
const tableGroup = aggResponse.tabify(vis, response, { | ||
canSplit: true, | ||
asAggConfigResults: _.get(vis, 'type.responseHandlerConfig.asAggConfigResults', false) | ||
}); | ||
|
||
resolve(tableGroup); | ||
}); | ||
} | ||
}; | ||
}; | ||
|
||
VisResponseHandlersRegistryProvider.register(TabifyResponseHandlerProvider); | ||
|
||
export { TabifyResponseHandlerProvider }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters