This is an automated email from the ASF dual-hosted git repository.
atkach pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new 67ff53b AMBARI-23720 Ambari UI trying to create GPL repo with empty
base url for the rest repos
67ff53b is described below
commit 67ff53b6daeeac41476567d1084ac90223999fc7
Author: Andrii Tkach <[email protected]>
AuthorDate: Fri Apr 27 18:53:29 2018 +0300
AMBARI-23720 Ambari UI trying to create GPL repo with empty base url for
the rest repos
---
ambari-web/app/controllers/installer.js | 26 +++++++++++++---------
.../app/controllers/wizard/step1_controller.js | 7 +++++-
2 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/ambari-web/app/controllers/installer.js
b/ambari-web/app/controllers/installer.js
index 14010b6..9da077b 100644
--- a/ambari-web/app/controllers/installer.js
+++ b/ambari-web/app/controllers/installer.js
@@ -322,7 +322,9 @@ App.InstallerController =
App.WizardController.extend(App.Persist, {
var _oses = oses || [];
var _stacks = stacks || [];
_repos.forEach(function (repo) {
- App.Repository.find().findProperty('id', repo.id).set('baseUrl',
repo.base_url);
+ if (App.Repository.find(repo.id).get('isLoaded')) {
+ App.Repository.find(repo.id).set('baseUrl', repo.base_url);
+ }
});
_oses.forEach(function (os) {
if (App.OperatingSystem.find().findProperty('id', os.id)) {
@@ -823,16 +825,18 @@ App.InstallerController =
App.WizardController.extend(App.Persist, {
"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')
- }
- });
+ if (!(repository.get('isGPL') &&
_.isEmpty(repository.get('baseUrl')))) {
+ 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++;
}
diff --git a/ambari-web/app/controllers/wizard/step1_controller.js
b/ambari-web/app/controllers/wizard/step1_controller.js
index c137d96..d731a43 100644
--- a/ambari-web/app/controllers/wizard/step1_controller.js
+++ b/ambari-web/app/controllers/wizard/step1_controller.js
@@ -61,7 +61,12 @@ App.WizardStep1Controller = Em.Controller.extend({
*
* @type {boolean}
*/
- networkIssuesExist: Em.computed.everyBy('content.stacks', 'stackDefault',
true),
+ networkIssuesExist: function() {
+ if (this.get('content.stacks') && this.get('content.stacks.length') > 1) {
+ return this.get('content.stacks').everyProperty('stackDefault', true);
+ }
+ return false;
+ }.property('[email protected]'),
/**
* No stacks have repo update URL section (aka "latest") defined in
repoinfo.xml
--
To stop receiving notification emails like this one, please contact
[email protected].