angular_wrappers.ts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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, SecretFormField } from '@grafana/ui';
  13. import { FunctionEditor } from 'app/plugins/datasource/graphite/FunctionEditor';
  14. export function registerAngularDirectives() {
  15. react2AngularDirective('passwordStrength', PasswordStrength, ['password']);
  16. react2AngularDirective('sidemenu', SideMenu, []);
  17. react2AngularDirective('functionEditor', FunctionEditor, ['func', 'onRemove', 'onMoveLeft', 'onMoveRight']);
  18. react2AngularDirective('appNotificationsList', AppNotificationList, []);
  19. react2AngularDirective('pageHeader', PageHeader, ['model', 'noTabs']);
  20. react2AngularDirective('emptyListCta', EmptyListCTA, ['model']);
  21. react2AngularDirective('searchResult', SearchResult, []);
  22. react2AngularDirective('tagFilter', TagFilter, [
  23. 'tags',
  24. ['onChange', { watchDepth: 'reference' }],
  25. ['tagOptions', { watchDepth: 'reference' }],
  26. ]);
  27. react2AngularDirective('colorPicker', ColorPicker, [
  28. 'color',
  29. ['onChange', { watchDepth: 'reference', wrapApply: true }],
  30. ]);
  31. react2AngularDirective('seriesColorPickerPopover', SeriesColorPickerPopoverWithTheme, [
  32. 'color',
  33. 'series',
  34. 'onColorChange',
  35. 'onToggleAxis',
  36. ]);
  37. react2AngularDirective('metricSelect', MetricSelect, [
  38. 'options',
  39. 'onChange',
  40. 'value',
  41. 'isSearchable',
  42. 'className',
  43. 'placeholder',
  44. ['variables', { watchDepth: 'reference' }],
  45. ]);
  46. react2AngularDirective('stackdriverQueryEditor', StackdriverQueryEditor, [
  47. 'target',
  48. 'onQueryChange',
  49. 'onExecuteQuery',
  50. ['events', { watchDepth: 'reference' }],
  51. ['datasource', { watchDepth: 'reference' }],
  52. ['templateSrv', { watchDepth: 'reference' }],
  53. ]);
  54. react2AngularDirective('stackdriverAnnotationQueryEditor', StackdriverAnnotationQueryEditor, [
  55. 'target',
  56. 'onQueryChange',
  57. 'onExecuteQuery',
  58. ['datasource', { watchDepth: 'reference' }],
  59. ['templateSrv', { watchDepth: 'reference' }],
  60. ]);
  61. react2AngularDirective('secretFormField', SecretFormField, [
  62. 'value',
  63. 'isConfigured',
  64. 'inputWidth',
  65. ['onReset', { watchDepth: 'reference', wrapApply: true }],
  66. ['onChange', { watchDepth: 'reference', wrapApply: true }],
  67. ]);
  68. }