grafana / xk6-dashboard

A k6 extension that makes k6 metrics available on a web-based dashboard.
GNU Affero General Public License v3.0
334 stars 30 forks source link

[fix] Fix persistence of chart scale selection #164

Closed 2Steaks closed 3 months ago

2Steaks commented 7 months ago

Closes https://github.com/grafana/xk6-dashboard/issues/153

What?

This PR fixes an issue with the time range selection persisting upon data refresh.

Note

This does NOT fix active chart selection: https://github.com/grafana/xk6-dashboard/issues/154

Why?

The time range selection would reset with every data update.

Additional context

https://github.com/grafana/xk6-dashboard/assets/4395376/5e5bfd33-d0f9-4686-9fb4-7b28c47ba29b

Checklist

2Steaks commented 7 months ago

It works perfectly. (I ran an asset generation and pushed it) I have only one comment: I think there should be some visual feedback that a time interval is currently selected and therefore the graphs are not updated. For example, a button in the header: "enable refresh" or similar. Otherwise, the user will not know how to enable it and why it is not updated (especially after switching tabs).

https://github.com/grafana/xk6-dashboard/assets/4395376/0aa535b5-16c1-4424-b694-594cbfe8a8f7

2Steaks commented 3 months ago

The "reset time range" button should not be displayed in the summary tab, because nothing there depends on the selected time frame. In general, if there is no chart on the page, this button should not be used. This would visually lead to the top row "jumping", because a button would disappear from the middle. Perhaps this button could be placed in front of the icons (with an appropriate design), and then it wouldn't be disturbing if it disappeared from time to time. The other option is that it will be disabled if there is no chart on the page.

UI updated:

https://github.com/grafana/xk6-dashboard/assets/4395376/9d611e14-664b-4ac0-908a-43be6de5e306