-
Notifications
You must be signed in to change notification settings - Fork 29
Add more state pictograms #1271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/state-pictogram-tooltips
Are you sure you want to change the base?
Add more state pictograms #1271
Conversation
Now also add pictograms to state ball in the following cases: - Disabled active checks - Disabled notifications
7d04cb3 to
4c6da51
Compare
| if ($icon === null) { | ||
| if (! $item->notifications_enabled) { | ||
| $icon = new Icon(Icons::NO_NOTIFICATIONS, ['title' => $this->translate('Notifications disabled')]); | ||
| } elseif (! $item->active_checks_enabled) { | ||
| $icon = new Icon(Icons::NO_ACTIVE_CHECKS, ['title' => $this->translate('Active checks disabled')]); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These icons are still missing in the specific column view list (e.g., URL: icingadb/hosts?columns=name). These should be added to the State::getIcon() method to cover all use cases.
| if (! $item->active_checks_enabled) { | ||
| $statusIcons->addHtml( | ||
| new Icon('eye-slash', ['title' => $this->translate('Active checks disabled')]) | ||
| new Icon(Icons::NO_ACTIVE_CHECKS, ['title' => $this->translate('Active checks disabled')]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be consistent with other icons in the footer and improve accessibility, please add Host/service '%s' has active checks disabled.
| if (! $item->notifications_enabled) { | ||
| $statusIcons->addHtml( | ||
| new Icon('bell-slash', ['title' => $this->translate('Notifications disabled')]) | ||
| new Icon(Icons::NO_NOTIFICATIONS, ['title' => $this->translate('Notifications disabled')]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be consistent with other icons in the footer and improve accessibility, please add Host/service '%s' has notifications disabled.
| const NO_NOTIFICATIONS = 'bell-slash'; | ||
|
|
||
| const NO_ACTIVE_CHECKS = 'eye-slash'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest using NOTIFICATIONS_DISABLED | ACTIVE_CHECKS_DISABLED, as it fits better and describes the variable more clearly.
Now also add pictograms to state ball in the following cases:
If both active checks and notifications are disabled, the “notifications disabled” icon is shown. This is because results may still arrive from passive checks, but they cannot trigger notifications when notifications are disabled.
Resolves #1097