Compare commits

...

2 Commits

Author SHA1 Message Date
shamoon
96431c6085 Chore: warn and dont fail for invalid services (#4468) 2024-12-21 19:26:02 -08:00
shamoon
f64aa50cc0 Fix: metric heights in 0.10.x (#4467) 2024-12-21 19:14:00 -08:00
2 changed files with 6 additions and 2 deletions

View File

@@ -25,6 +25,10 @@ function parseServicesToGroups(services) {
const serviceGroupServices = [];
serviceGroup[name].forEach((entries) => {
const entryName = Object.keys(entries)[0];
if (!entries[entryName]) {
logger.warn(`Error parsing service "${entryName}" from config. Ensure required fields are present.`);
return;
}
if (Array.isArray(entries[entryName])) {
groups = groups.concat(parseServicesToGroups([{ [entryName]: entries[entryName] }]));
} else {

View File

@@ -18,10 +18,10 @@ export default function Container({ children, widget, error = null, chart = true
}
return (
<div className={classNames("service-container relative", chart ? "h-[120px]" : "")}>
<div className={classNames("service-container", chart ? "chart relative h-[120px]" : "")}>
{children}
<div className={`absolute top-0 right-0 bottom-0 left-0 overflow-clip pointer-events-none ${className}`} />
{chart && <div className="chart h-[68px] overflow-clip" />}
{chart && <div className="h-[68px] overflow-clip" />}
{!chart && <div className="h-[16px] overflow-clip" />}
</div>
);