浏览代码

remove segment srv prop

Erik Sundell 7 年之前
父节点
当前提交
8a916757d7

+ 0 - 1
public/app/plugins/datasource/stackdriver/angular_wrappers.ts

@@ -7,7 +7,6 @@ export function registerAngularDirectives() {
     'onQueryChange',
     'onExecuteQuery',
     ['events', { watchDepth: 'reference' }],
-    ['uiSegmentSrv', { watchDepth: 'reference' }],
     ['datasource', { watchDepth: 'reference' }],
   ]);
 }

+ 0 - 1
public/app/plugins/datasource/stackdriver/components/Filter.tsx

@@ -12,7 +12,6 @@ export interface Props {
   metricType: string;
   templateSrv: any;
   target: Target;
-  uiSegmentSrv: any;
   datasource: any;
 }
 

+ 1 - 3
public/app/plugins/datasource/stackdriver/components/QueryEditor.tsx

@@ -17,7 +17,6 @@ export interface Props {
   target: Target;
   events: any;
   datasource: any;
-  uiSegmentSrv: any;
 }
 
 interface State extends Target {
@@ -129,7 +128,7 @@ export class QueryEditor extends React.Component<Props, State> {
       lastQuery,
       lastQueryError,
     } = this.state;
-    const { datasource, uiSegmentSrv } = this.props;
+    const { datasource } = this.props;
 
     return (
       <React.Fragment>
@@ -146,7 +145,6 @@ export class QueryEditor extends React.Component<Props, State> {
                 filtersChanged={value => this.handleChange('filters', value)}
                 groupBysChanged={value => this.handleChange('groupBys', value)}
                 target={this.state}
-                uiSegmentSrv={uiSegmentSrv}
                 templateSrv={datasource.templateSrv}
                 datasource={datasource}
                 metricType={metric ? metric.type : ''}

+ 0 - 1
public/app/plugins/datasource/stackdriver/partials/query.editor.html

@@ -5,6 +5,5 @@
     datasource="ctrl.datasource"
     on-query-change="(ctrl.handleQueryChange)"
     on-execute-query="(ctrl.handleExecuteQuery)"
-    ui-segment-srv="ctrl.uiSegmentSrv"
   ></query-editor>
 </query-editor-row>

+ 1 - 3
public/app/plugins/datasource/stackdriver/query_ctrl.ts

@@ -8,12 +8,10 @@ import { Target } from './types';
 
 export class StackdriverQueryCtrl extends QueryCtrl {
   static templateUrl = 'partials/query.editor.html';
-  uiSegmentSrv: any;
 
   /** @ngInject */
-  constructor($scope, $injector, uiSegmentSrv) {
+  constructor($scope, $injector) {
     super($scope, $injector);
-    this.uiSegmentSrv = uiSegmentSrv;
     react2AngularDirective('stackdriverPicker', StackdriverPicker, [
       'options',
       'onChange',