Torkel Ödegaard 10 年之前
父节点
当前提交
8dd118bd86
共有 2 个文件被更改,包括 2 次插入3 次删除
  1. 0 1
      public/app/features/panel/panel_meta2.ts
  2. 2 2
      public/app/plugins/panel/test/module.ts

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

@@ -23,7 +23,6 @@ export default class PanelMeta {
     this.addMenuItem('Edit', 'icon-cog', 'editPanel(); dismiss();', 'Editor');
     this.addMenuItem('Edit', 'icon-cog', 'editPanel(); dismiss();', 'Editor');
     this.addMenuItem('Duplicate', 'icon-copy', 'duplicatePanel()', 'Editor');
     this.addMenuItem('Duplicate', 'icon-copy', 'duplicatePanel()', 'Editor');
     this.addMenuItem('Share', 'icon-share', 'sharePanel(); dismiss();');
     this.addMenuItem('Share', 'icon-share', 'sharePanel(); dismiss();');
-
     this.addEditorTab('General', 'app/partials/panelgeneral.html');
     this.addEditorTab('General', 'app/partials/panelgeneral.html');
 
 
     if (options.metricsEditor) {
     if (options.metricsEditor) {

+ 2 - 2
public/app/plugins/panel/test/module.ts

@@ -15,7 +15,6 @@ class PanelBaseCtrl {
 }
 }
 
 
 class TestPanelCtrl extends PanelBaseCtrl {
 class TestPanelCtrl extends PanelBaseCtrl {
-
   constructor($scope) {
   constructor($scope) {
     super($scope);
     super($scope);
     $scope.panelMeta.panelName = "Test";
     $scope.panelMeta.panelName = "Test";
@@ -32,7 +31,8 @@ function testPanelDirective() {
       </div>
       </div>
     </grafana-panel>
     </grafana-panel>
     `,
     `,
-    controller: TestPanelCtrl
+    controller: TestPanelCtrl,
+    controllerAs: 'ctrl',
   };
   };
 }
 }