You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vi...@apache.org on 2017/11/30 00:21:02 UTC

ambari git commit: AMBARI-22554. UI should pass repo_name for repository validation (vsubramanian)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 ec846e180 -> 128c7fb5f


AMBARI-22554. UI should pass repo_name for repository validation (vsubramanian)


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

Branch: refs/heads/branch-2.6
Commit: 128c7fb5fde0afac80d3f4eb1e8884f1700dd64f
Parents: ec846e1
Author: Vivek Ratnavel Subramanian <vi...@gmail.com>
Authored: Wed Nov 29 16:20:44 2017 -0800
Committer: Vivek Ratnavel Subramanian <vi...@gmail.com>
Committed: Wed Nov 29 16:20:44 2017 -0800

----------------------------------------------------------------------
 .../main/resources/ui/admin-web/app/scripts/services/Stack.js   | 3 ++-
 ambari-web/app/controllers/installer.js                         | 5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/128c7fb5/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
index 46f4f42..45da26b 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
@@ -369,7 +369,8 @@ angular.module('ambariAdminConsole')
               $http.post(url + '/operating_systems/' + os.OperatingSystems.os_type + '/repositories/' + repo.Repositories.repo_id + '?validate_only=true',
                 {
                   "Repositories": {
-                    "base_url": repo.Repositories.base_url
+                    "base_url": repo.Repositories.base_url,
+                    "repo_name": repo.Repositories.repo_name
                   }
                 },
                 {

http://git-wip-us.apache.org/repos/asf/ambari/blob/128c7fb5/ambari-web/app/controllers/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js
index afce91a..12a3704 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -315,7 +315,9 @@ App.InstallerController = App.WizardController.extend(App.UserPref, {
       App.Repository.find().findProperty('id', repo.id).set('baseUrl', repo.base_url);
     });
     _oses.forEach(function (os) {
-      App.OperatingSystem.find().findProperty('id', os.id).set('isSelected', os.is_selected);
+      if (App.OperatingSystem.find().findProperty('id', os.id)) {
+        App.OperatingSystem.find().findProperty('id', os.id).set('isSelected', os.is_selected);
+      }
     });
     //should delete the record on going to step 2, on going back to step 1, still need the record
     if (App.router.get('currentState.name') != "step1") {
@@ -857,6 +859,7 @@ App.InstallerController = App.WizardController.extend(App.UserPref, {
                   data: {
                     'Repositories': {
                       'base_url': repo.get('baseUrl'),
+                      'repo_name': repo.get('repoName'),
                       "verify_base_url": verifyBaseUrl
                     }
                   }