You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by am...@apache.org on 2018/01/05 07:55:59 UTC
[03/45] ambari git commit: AMBARI-22685 Stack OS/repos removed from
cluster installation UI showed up on the Versions tab after cluster is
installed (dili)
AMBARI-22685 Stack OS/repos removed from cluster installation UI showed up on the Versions tab after cluster is installed (dili)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/32092da8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/32092da8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/32092da8
Branch: refs/heads/branch-feature-AMBARI-22008-isilon
Commit: 32092da8377d7437d5b38e58ae58a9bebe05281a
Parents: 8ea7b19
Author: Di Li <di...@apache.org>
Authored: Fri Dec 22 11:52:46 2017 -0500
Committer: Di Li <di...@apache.org>
Committed: Fri Dec 22 11:52:46 2017 -0500
----------------------------------------------------------------------
ambari-web/app/controllers/installer.js | 42 +++++++++++---------
.../app/controllers/wizard/step8_controller.js | 2 +-
2 files changed, 24 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/32092da8/ambari-web/app/controllers/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js
index f49fc11..4ecdc9b 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -800,26 +800,30 @@ App.InstallerController = App.WizardController.extend(App.Persist, {
prepareRepoForSaving: function(repo) {
var repoVersion = { "operating_systems": [] };
var ambariManagedRepositories = !repo.get('useRedhatSatellite');
- repo.get('operatingSystems').forEach(function (os, k) {
- repoVersion.operating_systems.push({
- "OperatingSystems": {
- "os_type": os.get("osType"),
- "ambari_managed_repositories": ambariManagedRepositories
- },
- "repositories": []
- });
- os.get('repositories').forEach(function (repository) {
- repoVersion.operating_systems[k].repositories.push({
- "Repositories": {
- "base_url": repository.get('baseUrl'),
- "repo_id": repository.get('repoId'),
- "repo_name": repository.get('repoName'),
- "components": repository.get('components'),
- "tags": repository.get('tags'),
- "distribution": repository.get('distribution')
- }
+ var k = 0;
+ repo.get('operatingSystems').forEach(function (os) {
+ if (os.get('isSelected')) {
+ repoVersion.operating_systems.push({
+ "OperatingSystems": {
+ "os_type": os.get("osType"),
+ "ambari_managed_repositories": ambariManagedRepositories
+ },
+ "repositories": []
});
- });
+ os.get('repositories').forEach(function (repository) {
+ repoVersion.operating_systems[k].repositories.push({
+ "Repositories": {
+ "base_url": repository.get('baseUrl'),
+ "repo_id": repository.get('repoId'),
+ "repo_name": repository.get('repoName'),
+ "components": repository.get('components'),
+ "tags": repository.get('tags'),
+ "distribution": repository.get('distribution')
+ }
+ });
+ });
+ k++;
+ }
});
return repoVersion;
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/32092da8/ambari-web/app/controllers/wizard/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index e64a09a..bd3c36f 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -301,7 +301,7 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, App.wiz
}
} else {
// from install wizard
- var selectedStack = App.Stack.find().findProperty('isSelected');
+ var selectedStack = App.Stack.find().findProperty('isSelected', true);
var allRepos = [];
if (selectedStack && selectedStack.get('operatingSystems')) {
selectedStack.get('operatingSystems').forEach(function (os) {