Refactor: rename SeriesData to DataFrame (#17854)

This commit is contained in:
Ryan McKinley
2019-07-01 12:00:29 -07:00
committed by GitHub
parent c9f4cf8b53
commit e7c3d0ed97
49 changed files with 231 additions and 231 deletions

View File

@@ -2,10 +2,10 @@
import React, { PureComponent } from 'react';
// Types
import { InputDatasource, describeSeriesData } from './InputDatasource';
import { InputDatasource, describeDataFrame } from './InputDatasource';
import { InputQuery, InputOptions } from './types';
import { FormLabel, Select, QueryEditorProps, SelectOptionItem, SeriesData, TableInputCSV, toCSV } from '@grafana/ui';
import { FormLabel, Select, QueryEditorProps, SelectOptionItem, DataFrame, TableInputCSV, toCSV } from '@grafana/ui';
type Props = QueryEditorProps<InputDatasource, InputQuery, InputOptions>;
@@ -31,7 +31,7 @@ export class InputQueryEditor extends PureComponent<Props, State> {
onSourceChange = (item: SelectOptionItem<string>) => {
const { datasource, query, onChange, onRunQuery } = this.props;
let data: SeriesData[] | undefined = undefined;
let data: DataFrame[] | undefined = undefined;
if (item.value === 'panel') {
if (query.data) {
return;
@@ -51,7 +51,7 @@ export class InputQueryEditor extends PureComponent<Props, State> {
onRunQuery();
};
onSeriesParsed = (data: SeriesData[], text: string) => {
onSeriesParsed = (data: DataFrame[], text: string) => {
const { query, onChange, onRunQuery } = this.props;
this.setState({ text });
if (!data) {
@@ -80,10 +80,10 @@ export class InputQueryEditor extends PureComponent<Props, State> {
<div className="btn btn-link">
{query.data ? (
describeSeriesData(query.data)
describeDataFrame(query.data)
) : (
<a href={`datasources/edit/${id}/`}>
{name}: {describeSeriesData(datasource.data)} &nbsp;&nbsp;
{name}: {describeDataFrame(datasource.data)} &nbsp;&nbsp;
<i className="fa fa-pencil-square-o" />
</a>
)}