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