瀏覽代碼

fix: ensure panel.datasource is null as default

Torkel Ödegaard 8 年之前
父節點
當前提交
3dac77468b
共有 2 個文件被更改,包括 4 次插入3 次删除
  1. 1 0
      public/app/features/panel/metrics_panel_ctrl.ts
  2. 3 3
      scripts/webpack/webpack.dev.js

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

@@ -41,6 +41,7 @@ class MetricsPanelCtrl extends PanelCtrl {
     this.timeSrv = $injector.get('timeSrv');
     this.timeSrv = $injector.get('timeSrv');
     this.templateSrv = $injector.get('templateSrv');
     this.templateSrv = $injector.get('templateSrv');
     this.scope = $scope;
     this.scope = $scope;
+    this.panel.datasource = this.panel.datasource || null;
 
 
     if (!this.panel.targets) {
     if (!this.panel.targets) {
       this.panel.targets = [{}];
       this.panel.targets = [{}];

+ 3 - 3
scripts/webpack/webpack.dev.js

@@ -45,8 +45,8 @@ module.exports = merge(common, {
       names: ['vendor', 'manifest'],
       names: ['vendor', 'manifest'],
     }),
     }),
     new WebpackCleanupPlugin(),
     new WebpackCleanupPlugin(),
-    new BundleAnalyzerPlugin({
-      analyzerPort: 8889
-    })
+    // new BundleAnalyzerPlugin({
+    //   analyzerPort: 8889
+    // })
   ]
   ]
 });
 });