This is an automated email from the ASF dual-hosted git repository.

asnaik pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
     new f6110f8  AMBARI-25393 Not able to register new HDP version in 
Ambari-2.7.4 without GPL with Local Repository (asnaik) (#3098)
f6110f8 is described below

commit f6110f8189adccf309afaba681a08133333dafea
Author: Asnaik HWX <asn...@hortonworks.com>
AuthorDate: Thu Oct 10 20:50:38 2019 +0530

    AMBARI-25393 Not able to register new HDP version in Ambari-2.7.4 without 
GPL with Local Repository (asnaik) (#3098)
---
 .../scripts/controllers/stackVersions/StackVersionsCreateCtrl.js    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
index 350f5c1..72b73ac 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
@@ -310,7 +310,11 @@ angular.module('ambariAdminConsole')
     });
 
     var skip = $scope.skipValidation || $scope.useRedhatSatellite;
-    return Stack.validateBaseUrls(skip, $scope.osList, 
$scope.upgradeStack).then(function (invalidUrls) {
+    // Filter out repositories that are not shown in the UI
+    var osList = Object.assign([], $scope.osList).map(function(os) {
+      return Object.assign({}, os, {repositories: 
os.repositories.filter(function(repo) { return $scope.showRepo(repo); })});
+    });
+    return Stack.validateBaseUrls(skip, osList, 
$scope.upgradeStack).then(function (invalidUrls) {
       if (invalidUrls.length === 0) {
         if ($scope.isPublicVersion) {
           var data = {

Reply via email to