From d08383d7592f8265ee2c648797c9bd6b8a37d484 Mon Sep 17 00:00:00 2001 From: Felix Cornelius <9767036+fcornelius@users.noreply.github.com> Date: Tue, 19 Nov 2024 22:34:47 +0100 Subject: [PATCH] Remove field validation Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com> --- src/widgets/argocd/component.jsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/widgets/argocd/component.jsx b/src/widgets/argocd/component.jsx index 2481576e9..39349f83b 100644 --- a/src/widgets/argocd/component.jsx +++ b/src/widgets/argocd/component.jsx @@ -5,11 +5,10 @@ import useWidgetAPI from "utils/proxy/use-widget-api"; export default function Component({ service }) { const { widget } = service; - // Limits fields to available statuses - const validFields = ["apps", "synced", "outOfSync", "healthy", "progressing", "degraded", "suspended", "missing"]; - widget.fields = widget.fields?.filter((field) => validFields.includes(field)); + if (!widget.fields) { + widget.fields = ["apps", "synced", "outOfSync", "healthy"]; + } - // Limits max number of displayed fields const MAX_ALLOWED_FIELDS = 4; if (widget.fields?.length > MAX_ALLOWED_FIELDS) { widget.fields = widget.fields.slice(0, MAX_ALLOWED_FIELDS);