angular_wrappers.ts 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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, SeriesColorPickerPopover } 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', SeriesColorPickerPopover, [
  30. 'series',
  31. 'onColorChange',
  32. 'onToggleAxis',
  33. ]);
  34. react2AngularDirective('metricSelect', MetricSelect, [
  35. 'options',
  36. 'onChange',
  37. 'value',
  38. 'isSearchable',
  39. 'className',
  40. 'placeholder',
  41. ['variables', { watchDepth: 'reference' }],
  42. ]);
  43. react2AngularDirective('stackdriverQueryEditor', StackdriverQueryEditor, [
  44. 'target',
  45. 'onQueryChange',
  46. 'onExecuteQuery',
  47. ['events', { watchDepth: 'reference' }],
  48. ['datasource', { watchDepth: 'reference' }],
  49. ['templateSrv', { watchDepth: 'reference' }],
  50. ]);
  51. react2AngularDirective('stackdriverAnnotationQueryEditor', StackdriverAnnotationQueryEditor, [
  52. 'target',
  53. 'onQueryChange',
  54. 'onExecuteQuery',
  55. ['datasource', { watchDepth: 'reference' }],
  56. ['templateSrv', { watchDepth: 'reference' }],
  57. ]);
  58. }