| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- ///<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,
- controllerAs: 'ctrl',
- };
- }
- export {
- PanelBaseCtrl,
- TestPanelCtrl,
- testPanelDirective as panel
- }
|