ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject git commit: AMBARI-3323. Reverting unnecessary commits from 3a8bd15873df5ab706f04f5e96cf2f2021af0b0c to e222d3ee827558c3be7cf8032e7622f360813676 (ababiichuk)
Date Tue, 24 Sep 2013 14:14:26 GMT
Updated Branches:
  refs/heads/trunk d321f7edb -> add592816


AMBARI-3323. Reverting unnecessary commits from 3a8bd15873df5ab706f04f5e96cf2f2021af0b0c to
e222d3ee827558c3be7cf8032e7622f360813676 (ababiichuk)


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

Branch: refs/heads/trunk
Commit: add5928168163b9f2e62477980f2822968b57222
Parents: d321f7e
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Tue Sep 24 17:14:15 2013 +0300
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Tue Sep 24 17:14:15 2013 +0300

----------------------------------------------------------------------
 .../controllers/global/cluster_controller.js    | 12 ++---
 ambari-web/app/controllers/installer.js         |  1 -
 .../app/controllers/wizard/step2_controller.js  | 19 +++++++
 .../app/controllers/wizard/step7_controller.js  | 53 ++------------------
 .../app/controllers/wizard/step8_controller.js  |  3 +-
 ambari-web/app/messages.js                      |  2 -
 ambari-web/app/utils/ajax.js                    | 10 ----
 .../app/views/main/dashboard/service/hdfs.js    | 23 +++++++--
 8 files changed, 50 insertions(+), 73 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/add59281/ambari-web/app/controllers/global/cluster_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/cluster_controller.js b/ambari-web/app/controllers/global/cluster_controller.js
index e241c03..a845846 100644
--- a/ambari-web/app/controllers/global/cluster_controller.js
+++ b/ambari-web/app/controllers/global/cluster_controller.js
@@ -370,18 +370,18 @@ App.ClusterController = Em.Controller.extend({
     App.ajax.send({
       name: 'ambari.service',
       sender: this,
-      success: 'loadAmbariPropertiesSuccsess',
-      error: 'loadAmbariPropertiesdError'
-    })
+      success: 'loadAmbariPropertiesSuccess',
+      error: 'loadAmbariPropertiesError'
+    });
     return this.get('ambariProperties');
   },
 
-  loadAmbariPropertiesSuccsess: function(data) {
+  loadAmbariPropertiesSuccess: function(data) {
     console.log('loading ambari properties');
-    this.set('ambariProperties',data.RootServiceComponents.properties);
+    this.set('ambariProperties', data.RootServiceComponents.properties);
   },
 
-  loadAmbariPropertiesdError: function() {
+  loadAmbariPropertiesError: function() {
     console.warn('can\'t get ambari properties');
   },
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/add59281/ambari-web/app/controllers/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js
index f5c50c2..2fe4f5e 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -104,7 +104,6 @@ App.InstallerController = App.WizardController.extend({
     } else {
       console.log("Failed to load Services");
    }
-    App.router.get('clusterController').loadAmbariProperties();
   },
 
   stacks: [],

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/add59281/ambari-web/app/controllers/wizard/step2_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step2_controller.js b/ambari-web/app/controllers/wizard/step2_controller.js
index 03cf616..c30bd01 100644
--- a/ambari-web/app/controllers/wizard/step2_controller.js
+++ b/ambari-web/app/controllers/wizard/step2_controller.js
@@ -350,8 +350,27 @@ App.WizardStep2Controller = Em.Controller.extend({
     return (this.get('hostsError') || this.get('sshKeyError') || this.get('sshUserError'))
 ;
   }.property('hostsError', 'sshKeyError', 'sshUserError'),
 
+  setAmbariJavaHome: function(){
+    App.ajax.send({
+      name: 'ambari.service',
+      sender: this,
+      success: 'onGetAmbariJavaHomeSuccess',
+      error: 'onGetAmbariJavaHomeError'
+    });
+  },
+
+  onGetAmbariJavaHomeSuccess: function(data) {
+    this.set('content.installOptions.javaHome',data.RootServiceComponents.properties['java.home']);
+  },
+
+  onGetAmbariJavaHomeError: function() {
+    console.warn('can\'t get java.home value from server');
+    this.set('content.installOptions.javaHome',App.defaultJavaHome);
+  },
+
   saveHosts: function(){
     this.set('content.hosts', this.getHostInfo());
+    this.setAmbariJavaHome();
     App.router.send('next');
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/add59281/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 c3310e6..b46e6eb 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -196,30 +196,10 @@ App.WizardStep7Controller = Em.Controller.extend({
 
   submit: function () {
     if (!this.get('isSubmitDisabled')) {
-      if(!this.isGangliaPartitionGood()){
-        this.showRddWarningPopup();
-      } else {
-        App.router.send('next');
-      }
+      App.router.send('next');
     }
-  },
-
-  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(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');
-      },
-      onSecondary: function () {
-        this.hide();
-      }
-    });
-  },
+  }, 
+  
   /**
    * Provides service component name and display-name information for 
    * the current selected service. 
@@ -259,32 +239,7 @@ App.WizardStep7Controller = Em.Controller.extend({
     });
     return validComponents;
   }.property('content'),
-
-  gangliaHostDiskInfo: function(){
-    var ganglia = this.get('content.masterComponentHosts').findProperty('component','GANGLIA_SERVER');
-    if(!ganglia) return false;
-    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 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;
-  },
+  
 
   getAllHosts: function () {
     // Load hosts

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/add59281/ambari-web/app/controllers/wizard/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index e4ed854..2850375 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -1365,7 +1365,6 @@ App.WizardStep8Controller = Em.Controller.extend({
     var globalSiteProperties = {};
     var globalSiteObj = this.get('globals');
     var isHCFSSelected = this.get('selectedServices').someProperty('serviceName', 'HCFS');
-    var ambariProperties = App.router.get('clusterController.ambariProperties');
     
     // screen out the HCFS-specific global config entries when they are not required
     if (!isHCFSSelected) {
@@ -1388,7 +1387,7 @@ App.WizardStep8Controller = Em.Controller.extend({
         console.log("STEP8: value of the global property is: " + _globalSiteObj.value);
       }
       if (_globalSiteObj.name == 'java64_home') {
-        globalSiteProperties['java64_home'] = ambariProperties['java.home'] ? ambariProperties['java.home']
: App.defaultJavaHome ;
+        globalSiteProperties['java64_home'] = this.get('content.installOptions.javaHome');
       }
       this._recordHostOverrideFromObj(_globalSiteObj, 'global', 'version1', this);
     }, this);

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/add59281/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 434be54..363d06b 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -878,8 +878,6 @@ Em.I18n.translations = {
   'services.service.summary.RegionServersLIVE':'RegionServers Live',
   'services.service.summary.GangliaMonitorsLIVE':'Ganglia Monitors Live',
   'services.service.summary.nameNode':'NameNode Web UI',
-  'services.service.summary.nameNode.active':'Active NameNode',
-  'services.service.summary.nameNode.standby':'Standby NameNode',
   'services.service.summary.nameNodeUptime':'NameNode Uptime',
   'services.service.summary.nameNodeHeap':'NameNode Heap',
   'services.service.summary.nameNode.active':'Active NameNode',

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/add59281/ambari-web/app/utils/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax.js b/ambari-web/app/utils/ajax.js
index a77f546..890f134 100644
--- a/ambari-web/app/utils/ajax.js
+++ b/ambari-web/app/utils/ajax.js
@@ -572,15 +572,6 @@ var urls = {
     'mock': '',
     'type': 'GET'
   },
-  'admin.high_availability.getNnCheckPointStatus.sync': {
-    'real': '/clusters/{clusterName}/hosts/{hostName}/host_components/NAMENODE',
-    'mock': '',
-    'format': function (data, opt) {
-      return {
-        async: false
-      };
-    }
-  },
   'admin.high_availability.getJnCheckPointStatus': {
     'real': '/clusters/{clusterName}/hosts/{hostName}/host_components/JOURNALNODE?fields=metrics',
     'mock': ''
@@ -767,7 +758,6 @@ var urls = {
     'mock': '',
     'format': function (data, opt) {
       return {
-        async: false,
         timeout: 10000
       };
     }

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/add59281/ambari-web/app/views/main/dashboard/service/hdfs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/service/hdfs.js b/ambari-web/app/views/main/dashboard/service/hdfs.js
index 863b807..8d73e35 100644
--- a/ambari-web/app/views/main/dashboard/service/hdfs.js
+++ b/ambari-web/app/views/main/dashboard/service/hdfs.js
@@ -218,8 +218,25 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({
     return App.HostComponent.find().findProperty('componentName', 'JOURNALNODE');
   }.property(),
 
-  isSafeMode: function () {
+  safeModeStatus: function () {
     var safeMode = this.get('service.safeModeStatus');
-    return safeMode != null && safeMode.length > 0;
-  }.property('service.safeModeStatus')
+    if (safeMode == null) {
+      return Em.I18n.t("services.service.summary.notAvailable");
+    } else if (safeMode.length == 0) {
+      return Em.I18n.t("services.service.summary.safeModeStatus.notInSafeMode");
+    } else {
+      return Em.I18n.t("services.service.summary.safeModeStatus.inSafeMode");
+    }
+  }.property('service.safeModeStatus'),
+  upgradeStatus: function () {
+    var upgradeStatus = this.get('service.upgradeStatus');
+    var healthStatus = this.get('service.healthStatus');
+    if (upgradeStatus) {
+      return Em.I18n.t('services.service.summary.pendingUpgradeStatus.notPending');
+    } else if (healthStatus == 'green') {
+      return Em.I18n.t('services.service.summary.pendingUpgradeStatus.pending');
+    } else {
+      return Em.I18n.t("services.service.summary.notAvailable");
+    }
+  }.property('service.upgradeStatus', 'service.healthStatus')
 });


Mime
View raw message