mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
parent
c03373c692
commit
dce884f526
@ -68,5 +68,15 @@ angular.module('kibana.directives', [])
|
||||
});
|
||||
}
|
||||
};
|
||||
})
|
||||
.directive('ngBlur', ['$parse', function($parse) {
|
||||
return function(scope, element, attr) {
|
||||
var fn = $parse(attr['ngBlur']);
|
||||
element.bind('blur', function(event) {
|
||||
scope.$apply(function() {
|
||||
fn(scope, {$event:event});
|
||||
});
|
||||
});
|
||||
}
|
||||
}]);
|
||||
|
||||
|
@ -39,8 +39,8 @@
|
||||
<strong>{{filterSrv.list[id].type}}</strong>
|
||||
<span ng-show="!filterSrv.list[id].editing" class="filter-mandate" ng-click="filterSrv.list[id].editing = true">{{filterSrv.list[id].mandate}}</span>
|
||||
|
||||
<span class="small" ng-show="filterSrv.list[id].editing">
|
||||
<select class="input-small" ng-model="filterSrv.list[id].mandate" ng-options="f for f in ['must','mustNot','either']" ng-change='filterSrv.list[id].editing=undefined;refresh()'></select>
|
||||
<span ng-show="filterSrv.list[id].editing">
|
||||
<select class="input-small" ng-model="filterSrv.list[id].mandate" ng-options="f for f in ['must','mustNot','either']" ng-change='filterSrv.list[id].editing=undefined;refresh()' ng-blur="filterSrv.list[id].editing=undefined"></select>
|
||||
<i class="pointer icon-remove" bs-tooltip="'Cancel '" ng-click="filterSrv.list[id].editing=undefined"></i>
|
||||
</span>
|
||||
|
||||
|
@ -110,7 +110,7 @@ angular.module('kibana.table', [])
|
||||
var query;
|
||||
// This needs to be abstracted somewhere
|
||||
if(_.isArray(value)) {
|
||||
query = field+":(" + _.map(value,function(v){return "\""+v+"\""}).join(",") + ")";
|
||||
query = field+":(" + _.map(value,function(v){return angular.toJson("\""+v+"\"")}).join(",") + ")";
|
||||
} else {
|
||||
query = field+":"+angular.toJson(value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user