mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
poc(): new panel system
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user