diff --git a/public/app/core/angular_wrappers.ts b/public/app/core/angular_wrappers.ts index 7a2703b76e7..92f5d663656 100644 --- a/public/app/core/angular_wrappers.ts +++ b/public/app/core/angular_wrappers.ts @@ -1,4 +1,5 @@ import { react2AngularDirective } from 'app/core/utils/react2angular'; +import { QueryEditor } from 'app/plugins/datasource/stackdriver/components/QueryEditor'; import { PasswordStrength } from './components/PasswordStrength'; import PageHeader from './components/PageHeader/PageHeader'; import EmptyListCTA from './components/EmptyListCTA/EmptyListCTA'; @@ -29,4 +30,11 @@ export function registerAngularDirectives() { 'placeholder', ['variables', { watchDepth: 'reference' }], ]); + react2AngularDirective('queryEditor', QueryEditor, [ + 'target', + 'onQueryChange', + 'onExecuteQuery', + ['events', { watchDepth: 'reference' }], + ['datasource', { watchDepth: 'reference' }], + ]); } diff --git a/public/app/plugins/datasource/stackdriver/annotations_query_ctrl.ts b/public/app/plugins/datasource/stackdriver/annotations_query_ctrl.ts index 4df035719a0..26a09e3d1fa 100644 --- a/public/app/plugins/datasource/stackdriver/annotations_query_ctrl.ts +++ b/public/app/plugins/datasource/stackdriver/annotations_query_ctrl.ts @@ -7,7 +7,7 @@ export class StackdriverAnnotationsQueryCtrl { constructor() { this.annotation.target = this.annotation.target || {}; - this.handleQueryChange = this.handleQueryChange.bind(this); + this.onQueryChange = this.onQueryChange.bind(this); react2AngularDirective('annotationQueryEditor', AnnotationQueryEditor, [ 'target', @@ -17,7 +17,7 @@ export class StackdriverAnnotationsQueryCtrl { ]); } - handleQueryChange(target) { + onQueryChange(target) { Object.assign(this.annotation.target, target); } } diff --git a/public/app/plugins/datasource/stackdriver/components/Aggregations.tsx b/public/app/plugins/datasource/stackdriver/components/Aggregations.tsx index 81da7aa128c..7ae0e506a0b 100644 --- a/public/app/plugins/datasource/stackdriver/components/Aggregations.tsx +++ b/public/app/plugins/datasource/stackdriver/components/Aggregations.tsx @@ -52,7 +52,7 @@ export class Aggregations extends React.Component { this.setState({ aggOptions }); } - handleToggleDisplayAdvanced() { + onToggleDisplayAdvanced() { this.setState(state => ({ displayAdvancedOptions: !state.displayAdvancedOptions, })); @@ -78,7 +78,7 @@ export class Aggregations extends React.Component {