Commit ecdc730d by Torkel Ödegaard

poc(): new panel system

parent 89270424
...@@ -3,19 +3,13 @@ ...@@ -3,19 +3,13 @@
import PanelMeta from './panel_meta2'; import PanelMeta from './panel_meta2';
export class PanelCtrl { export class PanelCtrl {
panelMeta: any; meta: any;
panel: any; panel: any;
row: any; row: any;
dashboard: any; dashboard: any;
constructor(private scope) { constructor(private scope) {
this.panelMeta = new PanelMeta({ this.meta = new PanelMeta(this.panel);
panelName: 'Table',
editIcon: "fa fa-table",
fullscreen: true,
metricsEditor: true,
});
this.publishAppEvent('panel-instantiated', {scope: scope}); this.publishAppEvent('panel-instantiated', {scope: scope});
} }
...@@ -23,11 +17,23 @@ export class PanelCtrl { ...@@ -23,11 +17,23 @@ export class PanelCtrl {
this.scope.$root.appEvent(evtName, evt); this.scope.$root.appEvent(evtName, evt);
} }
editPanel() { changeView(fullscreen, edit) {
this.publishAppEvent('panel-change-view', { this.publishAppEvent('panel-change-view', {
fullscreen: true, edit: true, panelId: this.panel.id fullscreen: fullscreen, edit: edit, panelId: this.panel.id
}); });
} }
viewPanel() {
this.changeView(true, false);
}
editPanel() {
this.changeView(true, true);
}
exitFullscreen() {
this.changeView(false, false);
}
} }
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</div> </div>
</div> </div>
<button class="gf-box-header-close-btn" ng-click="exitFullscreen();"> <button class="gf-box-header-close-btn" ng-click="ctrl.exitFullscreen();">
Back to dashboard Back to dashboard
</button> </button>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment