You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2017/04/12 09:14:39 UTC

[2/9] ambari git commit: AMBARI-20700 - UI should use the URL as-given by the backend (rzang)

AMBARI-20700 - UI should use the URL as-given by the backend (rzang)

Change-Id: I308c7b8d3eed2ba9218d26d2d2590dba9fe49f74


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

Branch: refs/heads/branch-3.0-perf
Commit: 908c44e8b60c59af75d8a0a7ad0cc6b96c383808
Parents: ab4935b
Author: Richard Zang <rz...@apache.org>
Authored: Tue Apr 11 13:10:28 2017 -0700
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Wed Apr 12 12:14:25 2017 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/installer.js | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/908c44e8/ambari-web/app/controllers/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js
index 369e163..ec280fa 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -707,6 +707,7 @@ App.InstallerController = App.WizardController.extend(App.Persist, {
    */
   getSupportedOSListSuccessCallback: function (response, request, data) {
     var self = this;
+    var stack_default = data.versionDefinition.VersionDefinition.stack_default;
     var existedOS = data.versionDefinition.operating_systems;
     var existedMap = {};
     existedOS.map(function (existedOS) {
@@ -720,8 +721,7 @@ App.InstallerController = App.WizardController.extend(App.Persist, {
           repo.Repositories.base_url = '';
         });
         existedOS.push(supportedOS);
-      }
-      if(existedMap[supportedOS.OperatingSystems.os_type]) {
+      } else if (stack_default) { // only overwrite if it is stack default, otherwise use url from /version_definition
         existedMap[supportedOS.OperatingSystems.os_type].repositories.forEach(function (repo) {
           supportedOS.repositories.forEach(function (supportedRepo) {
             if (supportedRepo.Repositories.repo_id == repo.Repositories.repo_id) {
@@ -754,16 +754,6 @@ App.InstallerController = App.WizardController.extend(App.Persist, {
           this.setSelected(data.stackInfo.isStacksExistInDb);
         }
       }
-      // log diagnosis data for abnormal number of repos
-      var post_diagnosis = false;
-      data.versionDefinition.operating_systems.map(function(item) {
-        if (item.repositories.length > 2) {
-          post_diagnosis = true;
-        }
-      });
-      if (post_diagnosis) {
-        this.postUserPref('stack_response_diagnosis', data);
-      }
     }
   },