metrics_tab.ts 887 B

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