|
|
@@ -253,21 +253,29 @@ function (angular, _, kbn) {
|
|
|
this.addAllOption = function(variable) {
|
|
|
var allValue = '';
|
|
|
switch(variable.allFormat) {
|
|
|
- case 'wildcard':
|
|
|
- allValue = '*';
|
|
|
- break;
|
|
|
- case 'regex wildcard':
|
|
|
- allValue = '.*';
|
|
|
- break;
|
|
|
- case 'regex values':
|
|
|
- allValue = '(' + _.map(variable.options, function(option) {
|
|
|
- return self.regexEscape(option.text);
|
|
|
- }).join('|') + ')';
|
|
|
- break;
|
|
|
- default:
|
|
|
- allValue = '{';
|
|
|
- allValue += _.pluck(variable.options, 'text').join(',');
|
|
|
- allValue += '}';
|
|
|
+ case 'wildcard': {
|
|
|
+ allValue = '*';
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 'regex wildcard': {
|
|
|
+ allValue = '.*';
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 'lucene': {
|
|
|
+ allValue = '(' + _.pluck(variable.options, 'text').join(' OR ') + ')';
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 'regex values': {
|
|
|
+ allValue = '(' + _.map(variable.options, function(option) {
|
|
|
+ return self.regexEscape(option.text);
|
|
|
+ }).join('|') + ')';
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ default: {
|
|
|
+ allValue = '{';
|
|
|
+ allValue += _.pluck(variable.options, 'text').join(',');
|
|
|
+ allValue += '}';
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
variable.options.unshift({text: 'All', value: allValue});
|