Skip to content

Commit

Permalink
Put metrics graphs in 2 columns
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed Feb 9, 2023
1 parent 6035940 commit b650bff
Showing 1 changed file with 30 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,35 @@ function Graphs({ cpu: [cpu], mem: [mem] }) {
{ cpuValues: convertVals(cpu.values), memValues: convertVals(mem.values) }), [cpu, mem])

return (
<>
<Div
height={280}
marginVertical="large"
<Flex
gap="large"
grow={1}
height={320}
padding="large"
>
<Flex
direction="column"
grow={1}
>
<GraphHeader title="Overall CPU Usage" />
<Graph
data={[{ id: 'cpu', data: cpuValues }]}
yFormat={undefined}
tickRotation={undefined}
/>
</Div>
<Div
height={280}
marginVertical="large"
</Flex>
<Flex
direction="column"
grow={1}
>
<GraphHeader title="Overall Memory Usage" />
<Graph
data={[{ id: 'memory', data: memValues }]}
yFormat={filesize}
tickRotation={undefined}
/>
</Div>
</>
</Flex>
</Flex>
)
}

Expand All @@ -55,30 +60,35 @@ function PodGraphs({ cpu, mem }) {
}, [cpu, mem])

return (
<>
<Div
height={280}
marginVertical="large"
<Flex
gap="large"
grow={1}
height={320}
padding="large"
>
<Flex
direction="column"
grow={1}
>
<GraphHeader title="Pod CPU Usage" />
<Graph
data={cpuGraph}
yFormat={undefined}
tickRotation={undefined}
/>
</Div>
<Div
height={280}
marginVertical="large"
</Flex>
<Flex
direction="column"
grow={1}
>
<GraphHeader title="Pod Memory Usage" />
<Graph
data={memGraph}
yFormat={filesize}
tickRotation={undefined}
/>
</Div>
</>
</Flex>
</Flex>
)
}

Expand Down

0 comments on commit b650bff

Please sign in to comment.