Fix Product UID loading and add manual Device UID configuration#214
Fix Product UID loading and add manual Device UID configuration#214
Conversation
- Updated /api/clients route to handle both /api/clients and /api/clients?... for better compatibility - Fixed loadServerSettings() to handle empty Product UID gracefully with clear error messages - Added manual Device UID input field to allow sending config to any device - Changed fetch endpoint to /api/clients?summary=1 for consistency Co-authored-by: dorkmo <1923070+dorkmo@users.noreply.github.com>
- Updated loadConfigIntoForm() to handle empty Product UID with error styling - Added manual Device UID input field after Product UID field - Modified submitConfig() to use manual UID when provided - Added manualDeviceUid to els object for easy access - Shows clear warning "⚠ Not configured - set in Server Settings" when Product UID is empty Co-authored-by: dorkmo <1923070+dorkmo@users.noreply.github.com>
|
@copilot the new config generator page was showing the correct product uid. Maybe there is another problem? |
You're correct - the Config Generator page ( The original issue mentioned "the product UID in the Client configuration section shows 'Loading...'" which refers to the Client Console page ( The difference:
The fix I made was specifically to the Client Console's Should I also apply similar error handling to the Config Generator page for consistency? |
Client configuration page showed "Loading..." indefinitely when Product UID was unconfigured. No mechanism existed to configure devices not yet reporting to server.
Changes
API Route Flexibility
/api/clientsroute matching from exact?summary=1to any query params/api/clientsand/api/clients?summary=1patternsProduct UID Error Handling
loadConfigIntoForm()now handles empty Product UID with visual warningManual Device UID Override
submitConfig()prioritizes manual UID:const uid = manualUid || state.selectedExample Usage
All changes in
TankAlarm-112025-Server-BluesOpta.ino- embedded HTML/JS in CLIENT_CONSOLE_HTML constant.Original prompt
Created from VS Code.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.