From c7f2314a15e69f73cdcc3e11faa93849149f0ee0 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Wed, 1 Apr 2020 16:42:20 -0700 Subject: [PATCH] add note that memory is 1024 based --- src/js/index.js | 2 +- src/views/graphs.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/index.js b/src/js/index.js index 5cb7b2233..e206c1ab7 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -281,9 +281,9 @@ app.filter('prettyDomains', function () { }; }); +// we use 1024 unit in memory limit in manifest app.filter('prettyMemory', function () { return function (memory) { - // Adjust the default memory limit if it changes return memory ? Math.floor(memory / 1024 / 1024) : 256; }; }); diff --git a/src/views/graphs.js b/src/views/graphs.js index 07f1abf0b..09c9215ea 100644 --- a/src/views/graphs.js +++ b/src/views/graphs.js @@ -17,6 +17,7 @@ angular.module('Application').controller('GraphsController', ['$scope', '$locati $scope.installedApps = Client.getInstalledApps(); + // we use 1024 to match free -m output (which is not si units) function bytesToMegaBytes(value) { return (value/1024/1024).toFixed(2); }