From b9f47be83ccfb463e62a8f66ccaefd582869be1f Mon Sep 17 00:00:00 2001 From: Oleksii Orel Date: Mon, 5 Sep 2016 17:18:51 +0300 Subject: [PATCH] change basic measurement unit for RAM after model changed Signed-off-by: Oleksii Orel --- .../che-workspace-ram-allocation-slider.controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboard/src/app/workspaces/workspace-ram-slider/che-workspace-ram-allocation-slider.controller.js b/dashboard/src/app/workspaces/workspace-ram-slider/che-workspace-ram-allocation-slider.controller.js index 18a7517056d..d8a5538893c 100644 --- a/dashboard/src/app/workspaces/workspace-ram-slider/che-workspace-ram-allocation-slider.controller.js +++ b/dashboard/src/app/workspaces/workspace-ram-slider/che-workspace-ram-allocation-slider.controller.js @@ -27,7 +27,7 @@ export class CheWorkspaceRamAllocationSliderController { $scope.$watch(() => { return this.ngModel; }, () => { - this.inputVal = this.init(this.ngModel / 1024); + this.inputVal = this.init(this.ngModel / Math.pow(1024,3)); }); } @@ -47,7 +47,7 @@ export class CheWorkspaceRamAllocationSliderController { if (!this.inputVal) { return; } - this.ngModel = this.inputVal * 1024; + this.ngModel = this.inputVal * Math.pow(1024,3); this.$timeout(() => { this.cheOnChange();