@parca/profile 0.19.83 → 0.19.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/MatchersInput/index.d.ts +2 -34
- package/dist/MatchersInput/index.d.ts.map +1 -1
- package/dist/MatchersInput/index.js +14 -91
- package/dist/MetricsGraph/index.d.ts.map +1 -1
- package/dist/MetricsGraph/index.js +13 -1
- package/dist/ProfileMetricsGraph/index.d.ts.map +1 -1
- package/dist/ProfileMetricsGraph/index.js +6 -29
- package/dist/ProfileSelector/MetricsGraphSection.d.ts +2 -9
- package/dist/ProfileSelector/MetricsGraphSection.d.ts.map +1 -1
- package/dist/ProfileSelector/MetricsGraphSection.js +3 -38
- package/dist/ProfileSelector/index.d.ts +1 -29
- package/dist/ProfileSelector/index.d.ts.map +1 -1
- package/dist/ProfileSelector/index.js +14 -10
- package/dist/QueryControls/index.d.ts +46 -0
- package/dist/QueryControls/index.d.ts.map +1 -0
- package/dist/{ProfileSelector/QueryControls.js → QueryControls/index.js} +16 -13
- package/dist/SimpleMatchers/Select.js +1 -1
- package/dist/SimpleMatchers/index.d.ts +6 -10
- package/dist/SimpleMatchers/index.d.ts.map +1 -1
- package/dist/SimpleMatchers/index.js +30 -45
- package/dist/ViewMatchers/index.d.ts +0 -9
- package/dist/ViewMatchers/index.d.ts.map +1 -1
- package/dist/ViewMatchers/index.js +20 -12
- package/dist/contexts/LabelsQueryProvider.d.ts +35 -0
- package/dist/contexts/LabelsQueryProvider.d.ts.map +1 -0
- package/dist/contexts/LabelsQueryProvider.js +70 -0
- package/dist/contexts/UnifiedLabelsContext.d.ts +37 -0
- package/dist/contexts/UnifiedLabelsContext.d.ts.map +1 -0
- package/dist/contexts/UnifiedLabelsContext.js +88 -0
- package/dist/contexts/utils.d.ts +10 -0
- package/dist/contexts/utils.d.ts.map +1 -0
- package/dist/contexts/utils.js +31 -0
- package/dist/hooks/useLabels.d.ts +23 -0
- package/dist/hooks/useLabels.d.ts.map +1 -0
- package/dist/hooks/useLabels.js +75 -0
- package/dist/hooks/useQueryState.d.ts +2 -0
- package/dist/hooks/useQueryState.d.ts.map +1 -1
- package/dist/hooks/useQueryState.js +19 -12
- package/dist/index.d.ts +9 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -3
- package/dist/styles.css +1 -1
- package/dist/useSumBy.js +1 -1
- package/package.json +2 -2
- package/src/MatchersInput/index.tsx +17 -163
- package/src/MetricsGraph/index.tsx +17 -1
- package/src/ProfileMetricsGraph/index.tsx +17 -98
- package/src/ProfileSelector/MetricsGraphSection.tsx +14 -115
- package/src/ProfileSelector/index.tsx +114 -109
- package/src/{ProfileSelector/QueryControls.tsx → QueryControls/index.tsx} +76 -84
- package/src/SimpleMatchers/Select.tsx +1 -1
- package/src/SimpleMatchers/index.tsx +46 -84
- package/src/ViewMatchers/index.tsx +22 -30
- package/src/contexts/LabelsQueryProvider.tsx +142 -0
- package/src/contexts/UnifiedLabelsContext.tsx +155 -0
- package/src/contexts/utils.ts +43 -0
- package/src/hooks/useLabels.ts +121 -0
- package/src/hooks/useQueryState.ts +26 -15
- package/src/index.tsx +29 -3
- package/src/useSumBy.ts +1 -1
- package/dist/MetricsGraph/UtilizationMetrics/Throughput.d.ts +0 -29
- package/dist/MetricsGraph/UtilizationMetrics/Throughput.d.ts.map +0 -1
- package/dist/MetricsGraph/UtilizationMetrics/Throughput.js +0 -175
- package/dist/MetricsGraph/UtilizationMetrics/index.d.ts +0 -28
- package/dist/MetricsGraph/UtilizationMetrics/index.d.ts.map +0 -1
- package/dist/MetricsGraph/UtilizationMetrics/index.js +0 -186
- package/dist/ProfileSelector/QueryControls.d.ts +0 -43
- package/dist/ProfileSelector/QueryControls.d.ts.map +0 -1
- package/dist/contexts/MatchersInputLabelsContext.d.ts +0 -29
- package/dist/contexts/MatchersInputLabelsContext.d.ts.map +0 -1
- package/dist/contexts/MatchersInputLabelsContext.js +0 -79
- package/dist/contexts/SimpleMatchersLabelContext.d.ts +0 -25
- package/dist/contexts/SimpleMatchersLabelContext.d.ts.map +0 -1
- package/dist/contexts/SimpleMatchersLabelContext.js +0 -115
- package/dist/contexts/UtilizationLabelsContext.d.ts +0 -15
- package/dist/contexts/UtilizationLabelsContext.d.ts.map +0 -1
- package/dist/contexts/UtilizationLabelsContext.js +0 -25
- package/src/MetricsGraph/UtilizationMetrics/Throughput.tsx +0 -405
- package/src/MetricsGraph/UtilizationMetrics/index.tsx +0 -426
- package/src/contexts/MatchersInputLabelsContext.tsx +0 -141
- package/src/contexts/SimpleMatchersLabelContext.tsx +0 -189
- package/src/contexts/UtilizationLabelsContext.tsx +0 -45
|
@@ -1,405 +0,0 @@
|
|
|
1
|
-
// Copyright 2022 The Parca Authors
|
|
2
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
// you may not use this file except in compliance with the License.
|
|
4
|
-
// You may obtain a copy of the License at
|
|
5
|
-
//
|
|
6
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
//
|
|
8
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
// See the License for the specific language governing permissions and
|
|
12
|
-
// limitations under the License.
|
|
13
|
-
|
|
14
|
-
import {useMemo} from 'react';
|
|
15
|
-
|
|
16
|
-
import {Icon} from '@iconify/react';
|
|
17
|
-
import {AnimatePresence, motion} from 'framer-motion';
|
|
18
|
-
|
|
19
|
-
import {
|
|
20
|
-
DateTimeRange,
|
|
21
|
-
MetricsGraphSkeleton,
|
|
22
|
-
TextWithTooltip,
|
|
23
|
-
useParcaContext,
|
|
24
|
-
} from '@parca/components';
|
|
25
|
-
import {formatDate, timePattern, valueFormatter} from '@parca/utilities';
|
|
26
|
-
|
|
27
|
-
import {type UtilizationMetrics as MetricSeries} from '../../ProfileSelector';
|
|
28
|
-
import MetricsGraph, {type ContextMenuItemOrSubmenu, type Series} from '../index';
|
|
29
|
-
import {useMetricsGraphDimensions} from '../useMetricsGraphDimensions';
|
|
30
|
-
|
|
31
|
-
interface NetworkLabel {
|
|
32
|
-
name: string;
|
|
33
|
-
value: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
interface NetworkSeries {
|
|
37
|
-
metric: NetworkLabel[];
|
|
38
|
-
values: number[][];
|
|
39
|
-
labelset: string;
|
|
40
|
-
isReceive?: boolean;
|
|
41
|
-
isSelected?: boolean;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
interface CommonProps {
|
|
45
|
-
transmitData: MetricSeries[];
|
|
46
|
-
receiveData: MetricSeries[];
|
|
47
|
-
addLabelMatcher: (
|
|
48
|
-
labels: {key: string; value: string} | Array<{key: string; value: string}>
|
|
49
|
-
) => void;
|
|
50
|
-
setTimeRange: (range: DateTimeRange) => void;
|
|
51
|
-
name: string;
|
|
52
|
-
humanReadableName: string;
|
|
53
|
-
from: number;
|
|
54
|
-
to: number;
|
|
55
|
-
selectedSeries?: Array<{key: string; value: string}>;
|
|
56
|
-
onSeriesClick?: (name: string, seriesIndex: number) => void;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
type RawAreaChartProps = CommonProps & {
|
|
60
|
-
transformedData: Series[];
|
|
61
|
-
width: number;
|
|
62
|
-
height: number;
|
|
63
|
-
margin: number;
|
|
64
|
-
contextMenuItems?: ContextMenuItemOrSubmenu[];
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
type Props = CommonProps & {
|
|
68
|
-
utilizationMetricsLoading?: boolean;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
const transformUtilizationLabels = (label: string): string => {
|
|
72
|
-
return label.replace('attributes.', '').replace('attributes_resource.', '');
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
const createThroughputContextMenuItems = (
|
|
76
|
-
addLabelMatcher: (
|
|
77
|
-
labels: {key: string; value: string} | Array<{key: string; value: string}>
|
|
78
|
-
) => void,
|
|
79
|
-
transmitData: MetricSeries[],
|
|
80
|
-
receiveData: MetricSeries[]
|
|
81
|
-
): ContextMenuItemOrSubmenu[] => {
|
|
82
|
-
const allData = [...transmitData, ...receiveData];
|
|
83
|
-
|
|
84
|
-
return [
|
|
85
|
-
{
|
|
86
|
-
id: 'focus-on-single-series',
|
|
87
|
-
label: 'Focus only on this series',
|
|
88
|
-
icon: 'ph:star',
|
|
89
|
-
onClick: (closestPoint, _series) => {
|
|
90
|
-
if (
|
|
91
|
-
closestPoint != null &&
|
|
92
|
-
allData.length > 0 &&
|
|
93
|
-
allData[closestPoint.seriesIndex] != null
|
|
94
|
-
) {
|
|
95
|
-
const originalSeriesData = allData[closestPoint.seriesIndex];
|
|
96
|
-
if (originalSeriesData.labelset?.labels != null) {
|
|
97
|
-
const labels = originalSeriesData.labelset.labels.filter(
|
|
98
|
-
label => label.name !== '__name__'
|
|
99
|
-
);
|
|
100
|
-
const labelsToAdd = labels.map(label => ({
|
|
101
|
-
key: label.name,
|
|
102
|
-
value: label.value,
|
|
103
|
-
}));
|
|
104
|
-
addLabelMatcher(labelsToAdd);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
id: 'add-to-query',
|
|
111
|
-
label: 'Add to query',
|
|
112
|
-
icon: 'material-symbols:add',
|
|
113
|
-
createDynamicItems: (closestPoint, _series) => {
|
|
114
|
-
if (
|
|
115
|
-
closestPoint == null ||
|
|
116
|
-
allData.length === 0 ||
|
|
117
|
-
allData[closestPoint.seriesIndex] == null
|
|
118
|
-
) {
|
|
119
|
-
return [
|
|
120
|
-
{
|
|
121
|
-
id: 'no-labels-available',
|
|
122
|
-
label: 'No labels available',
|
|
123
|
-
icon: 'ph:warning',
|
|
124
|
-
disabled: () => true,
|
|
125
|
-
onClick: () => {}, // No-op for disabled item
|
|
126
|
-
},
|
|
127
|
-
];
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
const originalSeriesData = allData[closestPoint.seriesIndex];
|
|
131
|
-
if (originalSeriesData.labelset?.labels == null) {
|
|
132
|
-
return [
|
|
133
|
-
{
|
|
134
|
-
id: 'no-labels-available',
|
|
135
|
-
label: 'No labels available',
|
|
136
|
-
icon: 'ph:warning',
|
|
137
|
-
disabled: () => true,
|
|
138
|
-
onClick: () => {}, // No-op for disabled item
|
|
139
|
-
},
|
|
140
|
-
];
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
const labels = originalSeriesData.labelset.labels.filter(
|
|
144
|
-
label => label.name !== '__name__'
|
|
145
|
-
);
|
|
146
|
-
|
|
147
|
-
return labels.map(label => ({
|
|
148
|
-
id: `add-label-${label.name}`,
|
|
149
|
-
label: (
|
|
150
|
-
<div className="mr-3 inline-block rounded-lg bg-gray-200 px-2 py-1 text-xs font-bold text-gray-700 dark:bg-gray-700 dark:text-gray-300">
|
|
151
|
-
{`${transformUtilizationLabels(label.name)}="${label.value}"`}
|
|
152
|
-
</div>
|
|
153
|
-
),
|
|
154
|
-
onClick: () => {
|
|
155
|
-
addLabelMatcher({
|
|
156
|
-
key: label.name,
|
|
157
|
-
value: label.value,
|
|
158
|
-
});
|
|
159
|
-
},
|
|
160
|
-
}));
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
];
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
interface MetricsSample {
|
|
167
|
-
timestamp: number;
|
|
168
|
-
value: number;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
function transformToSeries(data: MetricSeries[], isReceive = false): NetworkSeries[] {
|
|
172
|
-
const series: NetworkSeries[] = data.reduce<NetworkSeries[]>(function (
|
|
173
|
-
agg: NetworkSeries[],
|
|
174
|
-
s: MetricSeries
|
|
175
|
-
) {
|
|
176
|
-
if (s.labelset !== undefined) {
|
|
177
|
-
const metric = s.labelset.labels.sort((a, b) => a.name.localeCompare(b.name));
|
|
178
|
-
agg.push({
|
|
179
|
-
metric,
|
|
180
|
-
values: s.samples.reduce<number[][]>(function (agg: number[][], d: MetricsSample) {
|
|
181
|
-
if (d.timestamp !== undefined && d.value !== undefined) {
|
|
182
|
-
// Multiply receive values by -1 to display below zero
|
|
183
|
-
const value = isReceive ? -1 * d.value : d.value;
|
|
184
|
-
agg.push([d.timestamp, value]);
|
|
185
|
-
}
|
|
186
|
-
return agg;
|
|
187
|
-
}, []),
|
|
188
|
-
labelset: metric.map(m => `${m.name}=${m.value}`).join(','),
|
|
189
|
-
isReceive,
|
|
190
|
-
isSelected: s.isSelected,
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
return agg;
|
|
194
|
-
},
|
|
195
|
-
[]);
|
|
196
|
-
|
|
197
|
-
// Sort values by timestamp for each series
|
|
198
|
-
return series.map(series => ({
|
|
199
|
-
...series,
|
|
200
|
-
values: series.values.sort((a, b) => a[0] - b[0]),
|
|
201
|
-
}));
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
function transformNetworkSeriesToSeries(
|
|
205
|
-
transmitData: MetricSeries[],
|
|
206
|
-
receiveData: MetricSeries[]
|
|
207
|
-
): Series[] {
|
|
208
|
-
const transmitSeries = transformToSeries(transmitData);
|
|
209
|
-
const receiveSeries = transformToSeries(receiveData, true);
|
|
210
|
-
const allSeries = [...transmitSeries, ...receiveSeries];
|
|
211
|
-
|
|
212
|
-
return allSeries.map(networkSeries => {
|
|
213
|
-
const labels = networkSeries.metric ?? [];
|
|
214
|
-
const sortedLabels = labels
|
|
215
|
-
.filter(label => label.name !== '__name__')
|
|
216
|
-
.sort((a, b) => a.name.localeCompare(b.name));
|
|
217
|
-
const labelString = sortedLabels.map(label => `${label.name}=${label.value}`).join(',');
|
|
218
|
-
const id =
|
|
219
|
-
(networkSeries.isReceive === true ? 'receive-' : 'transmit-') +
|
|
220
|
-
(labelString !== '' ? labelString : 'default');
|
|
221
|
-
|
|
222
|
-
return {
|
|
223
|
-
id,
|
|
224
|
-
values: networkSeries.values.map(([timestamp, value]): [number, number] => [
|
|
225
|
-
timestamp,
|
|
226
|
-
value,
|
|
227
|
-
]),
|
|
228
|
-
highlighted: networkSeries.isSelected ?? false,
|
|
229
|
-
};
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
const RawAreaChart = ({
|
|
234
|
-
transmitData,
|
|
235
|
-
receiveData,
|
|
236
|
-
transformedData,
|
|
237
|
-
addLabelMatcher: _addLabelMatcher,
|
|
238
|
-
setTimeRange,
|
|
239
|
-
width,
|
|
240
|
-
height,
|
|
241
|
-
margin,
|
|
242
|
-
humanReadableName,
|
|
243
|
-
from,
|
|
244
|
-
to,
|
|
245
|
-
selectedSeries: _selectedSeries,
|
|
246
|
-
onSeriesClick,
|
|
247
|
-
contextMenuItems,
|
|
248
|
-
}: RawAreaChartProps): JSX.Element => {
|
|
249
|
-
const {timezone} = useParcaContext();
|
|
250
|
-
|
|
251
|
-
// Compute original series data for rich tooltip
|
|
252
|
-
const allOriginalData = useMemo(
|
|
253
|
-
() => [...transmitData, ...receiveData],
|
|
254
|
-
[transmitData, receiveData]
|
|
255
|
-
);
|
|
256
|
-
|
|
257
|
-
return (
|
|
258
|
-
<MetricsGraph
|
|
259
|
-
data={transformedData}
|
|
260
|
-
from={from}
|
|
261
|
-
to={to}
|
|
262
|
-
setTimeRange={setTimeRange}
|
|
263
|
-
onSampleClick={closestPoint => {
|
|
264
|
-
if (onSeriesClick != null) {
|
|
265
|
-
onSeriesClick(humanReadableName, closestPoint.seriesIndex);
|
|
266
|
-
}
|
|
267
|
-
}}
|
|
268
|
-
yAxisLabel={humanReadableName}
|
|
269
|
-
yAxisUnit="bytes_per_second"
|
|
270
|
-
width={width}
|
|
271
|
-
height={height}
|
|
272
|
-
margin={margin}
|
|
273
|
-
contextMenuItems={contextMenuItems}
|
|
274
|
-
renderTooltipContent={(seriesIndex: number, pointIndex: number) => {
|
|
275
|
-
if (allOriginalData?.[seriesIndex]?.samples?.[pointIndex] != null) {
|
|
276
|
-
const originalSeriesData = allOriginalData[seriesIndex];
|
|
277
|
-
const originalPoint = allOriginalData[seriesIndex].samples[pointIndex];
|
|
278
|
-
|
|
279
|
-
const labels = originalSeriesData.labelset?.labels ?? [];
|
|
280
|
-
const nameLabel = labels.find(e => e.name === '__name__');
|
|
281
|
-
const highlightedNameLabel = nameLabel ?? {name: '', value: ''};
|
|
282
|
-
|
|
283
|
-
// Determine if this is receive data (negative values)
|
|
284
|
-
const isReceive = seriesIndex >= transmitData.length;
|
|
285
|
-
const valuePrefix = isReceive ? 'Receive ' : 'Transmit ';
|
|
286
|
-
|
|
287
|
-
return (
|
|
288
|
-
<div className="flex flex-row">
|
|
289
|
-
<div className="ml-2 mr-6">
|
|
290
|
-
<span className="font-semibold">{highlightedNameLabel.value}</span>
|
|
291
|
-
<span className="my-2 block text-gray-700 dark:text-gray-300">
|
|
292
|
-
<table className="table-auto">
|
|
293
|
-
<tbody>
|
|
294
|
-
<tr>
|
|
295
|
-
<td className="w-1/4">{valuePrefix}Value</td>
|
|
296
|
-
<td className="w-3/4">
|
|
297
|
-
{valueFormatter(Math.abs(originalPoint.value), 'bytes_per_second', 2)}
|
|
298
|
-
</td>
|
|
299
|
-
</tr>
|
|
300
|
-
<tr>
|
|
301
|
-
<td className="w-1/4">At</td>
|
|
302
|
-
<td className="w-3/4">
|
|
303
|
-
{formatDate(
|
|
304
|
-
new Date(originalPoint.timestamp),
|
|
305
|
-
timePattern(timezone as string),
|
|
306
|
-
timezone
|
|
307
|
-
)}
|
|
308
|
-
</td>
|
|
309
|
-
</tr>
|
|
310
|
-
</tbody>
|
|
311
|
-
</table>
|
|
312
|
-
</span>
|
|
313
|
-
<span className="my-2 block text-gray-500">
|
|
314
|
-
{labels
|
|
315
|
-
.filter(label => label.name !== '__name__')
|
|
316
|
-
.map(label => (
|
|
317
|
-
<div
|
|
318
|
-
key={`${seriesIndex.toString()}-${pointIndex.toString()}-${label.name}`}
|
|
319
|
-
className="mr-3 inline-block rounded-lg bg-gray-200 px-2 py-1 text-xs font-bold text-gray-700 dark:bg-gray-700 dark:text-gray-400"
|
|
320
|
-
>
|
|
321
|
-
<TextWithTooltip
|
|
322
|
-
text={`${transformUtilizationLabels(label.name)}="${label.value}"`}
|
|
323
|
-
maxTextLength={37}
|
|
324
|
-
id={`${seriesIndex.toString()}-${pointIndex.toString()}-tooltip-${
|
|
325
|
-
label.name
|
|
326
|
-
}`}
|
|
327
|
-
/>
|
|
328
|
-
</div>
|
|
329
|
-
))}
|
|
330
|
-
</span>
|
|
331
|
-
<div className="flex w-full items-center gap-1 text-xs text-gray-500">
|
|
332
|
-
<Icon icon="iconoir:mouse-button-right" />
|
|
333
|
-
<div>Right click to add labels to query.</div>
|
|
334
|
-
</div>
|
|
335
|
-
</div>
|
|
336
|
-
</div>
|
|
337
|
-
);
|
|
338
|
-
}
|
|
339
|
-
return null;
|
|
340
|
-
}}
|
|
341
|
-
/>
|
|
342
|
-
);
|
|
343
|
-
};
|
|
344
|
-
|
|
345
|
-
const AreaChart = ({
|
|
346
|
-
transmitData,
|
|
347
|
-
receiveData,
|
|
348
|
-
addLabelMatcher,
|
|
349
|
-
setTimeRange,
|
|
350
|
-
utilizationMetricsLoading,
|
|
351
|
-
name,
|
|
352
|
-
humanReadableName,
|
|
353
|
-
from,
|
|
354
|
-
to,
|
|
355
|
-
selectedSeries,
|
|
356
|
-
onSeriesClick,
|
|
357
|
-
}: Props): JSX.Element => {
|
|
358
|
-
const {isDarkMode} = useParcaContext();
|
|
359
|
-
const {width, height, margin, heightStyle} = useMetricsGraphDimensions(false, true);
|
|
360
|
-
|
|
361
|
-
const transformedData = useMemo(
|
|
362
|
-
() => transformNetworkSeriesToSeries(transmitData, receiveData),
|
|
363
|
-
[transmitData, receiveData]
|
|
364
|
-
);
|
|
365
|
-
|
|
366
|
-
const contextMenuItems = useMemo(() => {
|
|
367
|
-
return createThroughputContextMenuItems(addLabelMatcher, transmitData, receiveData);
|
|
368
|
-
}, [addLabelMatcher, transmitData, receiveData]);
|
|
369
|
-
|
|
370
|
-
return (
|
|
371
|
-
<AnimatePresence>
|
|
372
|
-
<motion.div
|
|
373
|
-
className="w-full relative"
|
|
374
|
-
key="area-chart-graph-loaded"
|
|
375
|
-
initial={false}
|
|
376
|
-
animate={{display: 'block', opacity: 1}}
|
|
377
|
-
transition={{duration: 0.5}}
|
|
378
|
-
>
|
|
379
|
-
{utilizationMetricsLoading === true ? (
|
|
380
|
-
<MetricsGraphSkeleton heightStyle={heightStyle} isDarkMode={isDarkMode} isMini={true} />
|
|
381
|
-
) : (
|
|
382
|
-
<RawAreaChart
|
|
383
|
-
transmitData={transmitData}
|
|
384
|
-
receiveData={receiveData}
|
|
385
|
-
transformedData={transformedData}
|
|
386
|
-
addLabelMatcher={addLabelMatcher}
|
|
387
|
-
setTimeRange={setTimeRange}
|
|
388
|
-
width={width}
|
|
389
|
-
height={height}
|
|
390
|
-
margin={margin}
|
|
391
|
-
name={name}
|
|
392
|
-
humanReadableName={humanReadableName}
|
|
393
|
-
from={from}
|
|
394
|
-
to={to}
|
|
395
|
-
selectedSeries={selectedSeries}
|
|
396
|
-
onSeriesClick={onSeriesClick}
|
|
397
|
-
contextMenuItems={contextMenuItems}
|
|
398
|
-
/>
|
|
399
|
-
)}
|
|
400
|
-
</motion.div>
|
|
401
|
-
</AnimatePresence>
|
|
402
|
-
);
|
|
403
|
-
};
|
|
404
|
-
|
|
405
|
-
export default AreaChart;
|