2018-01-03 15:50:39 +01:00
|
|
|
import { react2AngularDirective } from 'app/core/utils/react2angular';
|
2019-01-14 18:23:01 +01:00
|
|
|
import { QueryEditor as StackdriverQueryEditor } from 'app/plugins/datasource/stackdriver/components/QueryEditor';
|
|
|
|
|
import { AnnotationQueryEditor as StackdriverAnnotationQueryEditor } from 'app/plugins/datasource/stackdriver/components/AnnotationQueryEditor';
|
2018-01-03 15:50:39 +01:00
|
|
|
import PageHeader from './components/PageHeader/PageHeader';
|
|
|
|
|
import EmptyListCTA from './components/EmptyListCTA/EmptyListCTA';
|
2018-01-16 12:52:13 +01:00
|
|
|
import { TagFilter } from './components/TagFilter/TagFilter';
|
2018-09-04 17:24:08 +02:00
|
|
|
import { SideMenu } from './components/sidemenu/SideMenu';
|
2018-12-19 21:44:38 +01:00
|
|
|
import { MetricSelect } from './components/Select/MetricSelect';
|
2018-10-23 13:34:27 +02:00
|
|
|
import AppNotificationList from './components/AppNotifications/AppNotificationList';
|
2019-06-25 11:38:51 +02:00
|
|
|
import { ColorPicker, SeriesColorPickerPopoverWithTheme, SecretFormField, DataLinksEditor } from '@grafana/ui';
|
2019-02-18 17:55:38 +01:00
|
|
|
import { FunctionEditor } from 'app/plugins/datasource/graphite/FunctionEditor';
|
2019-05-02 08:49:03 +02:00
|
|
|
import { SearchField } from './components/search/SearchField';
|
2019-06-25 11:38:51 +02:00
|
|
|
import { GraphContextMenu } from 'app/plugins/panel/graph/GraphContextMenu';
|
2017-10-22 07:03:26 +02:00
|
|
|
|
|
|
|
|
export function registerAngularDirectives() {
|
2018-09-04 17:24:08 +02:00
|
|
|
react2AngularDirective('sidemenu', SideMenu, []);
|
2019-02-18 17:55:38 +01:00
|
|
|
react2AngularDirective('functionEditor', FunctionEditor, ['func', 'onRemove', 'onMoveLeft', 'onMoveRight']);
|
2018-10-24 10:23:11 +02:00
|
|
|
react2AngularDirective('appNotificationsList', AppNotificationList, []);
|
2018-01-03 15:50:39 +01:00
|
|
|
react2AngularDirective('pageHeader', PageHeader, ['model', 'noTabs']);
|
|
|
|
|
react2AngularDirective('emptyListCta', EmptyListCTA, ['model']);
|
2019-05-02 08:49:03 +02:00
|
|
|
react2AngularDirective('searchField', SearchField, [
|
|
|
|
|
'query',
|
|
|
|
|
'autoFocus',
|
|
|
|
|
['onChange', { watchDepth: 'reference' }],
|
|
|
|
|
['onKeyDown', { watchDepth: 'reference' }],
|
|
|
|
|
]);
|
2018-01-16 12:52:13 +01:00
|
|
|
react2AngularDirective('tagFilter', TagFilter, [
|
|
|
|
|
'tags',
|
2018-12-10 13:23:38 +01:00
|
|
|
['onChange', { watchDepth: 'reference' }],
|
2018-01-16 12:52:13 +01:00
|
|
|
['tagOptions', { watchDepth: 'reference' }],
|
|
|
|
|
]);
|
2019-01-10 13:34:23 +01:00
|
|
|
react2AngularDirective('colorPicker', ColorPicker, [
|
|
|
|
|
'color',
|
|
|
|
|
['onChange', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
|
]);
|
2019-02-05 17:04:48 +01:00
|
|
|
react2AngularDirective('seriesColorPickerPopover', SeriesColorPickerPopoverWithTheme, [
|
2019-01-24 12:01:15 +01:00
|
|
|
'color',
|
2019-01-10 13:34:23 +01:00
|
|
|
'series',
|
|
|
|
|
'onColorChange',
|
|
|
|
|
'onToggleAxis',
|
|
|
|
|
]);
|
2018-12-19 21:44:38 +01:00
|
|
|
react2AngularDirective('metricSelect', MetricSelect, [
|
|
|
|
|
'options',
|
|
|
|
|
'onChange',
|
|
|
|
|
'value',
|
|
|
|
|
'isSearchable',
|
|
|
|
|
'className',
|
|
|
|
|
'placeholder',
|
|
|
|
|
['variables', { watchDepth: 'reference' }],
|
|
|
|
|
]);
|
2019-01-14 18:23:01 +01:00
|
|
|
react2AngularDirective('stackdriverQueryEditor', StackdriverQueryEditor, [
|
2019-01-08 13:37:08 +01:00
|
|
|
'target',
|
|
|
|
|
'onQueryChange',
|
|
|
|
|
'onExecuteQuery',
|
|
|
|
|
['events', { watchDepth: 'reference' }],
|
|
|
|
|
['datasource', { watchDepth: 'reference' }],
|
2019-01-08 13:52:19 +01:00
|
|
|
['templateSrv', { watchDepth: 'reference' }],
|
|
|
|
|
]);
|
2019-01-14 18:23:01 +01:00
|
|
|
react2AngularDirective('stackdriverAnnotationQueryEditor', StackdriverAnnotationQueryEditor, [
|
2019-01-08 13:52:19 +01:00
|
|
|
'target',
|
|
|
|
|
'onQueryChange',
|
|
|
|
|
'onExecuteQuery',
|
|
|
|
|
['datasource', { watchDepth: 'reference' }],
|
|
|
|
|
['templateSrv', { watchDepth: 'reference' }],
|
2019-01-08 13:37:08 +01:00
|
|
|
]);
|
2019-03-19 13:38:54 +01:00
|
|
|
react2AngularDirective('secretFormField', SecretFormField, [
|
|
|
|
|
'value',
|
|
|
|
|
'isConfigured',
|
|
|
|
|
'inputWidth',
|
2019-04-15 11:11:17 +02:00
|
|
|
'labelWidth',
|
2019-03-19 13:38:54 +01:00
|
|
|
['onReset', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
|
['onChange', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
|
]);
|
2019-06-25 11:38:51 +02:00
|
|
|
react2AngularDirective('graphContextMenu', GraphContextMenu, [
|
|
|
|
|
'x',
|
|
|
|
|
'y',
|
|
|
|
|
'items',
|
|
|
|
|
['onClose', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
|
['getContextMenuSource', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
// We keep the drilldown terminology here because of as using data-* directive
|
|
|
|
|
// being in conflict with HTML data attributes
|
|
|
|
|
react2AngularDirective('drilldownLinksEditor', DataLinksEditor, [
|
|
|
|
|
'value',
|
|
|
|
|
'suggestions',
|
|
|
|
|
['onChange', { watchDepth: 'reference', wrapApply: true }],
|
|
|
|
|
]);
|
2017-10-22 07:03:26 +02:00
|
|
|
}
|