ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject ambari git commit: AMBARI-10445. Populate cluster widgets from stack-defined widgets on cluster/service create. Unit test fix. (swagle)
Date Mon, 13 Apr 2015 23:57:57 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 5a60fa18a -> e5efc57ae


AMBARI-10445. Populate cluster widgets from stack-defined widgets on cluster/service create.
Unit test fix. (swagle)


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

Branch: refs/heads/trunk
Commit: e5efc57ae7828ce379079385454d58142db9b44b
Parents: 5a60fa1
Author: Siddharth Wagle <swagle@hortonworks.com>
Authored: Mon Apr 13 16:57:46 2015 -0700
Committer: Siddharth Wagle <swagle@hortonworks.com>
Committed: Mon Apr 13 16:57:53 2015 -0700

----------------------------------------------------------------------
 .../server/controller/AmbariManagementControllerImpl.java     | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e5efc57a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index 07ac1d3..c442349 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -388,7 +388,8 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
       clusters.mapHostsToCluster(request.getHostNames(),
           request.getClusterName());
     }
-
+    // Create cluster widgets and layouts
+    initializeWidgetsAndLayouts(c, null);
   }
 
   @Override
@@ -3832,7 +3833,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
   @SuppressWarnings("unchecked")
   @Override
   public void initializeWidgetsAndLayouts(Cluster cluster, Service service) throws AmbariException
{
-    StackId stackId = cluster.getCurrentStackVersion();
+    StackId stackId = cluster.getDesiredStackVersion();
     Type widgetLayoutType = new TypeToken<Map<String, List<WidgetLayout>>>(){}.getType();
 
     try {
@@ -3868,7 +3869,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
         }
       }
       if (widgetDescriptor != null) {
-        LOG.debug("Loaded widgest descriptor: " + widgetDescriptor);
+        LOG.debug("Loaded widget descriptor: " + widgetDescriptor);
         for (Object artifact : widgetDescriptor.values()) {
           List<WidgetLayout> widgetLayouts = (List<WidgetLayout>) artifact;
           createWidgetsAndLayouts(cluster, widgetLayouts);


Mime
View raw message