mirror of
https://github.com/taylanbakircioglu/haproxy-openmanager.git
synced 2026-09-16 23:55:13 +00:00
27fbe48c4b
A self-hosted agent could fail every heartbeat with HTTP 400 `Invalid JSON: Expecting property name enclosed in double quotes` when the system-info block it collects came back empty on an unusual host. The agent builds the heartbeat JSON as text, so an empty `$system_info` collapsed the `$system_info,` line to a bare comma and broke the payload. - Agent script (linux + macos, kept in sync): guard the fragment-form register_agent and send_heartbeat builders so an empty system_info falls back to a valid key and can never emit a bare comma. Uses the most portable bash glob test (no POSIX class / pattern substitution; verified on bash 3.2-5.2 and on Ubuntu/Debian/Rocky/Alpine/Amazon Linux). True no-op for healthy agents. - Backend heartbeat endpoint: parse the body as-is first and only run the malformed-JSON repair when parsing fails, so a valid heartbeat from any agent version is byte-for-byte untouched. The repair (now a testable helper) recovers a leading or doubled comma (the empty-system_info artifact) in addition to the existing empty-value / trailing-comma fixes. No agent version bump; self-upgrade and daemon mode are unaffected. Healthy agents of every version behave identically. Full backend suite green. Addresses #31.
59 lines
1.5 KiB
JSON
59 lines
1.5 KiB
JSON
{
|
|
"name": "haproxy-openmanager-frontend",
|
|
"version": "1.8.3",
|
|
"description": "HAProxy Load Balancer Management UI",
|
|
"license": "AGPL-3.0-or-later",
|
|
"dependencies": {
|
|
"react": "^18.2.0",
|
|
"react-dom": "^18.2.0",
|
|
"react-router-dom": "^6.8.0",
|
|
"axios": "^1.16.0",
|
|
"antd": "^5.2.0",
|
|
"@ant-design/icons": "^5.0.0",
|
|
"recharts": "^2.5.0",
|
|
"moment": "^2.29.0",
|
|
"react18-json-view": "^0.2.9",
|
|
"monaco-editor": "^0.36.0",
|
|
"@monaco-editor/react": "^4.6.0",
|
|
"react-ace": "^10.1.0",
|
|
"ace-builds": "^1.23.4",
|
|
"react-window": "^1.8.10",
|
|
"qrcode.react": "^4.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/react": "^18.0.0",
|
|
"@types/react-dom": "^18.0.0",
|
|
"react-scripts": "5.0.1",
|
|
"typescript": "^4.9.0",
|
|
"@testing-library/react": "^13.4.0",
|
|
"@testing-library/jest-dom": "^5.16.4",
|
|
"@testing-library/user-event": "^14.4.3",
|
|
"@babel/plugin-proposal-private-property-in-object": "^7.21.0"
|
|
},
|
|
"scripts": {
|
|
"start": "react-scripts start",
|
|
"build": "react-scripts build",
|
|
"test": "react-scripts test",
|
|
"eject": "react-scripts eject"
|
|
},
|
|
|
|
"eslintConfig": {
|
|
"extends": [
|
|
"react-app",
|
|
"react-app/jest"
|
|
]
|
|
},
|
|
"browserslist": {
|
|
"production": [
|
|
">0.2%",
|
|
"not dead",
|
|
"not op_mini all"
|
|
],
|
|
"development": [
|
|
"last 1 chrome version",
|
|
"last 1 firefox version",
|
|
"last 1 safari version"
|
|
]
|
|
},
|
|
"proxy": "http://backend:8000"
|
|
} |