Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 05cb5e8cf -> dc3e200cb


AMBARI-18535 Ambari is not picking up the latest repo for HDP-2.4 (zhewang)


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

Branch: refs/heads/branch-2.5
Commit: dc3e200cba9f8a99430b220efa0bea99f3b5b060
Parents: 05cb5e8
Author: Zhe (Joe) Wang <zhew...@apache.org>
Authored: Fri Oct 14 17:58:59 2016 -0700
Committer: Zhe (Joe) Wang <zhew...@apache.org>
Committed: Fri Oct 14 18:00:33 2016 -0700

----------------------------------------------------------------------
 ambari-web/app/controllers/installer.js | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/dc3e200c/ambari-web/app/controllers/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/installer.js 
b/ambari-web/app/controllers/installer.js
index 5493b3a..ab1dbd4 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -726,6 +726,17 @@ App.InstallerController = App.WizardController.extend({
         });
         existedOS.push(supportedOS);
       }
+      if(existedMap[supportedOS.OperatingSystems.os_type]) {
+        
existedMap[supportedOS.OperatingSystems.os_type].repositories.forEach(function 
(repo) {
+          supportedOS.repositories.forEach(function (supportedRepo) {
+            if (supportedRepo.Repositories.repo_id == 
repo.Repositories.repo_id) {
+              repo.Repositories.base_url = supportedRepo.Repositories.base_url;
+              repo.Repositories.default_base_url = 
supportedRepo.Repositories.default_base_url;
+              repo.Repositories.latest_base_url = 
supportedRepo.Repositories.latest_base_url;
+            }
+          });
+        });
+      }
     });
     App.stackMapper.map(data.versionDefinition);
 

Reply via email to