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