module.ts 696 B

12345678910111213141516171819202122232425262728293031323334
  1. ///<reference path="../../../headers/common.d.ts" />
  2. import {PanelDirective, MetricsPanelCtrl} from '../../../features/panel/panel';
  3. function optionsTab() {
  4. return {template: '<h2>options!</h2>' };
  5. }
  6. export class TestPanelCtrl extends MetricsPanelCtrl {
  7. data: any;
  8. constructor($scope, $injector) {
  9. super($scope, $injector);
  10. }
  11. initEditorTabs() {
  12. super.initEditorTabs();
  13. }
  14. refreshData(data) {
  15. console.log('refreshData: ', data);
  16. }
  17. }
  18. class TestPanel extends PanelDirective {
  19. templateUrl = `app/plugins/panel/test/module.html`;
  20. controller = TestPanelCtrl;
  21. link(scope, elem) {
  22. console.log('test panel linking:', scope);
  23. }
  24. }
  25. export {TestPanel as Panel}