From feb05a1df5b4851b73abef5b03c7c00c7b9caed4 Mon Sep 17 00:00:00 2001 From: findthelorax Date: Tue, 21 Apr 2026 09:53:09 -0400 Subject: [PATCH] updated node modal with consistent casing for type and check method following standard conventions --- frontend/src/components/modals/NodeModal.tsx | 25 ++++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/modals/NodeModal.tsx b/frontend/src/components/modals/NodeModal.tsx index 5caa1cd..bcb61d0 100644 --- a/frontend/src/components/modals/NodeModal.tsx +++ b/frontend/src/components/modals/NodeModal.tsx @@ -1,4 +1,4 @@ -import { createElement, useState } from 'react' +import { createElement, Fragment, useState } from 'react' import { RotateCcw, ChevronDown } from 'lucide-react' import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog' import { Button } from '@/components/ui/button' @@ -18,6 +18,17 @@ const NODE_TYPE_GROUPS: { label: string; types: NodeType[] }[] = [ const CHECK_METHODS: CheckMethod[] = ['none', 'ping', 'http', 'https', 'tcp', 'ssh', 'prometheus', 'health'] +const CHECK_METHOD_LABELS: Record = { + none: 'None', + ping: 'Ping', + http: 'HTTP', + https: 'HTTPS', + tcp: 'TCP', + ssh: 'SSH', + prometheus: 'Prometheus', + health: 'Health', +} + const DEFAULT_DATA: Partial = { type: 'server', label: '', @@ -76,13 +87,13 @@ export function NodeModal({ open, onClose, onSubmit, initial, title = 'Add Node' @@ -221,11 +232,11 @@ export function NodeModal({ open, onClose, onSubmit, initial, title = 'Add Node'