mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-17 14:55:25 +00:00
fix legend
This commit is contained in:
parent
355fe215a3
commit
924cf01d95
@ -42,7 +42,7 @@ export default function topoLegend(
|
||||
.map((d: any) => `${d.name} ${d.condition} ${d.value}`)
|
||||
.join(" and ");
|
||||
return item === "CUBEERROR"
|
||||
? config
|
||||
? config && config.length
|
||||
? `Unhealthy (${str})`
|
||||
: "Unhealthy"
|
||||
: "Healthy";
|
||||
|
@ -55,11 +55,10 @@ export default (d3: any, graph: any, funcs: any, tip: any, legend: any) => {
|
||||
}
|
||||
let c = true;
|
||||
for (const l of legend) {
|
||||
const val = l.name.includes("_sla") ? d[l.name] / 100 : d[l.name];
|
||||
if (l.condition === "<") {
|
||||
c = c && val < Number(l.value);
|
||||
c = c && d[l.name] < Number(l.value);
|
||||
} else {
|
||||
c = c && val > Number(l.value);
|
||||
c = c && d[l.name] > Number(l.value);
|
||||
}
|
||||
}
|
||||
return c && d.isReal ? icons.CUBEERROR : icons.CUBE;
|
||||
|
Loading…
Reference in New Issue
Block a user