Commit ecdc730d by Torkel Ödegaard

poc(): new panel system

parent 89270424
......@@ -3,19 +3,13 @@
import PanelMeta from './panel_meta2';
export class PanelCtrl {
panelMeta: any;
meta: any;
panel: any;
row: any;
dashboard: any;
constructor(private scope) {
this.panelMeta = new PanelMeta({
panelName: 'Table',
editIcon: "fa fa-table",
fullscreen: true,
metricsEditor: true,
});
this.meta = new PanelMeta(this.panel);
this.publishAppEvent('panel-instantiated', {scope: scope});
}
......@@ -23,11 +17,23 @@ export class PanelCtrl {
this.scope.$root.appEvent(evtName, evt);
}
editPanel() {
changeView(fullscreen, edit) {
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 @@
</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
</button>
</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