-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rashid Khan
committed
Oct 24, 2013
1 parent
8454a95
commit 34a2f0b
Showing
6 changed files
with
22 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,8 @@ function (angular, _, config, kbn) { | |
var _query = { | ||
alias: '', | ||
pin: false, | ||
type: 'lucene' | ||
type: 'lucene', | ||
enable: true | ||
}; | ||
|
||
// Defaults for specific query types | ||
|
@@ -214,15 +215,15 @@ function (angular, _, config, kbn) { | |
switch(config.mode) | ||
{ | ||
case 'all': | ||
return self.ids; | ||
return _.pluck(_.where(self.list,{enable:true}),'id'); | ||
case 'pinned': | ||
return _.pluck(_.where(self.list,{pin:true}),'id'); | ||
return _.pluck(_.where(self.list,{pin:true,enable:true}),'id'); | ||
case 'unpinned': | ||
return _.difference(self.ids,_.pluck(_.where(self.list,{pin:true}),'id')); | ||
return _.difference(self.ids,_.pluck(_.where(self.list,{pin:true,enable:true}),'id')); | ||
This comment has been minimized.
Sorry, something went wrong. |
||
case 'selected': | ||
return _.intersection(self.ids,config.ids); | ||
return _.intersection(_.pluck(_.where(self.list,{enable:true}),'id'),config.ids); | ||
This comment has been minimized.
Sorry, something went wrong.
elhu
|
||
default: | ||
return self.ids; | ||
return _.pluck(_.where(self.list,{enable:true}),'id'); | ||
} | ||
}; | ||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@rashidkpc Queries that are disabled will turn up in "unpinned" queries because of this change
Can be fixed with:
Or maybe beter
Don't know which one should be preferred.
Also, see pull request #564, where this functionality was also proposed