metrics_tab.ts 849 B

12345678910111213141516171819202122232425262728293031
  1. // Services & utils
  2. import coreModule from 'app/core/core_module';
  3. import { Emitter } from 'app/core/utils/emitter';
  4. // Types
  5. import { DashboardModel } from '../dashboard/dashboard_model';
  6. import { PanelModel } from '../dashboard/panel_model';
  7. import { DataQuery } from 'app/types';
  8. export interface AngularQueryComponentScope {
  9. panel: PanelModel;
  10. dashboard: DashboardModel;
  11. events: Emitter;
  12. refresh: () => void;
  13. render: () => void;
  14. removeQuery: (query: DataQuery) => void;
  15. addQuery: (query?: DataQuery) => void;
  16. moveQuery: (query: DataQuery, direction: number) => void;
  17. }
  18. /** @ngInject */
  19. export function metricsTabDirective() {
  20. 'use strict';
  21. return {
  22. restrict: 'E',
  23. scope: true,
  24. templateUrl: 'public/app/features/panel/partials/metrics_tab.html',
  25. };
  26. }
  27. coreModule.directive('metricsTab', metricsTabDirective);