mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Refactor: rename SeriesData to DataFrame (#17854)
This commit is contained in:
@@ -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)}
|
||||
{name}: {describeDataFrame(datasource.data)}
|
||||
<i className="fa fa-pencil-square-o" />
|
||||
</a>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user