mirror of https://github.com/buster-so/buster.git
push up logs
This commit is contained in:
parent
55db321904
commit
70d5b8925f
|
@ -3,7 +3,7 @@
|
||||||
import React, { useEffect, useMemo, useState } from 'react';
|
import React, { useEffect, useMemo, useState } from 'react';
|
||||||
import isEmpty from 'lodash/isEmpty';
|
import isEmpty from 'lodash/isEmpty';
|
||||||
import { BusterResizeableGrid, BusterResizeableGridRow } from '@/components/ui/grid';
|
import { BusterResizeableGrid, BusterResizeableGridRow } from '@/components/ui/grid';
|
||||||
import { useDebounceFn, useMemoizedFn } from '@/hooks';
|
import { useDebounceFn, useMemoizedFn, useWhyDidYouUpdate } from '@/hooks';
|
||||||
import {
|
import {
|
||||||
hasRemovedMetrics,
|
hasRemovedMetrics,
|
||||||
hasUnmappedMetrics,
|
hasUnmappedMetrics,
|
||||||
|
@ -56,6 +56,7 @@ export const DashboardContentController: React.FC<{
|
||||||
}, [remapMetrics, metrics, configRows]);
|
}, [remapMetrics, metrics, configRows]);
|
||||||
|
|
||||||
const dashboardRows = useMemo(() => {
|
const dashboardRows = useMemo(() => {
|
||||||
|
console.log('dashboardRows! rerender', rows);
|
||||||
return rows
|
return rows
|
||||||
.filter((row) => row.items.length > 0)
|
.filter((row) => row.items.length > 0)
|
||||||
.map((row) => {
|
.map((row) => {
|
||||||
|
@ -109,6 +110,19 @@ export const DashboardContentController: React.FC<{
|
||||||
}
|
}
|
||||||
}, [dashboard?.id, remapMetrics]);
|
}, [dashboard?.id, remapMetrics]);
|
||||||
|
|
||||||
|
useWhyDidYouUpdate('DashboardContentController', {
|
||||||
|
remapMetrics,
|
||||||
|
dashboard,
|
||||||
|
metrics,
|
||||||
|
dashboardRows,
|
||||||
|
readOnly,
|
||||||
|
numberOfMetrics,
|
||||||
|
rows,
|
||||||
|
chatId,
|
||||||
|
dashboardConfig,
|
||||||
|
configRows
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="dashboard-content-controller">
|
<div className="dashboard-content-controller">
|
||||||
{hasMetrics && !!dashboardRows.length && !!dashboard ? (
|
{hasMetrics && !!dashboardRows.length && !!dashboard ? (
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Card, CardHeader } from '@/components/ui/card/CardBase';
|
||||||
import { useDashboardMetric } from './useDashboardMetric';
|
import { useDashboardMetric } from './useDashboardMetric';
|
||||||
import { MetricTitle } from './MetricTitle';
|
import { MetricTitle } from './MetricTitle';
|
||||||
import { createBusterRoute, BusterRoutes } from '@/routes';
|
import { createBusterRoute, BusterRoutes } from '@/routes';
|
||||||
import { useMemoizedFn } from '@/hooks';
|
import { useMemoizedFn, useMount } from '@/hooks';
|
||||||
import { cn } from '@/lib/classMerge';
|
import { cn } from '@/lib/classMerge';
|
||||||
import { BusterChart } from '@/components/ui/charts/BusterChart';
|
import { BusterChart } from '@/components/ui/charts/BusterChart';
|
||||||
|
|
||||||
|
@ -70,6 +70,16 @@ const DashboardMetricItemBase: React.FC<{
|
||||||
setInitialAnimationEnded(metricId);
|
setInitialAnimationEnded(metricId);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
useMount(() => {
|
||||||
|
console.log('metricItem', {
|
||||||
|
metricLink,
|
||||||
|
isDragOverlay,
|
||||||
|
metricId,
|
||||||
|
dashboardId,
|
||||||
|
versionNumber
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
ref={conatinerRef}
|
ref={conatinerRef}
|
||||||
|
|
Loading…
Reference in New Issue