fix(ui) - MemoryConsumption avg value as per the API change

This commit is contained in:
Shekar Siri 2022-07-05 10:34:01 +02:00
parent afbe10b27d
commit f918be7124

View file

@ -15,6 +15,8 @@ interface Props {
function MemoryConsumption(props: Props) {
const { data, metric } = props;
const gradientDef = Styles.gradientDef();
// covert the data to mb
const avgValue = Math.round(data.value / 1024 / 1024);
return (
<NoContent
@ -23,7 +25,7 @@ function MemoryConsumption(props: Props) {
>
<>
<div className="flex items-center justify-end mb-3">
<AvgLabel text="Avg" unit="mb" className="ml-3" count={data.avgUsedJsHeapSize} />
<AvgLabel text="Avg" unit="mb" className="ml-3" count={avgValue} />
</div>
<ResponsiveContainer height={ 207 } width="100%">
<AreaChart