-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Hide unimportant details from service details and show some important ones instead #15701
Hide unimportant details from service details and show some important ones instead #15701
Conversation
Ooooo, I ❤️ this! You've got my approval for this PR when it's time for it. Great work! |
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.
So cool, thanks @KKoukiou !
6ca9065
to
daee0f0
Compare
daee0f0
to
a1ee5e1
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.
This works and looks really well 👏 Many thanks for this!
313d0e6
to
9c15042
Compare
/livetest |
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.
Thanks! There are still quite a number of issues from the previous review round, I marked the others as resolved. Many of the middle ones are unhelpfully hidden by github, you have to expand them 😿
61ab94b
to
7a300a1
Compare
Still some test failures, marking as draft till these are resolved. |
ea1ed4b
to
b654695
Compare
test-static-code fails:
|
b654695
to
bdb08a5
Compare
Ups sorry, reposted. |
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.
This works really nicely now 👍 Also thanks for the nice dynamic memory test case!
A few remaining easy nitpicks.
…for sockets MemoryCurrent does not emit an event when updated therefore just do polling.
Most of them are not of high interest and we display them as first information in the service details page. Let's add them behind an expandable section and let the user decide if they want to see them. Show the triggeredBy/triggers by default however since there are actually important for socket and timer activated services. systemctl status has the same approach.
We do have a lot of space in desktop mode which is unused, in smaller screens they collapse to vertical anyway.
Previously there was just too much information there, so we tried to categorize it. Now it's hidden by default so let's just divide the items.
Previously in console there was: Switch: Switch requires either a label or an aria-label to be specified
Also it's not used.
This custom CSS was removing the page's bottom padding, resulting in inability to scroll to the end.
In service details we used to block component refresh when we performed a unit lifecycle operation. This is still needed, but it can be done in a cleaner way with getDerivedStateFromProps.
bdb08a5
to
ceca3b9
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.
Thanks! 👍 assuming the tests agree.
"MemoryCurrent", | ||
result[0] && result[0].v > 0 ? result[0].v : null, | ||
); | ||
}, ex => console.log(ex.message)); |
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.
FWIW, the previous "Failed to.." string was fine, I meant to add ex.toString()
as a second argument. But good enough.
@marusak: rhel-9-0 failed in an interesting way:
This is some weird collision with your PR? that just landed |
Or perhaps some interaction between #15707 and the image refresh in cockpit-project/bots#1955 ? They landed in parallel |
@garrett: I made new screenshots (the original one was way too wide) and added a release note. Can you please have a look? |
@martinpitt Cool! I do remember a screenshot showing a port; these don't though? Also, since there's just white at the top, we might want to frame these in a dark grey outline. |
@garrett Right, I picked an Unix socket instead of a TCP one, but a TCP socket is fine as well. I just didn't want to use Cockpit's own service, as that felt a little too self-referential. But fine for me, of course :) Do you want to do the corresponding service one as well, or want me to re-do mine? |
So I was thinking how I can solve #14321
Went to service details and I realized that so much information there are not useful for most scenarios, or at least they were never useful for me till now.
So I though I should hide them by default, and display indead some more useful information, like the port a socket activated service is exposed at, for example.
Having the above mentioned property exposed we can move forward in the future with linking the service details of service sockets to the firewall page.
What do you think? @marusak ?
Services: Show memory usage and socket listeners
Socket units show the paths or ports on which they listen, and which service unit they activate:
Service units show their current memory usage and which socket unit activated them (if any). The static relationships like "Requires:" are now collapsed by default, to take less space and make it easier to see the journal output below.