Implement device-wise notification mute/unmute #822
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Muting notification for a certain device may be helpful in certain cases, such as when a degraded drive is waiting for replacement. This PR adds the backend and frontend changes for muting a device.
It's a pleasant surprise that a setting dialog containing a "notification" entry in the device detail page is already present. This PR reuse that dialog.
Changes
mute: booleanto thedevicetable.mute = true, skip notification./device/:wwn/muteand/device/:wwn/unmutefor setting the mute status in devices.Future works
Implementation presented in this PR has some shortcomings:
The dialog closes. -> Send update request -> Refresh drive data
One may see some opportunity for races here. However races does not introduce any inconsistency state, so no additional locking is done in this PR.
line-heightas its means of vertical aligning, but that means we'll bundle a icon font.Screenshots