Commit 3e39dc80 by Rashid Khan

Added 'unpinned' option to query selector

parent 503d0c24
...@@ -227,6 +227,8 @@ angular.module('kibana.services', []) ...@@ -227,6 +227,8 @@ angular.module('kibana.services', [])
return self.ids; return self.ids;
case 'pinned': case 'pinned':
return _.pluck(_.where(self.list,{pin:true}),'id'); return _.pluck(_.where(self.list,{pin:true}),'id');
case 'unpinned':
return _.difference(self.ids,_.pluck(_.where(self.list,{pin:true}),'id'));
case 'selected': case 'selected':
return _.intersection(self.ids,config.ids); return _.intersection(self.ids,config.ids);
default: default:
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</style> </style>
<h4>Queries</h4> <h4>Queries</h4>
<div class="span2" style="margin-left:0px"> <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>
<div class="span9 querySelect" ng-show="panel.queries.mode == 'selected'"> <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"> <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">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment