Add prettyMemory angular filter

This commit is contained in:
Johannes Zellner
2016-12-30 12:51:30 +01:00
parent 7d06f9e1e3
commit 0f1a4422f5

View File

@@ -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;