diff --git a/src/views/dashboard/configuration/widget/graph-styles/components/ContentDecorations.vue b/src/views/dashboard/configuration/widget/graph-styles/components/ContentDecorations.vue index 4931e65a..a8493563 100644 --- a/src/views/dashboard/configuration/widget/graph-styles/components/ContentDecorations.vue +++ b/src/views/dashboard/configuration/widget/graph-styles/components/ContentDecorations.vue @@ -66,9 +66,6 @@ limitations under the License. --> if (!keys.value.length) { return; } - if (!keys.value[index]) { - return; - } delete decorations.value[keys.value[index]]; keys.value.splice(index, 1); updateConfig({ decorations: decorations.value }); diff --git a/src/views/dashboard/graphs/Card.vue b/src/views/dashboard/graphs/Card.vue index f921a1c5..2b79e31d 100644 --- a/src/views/dashboard/graphs/Card.vue +++ b/src/views/dashboard/graphs/Card.vue @@ -72,14 +72,14 @@ limitations under the License. --> let withinRange = false; const ranges = k.match(regex)?.map(Number) || []; if (k.startsWith("[")) { - withinRange = k.startsWith("[-∞") ? true : Number(singleVal.value) >= ranges[0]; + withinRange = k.startsWith("[-∞") || Number(singleVal.value) >= ranges[0]; } else { - withinRange = k.startsWith("(-∞") ? true : Number(singleVal.value) > ranges[0]; + withinRange = k.startsWith("(-∞") || Number(singleVal.value) > ranges[0]; } if (k.endsWith("]")) { - withinRange = withinRange && (k.endsWith("+∞]") ? true : Number(singleVal.value) <= (ranges[1] || ranges[0])); + withinRange = withinRange && (k.endsWith("+∞]") || Number(singleVal.value) <= (ranges[1] || ranges[0])); } else { - withinRange = withinRange && (k.endsWith("+∞)") ? true : Number(singleVal.value) < (ranges[1] || ranges[0])); + withinRange = withinRange && (k.endsWith("+∞)") || Number(singleVal.value) < (ranges[1] || ranges[0])); } console.log(withinRange); if (withinRange) { diff --git a/src/views/dashboard/graphs/Table.vue b/src/views/dashboard/graphs/Table.vue index 57f76886..93e048ed 100644 --- a/src/views/dashboard/graphs/Table.vue +++ b/src/views/dashboard/graphs/Table.vue @@ -88,14 +88,14 @@ limitations under the License. --> let withinRange = false; const ranges = k.match(regex)?.map(Number) || []; if (k.startsWith("[")) { - withinRange = k.startsWith("[-∞") ? true : Number(source) >= ranges[0]; + withinRange = k.startsWith("[-∞") || Number(source) >= ranges[0]; } else { - withinRange = k.startsWith("(-∞") ? true : Number(source) > ranges[0]; + withinRange = k.startsWith("(-∞") || Number(source) > ranges[0]; } if (k.endsWith("]")) { - withinRange = withinRange && (k.endsWith("+∞]") ? true : Number(source) <= (ranges[1] || ranges[0])); + withinRange = withinRange && (k.endsWith("+∞]") || Number(source) <= (ranges[1] || ranges[0])); } else { - withinRange = withinRange && (k.endsWith("+∞)") ? true : Number(source) < (ranges[1] || ranges[0])); + withinRange = withinRange && (k.endsWith("+∞)") || Number(source) < (ranges[1] || ranges[0])); } if (withinRange) { return decorations.value[i];