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

fix(17700): Improve the UX of the metrics panel in the workspace #204

Merged
merged 34 commits into from
Nov 22, 2023

Conversation

vanch3d
Copy link
Contributor

@vanch3d vanch3d commented Nov 17, 2023

See https://hivemq.kanbanize.com/ctrl_board/57/cards/17700/details/

The PR improves the rendering of metrics in the property side panel of an entity in the workspace and its creation flow.

  • metric names are now properly rendered as an human-readable text, both in the sample component and the selector
  • in the selector, available metrics are restricted to those pertinent to the selected entity. Metrics already displayed in the panel are disabled
  • the metrics selector is now only available by clicking on the "expandable" icon
  • the rendering of a metric has been improved for accessibility (font colour) and for readability (use of numerical increase rather than percentage)
  • numbers are properly formatted with locale

The PR also adds a "copy-to-clipboard" CTA on the side of every Stat panel. It will copy the metric name as a string into the clipboard

Out-of-scope

  • persistency of the selected metrics will be done in a separate ticket

Before

screenshot-localhost_3000-2023 11 17-16_34_22

After

screenshot-localhost_3000-2023 11 21-13_02_51

screenshot-localhost_3000-2023 11 21-13_03_52

screenshot-localhost_3000-2023 11 21-13_04_16

screenshot-localhost_3000-2023 11 21-13_04_39

screenshot-localhost_3000-2023 11 21-13_05_27

@cla-bot cla-bot bot added the cla-signed label Nov 17, 2023
@vanch3d vanch3d self-assigned this Nov 17, 2023
@sfrehse
Copy link
Contributor

sfrehse commented Nov 18, 2023

Might it be possible to show the complete metric string since that string is used as a direct address of the metric in other systems, like Prometheus/Grafana? Let's link a copy-to-clipboard icon with the tooltip of the raw metric string.

@vanch3d vanch3d force-pushed the fix/17700/update-metrics-ux branch 2 times, most recently from a64f351 to 62e084a Compare November 21, 2023 11:29
@vanch3d
Copy link
Contributor Author

vanch3d commented Nov 21, 2023

Might it be possible to show the complete metric string since that string is used as a direct address of the metric in other systems, like Prometheus/Grafana? Let's link a copy-to-clipboard icon with the tooltip of the raw metric string.

CTA added for every stat panel. Copy the metric in context:

{"metricName":"com.hivemq.edge.bridge.simons-bridge-there.forward.publish.count","timestamp":"2023-11-21T13:05:20.520Z","value":622308}

screenshot-localhost_3000-2023 11 21-13_05_27

@vanch3d vanch3d marked this pull request as ready for review November 21, 2023 13:25
@sfrehse
Copy link
Contributor

sfrehse commented Nov 21, 2023

The copy to the clipboard is an excellent feature. Currently, I assume the following use-case/user journey.

The user will check out metrics in the workspace and wants to use them in Grafana / Prometheus. To get it running in Grafana, the user only needs the metricName field content, which means, just the metric. Users will likely put it directly in the Grafana query editor which requires only the metricName,

@vanch3d
Copy link
Contributor Author

vanch3d commented Nov 22, 2023

The copy to the clipboard is an excellent feature. Currently, I assume the following use-case/user journey.

The user will check out metrics in the workspace and wants to use them in Grafana / Prometheus. To get it running in Grafana, the user only needs the metricName field content, which means, just the metric. Users will likely put it directly in the Grafana query editor which requires only the metricName,

Change made and description updated

@vanch3d vanch3d merged commit 13c9a52 into master Nov 22, 2023
10 checks passed
@vanch3d vanch3d deleted the fix/17700/update-metrics-ux branch November 22, 2023 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants