-
Notifications
You must be signed in to change notification settings - Fork 149
Add pagination to secrets list + fix case sensitivity #110
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pagination works really well. Tested with 1000+ secrets and the UI performance was excellent
return item.includes(v); | ||
}) | ||
}) | ||
let filtered = v ? _.filter(this.state.fullSecretList, (item) => { return item.includes(v.toLowerCase()); }) : this.state.fullSecretList; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For truly case-insensitive search you need to lowercase both search text and search predicate. In this case it should be:
let filtered = v ? _.filter(this.state.fullSecretList, (item) => { return item.toLowerCase().includes(v.toLowerCase()); }) : this.state.fullSecretList;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, I had thought Vault was case-insensitive, so I figured i'd save on some compute cycles, but apparently thats not the case. Great catch, fix inc.
Changes are in, but the Docker build seems to be failing on
I think NPM is just acting up right now, definitely seen similar behavior before. I actually can't even build master. I'll try again tomorrow morning before merging 👍 |
That's odd. TravisCI changed something in their build image perhaps? Anyway, good job on those changes! LGTM merge at will :) |
Borrowing from the Token management's display, adding pagination to secrets hopefully to solve #109.
Improved filtering by removing case-sensitivity, #106 (comment), and allowing the last known matches to stay displayed rather than clearing the list.