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
mgr/dashboard: remove daemon list for badges #46565
Conversation
Signed-off-by: Pedro Gonzalez Gomez <pegonzal@redhat.com>
...ind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/daemon-list/daemon-list.component.ts
Outdated
Show resolved
Hide resolved
...ind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/daemon-list/daemon-list.component.ts
Outdated
Show resolved
Hide resolved
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/overview/overview.component.html
Outdated
Show resolved
Hide resolved
jenkins test make check |
Signed-off-by: Pedro Gonzalez Gomez <pegonzal@redhat.com>
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.
nits
...ind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/daemon-list/daemon-list.component.ts
Outdated
Show resolved
Hide resolved
...ind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/daemon-list/daemon-list.component.ts
Outdated
Show resolved
Hide resolved
...d/mgr/dashboard/frontend/src/app/ceph/block/mirroring/daemon-list/daemon-list.component.html
Show resolved
Hide resolved
...d/mgr/dashboard/frontend/src/app/ceph/block/mirroring/daemon-list/daemon-list.component.html
Outdated
Show resolved
Hide resolved
… pipe function and updated unit test Signed-off-by: Pedro Gonzalez Gomez <pegonzal@redhat.com>
44de63d
to
b81f5ac
Compare
Interesting clean-up @Pegonzal ! This led me to think about a couple of things:
So all the above considered:
|
(fetchData)="refresh()" | ||
[status]="tableStatus"> | ||
</cd-table> | ||
<ng-container *ngIf="empty"> |
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.
Let's always use the ngIf="this else that".
} | ||
|
||
daemonStatus(daemon_status: string): string { | ||
const display_names = {success: 'UP', error: 'DOWN', warning: 'WARNING', info: 'UNKNOWN'}; |
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 is rather an enum.
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 dont see how would this work as an enum since im getting the values from the keys in the HTML
(fetchData)="refresh()" | ||
[status]="tableStatus"> | ||
</cd-table> | ||
<ng-container *ngIf="empty"> |
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.
No need to cache data yourself. Angular works better when you check the data you want. Angular does the memoization for you.
<ng-container *ngIf="empty"> | |
<ng-container *ngIf="data"> |
const daemon_states = { info: 0, error: 0, warning: 0, success: 0 }; | ||
this.empty = this.data.length > 0 ? false : true; | ||
for (let i = 0; i < this.data.length; i++) { | ||
const health_color = this.data[i]['health_color']; | ||
daemon_states[health_color]++; | ||
} | ||
return daemon_states; | ||
} | ||
|
||
daemonStatus(daemon_status: string): string { | ||
const display_names = {success: 'UP', error: 'DOWN', warning: 'WARNING', info: 'UNKNOWN'}; |
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.
Are we sure this mapping is ok? error and down seem 2 different conditions (down means that the service is not running, while error means the service is running but encountered a condition that impedes it from continuing).
And info = unknown is a bit shocking to me...
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.
Yo are right, I think it should be 'error'.
I also agree that info = unknoen is a little bit wierd but thats what I'm getting from the backend. From get_daemon_health function at src/pybind/mgr/dashboard/controllers/rbd_mirroring.py
data: []; | ||
columns: {}; | ||
data: any[]; | ||
daemons: {}; |
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.
Let's name things clearly: this is count/histogram of the daemon statuses, not the daemons themselves. Additionally, a proper type should be here
daemons: {}; | |
daemonCount: Record<'up' | 'down' | ..., number>; |
Or:
enum DaemonStatus {
up,
down,
}
let countDaemon: {[Key in DaemonStatus as string]: number} = {up: 1, down: 2};
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 Will do it. I'll be more careful with the naming
Thanks for your comments @epuertat! I have some more questions and coments regarding them: Since this PR was ment to clean up some of the information regarding the daemons, and display the daemons health status in a more visual and simpler way should we tackle the next improvements in other issues/PRs?
Couldn't that be a problem since we need an orchestrator to see that information from the services section?
That was the goal, to make it simple. A table is a great way to display information, but it seemed as there was not enough meaningful information inside the Daemons table to justify a whole table when there are two more tables displaying information aswell. There might be too much going at the same time, which most of the time might not be needed.
This could be a great solution overall. However I think two main issues might rise from it.
Would this PR cover that #46527 ?
Perfect, will look into that
Could be a great improvement to let the user what is going on. Will do. |
Sure, feel free to take/drop the suggestions.
While technically we could get some service information without orchestrator (Ceph tracks internally the status of Ceph services) you're right that this page won't work without orchestrator.
My idea of simplification here is more about adhering to generic patterns and removing ad-hoc (per-component) customizations, so the goal would be that every Dashboard page is just a table + form component. Anything else that adds specificities to a page would 'complicate' it. If we find that these new daemon labels make sense for ALL components, yes, let's go for it. But again, it's a suggestion.
Agree on the daemons table. Tables should be displaying a medium-large amount of data. For just displaying 1-2 daemons it makes it a waste of space.
If there are no daemons, then the "welcome screen" would replace this page. |
Then, after our discussion and your comments @epuertat my conclusion would be as follows: This PR is a great implementation because it can show relevant information (the daemon status) to the user in a clear and simple way at everymoment at the top of the page but this doesn't follow the simplicity of following a single component/pattern we are looking for with our Dashboard pages. So it should either be discarded or added to other pages where might be needed to keep the consistency but adding another pattern witch will reduce the simplicity of the pages. So which of the two options would be the best? However is it clear for all of us that this page would be beneffited from some kind of cleanup. Then the next things could be added/modified to do so:
@pereman2 since you were also in favor of this PR, I would also like to know your thoughs about this conclusions. Thank you guys for your help and comments and I'll wait for your responde about this. |
@epuertat I think this is a problem of effectively displaying relevant data. I understand that you want to have consistency across components and try not to do ad-hoc implementations. On the other side, we can agree that rbd-mirror is a different beast which works in a peculiar way. In the daemons table the relevant info is: name maybe and the state of the daemon because you cannot opererate if all dameons are down or with issues or whatever. If you were about to do something on an mirrored image and all daemons are down, you'd prefer not having to go to another tab before performing another action or checking if something is happening with daemons. If we have the same layout as we've always had, it wouldn't be a problem but still, you would have a huge table taking unnecessary space. With the current approach in this PR I believe you can have the same info the table provides, in a compact way without having to context switch between tables which is something I think it's important. If your problem is consistency and that we would have to implement this everywhere next time, I don't think we should not change something because it doesn't stick to our usual bloated unreadable tables, we should strive to display the data in the most efficient way possible and it has to be relevant. |
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.
While I agree that the rbd-mirroring page needs to be improved a lot, we should still be following some UX patterns. I know that we are kind of limited in that area but atleast we can try to follow the general theme and improve upon it. Our goal here in the end is to show what is relevant to the user upfront. And while showing the Daemons
table in the first view is not mostly relevant, we can still show it. Just not in the front.
I think the Images (or the status of the images) is the important thing here and one that user will continue to come to look at even after setting rbd-mirror up. So just show the info in the Images tab first and then do everything in a different tab would make a lot of sense here. It'll adhere to the UX we have in place too.
While the Daemons page doesn't give a lot of info, it still shows which daemon is up and which is not. I don't like the idea of this being lost under a tooltip TBH.
Picture speaks a thousand words here so my vision is to have something like this in place?
I really don't want to lose this opportunity to do some cleanups around this page. So lets try to bring a good design that we all can agree on.
Let me know your thoughts on this too. @Pegonzal @epuertat @pereman2
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.
@nizamial09 I'm ok with that approach. The only concern with is having again 3 tables displayed in a row manner. Feels weird.
I agree with @pereman2. We should find a way to display 1 piece of information at once (that's how some view abstractions work: pages, tabs) and avoid showing too much information simultaneously (collapsible/accordion components are acceptable, but risky if abused). I'm fine with any improvement that reduces/condensates the amount of information displayed. My comment today about adding badges/labels/chips (whichever we call them) is that we should prefer highlighting information that requires attention:
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
1 similar comment
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
Signed-off-by: Pedro Gonzalez Gomez pegonzal@redhat.com
Fixes: https://tracker.ceph.com/issues/55895
Changes the UI for the rbd-mirroring daemons, from a table to badges color coded depending the daemon health property.
rbd-mirror_badges.mp4
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox
jenkins test windows