mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
terms aggs should be sorted by the metric agg
This commit is contained in:
parent
72031972ca
commit
0da1f583e7
2 changed files with 5 additions and 6 deletions
2
TODOS.md
2
TODOS.md
|
@ -10,8 +10,6 @@
|
|||
- a legit way to update the index pattern
|
||||
- **[src/kibana/apps/settings/sections/indices/_create.js](https://github.com/elasticsearch/kibana4/blob/master/src/kibana/apps/settings/sections/indices/_create.js)**
|
||||
- we should probably display a message of some kind
|
||||
- **[src/kibana/components/agg_types/buckets/terms.js](https://github.com/elasticsearch/kibana4/blob/master/src/kibana/components/agg_types/buckets/terms.js)**
|
||||
- We need more than just _count here.
|
||||
- **[src/kibana/components/index_patterns/_mapper.js](https://github.com/elasticsearch/kibana4/blob/master/src/kibana/components/index_patterns/_mapper.js)**
|
||||
- Change index to be the resolved in some way, last three months, last hour, last year, whatever
|
||||
- **[src/kibana/components/visualize/visualize.js](https://github.com/elasticsearch/kibana4/blob/master/src/kibana/components/visualize/visualize.js)**
|
||||
|
|
|
@ -28,10 +28,11 @@ define(function (require) {
|
|||
editor: require('text!components/agg_types/controls/order_and_size.html'),
|
||||
default: 'desc',
|
||||
write: function (aggConfig, output) {
|
||||
// TODO: We need more than just _count here.
|
||||
output.params.order = {
|
||||
_count: aggConfig.params.order.val
|
||||
};
|
||||
|
||||
var metricAgg = _.first(aggConfig.vis.aggs.bySchemaGroup.metrics);
|
||||
|
||||
output.params.order = {};
|
||||
output.params.order[metricAgg.id] = aggConfig.params.order.val;
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue