ui: utils: add overrides for known notification metadata fields/values

This mechanism allows having nice, translatable notification event
types and fields.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Gabriel Goller <g.goller@proxmox.com>
Reviewed-by: Gabriel Goller <g.goller@proxmox.com>
Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Lukas Wagner 2024-04-23 13:52:18 +02:00 committed by Thomas Lamprecht
parent 8dc47a5774
commit ee4b6cf18b

View File

@ -435,6 +435,23 @@ Ext.define('PBS.Utils', {
zfscreate: [gettext('ZFS Storage'), gettext('Create')], zfscreate: [gettext('ZFS Storage'), gettext('Create')],
}); });
Proxmox.Utils.overrideNotificationFieldName({
'datastore': gettext('Datastore'),
'job-id': gettext('Job ID'),
'media-pool': gettext('Media Pool'),
});
Proxmox.Utils.overrideNotificationFieldValue({
'acme': gettext('ACME certificate renewal'),
'gc': gettext('Garbage collection'),
'package-updates': gettext('Package updates are available'),
'prune': gettext('Prune job'),
'sync': gettext('Sync job'),
'tape-backup': gettext('Tape backup notifications'),
'tape-load': gettext('Tape loading request'),
'verify': gettext('Verification job'),
});
Proxmox.Schema.overrideAuthDomains({ Proxmox.Schema.overrideAuthDomains({
pbs: { pbs: {
name: 'Proxmox Backup authentication server', name: 'Proxmox Backup authentication server',