Skip to content

Commit d08383d

Browse files
fcorneliusshamoon
andauthored
Remove field validation
Co-authored-by: shamoon <[email protected]>
1 parent 48d8f98 commit d08383d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/widgets/argocd/component.jsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ import useWidgetAPI from "utils/proxy/use-widget-api";
55
export default function Component({ service }) {
66
const { widget } = service;
77

8-
// Limits fields to available statuses
9-
const validFields = ["apps", "synced", "outOfSync", "healthy", "progressing", "degraded", "suspended", "missing"];
10-
widget.fields = widget.fields?.filter((field) => validFields.includes(field));
8+
if (!widget.fields) {
9+
widget.fields = ["apps", "synced", "outOfSync", "healthy"];
10+
}
1111

12-
// Limits max number of displayed fields
1312
const MAX_ALLOWED_FIELDS = 4;
1413
if (widget.fields?.length > MAX_ALLOWED_FIELDS) {
1514
widget.fields = widget.fields.slice(0, MAX_ALLOWED_FIELDS);

0 commit comments

Comments
 (0)