ui: lower default density to 35, fix table card display

This commit is contained in:
nick-delirium 2024-12-24 15:17:59 +01:00
parent 1397cace53
commit e719a1bdc0
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
3 changed files with 5 additions and 3 deletions

View file

@ -17,7 +17,7 @@ interface Props {
function CardSessionsByList({ list, selected, paginated, onClickHandler = () => null, metric, total }: Props) {
const { dashboardStore, metricStore, sessionStore } = useStore();
const drillDownPeriod = dashboardStore.drillDownPeriod;
const params = { density: 70 };
const params = { density: 35 };
const metricParams = { ...params };
const [loading, setLoading] = React.useState(false);
const data = paginated ? metric?.data[0]?.values : list;

View file

@ -513,12 +513,14 @@ function WidgetChart(props: Props) {
return <div>Unknown metric type</div>;
}, [data, compData, enabledRows, _metric]);
const showTable = _metric.metricType === TIMESERIES && (props.isPreview || _metric.viewType === TABLE)
return (
<div ref={ref}>
<Loader loading={loading} style={{ height: `240px` }}>
<div style={{ minHeight: props.isPreview ? undefined : 240 }}>
{renderChart()}
{props.isPreview && _metric.metricType === TIMESERIES ? (
{showTable ? (
<WidgetDatatable
defaultOpen={true}
isTableView={_metric.viewType === 'table'}

View file

@ -85,7 +85,7 @@ export default class Widget {
page: number = 1;
limit: number = 20;
thumbnail?: string;
params: any = {density: 70};
params: any = {density: 35};
startType: string = 'start';
startPoint: FilterItem = new FilterItem(filtersMap[FilterKey.LOCATION]);
excludes: FilterItem[] = [];