Sfoglia il codice sorgente

removed unused props from angular query component interface

Torkel Ödegaard 7 anni fa
parent
commit
3047579cdd

+ 1 - 7
public/app/features/dashboard/panel_editor/QueryEditorRow.tsx

@@ -43,7 +43,7 @@ export class QueryEditorRow extends PureComponent<Props, State> {
   }
   }
 
 
   getAngularQueryComponentScope(): AngularQueryComponentScope {
   getAngularQueryComponentScope(): AngularQueryComponentScope {
-    const { panel, onAddQuery, onMoveQuery, onRemoveQuery, query } = this.props;
+    const { panel, query } = this.props;
     const { datasource } = this.state;
     const { datasource } = this.state;
 
 
     return {
     return {
@@ -52,9 +52,6 @@ export class QueryEditorRow extends PureComponent<Props, State> {
       panel: panel,
       panel: panel,
       refresh: () => panel.refresh(),
       refresh: () => panel.refresh(),
       render: () => panel.render,
       render: () => panel.render,
-      addQuery: onAddQuery,
-      moveQuery: onMoveQuery,
-      removeQuery: onRemoveQuery,
       events: panel.events,
       events: panel.events,
     };
     };
   }
   }
@@ -234,9 +231,6 @@ export interface AngularQueryComponentScope {
   events: Emitter;
   events: Emitter;
   refresh: () => void;
   refresh: () => void;
   render: () => void;
   render: () => void;
-  removeQuery: (query: DataQuery) => void;
-  addQuery: (query?: DataQuery) => void;
-  moveQuery: (query: DataQuery, direction: number) => void;
   datasource: DataSourceApi;
   datasource: DataSourceApi;
   toggleEditorMode?: () => void;
   toggleEditorMode?: () => void;
   getCollapsedText?: () => string;
   getCollapsedText?: () => string;

+ 3 - 3
public/app/plugins/datasource/postgres/partials/query.editor.html

@@ -138,9 +138,9 @@
     <pre class="gf-form-pre alert alert-info">Time series:
     <pre class="gf-form-pre alert alert-info">Time series:
 - return column named <i>time</i> (UTC in seconds or timestamp)
 - return column named <i>time</i> (UTC in seconds or timestamp)
 - return column(s) with numeric datatype as values
 - return column(s) with numeric datatype as values
-Optional: 
-  - return column named <i>metric</i> to represent the series name. 
-  - If multiple value columns are returned the metric column is used as prefix. 
+Optional:
+  - return column named <i>metric</i> to represent the series name.
+  - If multiple value columns are returned the metric column is used as prefix.
   - If no column named metric is found the column name of the value column is used as series name
   - If no column named metric is found the column name of the value column is used as series name
 
 
 Resultsets of time series queries need to be sorted by time.
 Resultsets of time series queries need to be sorted by time.