TableData: support name (#16983)

This commit is contained in:
Ryan McKinley 2019-05-09 10:29:24 -07:00 committed by GitHub
parent d4a35213e1
commit 30bf9bf00f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -70,6 +70,7 @@ export interface Column {
}
export interface TableData extends QueryResultBase {
name?: string;
columns: Column[];
rows: any[][];
}

View File

@ -19,6 +19,7 @@ function convertTableToSeriesData(table: TableData): SeriesData {
rows: table.rows,
refId: table.refId,
meta: table.meta,
name: table.name,
};
}

View File

@ -78,6 +78,7 @@ export class TestDataDatasource implements DataSourceApi<TestDataQuery> {
for (const t of results.tables || []) {
const table = t as TableData;
table.refId = query.refId;
table.name = query.alias;
data.push(table);
}