Merge pull request #293 from rashidkpc/master

Added 'unpinned' option to query selector
This commit is contained in:
Rashid Khan
2013-07-29 07:33:44 -07:00
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -227,6 +227,8 @@ angular.module('kibana.services', [])
return self.ids;
case 'pinned':
return _.pluck(_.where(self.list,{pin:true}),'id');
case 'unpinned':
return _.difference(self.ids,_.pluck(_.where(self.list,{pin:true}),'id'));
case 'selected':
return _.intersection(self.ids,config.ids);
default:
+1 -1
View File
@@ -11,7 +11,7 @@
</style>
<h4>Queries</h4>
<div class="span2" style="margin-left:0px">
<select class="input-small" ng-change="set_refresh(true);" ng-model="panel.queries.mode" ng-options="f for f in ['all','pinned','selected']"></select>
<select class="input-small" ng-change="set_refresh(true);" ng-model="panel.queries.mode" ng-options="f for f in ['all','pinned','unpinned','selected']"></select>
</div>
<div class="span9 querySelect" ng-show="panel.queries.mode == 'selected'">
<span ng-style="{'border-color': querySrv.list[id].color}" ng-class="{selected:_.contains(panel.queries.ids,id),unselected:!_.contains(panel.queries.ids,id)}" ng-repeat="id in querySrv.ids" ng-click="panel.queries.ids = _.toggleInOut(panel.queries.ids,id);set_refresh(true);" class="query pointer badge">