[ambari] branch trunk updated: AMBARI-25069 - Ambari wrties Empty baseurl values written to Repo Files when using a local repository causing stack installation failure (#2743)

2019-01-15 Thread rlevas
This is an automated email from the ASF dual-hosted git repository.

rlevas 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 818b21f  AMBARI-25069 - Ambari wrties Empty baseurl values written to 
Repo Files when using a local repository causing stack installation failure 
(#2743)
818b21f is described below

commit 818b21f211bfc27f5152749f2e445c63de98c78f
Author: Akhil S Naik 
AuthorDate: Tue Jan 15 22:19:29 2019 +0530

AMBARI-25069 - Ambari wrties Empty baseurl values written to Repo Files 
when using a local repository causing stack installation failure (#2743)

* AMBARI-25069 - Ambari wrties Empty baseurl values written to Repo Files 
when using a local repository causing stack installation failure

* AMBARI-25069 - Ambari wrties Empty baseurl values written to Repo Files 
when using a local repository causing stack installation failure (asnaik)
---
 ambari-web/app/controllers/wizard/step1_controller.js | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/ambari-web/app/controllers/wizard/step1_controller.js 
b/ambari-web/app/controllers/wizard/step1_controller.js
index d731a43..489e467 100644
--- a/ambari-web/app/controllers/wizard/step1_controller.js
+++ b/ambari-web/app/controllers/wizard/step1_controller.js
@@ -193,12 +193,14 @@ App.WizardStep1Controller = Em.Controller.extend({
*/
   onNetworkIssuesExist: function() {
 if (this.get('networkIssuesExist')) {
-  this.get('content.stacks').forEach(function (stack) {
-stack.setProperties({
-  usePublicRepo: false,
-  useLocalRepo: true
-});
-stack.cleanReposBaseUrls();
+  this.get('content.stacks').forEach(function(stack) {
+if (stack.get('useLocalRepo') !== true) {
+  stack.setProperties({
+usePublicRepo: false,
+useLocalRepo: true
+  });
+  stack.cleanReposBaseUrls();
+}
   });
 }
   }.observes('networkIssuesExist'),



[ambari] Diff for: [GitHub] rlevas merged pull request #2743: AMBARI-25069 - Ambari wrties Empty baseurl values written to Repo Files when using a local repository causing stack installation failure

2019-01-15 Thread GitBox
diff --git a/ambari-web/app/controllers/wizard/step1_controller.js 
b/ambari-web/app/controllers/wizard/step1_controller.js
index d731a43d9ba..489e4672c61 100644
--- a/ambari-web/app/controllers/wizard/step1_controller.js
+++ b/ambari-web/app/controllers/wizard/step1_controller.js
@@ -193,12 +193,14 @@ App.WizardStep1Controller = Em.Controller.extend({
*/
   onNetworkIssuesExist: function() {
 if (this.get('networkIssuesExist')) {
-  this.get('content.stacks').forEach(function (stack) {
-stack.setProperties({
-  usePublicRepo: false,
-  useLocalRepo: true
-});
-stack.cleanReposBaseUrls();
+  this.get('content.stacks').forEach(function(stack) {
+if (stack.get('useLocalRepo') !== true) {
+  stack.setProperties({
+usePublicRepo: false,
+useLocalRepo: true
+  });
+  stack.cleanReposBaseUrls();
+}
   });
 }
   }.observes('networkIssuesExist'),


With regards,
Apache Git Services


[ambari] branch trunk updated: AMBARI-25103 Duplicate title on YARN summary page. (ababiichuk)

2019-01-15 Thread ababiichuk
This is an automated email from the ASF dual-hosted git repository.

ababiichuk 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 0fdfa1a  AMBARI-25103 Duplicate title on YARN summary page. 
(ababiichuk)
0fdfa1a is described below

commit 0fdfa1afa534c022d6546aac9da6ff9bfc3b6302
Author: ababiichuk 
AuthorDate: Mon Jan 14 18:33:31 2019 +0200

AMBARI-25103 Duplicate title on YARN summary page. (ababiichuk)
---
 .../main/service/info/summary/master_components.hbs  | 12 
 ambari-web/app/templates/main/service/services/hbase.hbs |  2 +-
 ambari-web/app/templates/main/service/services/hdfs.hbs  | 12 
 ambari-web/app/templates/main/service/services/hive.hbs  |  2 +-
 ambari-web/app/templates/main/service/services/onefs.hbs |  2 +-
 ambari-web/app/templates/main/service/services/ranger.hbs|  2 +-
 ambari-web/app/templates/main/service/services/storm.hbs |  4 ++--
 ambari-web/app/templates/main/service/services/yarn.hbs  |  2 +-
 ambari-web/app/views/main/service/service.js |  2 ++
 9 files changed, 21 insertions(+), 19 deletions(-)

diff --git 
a/ambari-web/app/templates/main/service/info/summary/master_components.hbs 
b/ambari-web/app/templates/main/service/info/summary/master_components.hbs
index 249247f..72a91d4 100644
--- a/ambari-web/app/templates/main/service/info/summary/master_components.hbs
+++ b/ambari-web/app/templates/main/service/info/summary/master_components.hbs
@@ -64,18 +64,6 @@
 {{/if}}
   {{/if}}
 {{/each}}
-{{#unless view.mastersComp.length}}
-  
-
-  {{#if view.parentView.parentView.hasComponents}}
-{{t dashboard.services.hdfs.summary.components}}
-  {{/if}}
-
-
-  {{view App.SummaryClientComponentsView 
clientsObjBinding="view.parentView.parentView.clientObj"}}
-
-  
-{{/unless}}
 {{#if view.parentView.parentView.service.hasMasterOrSlaveComponent}}
   {{#if view.componentCommonWidgetsView}}
 {{view view.componentCommonWidgetsView}}
diff --git a/ambari-web/app/templates/main/service/services/hbase.hbs 
b/ambari-web/app/templates/main/service/services/hbase.hbs
index 6134c71..581099b 100644
--- a/ambari-web/app/templates/main/service/services/hbase.hbs
+++ b/ambari-web/app/templates/main/service/services/hbase.hbs
@@ -22,7 +22,7 @@
 {{view view.dashboardMasterComponentView}}
 
   
-{{#if view.hasMultipleMasterGroups}}
+{{#if view.showComponentsTitleForNonMasters}}
   {{t dashboard.services.hdfs.summary.components}}
 {{/if}}
   
diff --git a/ambari-web/app/templates/main/service/services/hdfs.hbs 
b/ambari-web/app/templates/main/service/services/hdfs.hbs
index 43a0083..7f6b647 100644
--- a/ambari-web/app/templates/main/service/services/hdfs.hbs
+++ b/ambari-web/app/templates/main/service/services/hdfs.hbs
@@ -25,5 +25,17 @@
   {{view view.slaveComponentsView 
slaveComponentsViewBinding="view.slaveComponentsView" summaryViewBinding="view"
 showTitle=true}}
 {{/if}}
+{{#unless view.parentView.service.hasMasterOrSlaveComponent}}
+  
+
+  {{#if view.parentView.hasComponents}}
+{{t dashboard.services.hdfs.summary.components}}
+  {{/if}}
+
+
+  {{view App.SummaryClientComponentsView 
clientsObjBinding="view.parentView.clientObj"}}
+
+  
+{{/unless}}
   
 
diff --git a/ambari-web/app/templates/main/service/services/hive.hbs 
b/ambari-web/app/templates/main/service/services/hive.hbs
index ebd1e28..00ad345 100644
--- a/ambari-web/app/templates/main/service/services/hive.hbs
+++ b/ambari-web/app/templates/main/service/services/hive.hbs
@@ -20,7 +20,7 @@
   {{view view.dashboardMasterComponentView}}
   
 
-  {{#if view.hasMultipleMasterGroups}}
+  {{#if view.showComponentsTitleForNonMasters}}
 {{t dashboard.services.hdfs.summary.components}}
   {{/if}}
 
diff --git a/ambari-web/app/templates/main/service/services/onefs.hbs 
b/ambari-web/app/templates/main/service/services/onefs.hbs
index e4d6d27..23dd7f9 100644
--- a/ambari-web/app/templates/main/service/services/onefs.hbs
+++ b/ambari-web/app/templates/main/service/services/onefs.hbs
@@ -39,7 +39,7 @@
 
 
   
-{{#if view.hasMultipleMasterGroups}}
+{{#if view.showComponentsTitleForNonMasters}}
   {{t dashboard.services.hdfs.summary.components}}
 {{/if}}
   
diff --git a/ambari-web/app/templates/main/service/services/ranger.hbs 
b/ambari-web/app/templates/main/service/services/ranger.hbs
index 54b3efc..bed92e8 100644
--- a/ambari-web/app/templates/main/service/services/ranger.hbs
+++ b/ambari-web/app/templates/main/service/services/ranger.hbs
@@ -20,7 +20,7 @@
   {{view view.dashboardMasterComponentView}}
   
 
-  {{#if view.hasMultipleMasterGroups}}
+  {{#if 

[ambari] Diff for: [GitHub] aBabiichuk merged pull request #2765: [AMBARI-25103] Duplicate title on YARN summary page

2019-01-15 Thread GitBox
diff --git 
a/ambari-web/app/templates/main/service/info/summary/master_components.hbs 
b/ambari-web/app/templates/main/service/info/summary/master_components.hbs
index 249247fc891..72a91d4a6f9 100644
--- a/ambari-web/app/templates/main/service/info/summary/master_components.hbs
+++ b/ambari-web/app/templates/main/service/info/summary/master_components.hbs
@@ -64,18 +64,6 @@
 {{/if}}
   {{/if}}
 {{/each}}
-{{#unless view.mastersComp.length}}
-  
-
-  {{#if view.parentView.parentView.hasComponents}}
-{{t dashboard.services.hdfs.summary.components}}
-  {{/if}}
-
-
-  {{view App.SummaryClientComponentsView 
clientsObjBinding="view.parentView.parentView.clientObj"}}
-
-  
-{{/unless}}
 {{#if view.parentView.parentView.service.hasMasterOrSlaveComponent}}
   {{#if view.componentCommonWidgetsView}}
 {{view view.componentCommonWidgetsView}}
diff --git a/ambari-web/app/templates/main/service/services/hbase.hbs 
b/ambari-web/app/templates/main/service/services/hbase.hbs
index 6134c7126ea..581099b3e00 100644
--- a/ambari-web/app/templates/main/service/services/hbase.hbs
+++ b/ambari-web/app/templates/main/service/services/hbase.hbs
@@ -22,7 +22,7 @@
 {{view view.dashboardMasterComponentView}}
 
   
-{{#if view.hasMultipleMasterGroups}}
+{{#if view.showComponentsTitleForNonMasters}}
   {{t dashboard.services.hdfs.summary.components}}
 {{/if}}
   
diff --git a/ambari-web/app/templates/main/service/services/hdfs.hbs 
b/ambari-web/app/templates/main/service/services/hdfs.hbs
index 43a0083a45c..7f6b647f84c 100644
--- a/ambari-web/app/templates/main/service/services/hdfs.hbs
+++ b/ambari-web/app/templates/main/service/services/hdfs.hbs
@@ -25,5 +25,17 @@
   {{view view.slaveComponentsView 
slaveComponentsViewBinding="view.slaveComponentsView" summaryViewBinding="view"
 showTitle=true}}
 {{/if}}
+{{#unless view.parentView.service.hasMasterOrSlaveComponent}}
+  
+
+  {{#if view.parentView.hasComponents}}
+{{t dashboard.services.hdfs.summary.components}}
+  {{/if}}
+
+
+  {{view App.SummaryClientComponentsView 
clientsObjBinding="view.parentView.clientObj"}}
+
+  
+{{/unless}}
   
 
diff --git a/ambari-web/app/templates/main/service/services/hive.hbs 
b/ambari-web/app/templates/main/service/services/hive.hbs
index ebd1e288926..00ad345c63c 100644
--- a/ambari-web/app/templates/main/service/services/hive.hbs
+++ b/ambari-web/app/templates/main/service/services/hive.hbs
@@ -20,7 +20,7 @@
   {{view view.dashboardMasterComponentView}}
   
 
-  {{#if view.hasMultipleMasterGroups}}
+  {{#if view.showComponentsTitleForNonMasters}}
 {{t dashboard.services.hdfs.summary.components}}
   {{/if}}
 
diff --git a/ambari-web/app/templates/main/service/services/onefs.hbs 
b/ambari-web/app/templates/main/service/services/onefs.hbs
index e4d6d2773ca..23dd7f9ca2d 100644
--- a/ambari-web/app/templates/main/service/services/onefs.hbs
+++ b/ambari-web/app/templates/main/service/services/onefs.hbs
@@ -39,7 +39,7 @@
 
 
   
-{{#if view.hasMultipleMasterGroups}}
+{{#if view.showComponentsTitleForNonMasters}}
   {{t dashboard.services.hdfs.summary.components}}
 {{/if}}
   
diff --git a/ambari-web/app/templates/main/service/services/ranger.hbs 
b/ambari-web/app/templates/main/service/services/ranger.hbs
index 54b3efc280c..bed92e80f4b 100644
--- a/ambari-web/app/templates/main/service/services/ranger.hbs
+++ b/ambari-web/app/templates/main/service/services/ranger.hbs
@@ -20,7 +20,7 @@
   {{view view.dashboardMasterComponentView}}
   
 
-  {{#if view.hasMultipleMasterGroups}}
+  {{#if view.showComponentsTitleForNonMasters}}
 {{t dashboard.services.hdfs.summary.components}}
   {{/if}}
 
diff --git a/ambari-web/app/templates/main/service/services/storm.hbs 
b/ambari-web/app/templates/main/service/services/storm.hbs
index 3eb0aea3997..6cfa1c61f14 100644
--- a/ambari-web/app/templates/main/service/services/storm.hbs
+++ b/ambari-web/app/templates/main/service/services/storm.hbs
@@ -17,11 +17,11 @@
 }}
 
 
-  
+  
 {{view view.dashboardMasterComponentView}}
 
   
-{{#if view.hasMultipleMasterGroups}}
+{{#if view.showComponentsTitleForNonMasters}}
   {{t dashboard.services.hdfs.summary.components}}
 {{/if}}
   
diff --git a/ambari-web/app/templates/main/service/services/yarn.hbs 
b/ambari-web/app/templates/main/service/services/yarn.hbs
index f6733d99354..a17004e3e37 100644
--- a/ambari-web/app/templates/main/service/services/yarn.hbs
+++ b/ambari-web/app/templates/main/service/services/yarn.hbs
@@ -22,7 +22,7 @@
 {{view view.dashboardMasterComponentView}}
 
   
-{{#if view.parentView.hasComponents}}
+{{#if view.showComponentsTitleForNonMasters}}
   {{t 

[ambari] Diff for: [GitHub] hiveww closed pull request #2738: AMBARI-25060. Install wizard fails on step 8

2019-01-15 Thread GitBox
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js 
b/ambari-web/app/controllers/wizard/step8_controller.js
index dd37f9f7812..e47b48b7d68 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -503,8 +503,8 @@ App.WizardStep8Controller = 
Em.Controller.extend(App.AddSecurityConfigs, App.wiz
   }
   else {
 var componentName = component.get('isClient') ? 
Em.I18n.t('common.client').toUpperCase() : component.get('componentName');
-var hostsLength = this.get('content.slaveComponentHosts')
-  .findProperty('componentName', componentName).hosts.length;
+var component = 
this.get('content.slaveComponentHosts').findProperty('componentName', 
componentName);
+var hostsLength = component ? component.hosts.length : 0;
 componentValue = hostsLength + Em.I18n.t('installer.step8.host' + 
(hostsLength > 1 ? 's' : ''));
   }
 }


With regards,
Apache Git Services


[ambari] Diff for: [GitHub] hiveww closed pull request #2760: AMBARI-25098. Cover service reassign views

2019-01-15 Thread GitBox
diff --git a/ambari-web/app/assets/test/tests.js 
b/ambari-web/app/assets/test/tests.js
index 2f809ec6424..bd17989dfaa 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -406,6 +406,11 @@ var files = [
   'test/views/main/service/widgets/create/step3_view_test',
   'test/views/main/service/widgets/create/step2_view_test',
   'test/views/main/service/widgets/create/step1_view_test',
+  'test/views/main/service/reassign/step1_view_test',
+  'test/views/main/service/reassign/step2_view_test',
+  'test/views/main/service/reassign/step3_view_test',
+  'test/views/main/service/reassign/step4_view_test',
+  'test/views/main/service/reassign/step5_view_test',
   'test/views/main/admin/highAvailability/nameNode/step1_view_test',
   'test/views/main/admin/highAvailability/nameNode/step3_view_test',
   'test/views/main/admin/highAvailability/nameNode/step4_view_test',
diff --git a/ambari-web/test/views/main/service/reassign/step1_view_test.js 
b/ambari-web/test/views/main/service/reassign/step1_view_test.js
new file mode 100644
index 000..1d6980fbfae
--- /dev/null
+++ b/ambari-web/test/views/main/service/reassign/step1_view_test.js
@@ -0,0 +1,151 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+var stringUtils = require('utils/string_utils');
+
+describe('App.MainServiceItemView', function () {
+  var view;
+
+  beforeEach(function() {
+view = App.ReassignMasterWizardStep1View.create({});
+  });
+
+  describe('#message', function () {
+var listOfServices = [
+  Em.Object.create({serviceName: 'test'}),
+  Em.Object.create({serviceName: 'test2'}),
+  Em.Object.create({serviceName: 'HDFS'})
+];
+it('should return 2 msgs if componentsToStopAllServices contains 
componentName and hasManualSteps is false with installed services', function () 
{
+  view.set('controller', Em.Object.create({
+content: Em.Object.create({
+  reassign: Em.Object.create({component_name: 'test', display_name: 
'test_display'}),
+  componentsToStopAllServices: ['test'],
+  hasManualSteps: false
+})
+  }));
+  sinon.stub(App.Service, 'find').returns(listOfServices);
+  expect(view.get('message')).to.be.eql([
+Em.I18n.t('services.reassign.step1.message1').format('test_display'),
+Em.I18n.t('services.reassign.step1.message3').format(
+  
stringUtils.getFormattedStringFromArray(listOfServices.mapProperty('serviceName')),
+  'test_display')
+  ]);
+  App.Service.find.restore();
+});
+
+it('should return 3 msgs if componentsToStopAllServices contains 
componentName and hasManualSteps is true with installed services', function () {
+  view.set('controller', Em.Object.create({
+content: Em.Object.create({
+  reassign: Em.Object.create({component_name: 'test', display_name: 
'test_display'}),
+  componentsToStopAllServices: ['test'],
+  hasManualSteps: true
+})
+  }));
+  sinon.stub(App.Service, 'find').returns(listOfServices);
+  expect(view.get('message')).to.be.eql([
+Em.I18n.t('services.reassign.step1.message1').format('test_display'),
+Em.I18n.t('services.reassign.step1.message2').format('test_display'),
+Em.I18n.t('services.reassign.step1.message3').format(
+  
stringUtils.getFormattedStringFromArray(listOfServices.mapProperty('serviceName')),
+  'test_display')
+  ]);
+  App.Service.find.restore();
+});
+
+it('should return 2 msgs if componentsToStopAllServices contains 
componentName and hasManualSteps is false with installed services without 
HDFS', function () {
+  view.set('controller', Em.Object.create({
+content: Em.Object.create({
+  reassign: Em.Object.create({component_name: 'test', display_name: 
'test_display'}),
+  componentsToStopAllServices: [],
+  hasManualSteps: false
+}),
+target: Em.Object.create({
+  reassignMasterController: Em.Object.create({
+relatedServicesMap: {
+  'test': []
+}
+  })
+})
+  }));
+
+  sinon.stub(App.Service,