grafana/public/app/features
Dominik Prokop e4a0b2240d
Panels: Destroy panel model when recreating repeated panels (#18799)
Fixes #18533

To recreate the bug described in the original issue in the simplest possible way:

1. Setup dashboard with a single panel and repeat it using variables
2. Set the dashboard refresh to 5s
3. Hover over repeated panel during the refresh

What happened there?
When panels are repeated every time the dashboard is refreshed or variables change the repeated PanelModels are recreated. In https://github.com/grafana/grafana/blob/master/public/app/features/dashboard/state/DashboardModel.ts#L322 the models are removed from dashboard panel's model property what makes the dashboard re-render with source panel only, and then back again with the repeated panels when models are re-created. This means creating new DashboardPanel components. But when the repeated PanelModels are removed, they are not destroyed what results in a behaviour described in #18533.

This is a quick fix for this issue. Ideally I think we should use some cache and update the repeated PanelModels when the refresh or variables change trigger re-render, instead of re-creating those every time. I don't want to do this ATM as the logic around repeating panels is quite complex and require some <3.
2019-08-30 08:42:21 +02:00
..
admin Chore: noImplictAny no errors left (#18303) 2019-08-01 14:38:34 +02:00
alerting Refactor: EmptyListCTA (#18516) 2019-08-20 17:19:21 +02:00
annotations Refactor: EmptyListCTA (#18516) 2019-08-20 17:19:21 +02:00
api-keys Refactor: EmptyListCTA (#18516) 2019-08-20 17:19:21 +02:00
dashboard Panels: Destroy panel model when recreating repeated panels (#18799) 2019-08-30 08:42:21 +02:00
datasources Refactor: EmptyListCTA (#18516) 2019-08-20 17:19:21 +02:00
explore Explore: Fixed issue in PanelQuery state arround cancellation (#18771) 2019-08-29 16:25:10 +02:00
folders noImplicitAny: Down approx 200 errors (#18143) 2019-07-18 08:03:04 +02:00
manage-dashboards noImplicitAny: Down approx 200 errors (#18143) 2019-07-18 08:03:04 +02:00
org noImplicitAny: Down approx 200 errors (#18143) 2019-07-18 08:03:04 +02:00
panel Singlestat: Various fixes to singlestat and DataFrame (#18783) 2019-08-29 19:04:33 +02:00
playlist noImplicitAny: Down approx 200 errors (#18143) 2019-07-18 08:03:04 +02:00
plugins DashboardDatasource: reuse query results within a dashboard (#16660) 2019-08-27 11:06:49 +02:00
profile convert teams section of user profile to react (#18633) 2019-08-23 08:26:52 -04:00
teams Refactor: EmptyListCTA (#18516) 2019-08-20 17:19:21 +02:00
templating Refactor: EmptyListCTA (#18516) 2019-08-20 17:19:21 +02:00
users Chore: Revert React 16.9.0 bump (#18634) 2019-08-20 11:14:53 +02:00
all.ts extract tls auth settings directive from datasource http settings directive 2019-01-28 19:37:19 +01:00