Closed ajhollid closed 6 days ago
The StatusService
class in Server/service/statusService.js
has been updated to include a new method, getStatusString
, which translates boolean status values into string representations: "up", "down", and "unknown". The existing updateStatus
method now utilizes this new method for logging status changes, enhancing clarity without altering the overall structure or logic of the class. Correspondingly, a new test suite has been added in Server/tests/services/statusService.test.js
to validate the behavior of getStatusString
.
File | Change Summary |
---|---|
Server/service/statusService.js |
Added method getStatusString to convert boolean status to strings; updated updateStatus to use this method for logging. |
Server/tests/services/statusService.test.js |
Introduced a new test suite for getStatusString with three test cases for different input values. |
StatusService
, specifically modifying the buildCheck
method to accommodate changes in the payload structure.StatusService
to handle a new hardware check schema.Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
This PR improves status string generation for monitor status chagnes. Previously if a monitor went from an unknown state to a down state the logger would log "monitor went from down to down".
Now the logger will correctly log "monitor went from unknown to down"