Skip to content

Conversation

@CircuitCoder
Copy link

@CircuitCoder CircuitCoder commented Nov 8, 2025

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

  • Added a column mute: boolean to the device table.
  • For devices with mute = true, skip notification.
  • Added two endpoints: /device/:wwn/mute and /device/:wwn/unmute for setting the mute status in devices.
  • Implement the "Notification" entry in the device detail settings dialog.
  • Enable the settings dialog in wide screen.
  • Added a "mute" icon in the device detail page and dashboard card for muted devices.

Future works

Implementation presented in this PR has some shortcomings:

  • I'm rather new to Angular, so the handling of state updates are a little sloppy. Right now the following actions happens sequentially:
    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.
  • Alignment of the muted icon is incorrect with some page zooms. Ideally we'd want a icon-font with line-height as its means of vertical aligning, but that means we'll bundle a icon font.
  • Maybe instead of a device-wise mute, a attribute-wise mute is better?
  • There is no tests whatsoever

Screenshots

image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant