From 6efadc9d79e8685b44bc71f7db24cc6c463a8faf Mon Sep 17 00:00:00 2001 From: lzd <24379844+lzdw@users.noreply.github.com> Date: Tue, 10 Dec 2019 16:22:49 +0800 Subject: [PATCH] Alert: If the permission is forbidden, keep the historical alarm data present. (#19007) --- public/app/features/alerting/StateHistory.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/public/app/features/alerting/StateHistory.tsx b/public/app/features/alerting/StateHistory.tsx index 973bb4f499a..7b2836b5cdc 100644 --- a/public/app/features/alerting/StateHistory.tsx +++ b/public/app/features/alerting/StateHistory.tsx @@ -55,12 +55,11 @@ class StateHistory extends PureComponent { panelId: panelId, }) .then(() => { + this.setState({ + stateHistoryItems: [], + }); onRefresh(); }); - - this.setState({ - stateHistoryItems: [], - }); }, }); };