Commit 9e647590 by David Kaltschmidt

Review feedback, increased height

parent ff67213b
......@@ -645,7 +645,7 @@ export class Explore extends React.PureComponent<ExploreProps, ExploreState> {
)}
{supportsTable && showingTable ? (
<div className="panel-container">
<Table className="m-t-3" data={tableResult} loading={loading} onClickCell={this.onClickTableCell} />
<Table data={tableResult} loading={loading} onClickCell={this.onClickTableCell} />
</div>
) : null}
{supportsLogs && showingLogs ? <Logs data={logsResult} loading={loading} /> : null}
......
......@@ -7,7 +7,6 @@ import TableModel from 'app/core/table_model';
const EMPTY_TABLE = new TableModel();
interface TableProps {
className?: string;
data: TableModel;
loading: boolean;
onClickCell?: (columnKey: string, rowValue: string) => void;
......@@ -17,7 +16,7 @@ function prepareRows(rows, columnNames) {
return rows.map(cells => _.zipObject(columnNames, cells));
}
export default class Table extends PureComponent<TableProps, {}> {
export default class Table extends PureComponent<TableProps> {
getCellProps = (state, rowInfo, column) => {
return {
onClick: () => {
......@@ -38,6 +37,7 @@ export default class Table extends PureComponent<TableProps, {}> {
show: text !== 'Time',
Cell: row => <span className={filterable ? 'link' : ''}>{row.value}</span>,
}));
const noDataText = data ? 'The queries returned no data for a table.' : '';
return (
<ReactTable
......@@ -46,8 +46,9 @@ export default class Table extends PureComponent<TableProps, {}> {
getTdProps={this.getCellProps}
loading={loading}
minRows={0}
noDataText="No data returned from query."
noDataText={noDataText}
resolveData={data => prepareRows(data, columnNames)}
showPagination={data}
/>
);
}
......
// vendor
// DEPENDENCIES
@import '../../node_modules/react-table/react-table.css';
// VENDOR
@import '../vendor/css/timepicker.css';
@import '../vendor/css/spectrum.css';
@import '../vendor/css/rc-cascader.scss';
@import '../vendor/css/react-table.css';
// MIXINS
@import 'mixins/mixins';
......
......@@ -111,15 +111,6 @@
.link {
text-decoration: underline;
}
// React table
.explore-table-wrapper {
margin-top: 2 * $panel-margin;
}
.rt-tr .rt-td:last-child {
text-align: right;
}
}
.explore + .explore {
......@@ -201,6 +192,8 @@
.ReactTable {
border: none;
// Allow some space for the no-data text
min-height: 120px;
}
.ReactTable .rt-thead.-header {
......@@ -247,3 +240,6 @@
.ReactTable .-loading > div {
color: $input-color;
}
.ReactTable .rt-tr .rt-td:last-child {
text-align: right;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment