From 0f1a4422f574e9ff9d3f87f6d23ce9465cd7bf43 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Fri, 30 Dec 2016 12:51:30 +0100 Subject: [PATCH] Add prettyMemory angular filter --- webadmin/src/js/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/webadmin/src/js/index.js b/webadmin/src/js/index.js index bef1858f7..44c9f2d8a 100644 --- a/webadmin/src/js/index.js +++ b/webadmin/src/js/index.js @@ -111,6 +111,13 @@ app.filter('prettyAppMessage', function () { }; }); +app.filter('prettyMemory', function () { + return function (memory) { + // Adjust the default memory limit if it changes + return memory ? Math.floor(memory / 1024 / 1024) : 256; + }; +}); + app.filter('installationActive', function () { return function(app) { if (app.installationState === ISTATES.ERROR) return false;