Skip to content
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: Improve monitoring tabs content #46811

Merged
merged 1 commit into from Jul 6, 2022

Conversation

aaSharma14
Copy link
Contributor

@aaSharma14 aaSharma14 commented Jun 22, 2022

This PR intends to fix the column spacing in the alert list in the alerts tab

Fixes:https://tracker.ceph.com/issues/56165
Signed-off-by: Aashish Sharma aasharma@redhat.com

Active Alerts -

Screenshot from 2022-07-01 11-25-27

Alerts -

Screenshot from 2022-06-27 13-58-07

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
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

@aaSharma14 aaSharma14 requested a review from a team as a code owner June 22, 2022 11:51
@aaSharma14 aaSharma14 added this to In progress in Dashboard via automation Jun 22, 2022
@aaSharma14 aaSharma14 requested review from bryanmontalvan and nizamial09 and removed request for a team June 22, 2022 11:51
@epuertat
Copy link
Member

epuertat commented Jun 22, 2022

Some ideas:

  • For columns whose value is a predefined set (enum-like) we should use labels/badges. That applies to Severity (critical, warning, etc.) for which we should definitely use the prescribed colors (danger, warning, info, etc). Same for Group, but in that case we can simply use the primary color for all of them (until the auto-coloring label from @Pegonzal arrives).
  • For numeric columns I think those should be right-aligned (but not 100% sure, given that works great when the values are purely numeric, without units, which is not the case here: as we display seconds/minutes/etc.).
  • Regarding the columns width we can be even more kind to the Description field (flexGrow 4 versus 2-1-1, or even 8-2-1-1)?

@aaSharma14
Copy link
Contributor Author

Some ideas:

  • For columns whose value is a predefined set (enum-like) we should use labels/badges. That applies to Severity (critical, warning, etc.) for which we should definitely use the prescribed colors (danger, warning, info, etc). Same for Group, but in that case we can simply use the primary color for all of them (until the auto-coloring label from @Pegonzal arrives).
  • For numeric columns I think those should be right-aligned (but not 100% sure, given that works great when the values are purely numeric, without units, which is not the case here: as we display seconds/minutes/etc.).
  • Regarding the columns width we can be even more kind to the Description field (flexGrow 4 versus 2-1-1, or even 8-2-1-1)?

Thanks @epuertat for the suggestions. Updated the PR accordingly. PTAL.

Copy link
Member

@epuertat epuertat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks much better now! Just some comments about the implementation and another suggestion (although feel free to drop it for a follow-up PR).

@aaSharma14
Copy link
Contributor Author

aaSharma14 commented Jun 27, 2022

@epuertat , I have collaborated the changes of your PR #46836, in this PR itself so we don't have to track two different PRs.

@aaSharma14 aaSharma14 changed the title mgr/dashboard: Improve column spacing in alerts tab mgr/dashboard: Improve monitoring tabs content Jun 27, 2022
@aaSharma14
Copy link
Contributor Author

jenkins test dashboard cephadm

@aaSharma14
Copy link
Contributor Author

jenkins test api

Comment on lines +71 to +77
prop: 'labels.severity',
flexGrow: 1,
cellTransformation: CellTemplate.badge,
customTemplateConfig: {
map: {
critical: { class: 'badge-danger' },
warning: { class: 'badge-warning' }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to sort by severity as default? I feel people would prefer seeing the critical first then warnings.

@aaSharma14
Copy link
Contributor Author

jenkins test dashboard cephadm

@aaSharma14
Copy link
Contributor Author

jenkins test api

@aaSharma14
Copy link
Contributor Author

jenkins test dashboard cephadm

@epuertat
Copy link
Member

epuertat commented Jun 29, 2022

Discussed in today's daily meeting:

  • Add badges to the tabs: instead of getting the information in the parent/tab component, trying to send the alerts from the child component to the parent one [1], [2], [parent-child communication using service].
    image
  • Add badges to the menu item: with a similar approach.
    image

@aaSharma14
Copy link
Contributor Author

Discussed in today's daily meeting:

  • Add badges to the tabs: instead of getting the information in the parent/tab component, trying to send the alerts from the child component to the parent one [1], [2], [parent-child communication using service].
    image
  • Add badges to the menu item: with a similar approach.
    image

Thankyou for the suggestion @epuertat , Updated the PR accordingly.

Copy link
Member

@epuertat epuertat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @aaSharma14 ! Thanks for addressing my suggestions.

Once the following issues are fixed I'm ok with it:

  • Padding between badges:
    image
  • And while switching from tab Active Alerts to Alerts I got the following dump:
polyfills.js:214 Uncaught TypeError: ctx_r5.updateSelection is not a function
    at RulesListComponent_cd_table_2_Template_cd_table_updateSelection_0_listener (main.js:11918:634)
    at executeListenerWithErrorHandling (vendor.js:29760:16)
    at Object.wrapListenerIn_markDirtyAndPreventDefault [as next] (vendor.js:29798:22)
    at SafeSubscriber.__tryOrUnsub (vendor.js:155859:16)
    at SafeSubscriber.next (vendor.js:155798:22)
    at Subscriber._next (vendor.js:155748:26)
    at Subscriber.next (vendor.js:155725:18)
    at EventEmitter_.next (vendor.js:155509:25)
    at EventEmitter_.emit (vendor.js:40388:15)
    at TableComponent.ngOnInit (main.js:36088:30)

Dashboard automation moved this from In progress to Reviewer approved Jun 30, 2022
Copy link
Contributor

@pereman2 pereman2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

177 - mgr-dashboard-frontend-unittests (Failed)
I still think sorting by critical could be a nice touch. nevertheless, looks good.

This PR intends to fix the column spacing in the alert list in the alerts tab

Fixes:https://tracker.ceph.com/issues/56165
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
@aaSharma14
Copy link
Contributor Author

LGTM @aaSharma14 ! Thanks for addressing my suggestions.

Once the following issues are fixed I'm ok with it:

  • Padding between badges:
    image
  • And while switching from tab Active Alerts to Alerts I got the following dump:
polyfills.js:214 Uncaught TypeError: ctx_r5.updateSelection is not a function
    at RulesListComponent_cd_table_2_Template_cd_table_updateSelection_0_listener (main.js:11918:634)
    at executeListenerWithErrorHandling (vendor.js:29760:16)
    at Object.wrapListenerIn_markDirtyAndPreventDefault [as next] (vendor.js:29798:22)
    at SafeSubscriber.__tryOrUnsub (vendor.js:155859:16)
    at SafeSubscriber.next (vendor.js:155798:22)
    at Subscriber._next (vendor.js:155748:26)
    at Subscriber.next (vendor.js:155725:18)
    at EventEmitter_.next (vendor.js:155509:25)
    at EventEmitter_.emit (vendor.js:40388:15)
    at TableComponent.ngOnInit (main.js:36088:30)

Done

@aaSharma14
Copy link
Contributor Author

jenkins test make check

@aaSharma14
Copy link
Contributor Author

jenkins test dashboard cephadm

@avanthakkar
Copy link
Contributor

jenkins test dashboard cephadm

@aaSharma14
Copy link
Contributor Author

jenkins test dashboard cephadm

@nizamial09
Copy link
Member

cephadm e2e failures are tracked here : https://tracker.ceph.com/issues/55609

@nizamial09 nizamial09 merged commit d05b5e2 into ceph:main Jul 6, 2022
Dashboard automation moved this from Reviewer approved to Done Jul 6, 2022
@nizamial09 nizamial09 deleted the fix-56165-main branch July 6, 2022 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Dashboard
  
Done
5 participants