Files
grafana/public/app/features/panel/panel.ts

42 lines
797 B
TypeScript
Raw Normal View History

2016-01-22 19:59:36 +01:00
///<reference path="../../headers/common.d.ts" />
2016-01-24 17:30:29 -05:00
import config from 'app/core/config';
2016-01-24 18:44:21 -05:00
import {PanelCtrl} from './panel_ctrl';
import {MetricsPanelCtrl} from './metrics_panel_ctrl';
2016-01-22 19:59:36 +01:00
2016-01-24 18:44:21 -05:00
class PanelDirective {
template: string;
templateUrl: string;
bindToController: boolean;
scope: any;
controller: any;
controllerAs: string;
getDirective() {
if (!this.controller) {
this.controller = PanelCtrl;
}
return {
template: this.template,
templateUrl: this.templateUrl,
controller: this.controller,
controllerAs: 'ctrl',
bindToController: true,
scope: {dashboard: "=", panel: "=", row: "="},
link: this.link
};
}
link(scope, elem) {
return null;
}
}
2016-01-22 19:59:36 +01:00
2016-01-24 18:44:21 -05:00
export {
PanelCtrl,
MetricsPanelCtrl,
PanelDirective,
}