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,9 +39,9 @@
|
|||||||
<strong>{{filterSrv.list[id].type}}</strong>
|
<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 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">
|
<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()'></select>
|
<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>
|
<i class="pointer icon-remove" bs-tooltip="'Cancel '" ng-click="filterSrv.list[id].editing=undefined"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<i class="filter-action pointer icon-remove" bs-tooltip="'Remove'" ng-click="remove(id)"></i>
|
<i class="filter-action pointer icon-remove" bs-tooltip="'Remove'" ng-click="remove(id)"></i>
|
||||||
|
@ -110,7 +110,7 @@ angular.module('kibana.table', [])
|
|||||||
var query;
|
var query;
|
||||||
// This needs to be abstracted somewhere
|
// This needs to be abstracted somewhere
|
||||||
if(_.isArray(value)) {
|
if(_.isArray(value)) {
|
||||||
query = field+":(" + _.map(value,function(v){return "\""+v+"\""}).join(",") + ")";
|
query = field+":(" + _.map(value,function(v){return angular.toJson("\""+v+"\"")}).join(",") + ")";
|
||||||
} else {
|
} else {
|
||||||
query = field+":"+angular.toJson(value);
|
query = field+":"+angular.toJson(value);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user