ui: fix crypt mode caluclation
also include 'mixed' in the calculation of the overall mode of a snapshot and group Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
7ba2c1c386
commit
106603c58f
10
www/Utils.js
10
www/Utils.js
@ -34,8 +34,14 @@ Ext.define('PBS.Utils', {
|
||||
'lock',
|
||||
],
|
||||
|
||||
calculateCryptMode: function(signed, encrypted, files) {
|
||||
if (files === encrypted) {
|
||||
calculateCryptMode: function(data) {
|
||||
let mixed = data.mixed;
|
||||
let encrypted = data.encrypt;
|
||||
let signed = data['sign-only'];
|
||||
let files = data.count;
|
||||
if (mixed > 0) {
|
||||
return PBS.Utils.cryptmap.indexOf('mixed');
|
||||
} else if (files === encrypted) {
|
||||
return PBS.Utils.cryptmap.indexOf('encrypt');
|
||||
} else if (files === signed) {
|
||||
return PBS.Utils.cryptmap.indexOf('sign-only');
|
||||
|
Reference in New Issue
Block a user