Explorar o código

AMBARI-3693 [perf] Hosts UI should not load host_components unless editing a host, second patch. (atkach)

atkach %!s(int64=11) %!d(string=hai) anos
pai
achega
3664d43ecb
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      ambari-web/app/models/host.js

+ 2 - 3
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'),