ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject [2/9] git commit: BUG-8208 Warn if the available space is less than 16 GB at the partition where rrd logs are being stored 3
Date Tue, 24 Sep 2013 12:06:28 GMT
BUG-8208 Warn if the available space is less than 16 GB at the partition where rrd logs are
being stored 3


Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/533d15cd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/533d15cd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/533d15cd

Branch: refs/heads/trunk
Commit: 533d15cd73112f9bd413288c90360ae0488ecb2e
Parents: 580d0aa
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Thu Aug 29 14:34:24 2013 +0300
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Tue Sep 24 14:26:57 2013 +0300

----------------------------------------------------------------------
 .../app/controllers/wizard/step7_controller.js   | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/533d15cd/ambari-web/app/controllers/wizard/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js
index 2a98c71..c3310e6 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -205,9 +205,12 @@ App.WizardStep7Controller = Em.Controller.extend({
   },
 
   showRddWarningPopup: function() {
+    var ganglia = this.get('content.masterComponentHosts').findProperty('component','GANGLIA_SERVER');
+    if(!ganglia) return false;
+    var gangliaServerHost = ganglia.hostName;
     App.ModalPopup.show({
-      header: Em.I18n.t('installer.step7.popup.rddWarning.header').format(16),
-      body: Em.I18n.t('installer.step7.popup.rddWarning.body'),
+      header: Em.I18n.t('installer.step7.popup.rddWarning.header').format(gangliaServerHost),
+      body: Em.I18n.t('installer.step7.popup.rddWarning.body').format(this.get('gangliaMoutDir'),gangliaServerHost,numberUtils.bytesToSize(this.get('gangliaAvailableSpace'),1,'parseFloat',1024)),
       onPrimary: function () {
         this.hide();
         App.router.send('next');
@@ -260,24 +263,26 @@ App.WizardStep7Controller = Em.Controller.extend({
   gangliaHostDiskInfo: function(){
     var ganglia = this.get('content.masterComponentHosts').findProperty('component','GANGLIA_SERVER');
     if(!ganglia) return false;
-    var gangliaGarbageHost = ganglia.hostName;
-    var gangliaPartition = this.get('content.hosts')[gangliaGarbageHost].disk_info;
+    var gangliaServerHost = ganglia.hostName;
+    var gangliaPartition = this.get('content.hosts')[gangliaServerHost].disk_info;
     return gangliaPartition;
   }.property('content'),
 
   isGangliaPartitionGood: function() {
     var gangliaDiskInfo = this.get('gangliaHostDiskInfo');
     if(!gangliaDiskInfo) return true;
-    var miscCoinfigs = this.get('stepConfigs').findProperty('serviceName','MISC').get('configs');
-    var rddDir = miscCoinfigs.findProperty('name', 'rrdcached_base_dir').value;
+    var miscConfigs = this.get('stepConfigs').findProperty('serviceName','MISC').get('configs');
+    var rddDir = miscConfigs.findProperty('name', 'rrdcached_base_dir').value;
     var available = 0;
     gangliaDiskInfo.forEach(function(diskInfo) {
       var mount = rddDir.indexOf(diskInfo.mountpoint);
       if(mount==0 && diskInfo.mountpoint!="/") {
         available = diskInfo.available;
+        this.set('gangliaMoutDir',diskInfo.mountpoint);
       }
-    });
+    },this);
     available = (!available) ? gangliaDiskInfo.findProperty("mountpoint","/").available :
available;
+    this.set('gangliaAvailableSpace',available);
     return available > (16*1024*1024) ? true : false;
   },
 


Mime
View raw message