ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhew...@apache.org
Subject ambari git commit: AMBARI-16723 Stack id needs to be handled differently according to its source (zhewang)
Date Wed, 18 May 2016 18:33:54 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk bffcbd285 -> 14617e76a


AMBARI-16723 Stack id needs to be handled differently according to its source (zhewang)


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

Branch: refs/heads/trunk
Commit: 14617e76a3122920dd73605897f7372822695547
Parents: bffcbd2
Author: Zhe (Joe) Wang <zhewang@apache.org>
Authored: Wed May 18 14:32:28 2016 -0400
Committer: Zhe (Joe) Wang <zhewang@apache.org>
Committed: Wed May 18 14:33:34 2016 -0400

----------------------------------------------------------------------
 ambari-web/app/controllers/installer.js | 4 +++-
 ambari-web/app/mappers/stack_mapper.js  | 4 ++++
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/14617e76/ambari-web/app/controllers/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js
index 421f2dc..d8000c7 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -605,6 +605,7 @@ App.InstallerController = App.WizardController.extend({
       var data = _data.resources[0];
       var self = this;
       // load the data info to display for details and contents panel
+      data.VersionDefinition.id = dataInfo.data.VersionDefinition.available;
       var response = {
         id : data.VersionDefinition.id,
         stackVersion : data.VersionDefinition.stack_version,
@@ -733,7 +734,8 @@ App.InstallerController = App.WizardController.extend({
           this.postVersionDefinitionFile(versionData.isXMLdata, versionData.data).done(function
(versionInfo) {
             self.mergeChanges(data.stackInfo.repos, data.stackInfo.stacks);
             App.Stack.find().setEach('isSelected', false);
-            App.Stack.find().findProperty('id', versionInfo.stackNameVersion + "-" + versionInfo.actualVersion).set('isSelected',
true);
+            var stackId = versionData.data.VersionDefinition.available || versionInfo.stackNameVersion
+ "-" + versionInfo.actualVersion;
+            App.Stack.find().findProperty('id', stackId).set('isSelected', true);
             self.setSelected(data.stackInfo.isStacksExistInDb);
           });
         } else {

http://git-wip-us.apache.org/repos/asf/ambari/blob/14617e76/ambari-web/app/mappers/stack_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/stack_mapper.js b/ambari-web/app/mappers/stack_mapper.js
index 473c466..ab1d6a8 100644
--- a/ambari-web/app/mappers/stack_mapper.js
+++ b/ambari-web/app/mappers/stack_mapper.js
@@ -99,6 +99,10 @@ App.stackMapper = App.QuickDataMapper.create({
     var operatingSystemsArray = [];
     var servicesArray = [];
 
+    if (!stack.id) {
+      stack.id = stack.stack_name + "-" + stack.stack_version + "-" + stack.repository_version;
//HDP-2.5-2.5.0.0
+    }
+
     item.operating_systems.forEach(function(ops) {
       var operatingSystems = ops.OperatingSystems;
 


Mime
View raw message