浏览代码

Panel: Show error in edit mode (#18175)

- the error was set, but has not been shown
- this change will force a digest before the query promises return with
their error handling
David 6 年之前
父节点
当前提交
c6d3ffce91
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      public/app/features/panel/metrics_panel_ctrl.ts

+ 3 - 1
public/app/features/panel/metrics_panel_ctrl.ts

@@ -110,8 +110,10 @@ class MetricsPanelCtrl extends PanelCtrl {
       }
     }
 
-    this.events.emit('data-error', err);
     console.log('Panel data error:', err);
+    return this.$timeout(() => {
+      this.events.emit('data-error', err);
+    });
   }
 
   // Updates the response with information from the stream