Skip to content

Commit

Permalink
Merge pull request #293 from rashidkpc/master
Browse files Browse the repository at this point in the history
Added 'unpinned' option to query selector
  • Loading branch information
Rashid Khan committed Jul 29, 2013
2 parents f9845ea + 3e39dc8 commit 11199e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions js/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion partials/querySelect.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down

0 comments on commit 11199e1

Please sign in to comment.