Merge pull request #15864 from ryantxu/all-data-as-table

Use TableData for all data in react
This commit is contained in:
Torkel Ödegaard
2019-03-20 09:15:06 +01:00
committed by GitHub
20 changed files with 165 additions and 158 deletions

View File

@@ -1,17 +1,18 @@
import _ from 'lodash';
import { Column, TableData } from '@grafana/ui';
interface Column {
text: string;
/**
* Extends the standard Column class with variables that get
* mutated in the angular table panel.
*/
interface MutableColumn extends Column {
title?: string;
type?: string;
sort?: boolean;
desc?: boolean;
filterable?: boolean;
unit?: string;
}
export default class TableModel {
columns: Column[];
export default class TableModel implements TableData {
columns: MutableColumn[];
rows: any[];
type: string;
columnMap: any;