Commit 3e3b9969 by Torkel Ödegaard

feat(plugin): experimental work on plugin architecture

parent 7a26d309
///<reference path="../../../headers/common.d.ts" />
import PanelMeta from 'app/features/panel/panel_meta2';
class PanelBaseCtrl {
constructor(private $scope) {
$scope.panelMeta = new PanelMeta({
panelName: 'Table',
editIcon: "fa fa-table",
fullscreen: true,
metricsEditor: true,
});
$scope.testProp = "hello";
}
}
class TestPanelCtrl extends PanelBaseCtrl {
constructor($scope) {
super($scope);
$scope.panelMeta.panelName = "Test";
}
}
function testPanelDirective() {
return {
restrict: 'E',
template: `
<grafana-panel>
<div class="text-center" style="padding-top: 2rem">
<h2>Test Panel, {{testProp}}</h2>
</div>
</grafana-panel>
`,
controller: TestPanelCtrl
};
}
export {
PanelBaseCtrl,
TestPanelCtrl,
testPanelDirective as panel
}
{
"type": "panel",
"name": "Test",
"id": "test"
}
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