ui: adapt for new sign-only crypt mode
we can now show 'none', 'encprypted', 'signed' or 'mixed' for the crypt mode also adds a different icon for signed files, and adds a hint that signatures cannot be verified on the server Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
4459ffe30e
commit
2774566b03
33
www/Utils.js
33
www/Utils.js
@ -13,6 +13,39 @@ Ext.define('PBS.Utils', {
|
||||
|
||||
dataStorePrefix: 'DataStore-',
|
||||
|
||||
cryptmap: [
|
||||
'none',
|
||||
'mixed',
|
||||
'sign-only',
|
||||
'encrypt',
|
||||
],
|
||||
|
||||
cryptText: [
|
||||
Proxmox.Utils.noText,
|
||||
gettext('Mixed'),
|
||||
gettext('Signed'),
|
||||
gettext('Encrypted'),
|
||||
],
|
||||
|
||||
cryptIconCls: [
|
||||
'',
|
||||
'',
|
||||
'certificate',
|
||||
'lock',
|
||||
],
|
||||
|
||||
calculateCryptMode: function(signed, encrypted, files) {
|
||||
if (files === encrypted) {
|
||||
return PBS.Utils.cryptmap.indexOf('encrypt');
|
||||
} else if (files === signed) {
|
||||
return PBS.Utils.cryptmap.indexOf('sign-only');
|
||||
} else if ((signed+encrypted) === 0) {
|
||||
return PBS.Utils.cryptmap.indexOf('none');
|
||||
} else {
|
||||
return PBS.Utils.cryptmap.indexOf('mixed');
|
||||
}
|
||||
},
|
||||
|
||||
getDataStoreFromPath: function(path) {
|
||||
return path.slice(PBS.Utils.dataStorePrefix.length);
|
||||
},
|
||||
|
Reference in New Issue
Block a user