From 18abb87cbbabbbef980b875166d072b8031c57d4 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Mon, 14 Jan 2019 18:23:01 +0100 Subject: [PATCH] stackdriver: small fixes after reactifying --- public/app/core/angular_wrappers.ts | 8 ++++---- .../stackdriver/components/Aggregations.tsx | 8 ++++---- .../datasource/stackdriver/components/AliasBy.tsx | 11 +++-------- .../stackdriver/components/AlignmentPeriods.tsx | 2 +- .../datasource/stackdriver/components/Alignments.tsx | 2 +- .../stackdriver/components/AnnotationQueryEditor.tsx | 6 +++--- .../datasource/stackdriver/components/Help.tsx | 12 ++++++------ .../datasource/stackdriver/components/Metrics.tsx | 12 ++++++------ .../stackdriver/components/QueryEditor.tsx | 6 +++--- .../stackdriver/partials/annotations.editor.html | 4 ++-- .../stackdriver/partials/query.editor.html | 4 ++-- 11 files changed, 35 insertions(+), 40 deletions(-) diff --git a/public/app/core/angular_wrappers.ts b/public/app/core/angular_wrappers.ts index 7c87fbecc02..65eb68966ff 100644 --- a/public/app/core/angular_wrappers.ts +++ b/public/app/core/angular_wrappers.ts @@ -1,6 +1,6 @@ import { react2AngularDirective } from 'app/core/utils/react2angular'; -import { QueryEditor } from 'app/plugins/datasource/stackdriver/components/QueryEditor'; -import { AnnotationQueryEditor } from 'app/plugins/datasource/stackdriver/components/AnnotationQueryEditor'; +import { QueryEditor as StackdriverQueryEditor } from 'app/plugins/datasource/stackdriver/components/QueryEditor'; +import { AnnotationQueryEditor as StackdriverAnnotationQueryEditor } from 'app/plugins/datasource/stackdriver/components/AnnotationQueryEditor'; import { PasswordStrength } from './components/PasswordStrength'; import PageHeader from './components/PageHeader/PageHeader'; import EmptyListCTA from './components/EmptyListCTA/EmptyListCTA'; @@ -41,7 +41,7 @@ export function registerAngularDirectives() { 'placeholder', ['variables', { watchDepth: 'reference' }], ]); - react2AngularDirective('queryEditor', QueryEditor, [ + react2AngularDirective('stackdriverQueryEditor', StackdriverQueryEditor, [ 'target', 'onQueryChange', 'onExecuteQuery', @@ -49,7 +49,7 @@ export function registerAngularDirectives() { ['datasource', { watchDepth: 'reference' }], ['templateSrv', { watchDepth: 'reference' }], ]); - react2AngularDirective('annotationQueryEditor', AnnotationQueryEditor, [ + react2AngularDirective('stackdriverAnnotationQueryEditor', StackdriverAnnotationQueryEditor, [ 'target', 'onQueryChange', 'onExecuteQuery', diff --git a/public/app/plugins/datasource/stackdriver/components/Aggregations.tsx b/public/app/plugins/datasource/stackdriver/components/Aggregations.tsx index 7ae0e506a0b..d20c70ca72d 100644 --- a/public/app/plugins/datasource/stackdriver/components/Aggregations.tsx +++ b/public/app/plugins/datasource/stackdriver/components/Aggregations.tsx @@ -52,11 +52,11 @@ export class Aggregations extends React.Component { this.setState({ aggOptions }); } - onToggleDisplayAdvanced() { + onToggleDisplayAdvanced = () => { this.setState(state => ({ displayAdvancedOptions: !state.displayAdvancedOptions, })); - } + }; render() { const { displayAdvancedOptions, aggOptions } = this.state; @@ -68,7 +68,7 @@ export class Aggregations extends React.Component {
onChange(value)} + onChange={onChange} value={crossSeriesReducer} variables={templateSrv.variables} options={aggOptions} @@ -78,7 +78,7 @@ export class Aggregations extends React.Component {