Browse code

bm-cli index info : fix ratio

Arnaud Aujon Chevallier authored on 13/05/2019 08:10:33
Showing 1 changed files
... ...
@@ -63,13 +63,13 @@ public class MailboxInfoCommand extends SingleOrDomainOperation {
63 63
 		JsonObject userJson = new JsonObject();
64 64
 		userJson.putString("email", de.value.email);
65 65
 
66
-		long ESQuota = (long) getESQuota(de.uid) / 1024; // to KiB
67
-		userJson.putNumber("ESQuota", ESQuota);
68
-		long ImapQuota = (long) getImapQuota(domainUid, de);
69
-		userJson.putNumber("IMAPQuota", ImapQuota);
66
+		long esQuota = (long) getESQuota(de.uid) / 1024; // to KiB
67
+		userJson.putNumber("ESQuotaKiB", esQuota);
68
+		long imapQuota = (long) getImapQuota(domainUid, de);
69
+		userJson.putNumber("IMAPQuotaKiB", imapQuota);
70 70
 
71
-		if (ImapQuota != 0) {
72
-			userJson.putNumber("ratio", (ImapQuota / ESQuota * 100));
71
+		if (imapQuota != 0) {
72
+			userJson.putNumber("ratio", (esQuota / imapQuota * 100));
73 73
 		}
74 74
 
75 75
 		ctx.info(userJson.encode());