Updated Branches: refs/heads/trunk 5793ae2eb -> 3664d43ec
AMBARI-3693 [perf] Hosts UI should not load host_components unless editing a host, second patch. (atkach) Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/3664d43e Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/3664d43e Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/3664d43e Branch: refs/heads/trunk Commit: 3664d43ecb8b29b587519644db6e0ceabe83372b Parents: 5793ae2 Author: atkach <[email protected]> Authored: Tue Nov 5 16:58:07 2013 +0200 Committer: atkach <[email protected]> Committed: Tue Nov 5 16:58:07 2013 +0200 ---------------------------------------------------------------------- ambari-web/app/models/host.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/3664d43e/ambari-web/app/models/host.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/models/host.js b/ambari-web/app/models/host.js index 287d21b..59cc855 100644 --- a/ambari-web/app/models/host.js +++ b/ambari-web/app/models/host.js @@ -46,15 +46,14 @@ App.Host = DS.Model.extend({ cpuUsage: function () { if (this.get('cpuSystem') && this.get('cpu_user')) { - return (this.get('cpuSystem') + this.get('cpu_user')).toFixed(1); + return this.get('cpuSystem') + this.get('cpu_user'); } }.property('cpuSystem', 'cpuUser'), memoryUsage: function () { if (this.get('memFree') && this.get('memTotal')) { var memUsed = this.get('memTotal') - this.get('memFree'); - var memUsedPercent = (100 * memUsed) / this.get('memTotal'); - return memUsedPercent.toFixed(1); + return (100 * memUsed) / this.get('memTotal'); } }.property('memTotal', 'memFree'),
