mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Changing defaults from string to pojo
This commit is contained in:
parent
c300c1486f
commit
904a74e803
3 changed files with 11 additions and 7 deletions
|
@ -34,10 +34,7 @@ define(function (require) {
|
|||
if (!self.bySchemaName[schema.name]) {
|
||||
var defaults = schema.defaults.slice(0, schema.max);
|
||||
_.each(defaults, function (def) {
|
||||
self.push(new AggConfig(vis, {
|
||||
schema: schema.name,
|
||||
type: def
|
||||
}));
|
||||
self.push(new AggConfig(vis, def));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -19,7 +19,7 @@ define(function (require) {
|
|||
min: 1,
|
||||
max: 1,
|
||||
defaults: [
|
||||
'count'
|
||||
{ schema: 'metric', type: 'count' }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -76,7 +76,11 @@ define(function (require) {
|
|||
title: 'Simple',
|
||||
min: 1,
|
||||
max: 2,
|
||||
defaults: [ 'count', 'avg', 'sum' ]
|
||||
defaults: [
|
||||
{ schema: 'metric', type: 'count' },
|
||||
{ schema: 'metric', type: 'avg' },
|
||||
{ schema: 'metric', type: 'sum' }
|
||||
]
|
||||
},
|
||||
{
|
||||
group: 'buckets',
|
||||
|
@ -84,7 +88,10 @@ define(function (require) {
|
|||
title: 'Example',
|
||||
min: 0,
|
||||
max: 1,
|
||||
defaults: [ 'terms', 'fitlers' ]
|
||||
defaults: [
|
||||
{ schema: 'segment', type: 'terms' },
|
||||
{ schema: 'segment', type: 'filters' }
|
||||
]
|
||||
}
|
||||
])
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue