Skip to content

Commit

Permalink
FIx: glances containers header position (#4496)
Browse files Browse the repository at this point in the history
  • Loading branch information
shamoon authored Dec 26, 2024
1 parent f717e59 commit e4d42b5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/widgets/glances/metrics/containers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,24 @@ export default function Component({ service }) {
}

data.splice(chart ? 5 : 1);
let headerYPosition = "top-4";
let listYPosition = "bottom-4";
if (chart) {
headerYPosition = "-top-6";
listYPosition = "-top-3";
}

return (
<Container chart={chart}>
<Block position="top-4 right-3 left-3">
<Block position={`${headerYPosition} right-3 left-3`}>
<div className="flex items-center text-xs">
<div className="grow" />
<div className="w-14 text-right italic">{t("resources.cpu")}</div>
<div className="w-14 text-right">{t("resources.mem")}</div>
</div>
</Block>

<Block position="bottom-4 right-3 left-3">
<Block position={`${listYPosition} right-3 left-3`}>
<div className="pointer-events-none text-theme-900 dark:text-theme-200">
{data.map((item) => (
<div key={item[idKey]} className="text-[0.75rem] h-[0.8rem]">
Expand Down

0 comments on commit e4d42b5

Please sign in to comment.