mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
squash empty input for script params
This commit is contained in:
parent
582d6ae111
commit
c334dc6504
2 changed files with 12 additions and 2 deletions
|
@ -31,7 +31,12 @@ define(function (require) {
|
||||||
{
|
{
|
||||||
name: 'script',
|
name: 'script',
|
||||||
editor: require('text!components/agg_types/controls/script.html'),
|
editor: require('text!components/agg_types/controls/script.html'),
|
||||||
advanced: true
|
advanced: true,
|
||||||
|
write: function (aggConfig, output) {
|
||||||
|
if (aggConfig.params.script && aggConfig.params.script.length)
|
||||||
|
output.params.script = aggConfig.params.script;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
|
@ -68,7 +68,12 @@ define(function (require) {
|
||||||
{
|
{
|
||||||
name: 'script',
|
name: 'script',
|
||||||
editor: require('text!components/agg_types/controls/script.html'),
|
editor: require('text!components/agg_types/controls/script.html'),
|
||||||
advanced: true
|
advanced: true,
|
||||||
|
write: function (aggConfig, output) {
|
||||||
|
if (aggConfig.params.script && aggConfig.params.script.length)
|
||||||
|
output.params.script = aggConfig.params.script;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue