angular_wrappers.ts 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import { react2AngularDirective } from 'app/core/utils/react2angular';
  2. import { QueryEditor as StackdriverQueryEditor } from 'app/plugins/datasource/stackdriver/components/QueryEditor';
  3. import { AnnotationQueryEditor as StackdriverAnnotationQueryEditor } from 'app/plugins/datasource/stackdriver/components/AnnotationQueryEditor';
  4. import { PasswordStrength } from './components/PasswordStrength';
  5. import PageHeader from './components/PageHeader/PageHeader';
  6. import EmptyListCTA from './components/EmptyListCTA/EmptyListCTA';
  7. import { SearchResult } from './components/search/SearchResult';
  8. import { TagFilter } from './components/TagFilter/TagFilter';
  9. import { SideMenu } from './components/sidemenu/SideMenu';
  10. import { MetricSelect } from './components/Select/MetricSelect';
  11. import AppNotificationList from './components/AppNotifications/AppNotificationList';
  12. import { ColorPicker, SeriesColorPickerPopoverWithTheme } from '@grafana/ui';
  13. export function registerAngularDirectives() {
  14. react2AngularDirective('passwordStrength', PasswordStrength, ['password']);
  15. react2AngularDirective('sidemenu', SideMenu, []);
  16. react2AngularDirective('appNotificationsList', AppNotificationList, []);
  17. react2AngularDirective('pageHeader', PageHeader, ['model', 'noTabs']);
  18. react2AngularDirective('emptyListCta', EmptyListCTA, ['model']);
  19. react2AngularDirective('searchResult', SearchResult, []);
  20. react2AngularDirective('tagFilter', TagFilter, [
  21. 'tags',
  22. ['onChange', { watchDepth: 'reference' }],
  23. ['tagOptions', { watchDepth: 'reference' }],
  24. ]);
  25. react2AngularDirective('colorPicker', ColorPicker, [
  26. 'color',
  27. ['onChange', { watchDepth: 'reference', wrapApply: true }],
  28. ]);
  29. react2AngularDirective('seriesColorPickerPopover', SeriesColorPickerPopoverWithTheme, [
  30. 'color',
  31. 'series',
  32. 'onColorChange',
  33. 'onToggleAxis',
  34. ]);
  35. react2AngularDirective('metricSelect', MetricSelect, [
  36. 'options',
  37. 'onChange',
  38. 'value',
  39. 'isSearchable',
  40. 'className',
  41. 'placeholder',
  42. ['variables', { watchDepth: 'reference' }],
  43. ]);
  44. react2AngularDirective('stackdriverQueryEditor', StackdriverQueryEditor, [
  45. 'target',
  46. 'onQueryChange',
  47. 'onExecuteQuery',
  48. ['events', { watchDepth: 'reference' }],
  49. ['datasource', { watchDepth: 'reference' }],
  50. ['templateSrv', { watchDepth: 'reference' }],
  51. ]);
  52. react2AngularDirective('stackdriverAnnotationQueryEditor', StackdriverAnnotationQueryEditor, [
  53. 'target',
  54. 'onQueryChange',
  55. 'onExecuteQuery',
  56. ['datasource', { watchDepth: 'reference' }],
  57. ['templateSrv', { watchDepth: 'reference' }],
  58. ]);
  59. }