-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
[enhancement]: Show system updates less often (unable to clear packageUpdate notification) #2864
Comments
Looks like the admin is running |
We could persist the current updates in a state or object and if nothing changed, do not re-generate + always re-generate on controller restart? Or yes if written in state anyway we could use ts (if we only write when generating notification) to determine that last notification is (maybe) 7 days old or changed -> generate notification. |
Sounds good, since that state already exists:
And there is also another bug, that the state is not set to an empty list when the system has been updated: ioBroker.js-controller/packages/controller/src/main.ts Lines 5726 to 5729 in 67b3039
|
e.g. /**
* Check for updatable OS packages and register them as notification
*/
async function listUpdatableOsPackages(): Promise<void> {
if (tools.isDocker()) {
return;
}
const packManager = new PacketManager();
await packManager.ready();
const packages = await packManager.listUpgradeablePackages();
const osPackageUpdatesId = `${hostObjectPrefix}.osPackageUpdates`;
if (!packages.length) {
await notificationHandler.clearNotifications('system', 'packageUpdates', `system.host.${hostname}`);
await states!.setState(osPackageUpdatesId, { val: JSON.stringify([]), ack: true });
} else {
const osPackageUpdatesState = await states!.getState(osPackageUpdatesId);
const packagesJson = JSON.stringify(packages);
if (!osPackageUpdatesState || osPackageUpdatesState.val !== packagesJson) {
await notificationHandler.addMessage('system', 'packageUpdates', packages.join('\n'), `system.host.${hostname}`);
await states!.setState(osPackageUpdatesId, { val: packagesJson, ack: true });
}
}
} |
Can we please also exclude system updates that were kept back? I'm annoyed to see the notification about debian version every time I open the page in browser. It also would be good if we could turn off these notifications completely. I update the server whenever I want to. Why do I need ioBroker to annoy me with this? |
You can turn them off, simply use the notification manager adapter and no notifications will "annoy" you if configured. |
take a look at adapter iobroker.notification-manager |
I will, thanks. But anyway, it would be cool if "Aknowledge" button simply allowed to mark specific notification as read. |
That is what this issue is about, after PR is merged it will only be re-generated if new updates are available the user was not informed about eralier and likely this will relax the whole situation around people being annoyed on every admin reload by the notification + newest admin version should no longer auto open the notifications on reload if no warning is present. |
No existing issues.
Description
At the moment, every
getRepository
orupgradeOsPackages
host message leads to a new notification:ioBroker.js-controller/packages/controller/src/main.ts
Lines 2190 to 2194 in 67b3039
ioBroker.js-controller/packages/controller/src/main.ts
Lines 2988 to 2992 in 67b3039
ioBroker.js-controller/packages/controller/src/main.ts
Lines 5724 to 5732 in 67b3039
So there's a new notification every day (if the repo has changed) - even if the notification has been confirmed already.
Why?
I'm doing updates about once a week. So I cannot remove that notification for a few days. When using admin 7.0.23 it is not possible to remove those notifications:
Looks like the notifications are cleared correctly (
system.host.iobroker.notifications.system
is{}
afterwards) but a page reload re-generates the notification:{"packageUpdates":{"count":1}}
How?
No response
The text was updated successfully, but these errors were encountered: