diff --git a/webui/react-ui/src/pages/AgentStatus.jsx b/webui/react-ui/src/pages/AgentStatus.jsx index 74c91ca..8cf635b 100644 --- a/webui/react-ui/src/pages/AgentStatus.jsx +++ b/webui/react-ui/src/pages/AgentStatus.jsx @@ -54,6 +54,23 @@ function AgentStatus() { }; }, [name]); + // Helper function to safely convert any value to a displayable string + const formatValue = (value) => { + if (value === null || value === undefined) { + return 'N/A'; + } + + if (typeof value === 'object') { + try { + return JSON.stringify(value, null, 2); + } catch (err) { + return '[Complex Object]'; + } + } + + return String(value); + }; + if (loading) { return (