-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added filters for Name and Type #22
Conversation
Thanks @tyrone-wu. I'll make sure to check it out tomorrow. It would help to provide screenshots or a video of the new feature. |
Could you also squash the commits into just one? |
0205780
to
0d21b79
Compare
0d21b79
to
dd176ef
Compare
dd176ef
to
09e3811
Compare
09e3811
to
824896c
Compare
Looks great. I'll take a closer look this weekend |
@tyrone-wu I tried it out today and have some feedback. I'm concerned about using up all space in the footer. If we were to add more features, there wouldn't be much room left. I suggest just adding another option to to the existing footer to toggle the filter input field, something like this:
When f is pressed, then show the filter input. Also, I think we only need one filter field that works on both the name and type of the program, we don't need separate ones. Remove the blinking, I don't think it helps. But I like the golden border color. |
For the graph and table state of the UI, would it be alright if I refactor it to use a Some of the refactoring would end up looking something like this:
|
Yes, that seems like a good evolution for the code. Go for it! |
94d4526
to
25894b5
Compare
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.
It's almost there. I have one small request around explicitly dropping the mutex lock.
src/app.rs
Outdated
@@ -71,6 +82,8 @@ impl App { | |||
.map(|prog| (prog.id.clone(), prog)) | |||
.collect(); | |||
|
|||
let filter = filter.lock().unwrap().value().to_lowercase(); |
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.
I believe by re-assigning filter you are immediately dropping the lock, which is what we want. But I would prefer doing this more explicitly, something like:
let filter = filter.lock.unwrap();
let filter_str = filter.value().to_lowercase():
drop(filter);
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.
The explicit mutex drop is added now. 👍
25894b5
to
946756c
Compare
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.
LGTM. Thank you for taking the initiative to add this feature and being responsive to feedback. I will cut a 0.3.0 release with this change.
A vote of support for the filtering capability. Thanks Tyrone |
Added input fields for filtering
Name
andType
of BPF program. #5