forked from AnalogJ/scrutiny
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
backendBackend/Go relatedBackend/Go relatedenhancementNew feature or requestNew feature or requestfrontendFrontend/Angular relatedFrontend/Angular relatedpriority:mediumMedium priorityMedium priority
Milestone
Description
Feature Request
Environment
- Affected: Production / Dev / Both
- Component: Backend, Frontend
- Upstream ref: [FEAT] Add the ability to reset device status on demand AnalogJ/scrutiny#354
Description
When a device is marked as "failed" (due to misconfiguration, transient SMART errors, or threshold false positives), the status persists until the next SMART collection shows all attributes passing. Users currently have no way to manually acknowledge or reset a device's failed status from the UI.
Current Behavior
- Device status is set to failed when SMART thresholds are exceeded
- Status auto-resets only when the next
POST /api/device/:wwn/smartupload shows all attributes passing - Between collections (which may be hours apart), the device stays red with no way to clear it
- The only workaround is direct database manipulation per the troubleshooting docs
What We Already Have
ResetDeviceStatus()method exists inwebapp/backend/pkg/database/scrutiny_repository_device.go:73-87- Auto-reset logic in
webapp/backend/pkg/web/handler/upload_device_metrics.go:71-80 - The database method works correctly (uses map-based GORM update to handle zero-value, commit
31dfd4a)
What's Missing
- No API endpoint to trigger reset on demand
- No frontend button or menu option
- No handler connecting the API to the existing database method
Proposed Implementation
Backend
- Add route:
POST /api/device/:wwn/reset-statusinserver.go - Create handler
webapp/backend/pkg/web/handler/reset_device_status.gothat calls the existingResetDeviceStatus()method - Return updated device status in response
Frontend
- Add "Reset Status" option to the device detail page action menu (alongside Archive, Delete, Mute)
- Add corresponding service method in
detail.service.ts - Only show when device status is failed (no point resetting a passing device)
Acceptance Criteria
-
POST /api/device/:wwn/reset-statusendpoint resets device to passed status - UI button/menu item available on device detail page when device is failed
- Button is hidden or disabled when device is already passing
- Status updates immediately in the UI after reset
- Dashboard reflects the reset status
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
backendBackend/Go relatedBackend/Go relatedenhancementNew feature or requestNew feature or requestfrontendFrontend/Angular relatedFrontend/Angular relatedpriority:mediumMedium priorityMedium priority