You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/04/18 06:54:43 UTC

svn commit: r1469163 - in /incubator/ambari/trunk: CHANGES.txt ambari-web/app/controllers/main/admin/cluster.js

Author: yusaku
Date: Thu Apr 18 04:54:43 2013
New Revision: 1469163

URL: http://svn.apache.org/r1469163
Log:
AMBARI-1954. Dashboard does not come up if the upgrade stack does not contain a service with the same name. (yusaku)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/controllers/main/admin/cluster.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1469163&r1=1469162&r2=1469163&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Thu Apr 18 04:54:43 2013
@@ -752,6 +752,9 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-1954. Dashboard does not come up if the upgrade stack does not contain
+ a service with the same name. (yusaku)
+
  AMBARI-1953. On Add Hosts, the request context for the start phase shows up
  as "Request Name Not Specified". (yusaku)
 

Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/admin/cluster.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/admin/cluster.js?rev=1469163&r1=1469162&r2=1469163&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/admin/cluster.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/admin/cluster.js Thu Apr 18 04:54:43 2013
@@ -82,25 +82,28 @@ App.MainAdminClusterController = Em.Cont
           findProperty("StackServices.service_name", displayOrderConfig[i].serviceName);
         if (entry) {
           entry = entry.StackServices;
-        if (installedServices.contains(entry.service_name)) {
-          var myService = Em.Object.create({
-            serviceName: entry.service_name,
-            displayName: displayOrderConfig[i].displayName,
-            isDisabled: i === 0,
-            isSelected: true,
-            isInstalled: false,
-            isHidden: displayOrderConfig[i].isHidden,
-            description: entry.comments,
-            version: entry.service_version,
-            newVersion: upgradeStack.stackServices.
-              findProperty("StackServices.service_name", displayOrderConfig[i].serviceName).
-              StackServices.service_version
-          });
-          //From 1.3.0 for Hive we display only "Hive" (but it install HCat and WebHCat as well)
-          if (this.get('upgradeVersion').replace(/HDP-/, '') >= '1.3.0' && displayOrderConfig[i].serviceName == 'HIVE') {
-            myService.set('displayName', 'Hive');
-          }
-          result.push(myService);
+          if (installedServices.contains(entry.service_name)) {
+            var myService = Em.Object.create({
+              serviceName: entry.service_name,
+              displayName: displayOrderConfig[i].displayName,
+              isDisabled: i === 0,
+              isSelected: true,
+              isInstalled: false,
+              isHidden: displayOrderConfig[i].isHidden,
+              description: entry.comments,
+              version: entry.service_version,
+              newVersion: ''
+            });
+            // it's possible that there is no corresponding service in the new stack
+            var matchedService = upgradeStack.stackServices.findProperty("StackServices.service_name", displayOrderConfig[i].serviceName);
+            if (matchedService) {
+              myService.newVersion = matchedService.StackServices.service_version;
+            }
+            //From 1.3.0 for Hive we display only "Hive" (but it install HCat and WebHCat as well)
+            if (this.get('upgradeVersion').replace(/HDP-/, '') >= '1.3.0' && displayOrderConfig[i].serviceName == 'HIVE') {
+              myService.set('displayName', 'Hive');
+            }
+            result.push(myService);
           }
         }
         else {