ambari git commit: AMBARI-20609. Fix Install Wizard data attribute (onechiporenko)

2017-04-21 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk b66d4b17e -> bbd86dd2b


AMBARI-20609. Fix Install Wizard data attribute (onechiporenko)


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

Branch: refs/heads/trunk
Commit: bbd86dd2bf7707485c91461eb118cf808ebef7f8
Parents: b66d4b1
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Fri Apr 21 14:28:03 2017 +0300
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Fri Apr 21 14:33:19 2017 +0300

--
 ambari-web/app/templates/wizard/step10.hbs | 2 +-
 ambari-web/app/templates/wizard/step4.hbs  | 4 ++--
 ambari-web/app/templates/wizard/step6.hbs  | 4 ++--
 ambari-web/app/templates/wizard/step7.hbs  | 4 ++--
 ambari-web/app/templates/wizard/step8.hbs  | 4 ++--
 ambari-web/app/templates/wizard/step9.hbs  | 2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bbd86dd2/ambari-web/app/templates/wizard/step10.hbs
--
diff --git a/ambari-web/app/templates/wizard/step10.hbs 
b/ambari-web/app/templates/wizard/step10.hbs
index 3c1012e..fef02b4 100644
--- a/ambari-web/app/templates/wizard/step10.hbs
+++ b/ambari-web/app/templates/wizard/step10.hbs
@@ -56,7 +56,7 @@
 
 
   
-
+
   {{#if App.router.nextBtnClickInProgress}}
 {{view App.SpinnerView tagName="span" 
classNames="service-button-spinner"}}
   {{/if}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/bbd86dd2/ambari-web/app/templates/wizard/step4.hbs
--
diff --git a/ambari-web/app/templates/wizard/step4.hbs 
b/ambari-web/app/templates/wizard/step4.hbs
index c688981..9f1d7df 100644
--- a/ambari-web/app/templates/wizard/step4.hbs
+++ b/ambari-web/app/templates/wizard/step4.hbs
@@ -61,14 +61,14 @@
 
   
 {{#unless view.parentView.controller.hideBackButton}}
-  
+  
  {{t common.back}}
 {{#if App.router.backBtnClickInProgress}}
   {{view App.SpinnerView tagName="span" 
classNames="service-button-spinner"}}
 {{/if}}
   
 {{/unless}}
-
+
   {{#if App.router.nextBtnClickInProgress}}
 {{view App.SpinnerView tagName="span" 
classNames="service-button-spinner"}}
   {{/if}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/bbd86dd2/ambari-web/app/templates/wizard/step6.hbs
--
diff --git a/ambari-web/app/templates/wizard/step6.hbs 
b/ambari-web/app/templates/wizard/step6.hbs
index c06177e..6dfb5f1 100644
--- a/ambari-web/app/templates/wizard/step6.hbs
+++ b/ambari-web/app/templates/wizard/step6.hbs
@@ -95,13 +95,13 @@
 
 
   
-
+
{{t common.back}}
   {{#if App.router.backBtnClickInProgress}}
 {{view App.SpinnerView tagName="span" 
classNames="service-button-spinner"}}
   {{/if}}
 
-
+
   {{#if App.router.nextBtnClickInProgress}}
 {{view App.SpinnerView tagName="span" 
classNames="service-button-spinner"}}
   {{/if}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/bbd86dd2/ambari-web/app/templates/wizard/step7.hbs
--
diff --git a/ambari-web/app/templates/wizard/step7.hbs 
b/ambari-web/app/templates/wizard/step7.hbs
index aecaf82..206c3cb 100644
--- a/ambari-web/app/templates/wizard/step7.hbs
+++ b/ambari-web/app/templates/wizard/step7.hbs
@@ -33,7 +33,7 @@
 
 
   
-
+
{{t common.back}}
   {{#if App.router.backBtnClickInProgress}}
 {{view App.SpinnerView tagName="span" 
classNames="service-button-spinner"}}
@@ -43,7 +43,7 @@
   {{#if App.supports.preInstallChecks}}
  
{{t installer.step7.preInstallChecks}}
   {{/if}}
-  
+  
 {{#if App.router.nextBtnClickInProgress}}
   {{view App.SpinnerView tagName="span" 
classNames="service-button-spinner"}}
 {{/if}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/bbd86dd2/ambari-web/app/templates/wizard/step8.hbs
--
diff --git a/ambari-web/app/templates/wizard/step8.hbs 
b/ambari-web/app/templates/wizard/step8.hbs
index f0e7b83..ac32710 100644
--- a/ambari-web/app/templates/wizard/step8.hbs
+++ b/ambari-web/app/templates/wizard/step8.hbs
@@ -84,13 +84,13 @@
 
 
   
-
+
  

ambari git commit: AMBARI-20732. Remove duplicate condition from route (onechiponerko)

2017-04-11 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk d3036fdaa -> 2760cda04


AMBARI-20732. Remove duplicate condition from route (onechiponerko)


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

Branch: refs/heads/trunk
Commit: 2760cda04ca7fd8fa85cf643444acbb735eb
Parents: d3036fd
Author: Oleg Nechiporenko 
Authored: Tue Apr 11 13:57:44 2017 +0300
Committer: Oleg Nechiporenko 
Committed: Tue Apr 11 18:55:03 2017 +0300

--
 ambari-web/app/routes/main.js| 2 +-
 ambari-web/test/controllers/main_test.js | 1 -
 ambari-web/test/init_test.js | 2 ++
 3 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2760cda0/ambari-web/app/routes/main.js
--
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 0a2375e..1f881e0 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -653,7 +653,7 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
 
   route: '/serviceAutoStart',
   enter: function(router, transition) {
-if (router.get('loggedIn') && 
!App.isAuthorized('CLUSTER.MANAGE_AUTO_START') && 
!App.isAuthorized('CLUSTER.MANAGE_AUTO_START')) {
+if (router.get('loggedIn') && 
!App.isAuthorized('CLUSTER.MANAGE_AUTO_START')) {
   router.transitionTo('main.dashboard.index');
 }
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/2760cda0/ambari-web/test/controllers/main_test.js
--
diff --git a/ambari-web/test/controllers/main_test.js 
b/ambari-web/test/controllers/main_test.js
index 9673092..573b1e9 100644
--- a/ambari-web/test/controllers/main_test.js
+++ b/ambari-web/test/controllers/main_test.js
@@ -17,7 +17,6 @@
  */
 
 var App = require('app');
-var testHelpers = require('test/helpers');
 
 describe('App.MainController', function () {
   var mainController = App.MainController.create();

http://git-wip-us.apache.org/repos/asf/ambari/blob/2760cda0/ambari-web/test/init_test.js
--
diff --git a/ambari-web/test/init_test.js b/ambari-web/test/init_test.js
index db72744..f6b572a 100644
--- a/ambari-web/test/init_test.js
+++ b/ambari-web/test/init_test.js
@@ -91,6 +91,7 @@ if (!Array.prototype.includes) {
   });
 }
 
+/* eslint-disable */
 if (typeof Object.assign != 'function') {
   Object.assign = function(target, varArgs) { // .length of function is 2
 'use strict';
@@ -115,6 +116,7 @@ if (typeof Object.assign != 'function') {
 return to;
   };
 }
+/* eslint-enable */
 
 Number.isFinite = Number.isFinite || function(value) {
   return typeof value === 'number' && isFinite(value);



ambari git commit: AMBARI-20609. Fix Install Wizard data attribute (onechiporenko)

2017-03-31 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk ee24a25d1 -> 388c6c102


AMBARI-20609. Fix Install Wizard data attribute (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 388c6c102a346b7d0859f9f30fcd3c99164d0a63
Parents: ee24a25
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Fri Mar 31 11:50:22 2017 +0300
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Fri Mar 31 11:50:22 2017 +0300

--
 ambari-web/app/templates/wizard/step8.hbs | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/388c6c10/ambari-web/app/templates/wizard/step8.hbs
--
diff --git a/ambari-web/app/templates/wizard/step8.hbs 
b/ambari-web/app/templates/wizard/step8.hbs
index 9e50e30..f0e7b83 100644
--- a/ambari-web/app/templates/wizard/step8.hbs
+++ b/ambari-web/app/templates/wizard/step8.hbs
@@ -27,7 +27,7 @@
 
   
 
-  
+  
 
   {{#each item in controller.clusterInfo}}
 
@@ -62,12 +62,12 @@
   {{t menu.item.services}}:
   
 {{#each controller.services}}
-  
-{{display_name}}
+  
+{{display_name}}
 
   {{#each component in this.service_components}}
 
-  {{component.display_name }} : {{component.component_value}}
+  {{component.display_name }} :  {{component.component_value}}
 
   {{/each}}
 



ambari git commit: AMBARI-20609. Fix Install Wizard data attribute (onechiporenko)

2017-03-29 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk edbb54920 -> 4d6c80feb


AMBARI-20609. Fix Install Wizard data attribute (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 4d6c80febe439377d3753867196b0499d2ed4ba3
Parents: edbb549
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Mar 29 15:59:54 2017 +0300
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Mar 29 15:59:54 2017 +0300

--
 ambari-web/app/assets/index.html|  4 ++--
 .../app/controllers/wizard/step6_controller.js  |  5 +++-
 .../mixins/wizard/assign_master_components.js   |  1 +
 ambari-web/app/templates/application.hbs|  4 ++--
 .../common/assign_master_components.hbs | 14 ++--
 .../app/templates/common/form/dropdown.hbs  |  2 +-
 ambari-web/app/templates/common/modal_popup.hbs |  8 +++
 ambari-web/app/templates/installer.hbs  | 24 ++--
 ambari-web/app/templates/wizard/step6.hbs   | 18 +++
 .../common/assign_master_components_view.js |  4 
 ambari-web/app/views/common/modal_popup.js  |  1 +
 .../views/common/modal_popups/alert_popup.js|  1 +
 .../common/modal_popups/confirmation_popup.js   |  1 +
 ambari-web/app/views/wizard/step6_view.js   | 12 ++
 14 files changed, 57 insertions(+), 42 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4d6c80fe/ambari-web/app/assets/index.html
--
diff --git a/ambari-web/app/assets/index.html b/ambari-web/app/assets/index.html
index 848df40..efd3c64 100644
--- a/ambari-web/app/assets/index.html
+++ b/ambari-web/app/assets/index.html
@@ -45,8 +45,8 @@
 
 
 
-http://www.apache.org/licenses/LICENSE-2.0; 
target="_blank">Licensed under the Apache License, Version 2.0.
-See third-party 
tools/resources that Ambari uses and their respective authors
+http://www.apache.org/licenses/LICENSE-2.0; target="_blank">Licensed 
under the Apache License, Version 2.0.
+See third-party tools/resources that Ambari uses and their 
respective authors
  
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d6c80fe/ambari-web/app/controllers/wizard/step6_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step6_controller.js 
b/ambari-web/app/controllers/wizard/step6_controller.js
index d766c18..fb26dc2 100644
--- a/ambari-web/app/controllers/wizard/step6_controller.js
+++ b/ambari-web/app/controllers/wizard/step6_controller.js
@@ -163,6 +163,7 @@ App.WizardStep6Controller = 
Em.Controller.extend(App.HostComponentValidationMixi
 
   openSlavesAndClientsIssues: function () {
 App.ModalPopup.show({
+  'data-qa': 'slave-clients-issues-modal',
   header: 
Em.I18n.t('installer.step6.validationSlavesAndClients.popup.header'),
   bodyClass: Em.View.extend({
 controller: this,
@@ -405,7 +406,8 @@ App.WizardStep6Controller = 
Em.Controller.extend(App.HostComponentValidationMixi
 checked: false,
 isInstalled: false,
 isDisabled: header.get('isDisabled'),
-uId: _hostName + '-checkbox-' + index
+uId: _hostName + '-checkbox-' + index,
+dataQaAttr: header.name === 'CLIENT' ? 'client-component' : ''
   };
 })
   };
@@ -834,6 +836,7 @@ App.WizardStep6Controller = 
Em.Controller.extend(App.HostComponentValidationMixi
 
 if (self.get('anyWarnings') || self.get('anyErrors')) {
   App.ModalPopup.show({
+'data-qa': 'validation-issues-modal',
 primary: Em.I18n.t('common.continueAnyway'),
 header: Em.I18n.t('installer.step6.validationIssuesAttention.header'),
 body: Em.I18n.t('installer.step6.validationIssuesAttention'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d6c80fe/ambari-web/app/mixins/wizard/assign_master_components.js
--
diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js 
b/ambari-web/app/mixins/wizard/assign_master_components.js
index 9813da1..3e2a09a 100644
--- a/ambari-web/app/mixins/wizard/assign_master_components.js
+++ b/ambari-web/app/mixins/wizard/assign_master_components.js
@@ -1205,6 +1205,7 @@ App.AssignMasterComponents = 
Em.Mixin.create(App.HostComponentValidationMixin, A
 }
 
 App.ModalPopup.show({
+  'data-qa': 'validation

ambari git commit: AMBARI-20619. JS error on Step6 installer when click "all/none" (onechiporenko)

2017-03-29 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk f6972cbde -> ec1505f21


AMBARI-20619. JS error on Step6 installer when click "all/none" (onechiporenko)


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

Branch: refs/heads/trunk
Commit: ec1505f215c718f54d59cf0ba2e60f37b6515b86
Parents: f6972cb
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Mar 29 14:25:44 2017 +0300
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Mar 29 14:25:44 2017 +0300

--
 ambari-web/app/controllers/wizard/step6_controller.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ec1505f2/ambari-web/app/controllers/wizard/step6_controller.js
--
diff --git a/ambari-web/app/controllers/wizard/step6_controller.js 
b/ambari-web/app/controllers/wizard/step6_controller.js
index adfa0ba..d766c18 100644
--- a/ambari-web/app/controllers/wizard/step6_controller.js
+++ b/ambari-web/app/controllers/wizard/step6_controller.js
@@ -631,8 +631,7 @@ App.WizardStep6Controller = 
Em.Controller.extend(App.HostComponentValidationMixi
 clearTimeout(this.get('timer'));
 if (this.get('validationInProgress')) {
   this.set('timer', setTimeout(function () {
-self.callValidation()
-  .then(validationCallback);
+self.callValidation();
   }, 700));
 } else {
   this.callServerSideValidation()



ambari git commit: AMBARI-20602. Comparison for configs with list of hostNames doesn't show all hosts correctly (onechiporenko)

2017-03-28 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk c77f4ce8b -> d14dba6fa


AMBARI-20602. Comparison for configs with list of hostNames doesn't show all 
hosts correctly (onechiporenko)


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

Branch: refs/heads/trunk
Commit: d14dba6fabd948290403a7857f75da174d0ef1d9
Parents: c77f4ce
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Tue Mar 28 11:49:06 2017 +0300
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Tue Mar 28 14:43:44 2017 +0300

--
 .../app/templates/wizard/component_hosts.hbs |  2 +-
 ambari-web/app/views/common/controls_view.js | 17 ++---
 .../test/views/common/controls_view_test.js  | 19 +++
 3 files changed, 26 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d14dba6f/ambari-web/app/templates/wizard/component_hosts.hbs
--
diff --git a/ambari-web/app/templates/wizard/component_hosts.hbs 
b/ambari-web/app/templates/wizard/component_hosts.hbs
index 802b970..e23b742 100644
--- a/ambari-web/app/templates/wizard/component_hosts.hbs
+++ b/ambari-web/app/templates/wizard/component_hosts.hbs
@@ -20,7 +20,7 @@
   {{t installer.noHostsAssigned}}
 {{else}}
   {{#if view.hasMultipleHosts}}
-{{value.firstObject}} {{t 
and}} {{view.otherLength}}
+{{view.firstHost}} {{t 
and}} {{view.otherLength}}
   {{else}}
 {{view.value.[0]}}
   {{/if}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/d14dba6f/ambari-web/app/views/common/controls_view.js
--
diff --git a/ambari-web/app/views/common/controls_view.js 
b/ambari-web/app/views/common/controls_view.js
index 120ca9a..da886ed 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -914,28 +914,21 @@ App.ServiceConfigMultipleHostsDisplay = 
Ember.Mixin.create(App.ServiceConfigHost
 if (!this.get('value')) {
   return true;
 }
-return this.get('value').length === 0;
+return !this.get('value.length');
   }.property('value'),
 
-  formatValue: function() {
-if (Em.isArray(this.get('value')) && this.get('value').length === 1) {
-  return this.get('value.firstObject');
-} else {
-  return this.get('value');
-}
-  }.property('value'),
+  formatValue: Em.computed.ifThenElseByKeys('hasOneHost', 'value.firstObject', 
'value'),
 
   hasOneHost: Em.computed.equal('value.length', 1),
 
   hasMultipleHosts: Em.computed.gt('value.length', 1),
 
   otherLength: function () {
-var len = this.get('value').length;
+var len = this.get('value.length');
 if (len > 2) {
   return 
Em.I18n.t('installer.controls.serviceConfigMultipleHosts.others').format(len - 
1);
-} else {
-  return Em.I18n.t('installer.controls.serviceConfigMultipleHosts.other');
 }
+return Em.I18n.t('installer.controls.serviceConfigMultipleHosts.other');
   }.property('value')
 
 });
@@ -954,6 +947,8 @@ App.ServiceConfigComponentHostsView = 
Ember.View.extend(App.ServiceConfigMultipl
 
   templateName: require('templates/wizard/component_hosts'),
 
+  firstHost: Em.computed.firstNotBlank('value.firstObject', 
'serviceConfig.value.firstObject'),
+
   /**
* Onclick handler for link
*/

http://git-wip-us.apache.org/repos/asf/ambari/blob/d14dba6f/ambari-web/test/views/common/controls_view_test.js
--
diff --git a/ambari-web/test/views/common/controls_view_test.js 
b/ambari-web/test/views/common/controls_view_test.js
index 3ff5253..17dd6e1 100644
--- a/ambari-web/test/views/common/controls_view_test.js
+++ b/ambari-web/test/views/common/controls_view_test.js
@@ -979,3 +979,22 @@ describe('App.BaseUrlTextField', function () {
 });
   });
 });
+
+describe('App.ServiceConfigComponentHostsView', function () {
+
+  function getView (value, serviceConfig) {
+return App.ServiceConfigComponentHostsView.create({
+  value: value,
+  serviceConfig: serviceConfig
+});
+  }
+
+  App.TestAliases.testAsComputedFirstNotBlank(getView(), 'firstHost', 
['value.firstObject', 'serviceConfig.value.firstObject']);
+
+  App.TestAliases.testAsComputedIfThenElseByKeys(getView(), 'formatValue', 
'hasOneHost', 'value.firstObject', 'value');
+
+  App.TestAliases.testAsComputedEqual(getView(), 'hasOneHost', 'value.length', 
1);
+
+  App.TestAliases.testAsComputedGt(getView(), 'hasMultipleHosts', 
'value.length', 1);
+
+})
\ No newline at end of file



ambari git commit: AMBARI-20577. Not all config groups are shown in the config history table (onechiporenko)

2017-03-27 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk fb153e3e9 -> cfff00c33


AMBARI-20577. Not all config groups are shown in the config history table 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: cfff00c330e9c914c9db352edc0c909a61efdb4a
Parents: fb153e3
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Mon Mar 27 10:32:25 2017 +0300
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Mar 27 15:07:56 2017 +0300

--
 .../views/main/dashboard/config_history_view.js   | 18 --
 ambari-web/test/controllers/wizard/step8_test.js  |  1 +
 .../main/dashboard/config_history_view_test.js| 13 +
 3 files changed, 14 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/cfff00c3/ambari-web/app/views/main/dashboard/config_history_view.js
--
diff --git a/ambari-web/app/views/main/dashboard/config_history_view.js 
b/ambari-web/app/views/main/dashboard/config_history_view.js
index 0acf556..4afd73b 100644
--- a/ambari-web/app/views/main/dashboard/config_history_view.js
+++ b/ambari-web/app/views/main/dashboard/config_history_view.js
@@ -131,22 +131,12 @@ App.MainConfigHistoryView = 
App.TableView.extend(App.TableServerViewMixin, {
 column: 2,
 fieldType: 'filter-input-width',
 content: function () {
-  var groupName = 
App.ServiceConfigVersion.find().mapProperty('groupName').uniq();
-  if (groupName.indexOf(null) > -1) {
-groupName.splice(groupName.indexOf(null), 1);
-  }
   return [
-{
-  value: '',
-  label: Em.I18n.t('common.all')
-}
-  ].concat(groupName.map(function (item) {
-return {
-  value: item,
-  label: item
-}
+{value: '', label: Em.I18n.t('common.all') }
+  
].concat(App.ServiceConfigVersion.find().mapProperty('groupName').uniq().compact().map(item
 => {
+return { value: item, label: item }
   }));
-}.property('parentView.isInitialRendering'),
+}.property('parentView.isInitialRendering', 'controller.content.[]'),
 onChangeValue: function () {
   this.get('parentView').updateFilter(this.get('column'), 
this.get('value'), 'select');
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cfff00c3/ambari-web/test/controllers/wizard/step8_test.js
--
diff --git a/ambari-web/test/controllers/wizard/step8_test.js 
b/ambari-web/test/controllers/wizard/step8_test.js
index 15b9245..7cdb69a 100644
--- a/ambari-web/test/controllers/wizard/step8_test.js
+++ b/ambari-web/test/controllers/wizard/step8_test.js
@@ -2296,6 +2296,7 @@ describe('App.WizardStep8Controller', function () {
 getDBProperty: function(key) {
   if (key === 'kerberosDescriptorConfigs') return 1234;
   if (key === 'isClusterDescriptorExists') return true;
+  return App.db.get(this.get('dbNamespace'), key);
 }
   }));
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/cfff00c3/ambari-web/test/views/main/dashboard/config_history_view_test.js
--
diff --git a/ambari-web/test/views/main/dashboard/config_history_view_test.js 
b/ambari-web/test/views/main/dashboard/config_history_view_test.js
index d799c44..979aefc 100644
--- a/ambari-web/test/views/main/dashboard/config_history_view_test.js
+++ b/ambari-web/test/views/main/dashboard/config_history_view_test.js
@@ -104,6 +104,7 @@ describe('App.MainConfigHistoryView', function() {
   sinon.stub(App.ServiceConfigVersion, 'find').returns([
 Em.Object.create({groupName: 'G1'}),
 Em.Object.create({groupName: 'G1'}),
+Em.Object.create({groupName: 'Default'}),
 Em.Object.create({groupName: null})
   ]);
 });
@@ -113,12 +114,16 @@ describe('App.MainConfigHistoryView', function() {
 it("content", function () {
   expect(subView.get('content')).to.eql([
 {
-  "value": "",
-  "label": Em.I18n.t('common.all')
+  value: '',
+  label: Em.I18n.t('common.all')
+},
+{
+  value: 'G1',
+  label: 'G1'
 },
 {
-  "value": "G1",
-  "label": "G1"
+  value: 'Default',
+  label: 'Default'
 }
   ]);
 });



ambari git commit: AMBARI-20526. Config is not shown on comparison mode if it doesn't exist in the latest version (onechiporenko)

2017-03-23 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 64fc0e23c -> da814785d


AMBARI-20526. Config is not shown on comparison mode if it doesn't exist in the 
latest version (onechiporenko)


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

Branch: refs/heads/trunk
Commit: da814785ddea9b86384188f4d01c987f1154e896
Parents: 64fc0e2
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Mar 22 11:44:15 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Mar 23 10:13:23 2017 +0200

--
 .../mixins/common/configs/configs_comparator.js | 21 
 .../service_config_version_mapper_test.js   |  2 +-
 .../test/mappers/configs/themes_mapper_test.js  |  2 +-
 .../common/configs/configs_comparator_test.js   |  2 ++
 4 files changed, 21 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/da814785/ambari-web/app/mixins/common/configs/configs_comparator.js
--
diff --git a/ambari-web/app/mixins/common/configs/configs_comparator.js 
b/ambari-web/app/mixins/common/configs/configs_comparator.js
index e9fb942..748e77e 100644
--- a/ambari-web/app/mixins/common/configs/configs_comparator.js
+++ b/ambari-web/app/mixins/common/configs/configs_comparator.js
@@ -98,7 +98,8 @@ App.ConfigsComparator = Em.Mixin.create({
   type: configuration.type,
   tag: configuration.tag,
   version: configuration.version,
-  service_config_version: item.service_config_version
+  service_config_version: item.service_config_version,
+  filename: App.config.getOriginalFileName(configuration.type)
 };
 if (Em.isNone(configNamesMap[prop])) {
   allConfigs.push(this.getMockConfig(prop, serviceName, 
App.config.getOriginalFileName(configuration.type)));
@@ -127,7 +128,7 @@ App.ConfigsComparator = Em.Mixin.create({
*/
   addCompareConfigs: function(compareNonDefaultVersions, allConfigs, 
serviceVersionMap) {
 var compareVersionNumber = this.get('compareServiceVersion.version');
-
+var serviceName = this.get('content.serviceName');
 if (compareNonDefaultVersions) {
   allConfigs.forEach(function (serviceConfig) {
 if (Em.get(serviceConfig, 'isRequiredByAgent') !== false) {
@@ -135,13 +136,25 @@ App.ConfigsComparator = Em.Mixin.create({
 }
   }, this);
 } else {
+  var serviceCfgVersionMap = 
serviceVersionMap[this.get('compareServiceVersion.version')] || {};
+  var allConfigsMap = {};
   allConfigs.forEach(function (serviceConfig) {
+var id = serviceConfig.name + '-' + 
App.config.getConfigTagFromFileName(serviceConfig.filename);
+allConfigsMap[id] = serviceConfig;
 if (Em.get(serviceConfig, 'isRequiredByAgent') !== false) {
-  var serviceCfgVersionMap = 
serviceVersionMap[this.get('compareServiceVersion.version')];
-  var compareConfig = serviceCfgVersionMap[serviceConfig.name + '-' + 
App.config.getConfigTagFromFileName(serviceConfig.filename)];
+  var compareConfig = serviceCfgVersionMap[id];
   this.setCompareDefaultGroupConfig(serviceConfig, compareConfig);
 }
   }, this);
+  if (allConfigs.length !== Object.keys(serviceCfgVersionMap).length) {
+Object.keys(serviceCfgVersionMap).forEach(id => {
+  if (!allConfigsMap[id]) {
+var mockConfig = this.getMockConfig(serviceCfgVersionMap[id].name, 
serviceName, serviceCfgVersionMap[id].filename);
+this.setCompareDefaultGroupConfig(mockConfig, 
serviceCfgVersionMap[id]);
+allConfigs.push(mockConfig);
+  }
+});
+  }
 }
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/da814785/ambari-web/test/mappers/configs/service_config_version_mapper_test.js
--
diff --git 
a/ambari-web/test/mappers/configs/service_config_version_mapper_test.js 
b/ambari-web/test/mappers/configs/service_config_version_mapper_test.js
index d99864a..2027bba 100644
--- a/ambari-web/test/mappers/configs/service_config_version_mapper_test.js
+++ b/ambari-web/test/mappers/configs/service_config_version_mapper_test.js
@@ -124,7 +124,7 @@ describe('App.serviceConfigVersionsMapper', function () {
 });
 
 it('currentVersionMap should have not current version', function() {
-  expect(currentVersionMap['S1_g2'].get('isCurrent')).to.be.false;
+  expect(currentVersionMap.S1_g2.get('isCurrent')).to.be.false;
 });
 
 it('App

ambari git commit: AMBARI-20481. Start/Stop Service command may silently fail without any reporting for user (onechiporenko)

2017-03-17 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk bcad0bdd3 -> 2ef903165


AMBARI-20481. Start/Stop Service command may silently fail without any 
reporting for user (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 2ef90316516e305ead42b8b851916f41f1502e60
Parents: bcad0bd
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Mar 16 14:59:00 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Fri Mar 17 10:03:42 2017 +0200

--
 ambari-web/app/controllers/main/service/item.js|  1 +
 .../test/controllers/main/service/item_test.js | 17 +
 2 files changed, 18 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2ef90316/ambari-web/app/controllers/main/service/item.js
--
diff --git a/ambari-web/app/controllers/main/service/item.js 
b/ambari-web/app/controllers/main/service/item.js
index 5169564..37713dc 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -268,6 +268,7 @@ App.MainServiceItemController = 
Em.Controller.extend(App.SupportClientConfigsDow
 }
   },
   startStopPopupErrorCallback: function(request, ajaxOptions, error, opt, 
params){
+App.ajax.defaultErrorHandler(request, opt.url, opt.type, request.status);
 params.query.set('status', 'FAIL');
   },
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/2ef90316/ambari-web/test/controllers/main/service/item_test.js
--
diff --git a/ambari-web/test/controllers/main/service/item_test.js 
b/ambari-web/test/controllers/main/service/item_test.js
index c4a50ea..69a02de 100644
--- a/ambari-web/test/controllers/main/service/item_test.js
+++ b/ambari-web/test/controllers/main/service/item_test.js
@@ -2000,4 +2000,21 @@ describe('App.MainServiceItemController', function () {
 
   });
 
+  describe('#startStopPopupErrorCallback', function () {
+
+beforeEach(function () {
+  sinon.spy(App.ajax, 'defaultErrorHandler');
+});
+
+afterEach(function () {
+  App.ajax.defaultErrorHandler.restore();
+});
+
+it('`App.ajax.defaultErrorHandler` should be called', function () {
+  App.MainServiceItemController.create().startStopPopupErrorCallback({}, 
{}, '', {}, {query: Em.Object.create()});
+  expect(App.ajax.defaultErrorHandler.calledOnce).to.be.true;
+});
+
+  });
+
 });



ambari git commit: AMBARI-20458 Admin/Version page doesn't mark StackAndVersion item as active (onechiporenko)

2017-03-15 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk e34f41ab5 -> 87d47f923


AMBARI-20458 Admin/Version page doesn't mark StackAndVersion item as active 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: 87d47f923505dd399f94c4bb97ed02c775bc0593
Parents: e34f41a
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Mar 15 14:18:35 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Mar 15 14:18:35 2017 +0200

--
 .../app/templates/main/side-menu-item.hbs   |  2 +-
 ambari-web/test/views/main/menu_test.js | 52 +---
 2 files changed, 2 insertions(+), 52 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/87d47f92/ambari-web/app/templates/main/side-menu-item.hbs
--
diff --git a/ambari-web/app/templates/main/side-menu-item.hbs 
b/ambari-web/app/templates/main/side-menu-item.hbs
index 44de409..38ae13d 100644
--- a/ambari-web/app/templates/main/side-menu-item.hbs
+++ b/ambari-web/app/templates/main/side-menu-item.hbs
@@ -35,7 +35,7 @@
 
   {{#each category in view.dropdownCategories}}
 {{#view view.AdminDropdownItemView itemBinding="category.name"}}
-  {{category.label}}
+  {{category.label}}
 {{/view}}
   {{/each}}
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/87d47f92/ambari-web/test/views/main/menu_test.js
--
diff --git a/ambari-web/test/views/main/menu_test.js 
b/ambari-web/test/views/main/menu_test.js
index 658984c..f7dff30 100644
--- a/ambari-web/test/views/main/menu_test.js
+++ b/ambari-web/test/views/main/menu_test.js
@@ -24,7 +24,7 @@ describe('App.MainMenuView', function () {
   var view;
 
   beforeEach(function () {
-view = App.MainSideMenuView.create()
+view = App.MainSideMenuView.create();
   });
 
   describe("#views", function () {
@@ -54,56 +54,6 @@ describe('App.MainMenuView', function () {
   });
 });
 
-// todo: fix test
-
-//describe("#active", function () {
-//
-//  beforeEach(function () {
-//this.mock = sinon.stub(App.router, 'get');
-//  });
-//
-//  afterEach(function () {
-//this.mock.restore();
-//App.router.set('location.lastSetURL', '/login');
-//  });
-//
-//  it("cluster not loaded", function () {
-//this.mock.withArgs('clusterController.isLoaded').returns(false);
-//itemViewClass.propertyDidChange('active');
-//expect(itemViewClass.get('active')).to.be.empty;
-//  });
-//
-//  it("cluster loaded, firstroute should be active", function () {
-//this.mock.withArgs('clusterController.isLoaded').returns(true);
-//App.router.set('location.lastSetURL', '/main/firstroute');
-//itemViewClass.propertyDidChange('active');
-//expect(itemViewClass.get('active')).to.be.equal('active');
-//  });
-//
-//  it("cluster loaded, dashboard should be active", function () {
-//itemViewClass.set('content.routing', ['dashboard']);
-//this.mock.withArgs('clusterController.isLoaded').returns(true);
-//App.router.set('location.lastSetURL', '/main');
-//itemViewClass.propertyDidChange('active');
-//expect(itemViewClass.get('active')).to.be.equal('active');
-//  });
-//
-//  it("cluster loaded, should be undefined", function () {
-//itemViewClass.set('content.routing', ['dashboard']);
-//this.mock.withArgs('clusterController.isLoaded').returns(true);
-//App.router.set('location.lastSetURL', '');
-//itemViewClass.propertyDidChange('active');
-//expect(itemViewClass.get('active')).to.be.undefined;
-//  });
-//
-//  it("cluster loaded, secondroute should not be active", function () {
-//this.mock.withArgs('clusterController.isLoaded').returns(true);
-//App.router.set('location.lastSetURL', '/main/secondroute');
-//itemViewClass.propertyDidChange('active');
-//expect(itemViewClass.get('active')).to.be.empty;
-//  });
-//});
-
 describe("#isViewsItem", function () {
 
   it("should be false", function() {



ambari git commit: AMBARI-20456. Few breadcrumbs are missing (onechiporenko)

2017-03-15 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 5d20ccd23 -> e34f41ab5


AMBARI-20456. Few breadcrumbs are missing (onechiporenko)


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

Branch: refs/heads/trunk
Commit: e34f41ab5054f480de3fd2610441ebc0dbb92142
Parents: 5d20ccd
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Mar 15 12:51:44 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Mar 15 13:28:42 2017 +0200

--
 .../main/admin/stack_and_upgrade_controller.js  | 10 +++
 .../app/routes/activate_hawq_standby_routes.js  |  4 ++
 .../app/routes/add_hawq_standby_routes.js   |  4 ++
 ambari-web/app/routes/add_kerberos_routes.js|  1 +
 .../app/routes/high_availability_routes.js  |  4 ++
 ambari-web/app/routes/main.js   | 46 +++-
 .../app/routes/manage_journalnode_routes.js |  4 ++
 .../app/routes/ra_high_availability_routes.js   |  4 ++
 ambari-web/app/routes/reassign_master_routes.js |  8 +++
 .../app/routes/remove_hawq_standby_routes.js|  4 ++
 .../app/routes/rm_high_availability_routes.js   |  4 ++
 ambari-web/app/routes/stack_upgrade_routes.js   | 13 ++--
 ambari-web/app/routes/view.js   |  1 +
 ambari-web/app/routes/views.js  | 10 +--
 ambari-web/app/views/common/breadcrumbs_view.js | 37 +-
 .../test/views/common/breadcrumbs_view_test.js  | 75 
 16 files changed, 196 insertions(+), 33 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e34f41ab/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js 
b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
index a760f0c..270c5c5 100644
--- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
+++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
@@ -143,6 +143,16 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
   isWizardRestricted: false,
 
   /**
+   * @type {string}
+   */
+  wizardModalTitle: function () {
+if (this.get('isDowngrade')) {
+  return 
Em.I18n.t('admin.stackUpgrade.dialog.downgrade.header').format(this.get('upgradeVersion'));
+}
+return 
Em.I18n.t('admin.stackUpgrade.dialog.header').format(this.get('upgradeTypeDisplayName'),
 this.get('upgradeVersion'));
+  }.property('upgradeTypeDisplayName', 'upgradeVersion', 'isDowngrade'),
+
+  /**
* methods through which cluster could be upgraded, "allowed" indicated if 
the method is allowed
* by stack upgrade path
* @type {Array}

http://git-wip-us.apache.org/repos/asf/ambari/blob/e34f41ab/ambari-web/app/routes/activate_hawq_standby_routes.js
--
diff --git a/ambari-web/app/routes/activate_hawq_standby_routes.js 
b/ambari-web/app/routes/activate_hawq_standby_routes.js
index 9ba6073..fae281b 100644
--- a/ambari-web/app/routes/activate_hawq_standby_routes.js
+++ b/ambari-web/app/routes/activate_hawq_standby_routes.js
@@ -21,6 +21,10 @@ var App = require('app');
 module.exports = App.WizardRoute.extend({
   route: '/highAvailability/Hawq/activate',
 
+  breadcrumbs: {
+label: Em.I18n.t('admin.activateHawqStandby.wizard.header')
+  },
+
   enter: function (router, transition) {
 var activateHawqStandbyWizardController = 
router.get('activateHawqStandbyWizardController');
 activateHawqStandbyWizardController.dataLoading().done(function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e34f41ab/ambari-web/app/routes/add_hawq_standby_routes.js
--
diff --git a/ambari-web/app/routes/add_hawq_standby_routes.js 
b/ambari-web/app/routes/add_hawq_standby_routes.js
index 346f506..dde7009 100644
--- a/ambari-web/app/routes/add_hawq_standby_routes.js
+++ b/ambari-web/app/routes/add_hawq_standby_routes.js
@@ -21,6 +21,10 @@ var App = require('app');
 module.exports = App.WizardRoute.extend({
   route: '/highAvailability/Hawq/add',
 
+  breadcrumbs: {
+label: Em.I18n.t('admin.addHawqStandby.wizard.header')
+  },
+
   enter: function (router, transition) {
 var addHawqStandbyWizardController = 
router.get('addHawqStandbyWizardController');
 addHawqStandbyWizardController.dataLoading().done(function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e34f41ab/ambari-web/app/rout

ambari git commit: AMBARI-20441. Alert Definition "Last Changed" field is shown incorrect if alert wan't triggered any time (onechiporenko)

2017-03-14 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 645407b65 -> e2818c61c


AMBARI-20441. Alert Definition "Last Changed" field is shown incorrect if alert 
wan't triggered any time (onechiporenko)


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

Branch: refs/heads/trunk
Commit: e2818c61c15ec703e15581ca149c27bbfb7c1909
Parents: 645407b
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Tue Mar 14 11:32:45 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Tue Mar 14 11:32:45 2017 +0200

--
 ambari-web/app/models/alerts/alert_definition.js  | 3 ++-
 .../main/service/configs/component_actions_by_configs_test.js | 2 +-
 ambari-web/test/models/alerts/alert_definition_test.js| 7 +++
 3 files changed, 10 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e2818c61/ambari-web/app/models/alerts/alert_definition.js
--
diff --git a/ambari-web/app/models/alerts/alert_definition.js 
b/ambari-web/app/models/alerts/alert_definition.js
index b55ef1b..09089e6 100644
--- a/ambari-web/app/models/alerts/alert_definition.js
+++ b/ambari-web/app/models/alerts/alert_definition.js
@@ -100,7 +100,8 @@ App.AlertDefinition = DS.Model.extend({
* @type {string}
*/
   lastTriggeredFormatted: function () {
-return dateUtils.dateFormat(this.get('lastTriggered'));
+let lastTriggered = this.get('lastTriggered');
+return lastTriggered ? dateUtils.dateFormat(lastTriggered) : '';
   }.property('lastTriggered'),
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/e2818c61/ambari-web/test/mixins/main/service/configs/component_actions_by_configs_test.js
--
diff --git 
a/ambari-web/test/mixins/main/service/configs/component_actions_by_configs_test.js
 
b/ambari-web/test/mixins/main/service/configs/component_actions_by_configs_test.js
index f987c52..9a73a9a 100644
--- 
a/ambari-web/test/mixins/main/service/configs/component_actions_by_configs_test.js
+++ 
b/ambari-web/test/mixins/main/service/configs/component_actions_by_configs_test.js
@@ -226,7 +226,7 @@ describe('App.ComponentActionsByConfigs', function () {
 name: 'common.batch.request_schedules',
 sender: mixin,
 data: {
-  intervalTimeSeconds: 1,
+  intervalTimeSeconds: 60,
   tolerateSize: 0,
   batches: [{}, {}]
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/e2818c61/ambari-web/test/models/alerts/alert_definition_test.js
--
diff --git a/ambari-web/test/models/alerts/alert_definition_test.js 
b/ambari-web/test/models/alerts/alert_definition_test.js
index 3d8b62d..26309ae 100644
--- a/ambari-web/test/models/alerts/alert_definition_test.js
+++ b/ambari-web/test/models/alerts/alert_definition_test.js
@@ -175,6 +175,13 @@ describe('App.AlertDefinition', function () {
 RECOVERY: 'glyphicon glyphicon-oil'
   }});
 
+  describe('#lastTriggeredFormatted', function () {
+it('should be empty', function () {
+  model.set('lastTriggered', 0);
+  expect(model.get('lastTriggeredFormatted')).to.be.equal('');
+});
+  });
+
   describe('REOPEN', function () {
 
 describe('#getSortDefinitionsByStatus', function () {



ambari git commit: AMBARI-20415. JS error when filtering config history table (onechiporenko)

2017-03-13 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 938fed1f3 -> bc28cd782


AMBARI-20415. JS error when filtering config history table (onechiporenko)


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

Branch: refs/heads/trunk
Commit: bc28cd782d1d7cd92c693e3a4884b0ea66ef3484
Parents: 938fed1
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Mon Mar 13 13:38:22 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Mar 13 16:40:38 2017 +0200

--
 ambari-web/app/mixins/common/table_server_view_mixin.js   | 6 ++
 ambari-web/app/views/main/dashboard/config_history_view.js| 4 
 ambari-web/test/mixins/common/table_server_view_mixin_test.js | 3 ++-
 3 files changed, 12 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bc28cd78/ambari-web/app/mixins/common/table_server_view_mixin.js
--
diff --git a/ambari-web/app/mixins/common/table_server_view_mixin.js 
b/ambari-web/app/mixins/common/table_server_view_mixin.js
index d44a09e..a4e6db7 100644
--- a/ambari-web/app/mixins/common/table_server_view_mixin.js
+++ b/ambari-web/app/mixins/common/table_server_view_mixin.js
@@ -149,6 +149,12 @@ App.TableServerViewMixin = Em.Mixin.create({
   this.refresh();
 }
   },
+
+  /**
+   * Placeholder for `saveStartIndex`
+   */
+  saveStartIndex: Em.K,
+
   /**
* when new filter applied page index should be reset to first page
*/

http://git-wip-us.apache.org/repos/asf/ambari/blob/bc28cd78/ambari-web/app/views/main/dashboard/config_history_view.js
--
diff --git a/ambari-web/app/views/main/dashboard/config_history_view.js 
b/ambari-web/app/views/main/dashboard/config_history_view.js
index 7bd9e4a..0acf556 100644
--- a/ambari-web/app/views/main/dashboard/config_history_view.js
+++ b/ambari-web/app/views/main/dashboard/config_history_view.js
@@ -231,6 +231,10 @@ App.MainConfigHistoryView = 
App.TableView.extend(App.TableServerViewMixin, {
 App.loadTimer.finish('Config History Page');
   },
 
+  saveStartIndex: function() {
+App.db.setStartIndex(this.get('controller.name'), this.get('startIndex'));
+  }.observes('startIndex'),
+
   /**
* associations between host property and column index
* @type {Array}

http://git-wip-us.apache.org/repos/asf/ambari/blob/bc28cd78/ambari-web/test/mixins/common/table_server_view_mixin_test.js
--
diff --git a/ambari-web/test/mixins/common/table_server_view_mixin_test.js 
b/ambari-web/test/mixins/common/table_server_view_mixin_test.js
index ae750de..4c9db12 100644
--- a/ambari-web/test/mixins/common/table_server_view_mixin_test.js
+++ b/ambari-web/test/mixins/common/table_server_view_mixin_test.js
@@ -28,7 +28,6 @@ describe('App.MainConfigHistoryView', function() {
 filteredContent: [],
 refresh: Em.K,
 saveFilterConditions: Em.K,
-saveStartIndex: sinon.spy(),
 controller: Em.Object.create({
   name: 'mainConfigHistoryController',
   paginationProps: [
@@ -212,8 +211,10 @@ describe('App.MainConfigHistoryView', function() {
   describe('#resetStartIndex()', function() {
 beforeEach(function () {
   sinon.stub(view, 'updatePagination');
+  sinon.spy(view, 'saveStartIndex');
 });
 afterEach(function () {
+  view.saveStartIndex.restore();
   view.updatePagination.restore();
 });
 it('resetStartIndex is false and filteredCount is 0', function() {



ambari git commit: AMBARI-20375. Remove duplicate code from wizard menu (onechiporenko)

2017-03-09 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk af69dcc43 -> c3c3422e5


AMBARI-20375. Remove duplicate code from wizard menu (onechiporenko)


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

Branch: refs/heads/trunk
Commit: c3c3422e51c58c6e9ec3affd492f28a26499dc1e
Parents: af69dcc
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Mar 9 14:03:11 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Mar 9 16:41:51 2017 +0200

--
 .../app/mixins/wizard/wizard_menu_view.js   | 125 ++-
 .../app/views/main/service/reassign_view.js |  32 -
 2 files changed, 38 insertions(+), 119 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c3c3422e/ambari-web/app/mixins/wizard/wizard_menu_view.js
--
diff --git a/ambari-web/app/mixins/wizard/wizard_menu_view.js 
b/ambari-web/app/mixins/wizard/wizard_menu_view.js
index 90b7354..712263e 100644
--- a/ambari-web/app/mixins/wizard/wizard_menu_view.js
+++ b/ambari-web/app/mixins/wizard/wizard_menu_view.js
@@ -16,101 +16,52 @@
  * limitations under the License.
  */
 
-
 var App = require('app');
 
+function isStepDisabled(index) {
+  return Em.computed('controller.isStepDisabled.@each.{step,value}', function 
() {
+return this.isStepDisabled(index);
+  }).cacheable();
+}
+
+function isStepCompleted(index) {
+  return Em.computed('controller.{currentStep,isStepDisabled.@each.value}', 
function () {
+return this.isStepCompleted(index);
+  }).cacheable();
+}
+
 App.WizardMenuMixin = Em.Mixin.create({
 
   isStepDisabled: function (index) {
 return this.get('controller.isStepDisabled').findProperty('step', 
index).get('value');
   },
 
-  isStep0Disabled: function () {
-return this.isStepDisabled(0);
-  }.property('controller.isStepDisabled.@each.value').cacheable(),
-
-  isStep1Disabled: function () {
-return this.isStepDisabled(1);
-  }.property('controller.isStepDisabled.@each.value').cacheable(),
-
-  isStep2Disabled: function () {
-return this.isStepDisabled(2);
-  }.property('controller.isStepDisabled.@each.value').cacheable(),
-
-  isStep3Disabled: function () {
-return this.isStepDisabled(3);
-  }.property('controller.isStepDisabled.@each.value').cacheable(),
-
-  isStep4Disabled: function () {
-return this.isStepDisabled(4);
-  }.property('controller.isStepDisabled.@each.value').cacheable(),
-
-  isStep5Disabled: function () {
-return this.isStepDisabled(5);
-  }.property('controller.isStepDisabled.@each.value').cacheable(),
-
-  isStep6Disabled: function () {
-return this.isStepDisabled(6);
-  }.property('controller.isStepDisabled.@each.value').cacheable(),
-
-  isStep7Disabled: function () {
-return this.isStepDisabled(7);
-  }.property('controller.isStepDisabled.@each.value').cacheable(),
-
-  isStep8Disabled: function () {
-return this.isStepDisabled(8);
-  }.property('controller.isStepDisabled.@each.value').cacheable(),
-
-  isStep9Disabled: function () {
-return this.isStepDisabled(9);
-  }.property('controller.isStepDisabled.@each.value').cacheable(),
-
-  isStep10Disabled: function () {
-return this.isStepDisabled(10);
-  }.property('controller.isStepDisabled.@each.value').cacheable(),
-
-  isStep0Completed: function () {
-return this.get('controller.currentStep') > 0;
-  }.property('controller.isStepDisabled.@each.value').cacheable(),
-
-  isStep1Completed: function () {
-return this.get('controller.currentStep') > 1;
-  }.property('controller.isStepDisabled.@each.value').cacheable(),
-
-  isStep2Completed: function () {
-return this.get('controller.currentStep') > 2;
-  }.property('controller.isStepDisabled.@each.value').cacheable(),
-
-  isStep3Completed: function () {
-return this.get('controller.currentStep') > 3;
-  }.property('controller.isStepDisabled.@each.value').cacheable(),
-
-  isStep4Completed: function () {
-return this.get('controller.currentStep') > 4;
-  }.property('controller.isStepDisabled.@each.value').cacheable(),
-
-  isStep5Completed: function () {
-return this.get('controller.currentStep') > 5;
-  }.property('controller.isStepDisabled.@each.value').cacheable(),
-
-  isStep6Completed: function () {
-return this.get('controller.currentStep') > 6;
-  }.property('controller.isStepDisabled.@each.value').cacheable(),
-
-  isStep7Completed: function () {
-return this.get('controller.currentStep') > 7;
-  }.property('controller.isStepDisabled.@each.value').cacheable(),
-
-  isStep8Completed: function () {
-return

ambari git commit: AMBARI-20338. Alert Definition Name with brackets marked as invalid (onechiporenko)

2017-03-07 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 bf25d310f -> b9451a4b8


AMBARI-20338. Alert Definition Name with brackets marked as invalid 
(onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: b9451a4b87ab680219d1790d7b2a091e9c330da0
Parents: bf25d31
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Tue Mar 7 12:24:31 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Tue Mar 7 13:13:06 2017 +0200

--
 ambari-web/app/messages.js  |  2 +-
 ambari-web/app/utils/validator.js   |  2 +-
 ambari-web/test/utils/validator_test.js | 22 ++
 3 files changed, 24 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b9451a4b/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 6684f32..83cc85c 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1123,7 +1123,7 @@ Em.I18n.translations = {
   'alerts.definition.name': 'Alert Definition Name',
   'alerts.saveChanges': 'You have unsaved changes',
 
-  'alert.definition.name.invalid': 'Invalid input. Only alphanumerics, 
underscores, hyphens, percentage and spaces are allowed.',
+  'alert.definition.name.invalid': 'Invalid input. Only alphanumerics, 
underscores, hyphens, percentage, brackets and spaces are allowed. Value should 
be less than 255 symbols.',
   'alerts.definition.details.enable': 'Enable',
   'alerts.definition.details.disable': 'Disable',
   'alerts.definition.details.enableDisable': 'Enable / Disable',

http://git-wip-us.apache.org/repos/asf/ambari/blob/b9451a4b/ambari-web/app/utils/validator.js
--
diff --git a/ambari-web/app/utils/validator.js 
b/ambari-web/app/utils/validator.js
index 774215b..dd3d6c0 100644
--- a/ambari-web/app/utils/validator.js
+++ b/ambari-web/app/utils/validator.js
@@ -322,7 +322,7 @@ module.exports = {
* @returns {boolean}
*/
   isValidAlertName: function(value) {
-var alertNameRegex = /^[\s0-9a-z_\-%]+$/i;
+var alertNameRegex = /^[\s0-9a-z_\-%\(\)]+$/i;
 return alertNameRegex.test(value);
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b9451a4b/ambari-web/test/utils/validator_test.js
--
diff --git a/ambari-web/test/utils/validator_test.js 
b/ambari-web/test/utils/validator_test.js
index f0167da..2cb7750 100644
--- a/ambari-web/test/utils/validator_test.js
+++ b/ambari-web/test/utils/validator_test.js
@@ -500,4 +500,26 @@ describe('validator', function () {
   })
 });
   });
+
+  describe('#isValidAlertName', function () {
+
+[
+  {v: '', e: false},
+  {v: 'a', e: true},
+  {v: 'a b', e: true},
+  {v: '/', e: false},
+  {v: '/>1', e: false},
+  {v: 'a 1%', e: true},
+  {v: 'a (b)', e: true}
+].forEach(function (test) {
+
+  it(test.m || test.v, function () {
+expect(validator.isValidAlertName(test.v)).to.be.equal(test.e);
+  })
+
+});
+
+
+  });
+
 });



ambari git commit: AMBARI-20338. Alert Definition Name with brackets marked as invalid (onechiporenko)

2017-03-07 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 281875354 -> e6dcdf633


AMBARI-20338. Alert Definition Name with brackets marked as invalid 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: e6dcdf633f3949f8a59203185c8fb65874932e67
Parents: 2818753
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Tue Mar 7 12:24:31 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Tue Mar 7 13:01:38 2017 +0200

--
 ambari-web/app/messages.js  |  2 +-
 ambari-web/app/utils/validator.js   |  2 +-
 ambari-web/test/utils/validator_test.js | 21 +
 3 files changed, 23 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e6dcdf63/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 44bf13e..a0bc119 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1152,7 +1152,7 @@ Em.I18n.translations = {
   'alerts.definition.name': 'Alert Definition Name',
   'alerts.saveChanges': 'You have unsaved changes',
 
-  'alert.definition.name.invalid': 'Invalid input. Only alphanumerics, 
underscores, hyphens, percentage and spaces are allowed.',
+  'alert.definition.name.invalid': 'Invalid input. Only alphanumerics, 
underscores, hyphens, percentage, brackets and spaces are allowed. Value should 
be less than 255 symbols.',
   'alerts.definition.details.enable': 'Enable',
   'alerts.definition.details.disable': 'Disable',
   'alerts.definition.details.enableDisable': 'Enable / Disable',

http://git-wip-us.apache.org/repos/asf/ambari/blob/e6dcdf63/ambari-web/app/utils/validator.js
--
diff --git a/ambari-web/app/utils/validator.js 
b/ambari-web/app/utils/validator.js
index 5173702..c069724 100644
--- a/ambari-web/app/utils/validator.js
+++ b/ambari-web/app/utils/validator.js
@@ -323,7 +323,7 @@ module.exports = {
* @returns {boolean}
*/
   isValidAlertName: function(value) {
-var alertNameRegex = /^[\s0-9a-z_\-%]+$/i;
+var alertNameRegex = /^[\s0-9a-z_\-%\(\)]+$/i;
 return alertNameRegex.test(value);
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e6dcdf63/ambari-web/test/utils/validator_test.js
--
diff --git a/ambari-web/test/utils/validator_test.js 
b/ambari-web/test/utils/validator_test.js
index 8565b3d..aada441 100644
--- a/ambari-web/test/utils/validator_test.js
+++ b/ambari-web/test/utils/validator_test.js
@@ -523,4 +523,25 @@ describe('validator', function () {
 
   });
 
+  describe('#isValidAlertName', function () {
+
+[
+  {v: '', e: false},
+  {v: 'a', e: true},
+  {v: 'a b', e: true},
+  {v: '/', e: false},
+  {v: '/>1', e: false},
+  {v: 'a 1%', e: true},
+  {v: 'a (b)', e: true}
+].forEach(function (test) {
+
+  it(test.m || test.v, function () {
+expect(validator.isValidAlertName(test.v)).to.be.equal(test.e);
+  })
+
+});
+
+
+  });
+
 });



ambari git commit: AMBARI-20316. Move breadcrumbs to the separated view (onechiporenko)

2017-03-06 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 3d95dd6bf -> f7e7c8bb3


AMBARI-20316. Move breadcrumbs to the separated view (onechiporenko)


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

Branch: refs/heads/trunk
Commit: f7e7c8bb331d92997d547e6717ee1f3fdbefc6a8
Parents: 3d95dd6
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Mon Mar 6 14:58:54 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Mar 6 16:30:14 2017 +0200

--
 ambari-web/app/assets/test/tests.js |   1 +
 ambari-web/app/routes/main.js   |  78 
 ambari-web/app/routes/view.js   |   5 +
 ambari-web/app/routes/views.js  |   7 +
 ambari-web/app/templates/application.hbs|   8 +-
 ambari-web/app/templates/common/breadcrumbs.hbs |  24 +++
 ambari-web/app/views.js |   1 +
 ambari-web/app/views/application.js | 106 +--
 ambari-web/app/views/common/breadcrumbs_view.js | 190 +++
 .../test/controllers/main/service/item_test.js  |  19 +-
 .../test/views/common/breadcrumbs_view_test.js  |  37 
 11 files changed, 359 insertions(+), 117 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f7e7c8bb/ambari-web/app/assets/test/tests.js
--
diff --git a/ambari-web/app/assets/test/tests.js 
b/ambari-web/app/assets/test/tests.js
index 308edcd..ab007f0 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -236,6 +236,7 @@ var files = [
   'test/utils/configs/modification_handlers/misc_test',
   'test/utils/load_timer_test',
   'test/utils/configs/theme/theme_test',
+  'test/views/common/breadcrumbs_view_test',
   'test/views/common/chart/linear_time_test',
   'test/views/common/configs/widgets/combo_config_widget_view_test',
   'test/views/common/configs/widgets/config_widget_view_test',

http://git-wip-us.apache.org/repos/asf/ambari/blob/f7e7c8bb/ambari-web/app/routes/main.js
--
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 4460442..4607033 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -18,7 +18,19 @@
 
 var App = require('app');
 
+function getPostFormatLabel(parent) {
+  return function (label) {
+return `${parent} - ${label}`;
+  }
+}
+
 module.exports = Em.Route.extend(App.RouterRedirections, {
+
+  breadcrumbs: {
+label: '',
+route: 'dashboard'
+  },
+
   route: '/main',
   enter: function (router) {
 App.db.updateStorage();
@@ -111,6 +123,12 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
   }),
 
   dashboard: Em.Route.extend({
+
+breadcrumbs: {
+  label: Em.I18n.t('menu.item.dashboard'),
+  route: 'dashboard'
+},
+
 route: '/dashboard',
 connectOutlets: function (router, context) {
   router.get('mainController').connectOutlet('mainDashboard');
@@ -191,6 +209,15 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
 
 
   hosts: Em.Route.extend({
+
+breadcrumbs: {
+  label: Em.I18n.t('menu.item.hosts'),
+  route: 'hosts',
+  beforeTransition() {
+App.router.set('mainHostController.showFilterConditionsFirstLoad', 
false);
+  }
+},
+
 route: '/hosts',
 index: Ember.Route.extend({
   route: '/',
@@ -202,6 +229,12 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
 }),
 
 hostDetails: Em.Route.extend({
+
+  breadcrumbs: {
+labelBindingPath: 
'App.router.mainHostDetailsController.content.hostName',
+disabled: true
+  },
+
   route: '/:host_id',
   connectOutlets: function (router, host) {
 router.get('mainHostController').set('showFilterConditionsFirstLoad', 
true);
@@ -325,6 +358,15 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
   hostAdd: require('routes/add_host_routes'),
 
   alerts: Em.Route.extend({
+
+breadcrumbs: {
+  label: Em.I18n.t('menu.item.alerts'),
+  route: 'alerts',
+  beforeTransition() {
+
App.router.set('mainAlertDefinitionsController.showFilterConditionsFirstLoad', 
false);
+  }
+},
+
 route: '/alerts',
 index: Em.Route.extend({
   route: '/',
@@ -335,6 +377,11 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
 
 alertDetails: Em.Route.extend({
 
+  breadcrumbs: {
+labelBindingPath: 
'App.router.mainAlertDefinitionDetailsController.content.label',
+   

ambari git commit: AMBARI-20297. Popup "Save changed" appears when user switches config versions (onechiporenko)

2017-03-03 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 fffc69258 -> d485a0a19


AMBARI-20297. Popup "Save changed" appears when user switches config versions 
(onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: d485a0a191a4a7409e2174e363617a0cd47a7e97
Parents: fffc692
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Fri Mar 3 15:21:36 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Fri Mar 3 16:47:47 2017 +0200

--
 ambari-web/app/views/common/configs/config_history_flow.js | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d485a0a1/ambari-web/app/views/common/configs/config_history_flow.js
--
diff --git a/ambari-web/app/views/common/configs/config_history_flow.js 
b/ambari-web/app/views/common/configs/config_history_flow.js
index 0cd6b7f..929f082 100644
--- a/ambari-web/app/views/common/configs/config_history_flow.js
+++ b/ambari-web/app/views/common/configs/config_history_flow.js
@@ -274,6 +274,9 @@ App.ConfigHistoryFlowView = Em.View.extend({
 var type = event.contexts[1],
 controller = this.get('controller'),
 self = this;
+if (!controller.get('versionLoaded')) {
+  return;
+}
 // action from right popup of pull down version list will have context[0] 
== undefined, and use 'hoveredServiceVersion'.
 // refer to AMBARI-19871 for more info
 var configVersion = event.contexts[0] || this.get('hoveredServiceVersion');



ambari git commit: AMBARI-20286. While Comparing versions, value in latest version is not shown for custom property (onechiporenko)

2017-03-03 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 d14bd4560 -> 63ba7d682


AMBARI-20286. While Comparing versions, value in latest version is not shown 
for custom property (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: 63ba7d682acc83a55aa5e5a1e7eff0ea6d60a9cb
Parents: d14bd45
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Fri Mar 3 14:42:42 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Fri Mar 3 14:42:42 2017 +0200

--
 .../app/mixins/common/configs/configs_comparator.js   | 14 ++
 .../models/configs/objects/service_config_property.js |  7 +++
 .../common/configs/service_config_category.hbs|  3 +++
 ambari-web/app/utils/config.js|  3 ++-
 4 files changed, 22 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/63ba7d68/ambari-web/app/mixins/common/configs/configs_comparator.js
--
diff --git a/ambari-web/app/mixins/common/configs/configs_comparator.js 
b/ambari-web/app/mixins/common/configs/configs_comparator.js
index aa595ca..18ab899 100644
--- a/ambari-web/app/mixins/common/configs/configs_comparator.js
+++ b/ambari-web/app/mixins/common/configs/configs_comparator.js
@@ -173,6 +173,10 @@ App.ConfigsComparator = Em.Mixin.create({
 Em.set(serviceConfig, 'compareConfigs', []);
 Em.set(serviceConfig, 'isComparison', true);
 
+if (!Em.get(serviceConfig, 'isCustomGroupConfig')) {
+  Em.set(serviceConfig, 'hasCompareDiffs', false);
+}
+
 if (compareConfig && selectedConfig) {
   Em.get(serviceConfig, 
'compareConfigs').push(this.getComparisonConfig(serviceConfig, compareConfig));
   Em.get(serviceConfig, 
'compareConfigs').push(this.getComparisonConfig(serviceConfig, selectedConfig));
@@ -250,16 +254,18 @@ App.ConfigsComparator = Em.Mixin.create({
 
 Em.set(serviceConfig, 'compareConfigs', []);
 Em.set(serviceConfig, 'isComparison', true);
-
 //if config isn't reconfigurable then it can't have changed value to 
compare
 if (compareConfig) {
   compareObject = this.getComparisonConfig(serviceConfig, compareConfig);
   Em.set(serviceConfig, 'hasCompareDiffs', Em.get(serviceConfig, 'isMock') 
|| this.hasCompareDiffs(serviceConfig, compareObject));
   Em.get(serviceConfig, 'compareConfigs').push(compareObject);
   // user custom property or property that was added during upgrade
-} else if (Em.get(serviceConfig, 'isUserProperty') || (!isEmptyProp && 
!compareConfig && Em.get(serviceConfig, 'isRequiredByAgent') !== false)) {
-  Em.get(serviceConfig, 
'compareConfigs').push(this.getMockComparisonConfig(serviceConfig, 
this.get('compareServiceVersion.version')));
-  Em.set(serviceConfig, 'hasCompareDiffs', true);
+} else {
+  var addToComparison = !Em.get(serviceConfig, 'isCustomGroupConfig') && 
(Em.get(serviceConfig, 'isUserProperty') || !isEmptyProp && !compareConfig && 
Em.get(serviceConfig, 'isRequiredByAgent') !== false);
+  if (addToComparison) {
+Em.get(serviceConfig, 
'compareConfigs').push(this.getMockComparisonConfig(serviceConfig, 
this.get('compareServiceVersion.version')));
+Em.set(serviceConfig, 'hasCompareDiffs', true);
+  }
 }
 
 return serviceConfig;

http://git-wip-us.apache.org/repos/asf/ambari/blob/63ba7d68/ambari-web/app/models/configs/objects/service_config_property.js
--
diff --git a/ambari-web/app/models/configs/objects/service_config_property.js 
b/ambari-web/app/models/configs/objects/service_config_property.js
index 4459946..b99d774 100644
--- a/ambari-web/app/models/configs/objects/service_config_property.js
+++ b/ambari-web/app/models/configs/objects/service_config_property.js
@@ -160,6 +160,13 @@ App.ServiceConfigProperty = Em.Object.extend({
   isConfigIdentity: false,
   copy: '',
 
+  /**
+   * Determines if config exists in the non-default config group but is loaded 
for default config group
+   *
+   * @type {boolean}
+   */
+  isCustomGroupConfig: false,
+
   error: Em.computed.bool('errorMessage.length'),
   warn: Em.computed.bool('warnMessage.length'),
   hasValidationErrors: Em.computed.bool('validationErrors.length'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/63ba7d68/ambari-web/app/templates/common/configs/service_config_category.hbs
-

ambari git commit: AMBARI-20286. While Comparing versions, value in latest version is not shown for custom property (onechiporenko)

2017-03-03 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 07076bd76 -> b624ed6d4


AMBARI-20286. While Comparing versions, value in latest version is not shown 
for custom property (onechiporenko)


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

Branch: refs/heads/trunk
Commit: b624ed6d4002c79143a4c34fc18bed9df965d3c7
Parents: 07076bd
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Fri Mar 3 13:32:59 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Fri Mar 3 13:32:59 2017 +0200

--
 .../app/mixins/common/configs/configs_comparator.js   | 14 ++
 .../models/configs/objects/service_config_property.js |  7 +++
 .../common/configs/service_config_category.hbs|  5 -
 ambari-web/app/utils/config.js|  3 ++-
 ambari-web/test/views/common/table_view_test.js   |  1 -
 5 files changed, 23 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b624ed6d/ambari-web/app/mixins/common/configs/configs_comparator.js
--
diff --git a/ambari-web/app/mixins/common/configs/configs_comparator.js 
b/ambari-web/app/mixins/common/configs/configs_comparator.js
index 4adc5ae..d4551b4 100644
--- a/ambari-web/app/mixins/common/configs/configs_comparator.js
+++ b/ambari-web/app/mixins/common/configs/configs_comparator.js
@@ -196,6 +196,10 @@ App.ConfigsComparator = Em.Mixin.create({
 
 Em.set(serviceConfig, 'isComparison', true);
 
+if (!Em.get(serviceConfig, 'isCustomGroupConfig')) {
+  Em.set(serviceConfig, 'hasCompareDiffs', false);
+}
+
 if (compareConfig && selectedConfig) {
   compareConfigs.push(this.getComparisonConfig(serviceConfig, 
compareConfig));
   compareConfigs.push(this.getComparisonConfig(serviceConfig, 
selectedConfig));
@@ -276,16 +280,18 @@ App.ConfigsComparator = Em.Mixin.create({
 
 Em.set(serviceConfig, 'compareConfigs', []);
 Em.set(serviceConfig, 'isComparison', true);
-
 //if config isn't reconfigurable then it can't have changed value to 
compare
 if (compareConfig) {
   compareObject = this.getComparisonConfig(serviceConfig, compareConfig);
   Em.set(serviceConfig, 'hasCompareDiffs', Em.get(serviceConfig, 'isMock') 
|| this.hasCompareDiffs(serviceConfig, compareObject));
   Em.get(serviceConfig, 'compareConfigs').push(compareObject);
   // user custom property or property that was added during upgrade
-} else if (Em.get(serviceConfig, 'isUserProperty') || (!isEmptyProp && 
Em.get(serviceConfig, 'isRequiredByAgent') !== false)) {
-  Em.get(serviceConfig, 
'compareConfigs').push(this.getMockComparisonConfig(serviceConfig, 
this.get('compareServiceVersion.version')));
-  Em.set(serviceConfig, 'hasCompareDiffs', true);
+} else {
+  var addToComparison = !Em.get(serviceConfig, 'isCustomGroupConfig') && 
(Em.get(serviceConfig, 'isUserProperty') || !isEmptyProp && !compareConfig && 
Em.get(serviceConfig, 'isRequiredByAgent') !== false);
+  if (addToComparison) {
+Em.get(serviceConfig, 
'compareConfigs').push(this.getMockComparisonConfig(serviceConfig, 
this.get('compareServiceVersion.version')));
+Em.set(serviceConfig, 'hasCompareDiffs', true);
+  }
 }
 
 return serviceConfig;

http://git-wip-us.apache.org/repos/asf/ambari/blob/b624ed6d/ambari-web/app/models/configs/objects/service_config_property.js
--
diff --git a/ambari-web/app/models/configs/objects/service_config_property.js 
b/ambari-web/app/models/configs/objects/service_config_property.js
index ed72dc3..5d306eb 100644
--- a/ambari-web/app/models/configs/objects/service_config_property.js
+++ b/ambari-web/app/models/configs/objects/service_config_property.js
@@ -160,6 +160,13 @@ App.ServiceConfigProperty = Em.Object.extend({
   isConfigIdentity: false,
   copy: '',
 
+  /**
+   * Determines if config exists in the non-default config group but is loaded 
for default config group
+   *
+   * @type {boolean}
+   */
+  isCustomGroupConfig: false,
+
   error: Em.computed.bool('errorMessage.length'),
   warn: Em.computed.bool('warnMessage.length'),
   hasValidationErrors: Em.computed.bool('validationErrors.length'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/b624ed6d/ambari-web/app/templates/common/configs/service_config_category.hbs
--
diff --git 
a/ambari-web/app/templates/common/configs/service_config_

ambari git commit: AMBARI-20252. Add ability to use brace expansion in the dependent keys(onechiporenko)

2017-03-01 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 890996fa2 -> bcbc597b7


AMBARI-20252. Add ability to use brace expansion in the dependent 
keys(onechiporenko)


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

Branch: refs/heads/trunk
Commit: bcbc597b7bfa79ae884e2f82eab1f6f6fce022be
Parents: 890996f
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Mar 1 12:13:56 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Mar 1 12:13:56 2017 +0200

--
 ambari-web/app/utils/ember_reopen.js   | 105 ++
 ambari-web/test/utils/ember_reopen_test.js | 112 
 2 files changed, 217 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bcbc597b/ambari-web/app/utils/ember_reopen.js
--
diff --git a/ambari-web/app/utils/ember_reopen.js 
b/ambari-web/app/utils/ember_reopen.js
index c7f93af..ff55b30 100644
--- a/ambari-web/app/utils/ember_reopen.js
+++ b/ambari-web/app/utils/ember_reopen.js
@@ -16,6 +16,11 @@
  * limitations under the License.
  */
 
+const {assert, warn, EXTEND_PROTOTYPES} = Ember;
+
+const END_WITH_EACH_REGEX = /\.@each$/;
+const DEEP_EACH_REGEX = /\.@each\.[^.]+\./;
+
 /**
  Merge the contents of two objects together into the first object.
 
@@ -350,3 +355,103 @@ Ember.Router.reopen({
 }
   }
 });
+
+function expandProperties(pattern, callback) {
+  assert('A computed property key must be a string', typeof pattern === 
'string');
+  assert(
+'Brace expanded properties cannot contain spaces, e.g. "user.{firstName, 
lastName}" should be "user.{firstName,lastName}"',
+pattern.indexOf(' ') === -1
+  );
+
+  let unbalancedNestedError = `Brace expanded properties have to be balanced 
and cannot be nested, pattern: ${pattern}`;
+  let properties = [pattern];
+
+  // Iterating backward over the pattern makes dealing with indices easier.
+  let bookmark;
+  let inside = false;
+  for (let i = pattern.length; i > 0; --i) {
+let current = pattern[i - 1];
+
+switch (current) {
+  // Closing curly brace will be the first character of the brace 
expansion we encounter.
+  // Bookmark its index so long as we're not already inside a brace 
expansion.
+  case '}':
+if (!inside) {
+  bookmark = i - 1;
+  inside = true;
+} else {
+  assert(unbalancedNestedError, false);
+}
+break;
+  // Opening curly brace will be the last character of the brace expansion 
we encounter.
+  // Apply the brace expansion so long as we've already seen a closing 
curly brace.
+  case '{':
+if (inside) {
+  let expansion = pattern.slice(i, bookmark).split(',');
+  // Iterating backward allows us to push new properties w/out 
affecting our "cursor".
+  for (let j = properties.length; j > 0; --j) {
+// Extract the unexpanded property from the array.
+let property = properties.splice(j - 1, 1)[0];
+// Iterate over the expansion, pushing the newly formed properties 
onto the array.
+for (let k = 0; k < expansion.length; ++k) {
+  properties.push(property.slice(0, i - 1) +
+expansion[k] +
+property.slice(bookmark + 1));
+}
+  }
+  inside = false;
+} else {
+  assert(unbalancedNestedError, false);
+}
+break;
+}
+  }
+  if (inside) {
+assert(unbalancedNestedError, false);
+  }
+
+  for (let i = 0; i < properties.length; i++) {
+callback(properties[i].replace(END_WITH_EACH_REGEX, '.[]'));
+  }
+}
+
+Ember.ComputedProperty.prototype.property = function () {
+  let args = [];
+
+  function addArg(property) {
+warn(
+  `Dependent keys containing @each only work one level deep. ` +
+  `You used the key "${property}" which is invalid. ` +
+  `Please create an intermediary computed property.`,
+  DEEP_EACH_REGEX.test(property) === false
+);
+args.push(property);
+  }
+
+  for (let i = 0; i < arguments.length; i++) {
+expandProperties(arguments[i], addArg);
+  }
+
+  this._dependentKeys = args.uniq();
+  return this;
+}
+
+Ember.observer = function(func, ...paths) {
+  let args = [];
+  for (let i = 0; i < paths.length; i++) {
+expandProperties(paths[i], property => args.push(property));
+  }
+  func.__ember_observes__ = args.uniq();
+  return func;
+};
+
+if(EXTEND_PROTOTYPES) {
+  Function.prototype.observes = fu

ambari git commit: AMBARI-20231. Don't recalculate side-menu content when moving to the views (onechiporenko)

2017-02-28 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 44e44ba60 -> a23467bf0


AMBARI-20231. Don't recalculate side-menu content when moving to the views 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: a23467bf03ca2fd10aa9183038b59bcd7ad841e0
Parents: 44e44ba
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Tue Feb 28 13:53:34 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Tue Feb 28 13:53:34 2017 +0200

--
 ambari-web/app/controllers/main/views_controller.js   | 2 ++
 ambari-web/app/views/application.js   | 7 ++-
 ambari-web/app/views/main/menu.js | 1 -
 ambari-web/app/views/main/views_view.js   | 2 +-
 .../admin/highAvailability/nameNode/step4_controller_test.js  | 2 +-
 .../admin/highAvailability/nameNode/step7_controller_test.js  | 2 --
 .../admin/highAvailability/nameNode/step8_controller_test.js  | 2 --
 .../admin/highAvailability/nameNode/wizard_controller_test.js | 2 --
 8 files changed, 6 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a23467bf/ambari-web/app/controllers/main/views_controller.js
--
diff --git a/ambari-web/app/controllers/main/views_controller.js 
b/ambari-web/app/controllers/main/views_controller.js
index e2e9281..eb5775d 100644
--- a/ambari-web/app/controllers/main/views_controller.js
+++ b/ambari-web/app/controllers/main/views_controller.js
@@ -25,6 +25,8 @@ App.MainViewsController = Em.Controller.extend({
 
   ambariViews: [],
 
+  visibleAmbariViews: Em.computed.filterBy('ambariViews', 'visible', true),
+
   dataLoading: function () {
 var viewsController = this;
 var dfd = $.Deferred();

http://git-wip-us.apache.org/repos/asf/ambari/blob/a23467bf/ambari-web/app/views/application.js
--
diff --git a/ambari-web/app/views/application.js 
b/ambari-web/app/views/application.js
index 207e77f..ef9df6a 100644
--- a/ambari-web/app/views/application.js
+++ b/ambari-web/app/views/application.js
@@ -23,11 +23,8 @@ App.ApplicationView = Em.View.extend({
   templateName: require('templates/application'),
 
   views: function () {

-if (App.router.get('loggedIn')) {

-  return 
App.router.get('mainViewsController.ambariViews').filterProperty('visible');

-} else {

-  return [];

-}
}.property('App.router.mainViewsController.ambariViews.length', 
'App.router.loggedIn'),
+return App.router.get('loggedIn') ? 
App.router.get('mainViewsController.visibleAmbariViews') : [];
+  
}.property('App.router.mainViewsController.visibleAmbariViews.[]', 
'App.router.loggedIn'),
 
   /**
* Create the breadcrums showing on ambari top bar

http://git-wip-us.apache.org/repos/asf/ambari/blob/a23467bf/ambari-web/app/views/main/menu.js
--
diff --git a/ambari-web/app/views/main/menu.js 
b/ambari-web/app/views/main/menu.js
index 91aaad7..6e79aba 100644
--- a/ambari-web/app/views/main/menu.js
+++ b/ambari-web/app/views/main/menu.js
@@ -49,7 +49,6 @@ App.MainSideMenuView = Em.CollectionView.extend({
 return result;
   }.property(
   'App.router.loggedIn',
-  'views.length',
   'App.router.clusterController.isLoaded',
   'App.router.clusterInstallCompleted',
   'App.router.wizardWatcherController.isWizardRunning'

http://git-wip-us.apache.org/repos/asf/ambari/blob/a23467bf/ambari-web/app/views/main/views_view.js
--
diff --git a/ambari-web/app/views/main/views_view.js 
b/ambari-web/app/views/main/views_view.js
index 46b3e43..846ecd9 100644
--- a/ambari-web/app/views/main/views_view.js
+++ b/ambari-web/app/views/main/views_view.js
@@ -26,7 +26,7 @@ App.MainViewsView = Em.View.extend({
 
   views: function() {
 return App.router.get('mainViewsController.ambariViews');
-  }.property('App.router.mainViewsController.ambariViews.@each'),
+  }.property('App.router.mainViewsController.ambariViews.[]'),
 
   selectedViewBinding: 'controller.selectedView'
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a23467bf/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step4_controller_test.js
--
diff --git 
a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step4_controller_test.js
 
b/ambari-web/test/control

ambari git commit: AMBARI-20147. Not able to delete custom property (onechiporenko)

2017-02-27 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 f849d527e -> 2c16e73d8


AMBARI-20147. Not able to delete custom property (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: 2c16e73d89676769705c8711c33cbfc65fca8d2d
Parents: f849d52
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Mon Feb 27 12:46:52 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Feb 27 15:17:30 2017 +0200

--
 .../configs/overriddenPropertyRow_view.js   | 21 ++--
 1 file changed, 15 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2c16e73d/ambari-web/app/views/common/configs/overriddenPropertyRow_view.js
--
diff --git a/ambari-web/app/views/common/configs/overriddenPropertyRow_view.js 
b/ambari-web/app/views/common/configs/overriddenPropertyRow_view.js
index 86e9c60..af65aee 100644
--- a/ambari-web/app/views/common/configs/overriddenPropertyRow_view.js
+++ b/ambari-web/app/views/common/configs/overriddenPropertyRow_view.js
@@ -67,14 +67,23 @@ App.ServiceConfigView.SCPOverriddenRowsView = 
Ember.View.extend({
   removeOverride: function (event) {
 // arg 1 SCP means ServiceConfigProperty
 var scpToBeRemoved = event.contexts[0];
-var overrides = this.get('serviceConfigProperty.overrides');
+var scp = this.get('serviceConfigProperty');
+var overrides = scp.get('overrides');
+var controller = this.get('controller');
+var group = 
controller.get('selectedService.configGroups').findProperty('name', 
controller.get('selectedConfigGroup.name'));
 // remove override property from selectedService on installer 7-th step
-if (this.get('controller.name') == 'wizardStep7Controller') {
-  var controller = this.get('controller');
-  var group = 
controller.get('selectedService.configGroups').findProperty('name', 
controller.get('selectedConfigGroup.name'));
+if (this.get('controller.name') === 'wizardStep7Controller') {
   group.get('properties').removeObject(scpToBeRemoved);
 }
-overrides = overrides.without(scpToBeRemoved);
-this.set('serviceConfigProperty.overrides', overrides);
+if (overrides) {
+  overrides = overrides.without(scpToBeRemoved);
+  this.set('serviceConfigProperty.overrides', overrides);
+}
+else {
+  if (scp.get('isUserProperty')) {
+this.get('parentView.serviceConfigs').removeObject(scpToBeRemoved);
+this.get('parentView.categoryConfigsAll').removeObject(scpToBeRemoved);
+  }
+}
   }
 });
\ No newline at end of file



ambari git commit: AMBARI-20147. Not able to delete custom property (onechiporenko)

2017-02-27 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 454e5a1ed -> d4c668c7b


AMBARI-20147. Not able to delete custom property (onechiporenko)


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

Branch: refs/heads/trunk
Commit: d4c668c7bb182b8e5e2e826b0864c80d092330c5
Parents: 454e5a1
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Mon Feb 27 12:46:52 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Feb 27 14:34:08 2017 +0200

--
 .../mixins/common/configs/configs_comparator.js |  4 ++--
 .../configs/overriddenPropertyRow_view.js   | 21 ++--
 2 files changed, 17 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d4c668c7/ambari-web/app/mixins/common/configs/configs_comparator.js
--
diff --git a/ambari-web/app/mixins/common/configs/configs_comparator.js 
b/ambari-web/app/mixins/common/configs/configs_comparator.js
index b619aca..4adc5ae 100644
--- a/ambari-web/app/mixins/common/configs/configs_comparator.js
+++ b/ambari-web/app/mixins/common/configs/configs_comparator.js
@@ -222,8 +222,8 @@ App.ConfigsComparator = Em.Mixin.create({
* @method getMockComparisonConfig
*/
   getMockComparisonConfig: function (serviceConfig, compareServiceVersion) {
-var compareObject = $.extend(true, {isComparison: false},  serviceConfig);
-compareObject.setProperties({
+var compareObject = $.extend(true, {isComparison: false}, serviceConfig);
+Em.setProperties(compareObject, {
   isEditable: false,
   serviceVersion: 
App.ServiceConfigVersion.find(this.get('content.serviceName') + "_" + 
compareServiceVersion),
   isMock: true,

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4c668c7/ambari-web/app/views/common/configs/overriddenPropertyRow_view.js
--
diff --git a/ambari-web/app/views/common/configs/overriddenPropertyRow_view.js 
b/ambari-web/app/views/common/configs/overriddenPropertyRow_view.js
index 86e9c60..af65aee 100644
--- a/ambari-web/app/views/common/configs/overriddenPropertyRow_view.js
+++ b/ambari-web/app/views/common/configs/overriddenPropertyRow_view.js
@@ -67,14 +67,23 @@ App.ServiceConfigView.SCPOverriddenRowsView = 
Ember.View.extend({
   removeOverride: function (event) {
 // arg 1 SCP means ServiceConfigProperty
 var scpToBeRemoved = event.contexts[0];
-var overrides = this.get('serviceConfigProperty.overrides');
+var scp = this.get('serviceConfigProperty');
+var overrides = scp.get('overrides');
+var controller = this.get('controller');
+var group = 
controller.get('selectedService.configGroups').findProperty('name', 
controller.get('selectedConfigGroup.name'));
 // remove override property from selectedService on installer 7-th step
-if (this.get('controller.name') == 'wizardStep7Controller') {
-  var controller = this.get('controller');
-  var group = 
controller.get('selectedService.configGroups').findProperty('name', 
controller.get('selectedConfigGroup.name'));
+if (this.get('controller.name') === 'wizardStep7Controller') {
   group.get('properties').removeObject(scpToBeRemoved);
 }
-overrides = overrides.without(scpToBeRemoved);
-this.set('serviceConfigProperty.overrides', overrides);
+if (overrides) {
+  overrides = overrides.without(scpToBeRemoved);
+  this.set('serviceConfigProperty.overrides', overrides);
+}
+else {
+  if (scp.get('isUserProperty')) {
+this.get('parentView.serviceConfigs').removeObject(scpToBeRemoved);
+this.get('parentView.categoryConfigsAll').removeObject(scpToBeRemoved);
+  }
+}
   }
 });
\ No newline at end of file



ambari git commit: AMBARI-20169. Handle on UI error on services API while trying to start all services with atleast one component in INSTALL_FAILED state (onechiporenko)

2017-02-27 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 1822f0ec4 -> 093aa3a07


AMBARI-20169. Handle on UI error on services API while trying to start all 
services with atleast one component in INSTALL_FAILED state (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: 093aa3a073369b38ce8ceed144f1175a6753d09b
Parents: 1822f0e
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Mon Feb 27 11:33:38 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Feb 27 12:37:33 2017 +0200

--
 .../app/controllers/main/admin/kerberos/step8_controller.js   | 2 +-
 ambari-web/app/controllers/main/service.js| 1 +
 ambari-web/app/mixins/wizard/wizardProgressPageController.js  | 7 ++-
 .../controllers/main/admin/kerberos/step8_controller_test.js  | 2 +-
 4 files changed, 9 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/093aa3a0/ambari-web/app/controllers/main/admin/kerberos/step8_controller.js
--
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step8_controller.js 
b/ambari-web/app/controllers/main/admin/kerberos/step8_controller.js
index 3e659b9..efc4da0 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step8_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step8_controller.js
@@ -34,7 +34,7 @@ App.KerberosWizardStep8Controller = 
App.KerberosProgressPageController.extend({
 urlParams: "params/run_smoke_test=" + !skipServiceCheck
   },
   success: 'startPolling',
-  error: 'onTaskError'
+  error: 'startServicesErrorCallback'
 });
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/093aa3a0/ambari-web/app/controllers/main/service.js
--
diff --git a/ambari-web/app/controllers/main/service.js 
b/ambari-web/app/controllers/main/service.js
index 5dfc176..eb9df0d 100644
--- a/ambari-web/app/controllers/main/service.js
+++ b/ambari-web/app/controllers/main/service.js
@@ -295,6 +295,7 @@ App.MainServiceController = 
Em.ArrayController.extend(App.SupportClientConfigsDo
*/
   allServicesCallErrorCallback: function (request, ajaxOptions, error, opt, 
params) {
 params.query.set('status', 'FAIL');
+App.ajax.defaultErrorHandler(request, opt.url, opt.type, request.status);
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/093aa3a0/ambari-web/app/mixins/wizard/wizardProgressPageController.js
--
diff --git a/ambari-web/app/mixins/wizard/wizardProgressPageController.js 
b/ambari-web/app/mixins/wizard/wizardProgressPageController.js
index 96eb0ae..ced5591 100644
--- a/ambari-web/app/mixins/wizard/wizardProgressPageController.js
+++ b/ambari-web/app/mixins/wizard/wizardProgressPageController.js
@@ -506,10 +506,15 @@ App.wizardProgressPageControllerMixin = 
Em.Mixin.create(App.InstallComponent, {
   sender: this,
   data: data,
   success: 'startPolling',
-  error: 'onTaskError'
+  error: 'startServicesErrorCallback'
 });
   },
 
+  startServicesErrorCallback: function (jqXHR, ajaxOptions, error, opt) {
+App.ajax.defaultErrorHandler(jqXHR, opt.url, opt.type, jqXHR.status);
+this.onTaskError(jqXHR, ajaxOptions, error, opt);
+  },
+
   /**
* Create component on single or multiple hosts.
*

http://git-wip-us.apache.org/repos/asf/ambari/blob/093aa3a0/ambari-web/test/controllers/main/admin/kerberos/step8_controller_test.js
--
diff --git 
a/ambari-web/test/controllers/main/admin/kerberos/step8_controller_test.js 
b/ambari-web/test/controllers/main/admin/kerberos/step8_controller_test.js
index 50a705d..0b19393 100644
--- a/ambari-web/test/controllers/main/admin/kerberos/step8_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/kerberos/step8_controller_test.js
@@ -56,7 +56,7 @@ describe('App.KerberosWizardStep8Controller', function() {
   urlParams: "params/run_smoke_test=false"
 },
 success: 'startPolling',
-error: 'onTaskError'
+error: 'startServicesErrorCallback'
   });
 });
   });



ambari git commit: AMBARI-20163. After disabling security page is not refreshed (onechiporenko)

2017-02-24 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 3952c83ee -> d55dfc27f


AMBARI-20163. After disabling security page is not refreshed (onechiporenko)


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

Branch: refs/heads/trunk
Commit: d55dfc27f56a673364fa38e90c47d767f489dd72
Parents: 3952c83
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Fri Feb 24 10:41:33 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Fri Feb 24 14:16:41 2017 +0200

--
 ambari-web/app/routes/main.js | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d55dfc27/ambari-web/app/routes/main.js
--
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 9730de2..d7d2785 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -433,6 +433,10 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
   secondary: null,
   disablePrimary: 
Em.computed.alias('App.router.kerberosDisableController.isSubmitDisabled'),
 
+  onPrimary() {
+this.onClose();
+  },
+
   onClose: function () {
 var self = this;
 var controller = router.get('kerberosDisableController');



ambari git commit: AMBARI-20099.Password fields are not disabled when should be (onechiporenko)

2017-02-22 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 0ffa89532 -> 1a6267597


AMBARI-20099.Password fields are not disabled when should be (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 1a6267597d5c445dc9bb12e4cfead5073cf134cf
Parents: 0ffa895
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Tue Feb 21 17:57:17 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Feb 22 10:23:00 2017 +0200

--
 ambari-web/app/utils/ember_reopen.js | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1a626759/ambari-web/app/utils/ember_reopen.js
--
diff --git a/ambari-web/app/utils/ember_reopen.js 
b/ambari-web/app/utils/ember_reopen.js
index ef996fc..c7f93af 100644
--- a/ambari-web/app/utils/ember_reopen.js
+++ b/ambari-web/app/utils/ember_reopen.js
@@ -237,6 +237,10 @@ Ember._HandlebarsBoundView.reopen({
   }
 });
 
+Ember.TextField.reopen({
+  attributeBindings: ['readOnly']
+});
+
 Ember.TextArea.reopen({
   attributeBindings: ['readonly']
 });



ambari git commit: AMBARI-20039. navigation bar interactiveness: clicking on an element should make it active (onechiporenko)

2017-02-20 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/side-navigation-feature-branch ab7a67199 -> 36a01d4b9


AMBARI-20039. navigation bar interactiveness: clicking on an element should 
make it active (onechiporenko)


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

Branch: refs/heads/side-navigation-feature-branch
Commit: 36a01d4b92ba0e8ecf4a24b55d533650d13fd97f
Parents: ab7a671
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Mon Feb 20 13:24:48 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Feb 20 13:24:48 2017 +0200

--
 .../app/styles/theme/bootstrap-ambari.css   | 79 +---
 .../vendor/scripts/theme/bootstrap-ambari.js| 12 ++-
 2 files changed, 63 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/36a01d4b/ambari-web/app/styles/theme/bootstrap-ambari.css
--
diff --git a/ambari-web/app/styles/theme/bootstrap-ambari.css 
b/ambari-web/app/styles/theme/bootstrap-ambari.css
index 2459808..5297c77 100644
--- a/ambari-web/app/styles/theme/bootstrap-ambari.css
+++ b/ambari-web/app/styles/theme/bootstrap-ambari.css
@@ -1,20 +1,3 @@
-/**
- * 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.
- */
 @font-face {
   font-family: 'Roboto';
   font-weight: normal;
@@ -334,15 +317,15 @@ input.form-control:focus {
 }
 .has-warning input.form-control {
   color: #666;
-  border: 1px solid #E98A41;
+  border: 1px solid #E98A40;
 }
 .has-warning input.form-control:focus {
-  border-color: #E98A41;
+  border-color: #E98A40;
   box-shadow: none;
 }
 .has-warning .help-block.validation-block::before {
   content: '\e101';
-  color: #E98A41;
+  color: #E98A40;
 }
 .form-control[disabled],
 .form-control[readonly],
@@ -948,26 +931,40 @@ input.radio:checked + label:after {
   color: #fff;
 }
 .navigation-bar-container ul.nav.side-nav-menu li.active:not(.has-sub-menu),
-.navigation-bar-container ul.nav.side-nav-footer li.active:not(.has-sub-menu) {
+.navigation-bar-container ul.nav.side-nav-footer li.active:not(.has-sub-menu),
+.navigation-bar-container ul.nav.side-nav-menu li.active.collapsed,
+.navigation-bar-container ul.nav.side-nav-footer li.active.collapsed {
   background: #404351;
   cursor: pointer;
 }
 .navigation-bar-container ul.nav.side-nav-menu li.active:not(.has-sub-menu) > 
a,
-.navigation-bar-container ul.nav.side-nav-footer li.active:not(.has-sub-menu) 
> a {
+.navigation-bar-container ul.nav.side-nav-footer li.active:not(.has-sub-menu) 
> a,
+.navigation-bar-container ul.nav.side-nav-menu li.active.collapsed > a,
+.navigation-bar-container ul.nav.side-nav-footer li.active.collapsed > a {
   color: #fff;
 }
 .navigation-bar-container ul.nav.side-nav-menu li.active:not(.has-sub-menu) > 
a .navigation-menu-item,
 .navigation-bar-container ul.nav.side-nav-footer li.active:not(.has-sub-menu) 
> a .navigation-menu-item,
+.navigation-bar-container ul.nav.side-nav-menu li.active.collapsed > a 
.navigation-menu-item,
+.navigation-bar-container ul.nav.side-nav-footer li.active.collapsed > a 
.navigation-menu-item,
 .navigation-bar-container ul.nav.side-nav-menu li.active:not(.has-sub-menu) > 
a .submenu-item,
 .navigation-bar-container ul.nav.side-nav-footer li.active:not(.has-sub-menu) 
> a .submenu-item,
+.navigation-bar-container ul.nav.side-nav-menu li.active.collapsed > a 
.submenu-item,
+.navigation-bar-container ul.nav.side-nav-footer li.active.collapsed > a 
.submenu-item,
 .navigation-bar-container ul.nav.side-nav-menu li.active:not(.has-sub-menu) > 
a .navigation-icon,
 .navigation-bar-container ul.nav.side-nav-footer li.active:not(.has-sub-menu) 
> a .navigation-icon,
+.navigation-bar-container ul.nav.side-nav-menu li.active.collapsed > a 
.navigation-icon,
+.naviga

ambari git commit: AMBARI-20043. Don't rerender all widgets when one of them is changed (onechiporenko)

2017-02-17 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 984b35e9c -> 05c76ed60


AMBARI-20043. Don't rerender all widgets when one of them is changed 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: 05c76ed609dfcf75e0ff211aa8032834ef8e9f73
Parents: 984b35e
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Feb 16 15:25:48 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Fri Feb 17 10:26:47 2017 +0200

--
 ambari-web/app/assets/test/tests.js |   1 +
 ambari-web/app/data/dashboard_widgets.js| 196 +
 ambari-web/app/messages.js  |   2 +-
 .../app/mixins/common/track_request_mixin.js|   6 +-
 .../mixins/main/dashboard/widgets/editable.js   |  91 +---
 .../dashboard/widgets/editable_with_limit.js| 106 +
 .../widgets/single_numeric_threshold.js | 127 +-
 .../main/dashboard/edit_widget_popup.hbs|  20 +-
 .../edit_widget_popup_single_threshold.hbs  |  12 +-
 ambari-web/app/views.js |   1 +
 .../modal_popups/edit_dashboard_widget_popup.js | 436 +++
 ambari-web/app/views/main/dashboard/widget.js   | 173 ++--
 ambari-web/app/views/main/dashboard/widgets.js  | 266 ++-
 .../views/main/dashboard/widgets/text_widget.js |  23 +-
 .../edit_dashboard_widget_popup_test.js | 214 +
 .../test/views/main/dashboard/widget_test.js| 112 +
 .../test/views/main/dashboard/widgets_test.js   |  10 +-
 17 files changed, 968 insertions(+), 828 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/05c76ed6/ambari-web/app/assets/test/tests.js
--
diff --git a/ambari-web/app/assets/test/tests.js 
b/ambari-web/app/assets/test/tests.js
index d47d558..05c1657 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -253,6 +253,7 @@ var files = [
   'test/views/common/widget/template_widget_view_test',
   'test/views/common/widget/heatmap_widget_view_test',
   'test/views/common/modal_popups/cluster_check_popup_test',
+  'test/views/common/modal_popups/edit_dashboard_widget_popup_test',
   'test/views/common/modal_popups/hosts_table_list_popup_test',
   'test/views/common/modal_popups/dependent_configs_list_popup_test',
   'test/views/main/admin_test',

http://git-wip-us.apache.org/repos/asf/ambari/blob/05c76ed6/ambari-web/app/data/dashboard_widgets.js
--
diff --git a/ambari-web/app/data/dashboard_widgets.js 
b/ambari-web/app/data/dashboard_widgets.js
new file mode 100644
index 000..d58b0e2
--- /dev/null
+++ b/ambari-web/app/data/dashboard_widgets.js
@@ -0,0 +1,196 @@
+/**
+ * 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.
+ */
+
+module.exports = [
+  {
+id: 1,
+viewName: 'NameNodeHeapPieChartView',
+sourceName: 'HDFS',
+title: Em.I18n.t('dashboard.widgets.NameNodeHeap'),
+threshold: [80, 90]
+  },
+  {
+id: 2,
+viewName: 'NameNodeCapacityPieChartView',
+sourceName: 'HDFS',
+title: Em.I18n.t('dashboard.widgets.HDFSDiskUsage'),
+threshold: [85, 95]
+  },
+  {
+id: 3,
+viewName: 'NameNodeCpuPieChartView',
+sourceName: 'HDFS',
+title: Em.I18n.t('dashboard.widgets.NameNodeCpu'),
+threshold: [90, 95]
+  },
+  {
+id: 4,
+viewName: 'DataNodeUpView',
+sourceName: 'HDFS',
+title: Em.I18n.t('dashboard.widgets.DataNodeUp'),
+threshold: [80, 90]
+  },
+  {
+id: 5,
+viewName: 'NameNodeRpcView',
+sourceName: 'HDFS',
+title: Em.I18n.t('dashboard.widgets.NameNodeRpc'),
+threshold: [1000, 3000]
+  },
+  {
+id: 6,
+viewName: 'ChartClusterMetricsMemoryWidgetView',
+sourceName: 'H

ambari git commit: AMBARI-20039. navigation bar interactiveness: clicking on an element should make it active (onechiporenko)

2017-02-16 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/side-navigation-feature-branch 4c08ceada -> 52093d151


AMBARI-20039. navigation bar interactiveness: clicking on an element should 
make it active (onechiporenko)


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

Branch: refs/heads/side-navigation-feature-branch
Commit: 52093d1518493bec21a5ea4662964dab5afbb50a
Parents: 4c08cea
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Feb 16 12:45:45 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Feb 16 12:45:45 2017 +0200

--
 .../app/styles/theme/bootstrap-ambari.css   | 24 +++
 ambari-web/app/templates/application.hbs|  2 +-
 .../app/templates/main/service/menu_item.hbs|  2 +-
 .../app/templates/main/side-menu-item.hbs   |  6 +-
 ambari-web/app/views/main/menu.js   | 71 ++--
 .../vendor/scripts/theme/bootstrap-ambari.js|  4 ++
 6 files changed, 55 insertions(+), 54 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/52093d15/ambari-web/app/styles/theme/bootstrap-ambari.css
--
diff --git a/ambari-web/app/styles/theme/bootstrap-ambari.css 
b/ambari-web/app/styles/theme/bootstrap-ambari.css
index d981fde..700ed1d 100644
--- a/ambari-web/app/styles/theme/bootstrap-ambari.css
+++ b/ambari-web/app/styles/theme/bootstrap-ambari.css
@@ -946,25 +946,25 @@ input.radio:checked + label:after {
 .navigation-bar-container ul.nav.side-nav-footer li > a:hover .submenu-item {
   color: #fff;
 }
-.navigation-bar-container ul.nav.side-nav-menu 
li.active:not(.no-active-effect),
-.navigation-bar-container ul.nav.side-nav-footer 
li.active:not(.no-active-effect) {
+.navigation-bar-container ul.nav.side-nav-menu li.active:not(.has-sub-menu),
+.navigation-bar-container ul.nav.side-nav-footer li.active:not(.has-sub-menu) {
   background: #404351;
   cursor: pointer;
 }
-.navigation-bar-container ul.nav.side-nav-menu 
li.active:not(.no-active-effect) > a,
-.navigation-bar-container ul.nav.side-nav-footer 
li.active:not(.no-active-effect) > a {
+.navigation-bar-container ul.nav.side-nav-menu li.active:not(.has-sub-menu) > 
a,
+.navigation-bar-container ul.nav.side-nav-footer li.active:not(.has-sub-menu) 
> a {
   border-left: 6px solid #3fae2a;
   padding-left: 19px;
   color: #fff;
 }
-.navigation-bar-container ul.nav.side-nav-menu 
li.active:not(.no-active-effect) > a .navigation-menu-item,
-.navigation-bar-container ul.nav.side-nav-footer 
li.active:not(.no-active-effect) > a .navigation-menu-item,
-.navigation-bar-container ul.nav.side-nav-menu 
li.active:not(.no-active-effect) > a .submenu-item,
-.navigation-bar-container ul.nav.side-nav-footer 
li.active:not(.no-active-effect) > a .submenu-item,
-.navigation-bar-container ul.nav.side-nav-menu 
li.active:not(.no-active-effect) > a .navigation-icon,
-.navigation-bar-container ul.nav.side-nav-footer 
li.active:not(.no-active-effect) > a .navigation-icon,
-.navigation-bar-container ul.nav.side-nav-menu 
li.active:not(.no-active-effect) > a .toggle-icon,
-.navigation-bar-container ul.nav.side-nav-footer 
li.active:not(.no-active-effect) > a .toggle-icon {
+.navigation-bar-container ul.nav.side-nav-menu li.active:not(.has-sub-menu) > 
a .navigation-menu-item,
+.navigation-bar-container ul.nav.side-nav-footer li.active:not(.has-sub-menu) 
> a .navigation-menu-item,
+.navigation-bar-container ul.nav.side-nav-menu li.active:not(.has-sub-menu) > 
a .submenu-item,
+.navigation-bar-container ul.nav.side-nav-footer li.active:not(.has-sub-menu) 
> a .submenu-item,
+.navigation-bar-container ul.nav.side-nav-menu li.active:not(.has-sub-menu) > 
a .navigation-icon,
+.navigation-bar-container ul.nav.side-nav-footer li.active:not(.has-sub-menu) 
> a .navigation-icon,
+.navigation-bar-container ul.nav.side-nav-menu li.active:not(.has-sub-menu) > 
a .toggle-icon,
+.navigation-bar-container ul.nav.side-nav-footer li.active:not(.has-sub-menu) 
> a .toggle-icon {
   color: #fff;
 }
 .navigation-bar-container ul.nav.side-nav-menu .all-services-actions,

http://git-wip-us.apache.org/repos/asf/ambari/blob/52093d15/ambari-web/app/templates/application.hbs
--
diff --git a/ambari-web/app/templates/application.hbs 
b/ambari-web/app/templates/application.hbs
index ce0e4e4..573d92b 100644
--- a/ambari-web/app/templates/application.hbs
+++ b/ambari-web/app/templates/application.hbs
@@ -54,7 +54,7 @@
   {{view App.MainSideMenuView}}
 

ambari git commit: AMBARI-20011. JS error in the "Supervisors Live" widget (onechiporenko)

2017-02-15 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 baae985a6 -> 5809d4fe3


AMBARI-20011. JS error in the "Supervisors Live" widget (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: 5809d4fe3885c5d6c58883723289e5f5263dd244
Parents: baae985
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Tue Feb 14 16:39:33 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Feb 15 10:48:19 2017 +0200

--
 ambari-web/app/views/main/dashboard/widgets/supervisor_live.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5809d4fe/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js
--
diff --git a/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js 
b/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js
index b8e36ca..0543f6f 100644
--- a/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js
+++ b/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js
@@ -59,7 +59,6 @@ App.SuperVisorUpView = 
App.TextDashboardWidgetView.extend(App.EditableWithLimitW
   }.property('superVisorsLive', 'superVisorsTotal'),
 
   hintInfo: function () {
-var maxTmp = parseFloat(parent.get('maxValue'));
-return Em.I18n.t('dashboard.widgets.hintInfo.hint1').format(maxTmp);
+return 
Em.I18n.t('dashboard.widgets.hintInfo.hint1').format(parseFloat(this.get('maxValue')));
   }.property('maxValue')
 });



ambari git commit: AMBARI-20011. JS error in the "Supervisors Live" widget (onechiporenko)

2017-02-15 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk e52fbc3a8 -> 1a03354c9


AMBARI-20011. JS error in the "Supervisors Live" widget (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 1a03354c9c44e85ae89fa7786eb61a1515f7cd41
Parents: e52fbc3
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Tue Feb 14 16:39:33 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Feb 15 10:26:22 2017 +0200

--
 ambari-web/app/views/main/dashboard/widgets/supervisor_live.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1a03354c/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js
--
diff --git a/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js 
b/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js
index 9158e59..ce03014 100644
--- a/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js
+++ b/ambari-web/app/views/main/dashboard/widgets/supervisor_live.js
@@ -52,7 +52,6 @@ App.SuperVisorUpView = 
App.TextDashboardWidgetView.extend(App.EditableWithLimitW
   }.property('superVisorsLive', 'superVisorsTotal'),
 
   hintInfo: function () {
-var maxTmp = parseFloat(parent.get('maxValue'));
-return Em.I18n.t('dashboard.widgets.hintInfo.hint1').format(maxTmp);
+return 
Em.I18n.t('dashboard.widgets.hintInfo.hint1').format(parseFloat(this.get('maxValue')));
   }.property('maxValue')
 });



ambari git commit: AMBARI-19983. Externalize the logic for making navigation bar interactive (onechiporenko)

2017-02-15 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/side-navigation-feature-branch cc4c04e5b -> c7164d8ea


AMBARI-19983. Externalize the logic for making navigation bar interactive 
(onechiporenko)


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

Branch: refs/heads/side-navigation-feature-branch
Commit: c7164d8eaaacc62e4d56f8f8ff03b74b1a0d46af
Parents: cc4c04e
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Mon Feb 13 13:47:47 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Feb 13 13:47:47 2017 +0200

--
 ambari-web/app/assets/data/clusters/info.json   | 11 +++
 ambari-web/app/styles/side_navigation.less  | 41 
 .../app/styles/theme/bootstrap-ambari.css   | 54 +++
 ambari-web/app/templates/application.hbs|  8 +-
 .../app/templates/main/side-menu-item.hbs   |  4 +-
 ambari-web/app/views/application.js | 39 +++-
 ambari-web/app/views/main/menu.js   |  8 --
 ambari-web/brunch-config.js |  3 +-
 .../vendor/scripts/theme/bootstrap-ambari.js| 99 
 9 files changed, 168 insertions(+), 99 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c7164d8e/ambari-web/app/assets/data/clusters/info.json
--
diff --git a/ambari-web/app/assets/data/clusters/info.json 
b/ambari-web/app/assets/data/clusters/info.json
new file mode 100644
index 000..95003f9
--- /dev/null
+++ b/ambari-web/app/assets/data/clusters/info.json
@@ -0,0 +1,11 @@
+{
+  "items": [
+{
+  "Clusters": {
+"cluster_name": "tdk",
+"provisioning_state": "INSTALLED",
+"version": "HDP2.0.1"
+  }
+}
+  ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7164d8e/ambari-web/app/styles/side_navigation.less
--
diff --git a/ambari-web/app/styles/side_navigation.less 
b/ambari-web/app/styles/side_navigation.less
deleted file mode 100644
index 48b8699..000
--- a/ambari-web/app/styles/side_navigation.less
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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.
- */
-
-@import 'common.less';
-
-#side-nav {
-  position: fixed;
-  top: 0px;
-  bottom: 0px;
-  z-index: 2079;
-
-  .side-nav-header {
-position: absolute;
-top: 0px;
-  }
-  .side-nav-menu {
-position: fixed;
-top: 55px;
-bottom: 50px;
-overflow-y: auto;
-  }
-  .side-nav-footer {
-position: fixed;
-bottom: 0px;
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/c7164d8e/ambari-web/app/styles/theme/bootstrap-ambari.css
--
diff --git a/ambari-web/app/styles/theme/bootstrap-ambari.css 
b/ambari-web/app/styles/theme/bootstrap-ambari.css
index adbddcd..d17e423 100644
--- a/ambari-web/app/styles/theme/bootstrap-ambari.css
+++ b/ambari-web/app/styles/theme/bootstrap-ambari.css
@@ -749,7 +749,7 @@ input.radio:checked + label:after {
   height: auto;
   width: 190px;
   background-color: #323544;
-  padding: 0px 0px;
+  padding: 0;
   overflow: hidden;
 }
 .navigation-bar-container ul.nav.side-nav-header {
@@ -761,7 +761,7 @@ input.radio:checked + label:after {
   height: 55px;
 }
 .navigation-bar-container ul.nav.side-nav-header li.navigation-header > 
a.ambari-logo {
-  padding: 0px;
+  padding: 0;
 }
 .navigation-bar-container ul.nav.side-nav-header li.navigation-header > 
a.ambari-logo > img {
   height: 25px;
@@ -780,7 +780,7 @@ input.radio:checked + label:after {
   cursor: pointer;
   display: inline;
   color: #fff;
-  padding: 0px 8px 0px 10px;
+  p

ambari git commit: AMBARI-20002. UI on Admin page-> Auto Start tab is not consistent (onechiporenko)

2017-02-14 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 771274a47 -> ad772ddd6


AMBARI-20002. UI on Admin page-> Auto Start tab is not consistent 
(onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: ad772ddd630fa0b4f4606798139d14445c235925
Parents: 771274a
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Tue Feb 14 12:48:59 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Tue Feb 14 12:48:59 2017 +0200

--
 ambari-web/app/views/main/admin/service_auto_start.js | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ad772ddd/ambari-web/app/views/main/admin/service_auto_start.js
--
diff --git a/ambari-web/app/views/main/admin/service_auto_start.js 
b/ambari-web/app/views/main/admin/service_auto_start.js
index ce487d0..b7f80df 100644
--- a/ambari-web/app/views/main/admin/service_auto_start.js
+++ b/ambari-web/app/views/main/admin/service_auto_start.js
@@ -54,10 +54,12 @@ App.MainAdminServiceAutoStartView = Em.View.extend({
 self.set('switcherValue', data[0].properties.recovery_enabled === 
'true');
 self.set('savedRecoveryEnabled', self.get('switcherValue'));
 self.get('controller').loadComponentsConfigs().then(function () {
-  Em.run.later('sync', function() {
-// plugin should be initiated after applying binding for 
switcherValue
-self.initSwitcher();
-  }.bind(self), 10);
+  Em.run.next(function() {
+Em.run.next(function() {
+  // plugin should be initiated after applying binding for 
switcherValue
+  self.initSwitcher();
+});
+  });
   self.set('isLoaded', true);
 });
   });



ambari git commit: AMBARI-20002.UI on Admin page-> Auto Start tab is not consistent (onechiporenko)

2017-02-14 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk e9e0a438a -> 0fdde6290


AMBARI-20002.UI on Admin page-> Auto Start tab is not consistent (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 0fdde6290b3f8dd3f6009f7dc8a6e68e5a00f9df
Parents: e9e0a43
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Tue Feb 14 13:02:44 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Tue Feb 14 13:02:44 2017 +0200

--
 .../app/views/main/admin/service_auto_start.js  |  2 +-
 .../main/service/info/config_test.js| 26 +++-
 2 files changed, 16 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0fdde629/ambari-web/app/views/main/admin/service_auto_start.js
--
diff --git a/ambari-web/app/views/main/admin/service_auto_start.js 
b/ambari-web/app/views/main/admin/service_auto_start.js
index 6f7d644..0399944 100644
--- a/ambari-web/app/views/main/admin/service_auto_start.js
+++ b/ambari-web/app/views/main/admin/service_auto_start.js
@@ -33,7 +33,7 @@ App.MainAdminServiceAutoStartView = Em.View.extend({
 this.set('isDisabled', !App.isAuthorized('CLUSTER.MANAGE_AUTO_START'));
 this.get('controller').load().then(() => {
   this.set('isLoaded', true);
-  Em.run.next(() => this.initSwitcher());
+  Em.run.next(() => Em.run.next(() => this.initSwitcher()));
 });
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/0fdde629/ambari-web/test/controllers/main/service/info/config_test.js
--
diff --git a/ambari-web/test/controllers/main/service/info/config_test.js 
b/ambari-web/test/controllers/main/service/info/config_test.js
index 8ca48b1..4cc2ef8 100644
--- a/ambari-web/test/controllers/main/service/info/config_test.js
+++ b/ambari-web/test/controllers/main/service/info/config_test.js
@@ -882,27 +882,31 @@ describe("App.MainServiceInfoConfigsController", function 
() {
   });
 
   describe('#abortRequests', function() {
+var pendingRequest, finishedRequest;
+
 beforeEach(function() {
   mainServiceInfoConfigsController.get('requestsInProgress').clear();
-});
-it('should clear requests when abort called', function() {
-  mainServiceInfoConfigsController.trackRequest($.Deferred());
-  mainServiceInfoConfigsController.abortRequests();
-  
expect(mainServiceInfoConfigsController.get('requestsInProgress')).to.have.length(0);
-});
-it('should abort requests which are not finished', function() {
-  var pendingRequest = {
+  finishedRequest = {
 abort: sinon.spy(),
-readyState: 0,
+readyState: 4,
 state: sinon.spy(),
 always: sinon.spy()
   };
-  var finishedRequest = {
+  pendingRequest = {
 abort: sinon.spy(),
-readyState: 4,
+readyState: 0,
 state: sinon.spy(),
 always: sinon.spy()
   };
+});
+
+it('should clear requests when abort called', function() {
+  mainServiceInfoConfigsController.trackRequest($.Deferred());
+  mainServiceInfoConfigsController.abortRequests();
+  
expect(mainServiceInfoConfigsController.get('requestsInProgress')).to.have.length(0);
+});
+
+it('should abort requests which are not finished', function() {
   mainServiceInfoConfigsController.trackRequest(pendingRequest);
   mainServiceInfoConfigsController.trackRequest(finishedRequest);
   mainServiceInfoConfigsController.abortRequests();



ambari git commit: AMBARI-19814. 'num_llap_nodes' should show up as non-editable property when non-ambari managed queue is selected (onechiporenko)

2017-02-14 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk eb1b9cfaa -> e9e0a438a


AMBARI-19814. 'num_llap_nodes' should show up as non-editable property when 
non-ambari managed queue is selected (onechiporenko)


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

Branch: refs/heads/trunk
Commit: e9e0a438a142ec9560ec9a5d8134d40a34efdacc
Parents: eb1b9cf
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Fri Feb 10 12:07:51 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Tue Feb 14 10:54:05 2017 +0200

--
 .../mixins/common/configs/widgets/unique/num_llap_nodes.js| 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e9e0a438/ambari-web/app/mixins/common/configs/widgets/unique/num_llap_nodes.js
--
diff --git 
a/ambari-web/app/mixins/common/configs/widgets/unique/num_llap_nodes.js 
b/ambari-web/app/mixins/common/configs/widgets/unique/num_llap_nodes.js
index a2df0fa..781a40a 100644
--- a/ambari-web/app/mixins/common/configs/widgets/unique/num_llap_nodes.js
+++ b/ambari-web/app/mixins/common/configs/widgets/unique/num_llap_nodes.js
@@ -45,9 +45,8 @@ App.NumLlapNodesWidgetMixin = Em.Mixin.create({
 var readOnly = this.get('readOnly');
 this.set('disabled', readOnly);
 this.set('supportSwitchToTextBox', !readOnly);
-if (readOnly) {
-  this.toggleSlider('disable');
-}
+var action = readOnly ? 'disable' : 'enable';
+this.toggleSlider(action);
   }.observes('readOnly'),
 
   toggleWidgetView: function() {
@@ -63,7 +62,7 @@ App.NumLlapNodesWidgetMixin = Em.Mixin.create({
   toggleSlider: function (action) {
 var self = this;
 Em.run.next(function () {
-  self.get('slider')[action]();
+  Em.tryInvoke(self.get('slider'), action);
 });
   }
 



ambari git commit: AMBARI-19814. 'num_llap_nodes' should show up as non-editable property when non-ambari managed queue is selected (onechiporenko)

2017-02-13 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 7bf4ecb38 -> 35a618ff4


AMBARI-19814. 'num_llap_nodes' should show up as non-editable property when 
non-ambari managed queue is selected (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: 35a618ff4e912883376beb186153ba4080bf4cae
Parents: 7bf4ecb
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Fri Feb 10 12:07:51 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Feb 13 13:53:31 2017 +0200

--
 .../mixins/common/configs/widgets/unique/num_llap_nodes.js| 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/35a618ff/ambari-web/app/mixins/common/configs/widgets/unique/num_llap_nodes.js
--
diff --git 
a/ambari-web/app/mixins/common/configs/widgets/unique/num_llap_nodes.js 
b/ambari-web/app/mixins/common/configs/widgets/unique/num_llap_nodes.js
index a2df0fa..781a40a 100644
--- a/ambari-web/app/mixins/common/configs/widgets/unique/num_llap_nodes.js
+++ b/ambari-web/app/mixins/common/configs/widgets/unique/num_llap_nodes.js
@@ -45,9 +45,8 @@ App.NumLlapNodesWidgetMixin = Em.Mixin.create({
 var readOnly = this.get('readOnly');
 this.set('disabled', readOnly);
 this.set('supportSwitchToTextBox', !readOnly);
-if (readOnly) {
-  this.toggleSlider('disable');
-}
+var action = readOnly ? 'disable' : 'enable';
+this.toggleSlider(action);
   }.observes('readOnly'),
 
   toggleWidgetView: function() {
@@ -63,7 +62,7 @@ App.NumLlapNodesWidgetMixin = Em.Mixin.create({
   toggleSlider: function (action) {
 var self = this;
 Em.run.next(function () {
-  self.get('slider')[action]();
+  Em.tryInvoke(self.get('slider'), action);
 });
   }
 



ambari git commit: AMBARI-19934. Confusing Auto Start settings page behavior when loading and API takes a while (onechiporenko)

2017-02-09 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 7b40c5bad -> e9f07973f


AMBARI-19934. Confusing Auto Start settings page behavior when loading and API 
takes a while (onechiporenko)


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

Branch: refs/heads/trunk
Commit: e9f07973f4c516590aca3e57e320a72a0bcedfe7
Parents: 7b40c5b
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Feb 9 12:15:02 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Feb 9 14:29:53 2017 +0200

--
 .../templates/main/admin/service_auto_start.hbs | 28 +++-
 .../app/views/main/admin/service_auto_start.js  |  8 +++---
 .../views/main/admin/service_auto_start_test.js |  2 ++
 3 files changed, 20 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e9f07973/ambari-web/app/templates/main/admin/service_auto_start.hbs
--
diff --git a/ambari-web/app/templates/main/admin/service_auto_start.hbs 
b/ambari-web/app/templates/main/admin/service_auto_start.hbs
index 0de7d40..6dc7dc5 100644
--- a/ambari-web/app/templates/main/admin/service_auto_start.hbs
+++ b/ambari-web/app/templates/main/admin/service_auto_start.hbs
@@ -19,21 +19,21 @@
 
   {{t admin.serviceAutoStart.header}}
   {{t admin.serviceAutoStart.header.text}}
-  
-
-  {{t admin.serviceAutoStart.body.text}}
-
-
-  {{view App.CheckboxView checkedBinding="controller.servicesAutoStart"}}
-
-
-  
-{{t 
common.discard}}
-{{t 
common.save}}
+  {{#if view.isLoaded}}
+
+  
+{{t admin.serviceAutoStart.body.text}}
+  
+  
+{{view App.CheckboxView checkedBinding="controller.servicesAutoStart"}}
+  
+  
+
+  {{t 
common.discard}}
+  {{t 
common.save}}
+
   
 
-  
-  {{#if view.isLoaded}}
 
 
   
@@ -99,5 +99,7 @@
 
   
 
+  {{else}}
+{{view App.SpinnerView}}
   {{/if}}
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e9f07973/ambari-web/app/views/main/admin/service_auto_start.js
--
diff --git a/ambari-web/app/views/main/admin/service_auto_start.js 
b/ambari-web/app/views/main/admin/service_auto_start.js
index 317b029..6f7d644 100644
--- a/ambari-web/app/views/main/admin/service_auto_start.js
+++ b/ambari-web/app/views/main/admin/service_auto_start.js
@@ -30,12 +30,10 @@ App.MainAdminServiceAutoStartView = Em.View.extend({
   isDisabled: false,
 
   didInsertElement: function () {
-var self = this;
-
 this.set('isDisabled', !App.isAuthorized('CLUSTER.MANAGE_AUTO_START'));
-this.get('controller').load().then(function() {
-  self.set('isLoaded', true);
-  self.initSwitcher();
+this.get('controller').load().then(() => {
+  this.set('isLoaded', true);
+  Em.run.next(() => this.initSwitcher());
 });
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e9f07973/ambari-web/test/views/main/admin/service_auto_start_test.js
--
diff --git a/ambari-web/test/views/main/admin/service_auto_start_test.js 
b/ambari-web/test/views/main/admin/service_auto_start_test.js
index f45f784..0edcf28 100644
--- a/ambari-web/test/views/main/admin/service_auto_start_test.js
+++ b/ambari-web/test/views/main/admin/service_auto_start_test.js
@@ -34,6 +34,7 @@ describe('App.MainAdminServiceAutoStartView', function () {
 
 beforeEach(function() {
   sinon.stub(view, 'initSwitcher');
+  sinon.stub(Em.run, 'next', Em.clb);
   sinon.stub(view.get('controller'), 'load').returns({
 then: Em.clb
   })
@@ -42,6 +43,7 @@ describe('App.MainAdminServiceAutoStartView', function () {
 afterEach(function() {
   view.initSwitcher.restore();
   view.get('controller').load.restore();
+  Em.run.next.restore();
 });
 
 it('initSwitcher should be called', function() {



ambari git commit: AMBARI-19934. Confusing Auto Start settings page behavior when loading and API takes a while (onechiporenko)

2017-02-09 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 971887938 -> 6fed7e276


AMBARI-19934. Confusing Auto Start settings page behavior when loading and API 
takes a while (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: 6fed7e276d86f5536edea73d2ac246a268d63b34
Parents: 9718879
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Feb 9 11:45:26 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Feb 9 14:29:35 2017 +0200

--
 .../templates/main/admin/service_auto_start.hbs   | 10 +++---
 .../app/views/main/admin/service_auto_start.js| 18 +-
 2 files changed, 20 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6fed7e27/ambari-web/app/templates/main/admin/service_auto_start.hbs
--
diff --git a/ambari-web/app/templates/main/admin/service_auto_start.hbs 
b/ambari-web/app/templates/main/admin/service_auto_start.hbs
index 87fc915..eec159c 100644
--- a/ambari-web/app/templates/main/admin/service_auto_start.hbs
+++ b/ambari-web/app/templates/main/admin/service_auto_start.hbs
@@ -24,8 +24,9 @@
 {{t admin.serviceAutoStart.header.text}}
   
   
+  {{#if view.isLoaded}}
   
-  
+  
   {{t admin.serviceAutoStart.body.text}}
   
   
@@ -38,9 +39,9 @@
   
 {{#if view.switcherValue}}
 
-{{t 
common.service}}{{t common.component}}{{t common.status}}
+{{t 
common.service}}{{t common.component}}{{t common.status}}
 
-
+
 {{#each tab in controller.tabs}}
 
 
@@ -74,4 +75,7 @@
 
 
 {{/if}}
+  {{else}}
+{{view App.SpinnerView}}
+  {{/if}}
 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/6fed7e27/ambari-web/app/views/main/admin/service_auto_start.js
--
diff --git a/ambari-web/app/views/main/admin/service_auto_start.js 
b/ambari-web/app/views/main/admin/service_auto_start.js
index be928ed..ce487d0 100644
--- a/ambari-web/app/views/main/admin/service_auto_start.js
+++ b/ambari-web/app/views/main/admin/service_auto_start.js
@@ -30,6 +30,12 @@ App.MainAdminServiceAutoStartView = Em.View.extend({
 
   savedRecoveryEnabled: false,
 
+  /**
+   * @type {boolean}
+   * @default false
+   */
+  isLoaded: false,
+
   isDisabled: false,
 
   didInsertElement: function () {
@@ -47,11 +53,13 @@ App.MainAdminServiceAutoStartView = Em.View.extend({
 self.set('controller.clusterConfigs', data[0].properties);
 self.set('switcherValue', data[0].properties.recovery_enabled === 
'true');
 self.set('savedRecoveryEnabled', self.get('switcherValue'));
-// plugin should be initiated after applying binding for switcherValue
-Em.run.later('sync', function() {
-  self.initSwitcher();
-}.bind(self), 10);
-self.get('controller').loadComponentsConfigs();
+self.get('controller').loadComponentsConfigs().then(function () {
+  Em.run.later('sync', function() {
+// plugin should be initiated after applying binding for 
switcherValue
+self.initSwitcher();
+  }.bind(self), 10);
+  self.set('isLoaded', true);
+});
   });
 });
   },



ambari git commit: AMBARI-19921. Js errors appear when user try to delete widgets from dashboard (onechiporenko)

2017-02-09 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 7c3bcc9e8 -> bb7ed8952


AMBARI-19921. Js errors appear when user try to delete widgets from dashboard 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: bb7ed895212845201cbc1a159a10b6395f48bf51
Parents: 7c3bcc9
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Feb 8 14:13:38 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Feb 9 11:22:45 2017 +0200

--
 .../app/templates/main/dashboard/widgets.hbs|  10 +-
 ambari-web/app/views/main/dashboard/widget.js   |  11 +-
 ambari-web/app/views/main/dashboard/widgets.js  | 116 -
 .../test/views/main/dashboard/widget_test.js|  21 +--
 .../test/views/main/dashboard/widgets_test.js   | 161 +++
 5 files changed, 221 insertions(+), 98 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bb7ed895/ambari-web/app/templates/main/dashboard/widgets.hbs
--
diff --git a/ambari-web/app/templates/main/dashboard/widgets.hbs 
b/ambari-web/app/templates/main/dashboard/widgets.hbs
index 8e04f1c..4b7a269 100644
--- a/ambari-web/app/templates/main/dashboard/widgets.hbs
+++ b/ambari-web/app/templates/main/dashboard/widgets.hbs
@@ -47,11 +47,11 @@
   
 
   
-{{#if view.visibleWidgets.length}}
-  {{#each widget in view.visibleWidgets}}
- {{view widget.viewClass widgetBinding="widget"}}
-  {{/each}}
-{{/if}}
+{{#each widget in view.allWidgets}}
+  {{#if widget.isVisible}}
+{{view widget.viewClass widgetBinding="widget"}}
+  {{/if}}
+{{/each}}
   
 
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb7ed895/ambari-web/app/views/main/dashboard/widget.js
--
diff --git a/ambari-web/app/views/main/dashboard/widget.js 
b/ambari-web/app/views/main/dashboard/widget.js
index cacac1a..e7a626c 100644
--- a/ambari-web/app/views/main/dashboard/widget.js
+++ b/ambari-web/app/views/main/dashboard/widget.js
@@ -186,16 +186,7 @@ App.DashboardWidgetView = Em.View.extend({
* delete widget
*/
   deleteWidget: function () {
-var parent = this.get('parentView');
-var userPreferences = parent.get('userPreferences');
-var deletedId = this.get('id');
-var newValue = {
-  visible: userPreferences.visible.slice(0).without(deletedId),
-  hidden: userPreferences.hidden.concat([deletedId]),
-  threshold: userPreferences.threshold
-};
-parent.saveWidgetsSettings(newValue);
-parent.renderWidgets();
+this.get('parentView').hideWidget(this.get('id'));
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb7ed895/ambari-web/app/views/main/dashboard/widgets.js
--
diff --git a/ambari-web/app/views/main/dashboard/widgets.js 
b/ambari-web/app/views/main/dashboard/widgets.js
index 0c6b7aa..572625d 100644
--- a/ambari-web/app/views/main/dashboard/widgets.js
+++ b/ambari-web/app/views/main/dashboard/widgets.js
@@ -17,7 +17,16 @@
  */
 
 var App = require('app');
-var filters = require('views/common/filter_view');
+
+const WidgetObject = Em.Object.extend({
+  id: '',
+  threshold: '',
+  viewClass: null,
+  sourceName: '',
+  title: '',
+  checked: false,
+  isVisible: true
+});
 
 App.MainDashboardWidgetsView = Em.View.extend(App.UserPref, App.LocalStorage, 
App.TimeRangeMixin, {
   name: 'mainDashboardWidgetsView',
@@ -202,6 +211,10 @@ App.MainDashboardWidgetsView = 
Em.View.extend(App.UserPref, App.LocalStorage, Ap
 }
   ],
 
+  widgetsDefinitionMap: function () {
+return this.get('widgetsDefinition').toMapByProperty('id');
+  }.property('widgetsDefinition.[]'),
+
   /**
* List of services
* @type {Ember.Enumerable}
@@ -226,16 +239,23 @@ App.MainDashboardWidgetsView = 
Em.View.extend(App.UserPref, App.LocalStorage, Ap
   isMoving: false,
 
   /**
+   * @type {WidgetObject[]}
+   */
+  allWidgets: [],
+
+  /**
* List of visible widgets
-   * @type {Ember.Enumerable}
+   *
+   * @type {WidgetObject[]}
*/
-  visibleWidgets: [],
+  visibleWidgets: Em.computed.filterBy('allWidgets', 'isVisible', true),
 
   /**
* List of hidden widgets
-   * @type {Ember.Enumerable}
+   *
+   * @type {WidgetObject[]}
*/
-  hiddenWidgets: [], // widget child view will push object in this array if 
deleted
+  hiddenWidgets: Em.computed.filter

ambari git commit: AMBARI-19888. A lot of warning messages after opening "Upgrade to ..."-popup (onechiporenko)

2017-02-08 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 8fd6395b3 -> 742225ab9


AMBARI-19888. A lot of warning messages after opening "Upgrade to ..."-popup 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: 742225ab9b400b80dba6f878bedcfad1cd3534e6
Parents: 8fd6395
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Tue Feb 7 13:14:30 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Feb 8 13:59:38 2017 +0200

--
 .../modal_popups/cluster_check_dialog.hbs   | 12 ++--
 .../common/modal_popups/cluster_check_popup.js  | 68 
 ambari-web/test/models/service_test.js  | 39 ---
 .../modal_popups/cluster_check_popup_test.js| 48 --
 4 files changed, 74 insertions(+), 93 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/742225ab/ambari-web/app/templates/common/modal_popups/cluster_check_dialog.hbs
--
diff --git 
a/ambari-web/app/templates/common/modal_popups/cluster_check_dialog.hbs 
b/ambari-web/app/templates/common/modal_popups/cluster_check_dialog.hbs
index 88d8eaf..79e1de5 100644
--- a/ambari-web/app/templates/common/modal_popups/cluster_check_dialog.hbs
+++ b/ambari-web/app/templates/common/modal_popups/cluster_check_dialog.hbs
@@ -30,8 +30,8 @@
 {{/if}}
 
   {{#each item in view.fails}}
-{{item.UpgradeChecks.check}}
-{{t 
popup.clusterCheck.reason}}{{item.UpgradeChecks.reason}}{{t 
popup.clusterCheck.failedOn}}{{item.UpgradeChecks.failed_on}}
+{{item.check}}
+{{t popup.clusterCheck.reason}}{{item.reason}}{{t 
popup.clusterCheck.failedOn}}{{item.failed_on}}
   {{/each}}
 
   {{/if}}
@@ -48,8 +48,8 @@
 {{/if}}
 
   {{#each item in view.bypass}}
-{{item.UpgradeChecks.check}}
-{{t 
popup.clusterCheck.reason}}{{item.UpgradeChecks.reason}}{{t 
popup.clusterCheck.failedOn}}{{item.UpgradeChecks.failed_on}}
+{{item.check}}
+{{t popup.clusterCheck.reason}}{{item.reason}}{{t 
popup.clusterCheck.failedOn}}{{item.failed_on}}
   {{/each}}
 
   {{/if}}
@@ -65,8 +65,8 @@
 {{/if}}
 
   {{#each item in view.warnings}}
-{{item.UpgradeChecks.check}}
-{{t 
popup.clusterCheck.reason}}{{item.UpgradeChecks.reason}}{{t 
popup.clusterCheck.failedOn}}{{item.UpgradeChecks.failed_on}}
+{{item.check}}
+{{t popup.clusterCheck.reason}}{{item.reason}}{{t 
popup.clusterCheck.failedOn}}{{item.failed_on}}
   {{/each}}
 
   {{/if}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/742225ab/ambari-web/app/views/common/modal_popups/cluster_check_popup.js
--
diff --git a/ambari-web/app/views/common/modal_popups/cluster_check_popup.js 
b/ambari-web/app/views/common/modal_popups/cluster_check_popup.js
index a2f6f83..a613f4b 100644
--- a/ambari-web/app/views/common/modal_popups/cluster_check_popup.js
+++ b/ambari-web/app/views/common/modal_popups/cluster_check_popup.js
@@ -18,6 +18,10 @@
 
 var App = require('app');
 
+function mapUpgradeChecks(items) {
+  return items.map(item => Em.getProperties(item.UpgradeChecks, ['failed_on', 
'reason', 'check']));
+}
+
 /**
  * popup to display requirements that are not met
  * for current action
@@ -33,41 +37,49 @@ App.showClusterCheckPopup = function (data, popup, configs, 
upgradeVersion) {
 bypass = data.items.filterProperty('UpgradeChecks.status', 'BYPASS'),
 hasConfigsMergeConflicts = !!(configs && configs.length),
 primary,
-secondary,
-popupBody;
+secondary;
   popup = popup || {};
-  primary = Em.isNone(popup.primary) ?
-(fails.length ? Em.I18n.t('common.dismiss') : 
Em.I18n.t('common.proceedAnyway')) : popup.primary;
-  secondary = Em.isNone(popup.secondary) ? (fails.length ? false : 
Em.I18n.t('common.cancel')) : popup.secondary;
-  popupBody = {
-failTitle: popup.failTitle,
-failAlert: popup.failAlert,
-warningTitle: popup.warningTitle,
-warningAlert: popup.warningAlert,
-templateName: 
require('templates/common/modal_popups/cluster_check_dialog'),
-fails: fails,
-bypass: bypass, // errors that can be bypassed
-warnings: warnings,
-hasConfigsMergeConflicts: hasConfigsMergeConflicts,
-isAllPassed: !fails.length && !warnings.length && !bypass.length && 
!hasConfigsMergeConflicts
-  };
-  if (hasConfigsMergeConflicts) {
-popupBody.configsMergeTable = Em.View.extend({
-

ambari git commit: AMBARI-19877. Confirmation for deleting services show serviceName and not displayName (onechiporenko)

2017-02-06 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 13f8f96b3 -> 9f2d1d9b6


AMBARI-19877. Confirmation for deleting services show serviceName and not 
displayName (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 9f2d1d9b6ef7019919e4a6fd1bd80569eaf4e97b
Parents: 13f8f96
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Mon Feb 6 13:57:39 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Feb 6 15:37:57 2017 +0200

--
 ambari-web/app/controllers/main/service/item.js | 15 --
 .../test/controllers/main/service/item_test.js  | 54 ++--
 2 files changed, 62 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9f2d1d9b/ambari-web/app/controllers/main/service/item.js
--
diff --git a/ambari-web/app/controllers/main/service/item.js 
b/ambari-web/app/controllers/main/service/item.js
index 9758ac3..7010ab5 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -1531,10 +1531,17 @@ App.MainServiceItemController = 
Em.Controller.extend(App.SupportClientConfigsDow
   },
 
   confirmServiceDeletion: function() {
-var progressPopup = this.get('deleteServiceProgressPopup'),
-  msg = this.get('interDependentServices.length')
-? 
Em.I18n.t('services.service.delete.service.success.confirmation.plural').format(this.get('serviceNamesToDelete').join(','))
-: 
Em.I18n.t('services.service.delete.service.success.confirmation').format(this.get('content.serviceName'));
+let serviceNames, msg;
+if (this.get('interDependentServices.length')) {
+  serviceNames = this.get('serviceNamesToDelete').map(serviceName => 
App.format.role(serviceName, true)).join(', ');
+  msg = 
Em.I18n.t('services.service.delete.service.success.confirmation.plural').format(serviceNames);
+}
+else {
+  serviceNames = App.format.role(this.get('content.serviceName'), true);
+  msg = 
Em.I18n.t('services.service.delete.service.success.confirmation').format(serviceNames);
+}
+
+var progressPopup = this.get('deleteServiceProgressPopup');
 if (progressPopup) {
   progressPopup.onClose();
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/9f2d1d9b/ambari-web/test/controllers/main/service/item_test.js
--
diff --git a/ambari-web/test/controllers/main/service/item_test.js 
b/ambari-web/test/controllers/main/service/item_test.js
index b582e86..302a9a5 100644
--- a/ambari-web/test/controllers/main/service/item_test.js
+++ b/ambari-web/test/controllers/main/service/item_test.js
@@ -28,7 +28,7 @@ require('controllers/main/service/reassign_controller');
 require('controllers/main/service/item');
 var batchUtils = require('utils/batch_scheduled_requests');
 var testHelpers = require('test/helpers');
-var stackSerivceModel = {
+var stackServiceModel = {
   'HDFS': Em.Object.create({
 serviceName: 'HDFS',
 requiredServices: ['ZOOKEEPER']
@@ -1352,7 +1352,7 @@ describe('App.MainServiceItemController', function () {
 beforeEach(function() {
   mainServiceItemController = App.MainServiceItemController.create({});
   sinon.stub(App.StackService, 'find', function (serviceName) {
-return stackSerivceModel[serviceName];
+return stackServiceModel[serviceName];
   });
   this.mockService = sinon.stub(App.Service, 'find');
 });
@@ -1644,7 +1644,7 @@ describe('App.MainServiceItemController', function () {
 
 beforeEach(function() {
   sinon.stub(App.StackService, 'find', function (serviceName) {
-return stackSerivceModel[serviceName];
+return stackServiceModel[serviceName];
   });
   mainServiceItemController = App.MainServiceItemController.create({
 content: {}
@@ -1802,6 +1802,54 @@ describe('App.MainServiceItemController', function () {
 });
   });
 
+  describe('#confirmServiceDeletion', function () {
+
+var mainServiceItemController = 
App.MainServiceItemController.create({deleteServiceProgressPopup: null});
+
+[
+  {
+content: Em.Object.create({serviceName: 'DRUID'}),
+stackServices: [
+  Em.Object.create({id: 'DRUID', displayName: 'Druid', serviceName: 
'DRUID', requiredServices: []})
+],
+m: 'No required services',
+e: 
Em.I18n.t('services.service.delete.service.success.confirmation').format('Druid')
+  },
+  {
+content: Em.Object.c

ambari git commit: AMBARI-19876. Popup with alerts on the Service summary doesn't have arrows for alerts with state "None" (onechiporenko)

2017-02-06 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 113de54e2 -> e71f3a97a


AMBARI-19876. Popup with alerts on the Service summary doesn't have arrows for 
alerts with state "None" (onechiporenko)


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

Branch: refs/heads/trunk
Commit: e71f3a97af080a3b03335be5606aeaa1aa73085d
Parents: 113de54
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Mon Feb 6 11:32:12 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Feb 6 11:32:12 2017 +0200

--
 ambari-web/app/controllers/main/service/info/summary.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e71f3a97/ambari-web/app/controllers/main/service/info/summary.js
--
diff --git a/ambari-web/app/controllers/main/service/info/summary.js 
b/ambari-web/app/controllers/main/service/info/summary.js
index 9bdf83a..0ca9775 100644
--- a/ambari-web/app/controllers/main/service/info/summary.js
+++ b/ambari-web/app/controllers/main/service/info/summary.js
@@ -394,9 +394,9 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
   };
 
   serviceDefinitions.forEach(function (definition) {
+definition.set('isCollapsed', true);
 Object.keys(definitionTypes).forEach(function (type) {
   if (definition.get(type)) {
-definition.set('isCollapsed', true);
 definitionTypes[type].push(definition);
 serviceDefinitions = serviceDefinitions.without(definition);
   }



ambari git commit: AMBARI-19862. JS error on host configs page (onechiporenko)

2017-02-03 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 25499712d -> 5262ebeaf


AMBARI-19862. JS error on host configs page (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: 5262ebeaf276fa3f2ba49ebaeabcb7ffb3c0ccf5
Parents: 2549971
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Fri Feb 3 10:47:11 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Fri Feb 3 11:51:07 2017 +0200

--
 .../app/views/common/configs/service_configs_by_category_view.js   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5262ebea/ambari-web/app/views/common/configs/service_configs_by_category_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/service_configs_by_category_view.js 
b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
index d9b4409..f4f35c8 100644
--- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js
+++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
@@ -70,7 +70,7 @@ App.ServiceConfigsByCategoryView = 
Em.View.extend(App.UserPref, App.ConfigOverri
*/
   mainView: function () {
 //todo: Get rid of this logic. Get data from controller instead.
-return this.get('controller.name') === 'mainServiceInfoConfigsController' 
? this.get('parentView.parentView') : this.get('parentView');
+return ['mainHostServiceConfigsController', 
'mainServiceInfoConfigsController'].contains(this.get('controller.name')) ? 
this.get('parentView.parentView') : this.get('parentView');
   }.property('controller.name'),
 
   didInsertElement: function () {



ambari git commit: AMBARI-19465. JS error when user click Alert Link in the popup on the service summary page (onechiporenko)

2017-02-02 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 877ab571b -> 8075f5eb3


AMBARI-19465. JS error when user click Alert Link in the popup on the service 
summary page (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: 8075f5eb3dae5738227c72a8a80e64db522910d0
Parents: 877ab57
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Jan 11 15:50:11 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Feb 2 14:33:02 2017 +0200

--
 ambari-web/app/controllers/main/service/info/summary.js | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8075f5eb/ambari-web/app/controllers/main/service/info/summary.js
--
diff --git a/ambari-web/app/controllers/main/service/info/summary.js 
b/ambari-web/app/controllers/main/service/info/summary.js
index 09f3429..9f61058 100644
--- a/ambari-web/app/controllers/main/service/info/summary.js
+++ b/ambari-web/app/controllers/main/service/info/summary.js
@@ -408,13 +408,14 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
 }.property('controller.content'),
 onToggleBlock: function (alert) {
   this.$('#' + alert.context.clientId).toggle('blind', 500);
-  alert.context.set("isCollapsed", !alert.context.get("isCollapsed"));
+  alert.context.toggleProperty('isCollapsed');
 },
-gotoAlertDetails: function (event) {
-  if (event && event.context) {
+gotoAlertDetails: function (e) {
+  if (e && e.context) {
 this.get('parentView').hide();
-App.router.transitionTo('main.alerts.alertDetails', event.context);
+App.router.transitionTo('main.alerts.alertDetails', e.context);
   }
+  return false;
 },
 closePopup: function () {
   this.get('parentView').hide();



ambari git commit: AMBARI-19814. 'num_llap_nodes' should show up as non-editable property when non-ambari managed queue is selected (onechiporenko)

2017-02-01 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 575d55251 -> 0f4775bf6


AMBARI-19814. 'num_llap_nodes' should show up as non-editable property when 
non-ambari managed queue is selected (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: 0f4775bf6a8ec6fa99c12ec6fb3aee670808d97b
Parents: 575d552
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Feb 1 13:22:48 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Feb 1 13:22:48 2017 +0200

--
 ambari-web/app/mixins.js|  1 +
 .../configs/widgets/unique/num_llap_nodes.js| 70 
 .../common/configs/widgets/controls.hbs |  2 +
 .../configs/service_config_layout_tab_view.js   | 23 ++-
 4 files changed, 93 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0f4775bf/ambari-web/app/mixins.js
--
diff --git a/ambari-web/app/mixins.js b/ambari-web/app/mixins.js
index ad682d7..72fd961 100644
--- a/ambari-web/app/mixins.js
+++ b/ambari-web/app/mixins.js
@@ -52,6 +52,7 @@ require('mixins/wizard/addSecurityConfigs');
 require('mixins/wizard/wizard_menu_view');
 require('mixins/wizard/assign_master_components');
 require('mixins/wizard/wizardHostsLoading');
+require('mixins/common/configs/widgets/unique/num_llap_nodes');
 require('mixins/common/configs/config_recommendations');
 require('mixins/common/configs/config_recommendation_parser');
 require('mixins/common/configs/config_with_override_recommendation_parser');

http://git-wip-us.apache.org/repos/asf/ambari/blob/0f4775bf/ambari-web/app/mixins/common/configs/widgets/unique/num_llap_nodes.js
--
diff --git 
a/ambari-web/app/mixins/common/configs/widgets/unique/num_llap_nodes.js 
b/ambari-web/app/mixins/common/configs/widgets/unique/num_llap_nodes.js
new file mode 100644
index 000..a2df0fa
--- /dev/null
+++ b/ambari-web/app/mixins/common/configs/widgets/unique/num_llap_nodes.js
@@ -0,0 +1,70 @@
+/**
+ * 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');
+
+/**
+ * Slider for `num_llap_nodes` should have unique widget
+ *
+ * @type {Em.Mixin}
+ */
+App.NumLlapNodesWidgetMixin = Em.Mixin.create({
+
+  /**
+   * @type {boolean}
+   */
+  readOnly: 
Em.computed.alias('config.stackConfigProperty.valueAttributes.read_only'),
+
+  /**
+   * @type {boolean}
+   */
+  doNotShowWidget: function () {
+if (this.get('readOnly')) {
+  return false;
+}
+return this.get('isPropertyUndefined') || this.get('config.showAsTextBox');
+  }.property('isPropertyUndefined', 'config.showAsTextBox', 'readOnly'),
+
+  handleReadOnlyAttribute: function () {
+var readOnly = this.get('readOnly');
+this.set('disabled', readOnly);
+this.set('supportSwitchToTextBox', !readOnly);
+if (readOnly) {
+  this.toggleSlider('disable');
+}
+  }.observes('readOnly'),
+
+  toggleWidgetView: function() {
+this._super();
+var action = !this.get('config.showAsTextBox') && this.get('readOnly') ? 
'disable' : 'enable';
+this.toggleSlider(action);
+  },
+
+  toggleWidgetState: function () {
+this.set('disabled', !this.get('config.isEditable'));
+  }.observes('config.isEditable'),
+
+  toggleSlider: function (action) {
+var self = this;
+Em.run.next(function () {
+  self.get('slider')[action]();
+});
+  }
+
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/0f4775bf/ambari-web/app/templates/common/configs/widgets/controls.hbs
--
diff --git a/ambari-web/app/templates/common/configs/widgets/cont

ambari git commit: AMBARI-19814. 'num_llap_nodes' should show up as non-editable property when non-ambari managed queue is selected (onechiporenko)

2017-02-01 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 4e689afe5 -> b55ba18ed


AMBARI-19814. 'num_llap_nodes' should show up as non-editable property when 
non-ambari managed queue is selected (onechiporenko)


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

Branch: refs/heads/trunk
Commit: b55ba18edd107a9439e24aafbe2167a76916b07f
Parents: 4e689af
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Feb 1 11:43:37 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Feb 1 13:15:45 2017 +0200

--
 ambari-web/app/mixins.js|  1 +
 .../configs/widgets/unique/num_llap_nodes.js| 70 
 .../common/configs/widgets/controls.hbs |  2 +
 .../configs/service_config_layout_tab_view.js   | 23 ++-
 4 files changed, 93 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b55ba18e/ambari-web/app/mixins.js
--
diff --git a/ambari-web/app/mixins.js b/ambari-web/app/mixins.js
index 7b4d6b4..9d833b5 100644
--- a/ambari-web/app/mixins.js
+++ b/ambari-web/app/mixins.js
@@ -53,6 +53,7 @@ require('mixins/wizard/addSecurityConfigs');
 require('mixins/wizard/wizard_menu_view');
 require('mixins/wizard/assign_master_components');
 require('mixins/wizard/wizardHostsLoading');
+require('mixins/common/configs/widgets/unique/num_llap_nodes');
 require('mixins/common/configs/config_recommendations');
 require('mixins/common/configs/config_recommendation_parser');
 require('mixins/common/configs/config_with_override_recommendation_parser');

http://git-wip-us.apache.org/repos/asf/ambari/blob/b55ba18e/ambari-web/app/mixins/common/configs/widgets/unique/num_llap_nodes.js
--
diff --git 
a/ambari-web/app/mixins/common/configs/widgets/unique/num_llap_nodes.js 
b/ambari-web/app/mixins/common/configs/widgets/unique/num_llap_nodes.js
new file mode 100644
index 000..a2df0fa
--- /dev/null
+++ b/ambari-web/app/mixins/common/configs/widgets/unique/num_llap_nodes.js
@@ -0,0 +1,70 @@
+/**
+ * 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');
+
+/**
+ * Slider for `num_llap_nodes` should have unique widget
+ *
+ * @type {Em.Mixin}
+ */
+App.NumLlapNodesWidgetMixin = Em.Mixin.create({
+
+  /**
+   * @type {boolean}
+   */
+  readOnly: 
Em.computed.alias('config.stackConfigProperty.valueAttributes.read_only'),
+
+  /**
+   * @type {boolean}
+   */
+  doNotShowWidget: function () {
+if (this.get('readOnly')) {
+  return false;
+}
+return this.get('isPropertyUndefined') || this.get('config.showAsTextBox');
+  }.property('isPropertyUndefined', 'config.showAsTextBox', 'readOnly'),
+
+  handleReadOnlyAttribute: function () {
+var readOnly = this.get('readOnly');
+this.set('disabled', readOnly);
+this.set('supportSwitchToTextBox', !readOnly);
+if (readOnly) {
+  this.toggleSlider('disable');
+}
+  }.observes('readOnly'),
+
+  toggleWidgetView: function() {
+this._super();
+var action = !this.get('config.showAsTextBox') && this.get('readOnly') ? 
'disable' : 'enable';
+this.toggleSlider(action);
+  },
+
+  toggleWidgetState: function () {
+this.set('disabled', !this.get('config.isEditable'));
+  }.observes('config.isEditable'),
+
+  toggleSlider: function (action) {
+var self = this;
+Em.run.next(function () {
+  self.get('slider')[action]();
+});
+  }
+
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/b55ba18e/ambari-web/app/templates/common/configs/widgets/controls.hbs
--
diff --git a/ambari-web/app/templates/common/configs/widgets/controls.hbs

ambari git commit: AMBARI-19722. Wizard modals are closed before confirmation popup appears (onechiporenko)

2017-01-27 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 22d4e1816 -> a1f625f26


AMBARI-19722. Wizard modals are closed before confirmation popup appears 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: a1f625f265b99634a4c18e7c7c69a88302b286a0
Parents: 22d4e18
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Jan 26 11:03:39 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Fri Jan 27 10:07:11 2017 +0200

--
 ambari-web/app/views/common/modal_popup.js | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a1f625f2/ambari-web/app/views/common/modal_popup.js
--
diff --git a/ambari-web/app/views/common/modal_popup.js 
b/ambari-web/app/views/common/modal_popup.js
index 47b7d61..2f2dc1c 100644
--- a/ambari-web/app/views/common/modal_popup.js
+++ b/ambari-web/app/views/common/modal_popup.js
@@ -86,6 +86,7 @@ App.ModalPopup = Ember.View.extend({
 var firstInputElement = this.$('#modal').find(':input').not(':disabled, 
.no-autofocus').first();
 if (!$.mocho) {
   this.$('#modal').modal({
+keyboard: false,
 backdrop: false
   });
 }



ambari git commit: AMBARI-19703. "Add Config Property" causes JS-error (onechiporenko)

2017-01-25 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 82f8e8107 -> f03fed539


AMBARI-19703. "Add Config Property" causes JS-error (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: f03fed5394d9ef36a35a4fc5c8545c0d0e11e27d
Parents: 82f8e81
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Jan 25 11:58:52 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Jan 25 16:02:09 2017 +0200

--
 .../app/views/common/configs/service_configs_by_category_view.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f03fed53/ambari-web/app/views/common/configs/service_configs_by_category_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/service_configs_by_category_view.js 
b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
index 7a5bcbe..d9b4409 100644
--- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js
+++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
@@ -655,8 +655,8 @@ App.ServiceConfigsByCategoryView = 
Em.View.extend(App.UserPref, App.ConfigOverri
   var controller = (App.router.get('currentState.name') == 'configs')
 ? App.router.get('mainServiceInfoConfigsController')
 : App.router.get('wizardStep7Controller');
-  this.get('mainView').onClose();
-  controller.set('filter', event.view.get('serviceConfigObj.name'));
+  controller.set('filter', this.get('serviceConfigObj.name'));
+  this.get('parentView').onClose();
 }
   })
 });



ambari git commit: AMBARI-19703. "Add Config Property" causes JS-error (onechiporenko)

2017-01-25 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 75bf160ce -> 8642a4634


AMBARI-19703. "Add Config Property" causes JS-error (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 8642a4634b230755f5c285ed340a7636abe54b8f
Parents: 75bf160
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Jan 25 11:58:52 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Jan 25 15:53:37 2017 +0200

--
 .../app/views/common/configs/service_configs_by_category_view.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8642a463/ambari-web/app/views/common/configs/service_configs_by_category_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/service_configs_by_category_view.js 
b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
index 4148197..25f7dfb 100644
--- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js
+++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
@@ -664,8 +664,8 @@ App.ServiceConfigsByCategoryView = 
Em.View.extend(App.UserPref, App.ConfigOverri
   var controller = (App.router.get('currentState.name') == 'configs')
   ? App.router.get('mainServiceInfoConfigsController')
   : App.router.get('wizardStep7Controller');
-  this.get('mainView').onClose();
-  controller.set('filter', event.view.get('serviceConfigObj.name'));
+  controller.set('filter', this.get('serviceConfigObj.name'));
+  this.get('parentView').onClose();
 }
   })
 });



ambari git commit: AMBARI-19672. Alert Popup doesn't execute callback if it's closed without click on "Primary" (onechiporenko)

2017-01-23 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 7fef86711 -> 5ec40d61f


AMBARI-19672. Alert Popup doesn't execute callback if it's closed without click 
on "Primary" (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: 5ec40d61f6e154b7315e3c46ce0566d05d810d7e
Parents: 7fef867
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Mon Jan 23 13:31:45 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Jan 23 15:26:44 2017 +0200

--
 ambari-web/app/views/common/modal_popups/alert_popup.js | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5ec40d61/ambari-web/app/views/common/modal_popups/alert_popup.js
--
diff --git a/ambari-web/app/views/common/modal_popups/alert_popup.js 
b/ambari-web/app/views/common/modal_popups/alert_popup.js
index 413d33c..3364fcb 100644
--- a/ambari-web/app/views/common/modal_popups/alert_popup.js
+++ b/ambari-web/app/views/common/modal_popups/alert_popup.js
@@ -23,19 +23,19 @@ var App = require('app');
  *
  * @param {String} header - header of the popup
  * @param {String} body - body of the popup
- * @param {Function} primary - function to call upon clicking the OK button
+ * @param {Function} callback - function to call upon clicking the OK button, 
clicking "x" or pressing "Esc"
  * @return {*}
  */
-App.showAlertPopup = function (header, body, primary) {
+App.showAlertPopup = function (header, body, callback) {
   return App.ModalPopup.show({
 primary: Em.I18n.t('ok'),
 secondary: null,
 header: header,
 body: body,
-onPrimary: function () {
-  this.hide();
-  if (primary) {
-primary();
+hide: function () {
+  this._super();
+  if (callback) {
+callback();
   }
 }
   });



ambari git commit: AMBARI-19672. Alert Popup doesn't execute callback if it's closed without click on "Primary" (onechiporenko)

2017-01-23 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk cacb1cccf -> aaa99316f


AMBARI-19672. Alert Popup doesn't execute callback if it's closed without click 
on "Primary" (onechiporenko)


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

Branch: refs/heads/trunk
Commit: aaa99316f42b5f7633bb8b2ace3d2557c73a5500
Parents: cacb1cc
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Mon Jan 23 13:31:45 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Jan 23 15:07:04 2017 +0200

--
 ambari-web/app/views/common/modal_popups/alert_popup.js | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/aaa99316/ambari-web/app/views/common/modal_popups/alert_popup.js
--
diff --git a/ambari-web/app/views/common/modal_popups/alert_popup.js 
b/ambari-web/app/views/common/modal_popups/alert_popup.js
index 413d33c..3364fcb 100644
--- a/ambari-web/app/views/common/modal_popups/alert_popup.js
+++ b/ambari-web/app/views/common/modal_popups/alert_popup.js
@@ -23,19 +23,19 @@ var App = require('app');
  *
  * @param {String} header - header of the popup
  * @param {String} body - body of the popup
- * @param {Function} primary - function to call upon clicking the OK button
+ * @param {Function} callback - function to call upon clicking the OK button, 
clicking "x" or pressing "Esc"
  * @return {*}
  */
-App.showAlertPopup = function (header, body, primary) {
+App.showAlertPopup = function (header, body, callback) {
   return App.ModalPopup.show({
 primary: Em.I18n.t('ok'),
 secondary: null,
 header: header,
 body: body,
-onPrimary: function () {
-  this.hide();
-  if (primary) {
-primary();
+hide: function () {
+  this._super();
+  if (callback) {
+callback();
   }
 }
   });



ambari git commit: AMBARI-19643. Not completed Upgrade History items show End Time as "Not started" (onechiporenko)

2017-01-20 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 6e8c2263f -> 7131068df


AMBARI-19643. Not completed Upgrade History items show End Time as "Not 
started" (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 7131068df0cef726b9044e7b4ffe4977d86c6d88
Parents: 6e8c226
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Fri Jan 20 12:13:21 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Fri Jan 20 14:02:48 2017 +0200

--
 ambari-web/app/utils/date/date.js   | 29 
 .../admin/stack_upgrade/upgrade_history_view.js |  2 +-
 ambari-web/test/utils/date/date_test.js | 17 
 .../stack_upgrade/upgrade_history_view_test.js  |  4 +++
 4 files changed, 40 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7131068d/ambari-web/app/utils/date/date.js
--
diff --git a/ambari-web/app/utils/date/date.js 
b/ambari-web/app/utils/date/date.js
index 877b421..d461d21 100644
--- a/ambari-web/app/utils/date/date.js
+++ b/ambari-web/app/utils/date/date.js
@@ -82,26 +82,33 @@ module.exports = {
 return date;
   },
 
+  startTime: function (startTimestamp) {
+return this._time(startTimestamp, 'Not started');
+  },
+
+  endTime: function (endTimestamp) {
+return this._time(endTimestamp, 'Not finished');
+  },
+
   /**
-   * Convert starTimestamp to 'DAY_OF_THE_WEEK, MONTH DAY, YEAR 
HOURS:MINUTES', except for the case: year equals 1969
+   * Convert timestamp to 'DAY_OF_THE_WEEK, MONTH DAY, YEAR HOURS:MINUTES', 
except for the case: year equals 1969
*
-   * @param {string} startTimestamp
-   * @return {string} startTimeSummary
-   * @method startTime
+   * @param {string} timestamp
+   * @param {string} msg
+   * @return {string} TimeSummary
*/
-  startTime: function (startTimestamp) {
-if (!validator.isValidInt(startTimestamp)) {
+  _time: function (timestamp, msg) {
+if (!validator.isValidInt(timestamp)) {
   return '';
 }
-var startDate = new Date(startTimestamp);
+var startDate = new Date(timestamp);
 var months = this.dateMonths;
 var days = this.dateDays;
-// generate start time
-if (startDate.getFullYear() == 1969 || startTimestamp < 1) {
-  return 'Not started';
+if (startDate.getFullYear() === 1969 || timestamp < 1) {
+  return msg;
 }
 var startTimeSummary = '';
-if (new Date(startTimestamp).setHours(0, 0, 0, 0) == new 
Date().setHours(0, 0, 0, 0)) { //today
+if (new Date(timestamp).setHours(0, 0, 0, 0) === new Date().setHours(0, 0, 
0, 0)) { //today
   startTimeSummary = 'Today ' + 
this.dateFormatZeroFirst(startDate.getHours()) + ':' + 
this.dateFormatZeroFirst(startDate.getMinutes());
 } else {
   startTimeSummary = days[startDate.getDay()] + ' ' + 
months[startDate.getMonth()] + ' ' +

http://git-wip-us.apache.org/repos/asf/ambari/blob/7131068d/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
--
diff --git 
a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js 
b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
index e259e3f..c4a428e 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
@@ -134,7 +134,7 @@ App.MainAdminStackUpgradeHistoryView = 
App.TableView.extend(App.TableServerViewM
 directionLabel: direction,
 upgradeTypeLabel: method ? method.get('displayName') : method,
 startTimeLabel: 
date.startTime(App.dateTimeWithTimeZone(item.get('startTime'))),
-endTimeLabel: 
date.startTime(App.dateTimeWithTimeZone(item.get('endTime'))),
+endTimeLabel: 
date.endTime(App.dateTimeWithTimeZone(item.get('endTime'))),
 duration: date.durationSummary(item.get('startTime'), 
item.get('endTime'))
   });
   processedContent.push(item);

http://git-wip-us.apache.org/repos/asf/ambari/blob/7131068d/ambari-web/test/utils/date/date_test.js
--
diff --git a/ambari-web/test/utils/date/date_test.js 
b/ambari-web/test/utils/date/date_test.js
index c82a02e..5289fdd 100644
--- a/ambari-web/test/utils/date/date_test.js
+++ b/ambari-web/test/utils/date/date_test.js
@@ -68,6 +68,23 @@ describe('date', function () {
 });
   });
 
+  describe('#endTime()', function() {
+v

ambari git commit: AMBARI-19643. Not completed Upgrade History items show End Time as "Not started" (onechiporenko)

2017-01-20 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 495146c57 -> 5e6265857


AMBARI-19643. Not completed Upgrade History items show End Time as "Not 
started" (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: 5e6265857168e0cf493239448000dfa006c426d1
Parents: 495146c
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Fri Jan 20 12:13:21 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Fri Jan 20 14:02:22 2017 +0200

--
 ambari-web/app/utils/date/date.js   | 29 
 .../admin/stack_upgrade/upgrade_history_view.js |  2 +-
 ambari-web/test/utils/date/date_test.js | 17 
 .../stack_upgrade/upgrade_history_view_test.js  |  4 +++
 4 files changed, 40 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5e626585/ambari-web/app/utils/date/date.js
--
diff --git a/ambari-web/app/utils/date/date.js 
b/ambari-web/app/utils/date/date.js
index 877b421..d461d21 100644
--- a/ambari-web/app/utils/date/date.js
+++ b/ambari-web/app/utils/date/date.js
@@ -82,26 +82,33 @@ module.exports = {
 return date;
   },
 
+  startTime: function (startTimestamp) {
+return this._time(startTimestamp, 'Not started');
+  },
+
+  endTime: function (endTimestamp) {
+return this._time(endTimestamp, 'Not finished');
+  },
+
   /**
-   * Convert starTimestamp to 'DAY_OF_THE_WEEK, MONTH DAY, YEAR 
HOURS:MINUTES', except for the case: year equals 1969
+   * Convert timestamp to 'DAY_OF_THE_WEEK, MONTH DAY, YEAR HOURS:MINUTES', 
except for the case: year equals 1969
*
-   * @param {string} startTimestamp
-   * @return {string} startTimeSummary
-   * @method startTime
+   * @param {string} timestamp
+   * @param {string} msg
+   * @return {string} TimeSummary
*/
-  startTime: function (startTimestamp) {
-if (!validator.isValidInt(startTimestamp)) {
+  _time: function (timestamp, msg) {
+if (!validator.isValidInt(timestamp)) {
   return '';
 }
-var startDate = new Date(startTimestamp);
+var startDate = new Date(timestamp);
 var months = this.dateMonths;
 var days = this.dateDays;
-// generate start time
-if (startDate.getFullYear() == 1969 || startTimestamp < 1) {
-  return 'Not started';
+if (startDate.getFullYear() === 1969 || timestamp < 1) {
+  return msg;
 }
 var startTimeSummary = '';
-if (new Date(startTimestamp).setHours(0, 0, 0, 0) == new 
Date().setHours(0, 0, 0, 0)) { //today
+if (new Date(timestamp).setHours(0, 0, 0, 0) === new Date().setHours(0, 0, 
0, 0)) { //today
   startTimeSummary = 'Today ' + 
this.dateFormatZeroFirst(startDate.getHours()) + ':' + 
this.dateFormatZeroFirst(startDate.getMinutes());
 } else {
   startTimeSummary = days[startDate.getDay()] + ' ' + 
months[startDate.getMonth()] + ' ' +

http://git-wip-us.apache.org/repos/asf/ambari/blob/5e626585/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
--
diff --git 
a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js 
b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
index 5954673..3dfb4c1 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
@@ -134,7 +134,7 @@ App.MainAdminStackUpgradeHistoryView = 
App.TableView.extend(App.TableServerViewM
 directionLabel: direction,
 upgradeTypeLabel: method ? method.get('displayName') : method,
 startTimeLabel: 
date.startTime(App.dateTimeWithTimeZone(item.get('startTime'))),
-endTimeLabel: 
date.startTime(App.dateTimeWithTimeZone(item.get('endTime'))),
+endTimeLabel: 
date.endTime(App.dateTimeWithTimeZone(item.get('endTime'))),
 duration: date.durationSummary(item.get('startTime'), 
item.get('endTime'))
   });
   processedContent.push(item);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5e626585/ambari-web/test/utils/date/date_test.js
--
diff --git a/ambari-web/test/utils/date/date_test.js 
b/ambari-web/test/utils/date/date_test.js
index c82a02e..5289fdd 100644
--- a/ambari-web/test/utils/date/date_test.js
+++ b/ambari-web/test/utils/date/date_test.js
@@ -68,6 +68,23 @@ describe('date', function () {
 });
   });
 
+  describe('#endTime()', functio

ambari git commit: AMBARI-19560. Timezone for timestamps in Upgrade History not consistent with Background Operations (onechiporenko)

2017-01-19 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 a29f1499b -> 6061a677e


AMBARI-19560. Timezone for timestamps in Upgrade History not consistent with 
Background Operations (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: 6061a677ed43cc354715de934789fa1b590897a0
Parents: a29f149
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Jan 19 14:06:17 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Jan 19 14:06:17 2017 +0200

--
 .../admin/stack_upgrade/upgrade_history_view.js |  4 +-
 .../stack_upgrade/upgrade_history_view_test.js  | 76 ++--
 2 files changed, 72 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6061a677/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
--
diff --git 
a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js 
b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
index 2137f46..5954673 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
@@ -133,8 +133,8 @@ App.MainAdminStackUpgradeHistoryView = 
App.TableView.extend(App.TableServerViewM
   item.setProperties({
 directionLabel: direction,
 upgradeTypeLabel: method ? method.get('displayName') : method,
-startTimeLabel: App.dateTimeWithTimeZone(item.get('startTime')),
-endTimeLabel: App.dateTimeWithTimeZone(item.get('endTime')),
+startTimeLabel: 
date.startTime(App.dateTimeWithTimeZone(item.get('startTime'))),
+endTimeLabel: 
date.startTime(App.dateTimeWithTimeZone(item.get('endTime'))),
 duration: date.durationSummary(item.get('startTime'), 
item.get('endTime'))
   });
   processedContent.push(item);

http://git-wip-us.apache.org/repos/asf/ambari/blob/6061a677/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_view_test.js
--
diff --git 
a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_view_test.js 
b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_view_test.js
index d68a854..d13ccd5 100644
--- 
a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_view_test.js
+++ 
b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_view_test.js
@@ -19,7 +19,6 @@
 
 var App = require('app');
 require('views/main/admin/stack_upgrade/upgrade_history_view');
-var testHelpers = require('test/helpers');
 
 describe('App.MainAdminStackUpgradeHistoryView', function () {
   var view;
@@ -64,31 +63,31 @@ describe('App.MainAdminStackUpgradeHistoryView', function 
() {
 it('All should return all records', function(){
   this.mock.returns(records);
   var filteredResults = view.filterBy('ALL')
-  expect(filteredResults.length == 4).to.be.true
+  expect(filteredResults.length).to.be.equal(4);
 });
 
 it('Filter aborted upgrades', function(){
   this.mock.returns(records);
   var filteredResults = view.filterBy('UPGRADE_ABORTED')
-  expect(filteredResults.length == 1).to.be.true
+  expect(filteredResults.length).to.be.equal(1);
 });
 
 it('Filter completed upgrades', function(){
   this.mock.returns(records);
   var filteredResults = view.filterBy('UPGRADE_COMPLETED')
-  expect(filteredResults.length == 1).to.be.true
+  expect(filteredResults.length).to.be.equal(1);
 });
 
 it('Filter aborted downgrades', function(){
   this.mock.returns(records);
   var filteredResults = view.filterBy('DOWNGRADE_ABORTED')
-  expect(filteredResults.length == 1).to.be.true
+  expect(filteredResults.length).to.be.equal(1);
 });
 
 it('Filter completed downgrades', function(){
   this.mock.returns(records);
   var filteredResults = view.filterBy('DOWNGRADE_COMPLETED')
-  expect(filteredResults.length == 1).to.be.true
+  expect(filteredResults.length).to.be.equal(1);
 });
   });
 
@@ -170,4 +169,69 @@ describe('App.MainAdminStackUpgradeHistoryView', function 
() {
   
expect(view.get('controller').loadStackUpgradeHistoryToModel.calledOnce).to.be.true;
 });
   });
+
+  describe('#processForDisplay', function () {
+
+var timestamp = 1484698121448;
+
+var content = [
+  Em.Object.create({
+direction: 'UPGRADE',
+upgradeType: 'ROLLING',
+startTime: timestamp,
+end

ambari git commit: AMBARI-19560. Timezone for timestamps in Upgrade History not consistent with Background Operations (onechiporenko)

2017-01-19 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk a06c44c6f -> ee8bbfb00


AMBARI-19560. Timezone for timestamps in Upgrade History not consistent with 
Background Operations (onechiporenko)


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

Branch: refs/heads/trunk
Commit: ee8bbfb008c1d261bc726c17b7fcc917fbf5a862
Parents: a06c44c
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Jan 19 14:03:51 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Jan 19 15:00:28 2017 +0200

--
 .../admin/stack_upgrade/upgrade_history_view.js |  4 +-
 .../stack_upgrade/upgrade_history_view_test.js  | 65 
 2 files changed, 67 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ee8bbfb0/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
--
diff --git 
a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js 
b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
index dbdfc55..e259e3f 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
@@ -133,8 +133,8 @@ App.MainAdminStackUpgradeHistoryView = 
App.TableView.extend(App.TableServerViewM
   item.setProperties({
 directionLabel: direction,
 upgradeTypeLabel: method ? method.get('displayName') : method,
-startTimeLabel: App.dateTimeWithTimeZone(item.get('startTime')),
-endTimeLabel: App.dateTimeWithTimeZone(item.get('endTime')),
+startTimeLabel: 
date.startTime(App.dateTimeWithTimeZone(item.get('startTime'))),
+endTimeLabel: 
date.startTime(App.dateTimeWithTimeZone(item.get('endTime'))),
 duration: date.durationSummary(item.get('startTime'), 
item.get('endTime'))
   });
   processedContent.push(item);

http://git-wip-us.apache.org/repos/asf/ambari/blob/ee8bbfb0/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_view_test.js
--
diff --git 
a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_view_test.js 
b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_view_test.js
index bb25d09..cecf98f 100644
--- 
a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_view_test.js
+++ 
b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_history_view_test.js
@@ -168,4 +168,69 @@ describe('App.MainAdminStackUpgradeHistoryView', function 
() {
   
expect(view.get('controller').loadStackUpgradeHistoryToModel.calledOnce).to.be.true;
 });
   });
+
+  describe('#processForDisplay', function () {
+
+var timestamp = 1484698121448;
+
+var content = [
+  Em.Object.create({
+direction: 'UPGRADE',
+upgradeType: 'ROLLING',
+startTime: timestamp,
+endTime: timestamp + 3600 * 1000
+  }),
+  Em.Object.create({
+direction: 'DOWNGRADE',
+upgradeType: 'HOST_ORDERED',
+startTime: timestamp,
+endTime: timestamp + 3600 * 1000 * 2
+  })
+];
+
+var expected = [
+  Em.Object.create({
+directionLabel: Em.I18n.t('common.upgrade'),
+upgradeTypeLabel: Em.I18n.t('common.rolling'),
+duration: '1.00 hours'
+  }),
+  Em.Object.create({
+directionLabel: Em.I18n.t('common.downgrade'),
+upgradeTypeLabel: Em.I18n.t('common.hostOrdered'),
+duration: '2.00 hours'
+  })
+];
+
+var fields = ['directionLabel', 'upgradeTypeLabel', 'duration'];
+
+var processedContent;
+
+beforeEach(function () {
+  sinon.stub(App, 'dateTimeWithTimeZone', function (ts) {
+return ts - 3600 * 1000 * 2
+  });
+  processedContent = view.processForDisplay(content);
+});
+
+afterEach(function () {
+  App.dateTimeWithTimeZone.restore();
+});
+
+expected.forEach(function (item, index) {
+
+  describe('test #' + (index + 1), function () {
+
+fields.forEach(function (field) {
+  it('#' + field, function () {
+
expect(processedContent[index].get(field)).to.be.equal(item.get(field));
+  });
+});
+
+  });
+
+});
+
+
+  });
+
 });



ambari git commit: AMBARI-19611. Add UI UT for alerts (onechiporenko)

2017-01-18 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 61d0f640b -> d7f1e8c00


AMBARI-19611. Add UI UT for alerts (onechiporenko)


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

Branch: refs/heads/trunk
Commit: d7f1e8c00e574e5612f40e286b9795bd1e531259
Parents: 61d0f64
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Jan 18 13:58:43 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Jan 18 15:35:20 2017 +0200

--
 ambari-web/app/assets/test/tests.js |   1 +
 .../alerts/definition_details_controller.js |  24 ++-
 .../alerts/manage_alert_groups_controller.js| 194 ---
 .../manage_alert_notifications_controller.js| 106 +-
 .../app/mappers/alert_definitions_mapper.js |  16 +-
 ambari-web/app/models/alerts/alert_config.js|   4 +-
 ambari-web/app/models/alerts/alert_group.js |   2 +-
 .../app/models/alerts/alert_notification.js |   4 +-
 .../manage_alert_groups_controller_test.js  |  57 ++
 ...anage_alert_notifications_controller_test.js |  10 +
 .../test/models/alerts/alert_config_test.js |  21 ++
 .../test/models/alerts/alert_group_test.js  |  25 +++
 .../models/alerts/alert_notification_test.js|  50 +
 13 files changed, 313 insertions(+), 201 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d7f1e8c0/ambari-web/app/assets/test/tests.js
--
diff --git a/ambari-web/app/assets/test/tests.js 
b/ambari-web/app/assets/test/tests.js
index e42c811..d47d558 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -390,6 +390,7 @@ var files = [
   'test/models/alerts/alert_definition_test',
   'test/models/alerts/alert_group_test',
   'test/models/alerts/alert_instance_test',
+  'test/models/alerts/alert_notification_test',
   'test/models/authentication_test',
   'test/models/client_component_test',
   'test/models/cluster_states_test',

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7f1e8c0/ambari-web/app/controllers/main/alerts/definition_details_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/alerts/definition_details_controller.js 
b/ambari-web/app/controllers/main/alerts/definition_details_controller.js
index ea9b5b7..55d7e2b 100644
--- a/ambari-web/app/controllers/main/alerts/definition_details_controller.js
+++ b/ambari-web/app/controllers/main/alerts/definition_details_controller.js
@@ -105,10 +105,9 @@ App.MainAlertDefinitionDetailsController = 
Em.Controller.extend({
 var lastDayAlertsCount = {};
 data.items.forEach(function (alert) {
   if (!lastDayAlertsCount[alert.AlertHistory.host_name]) {
-lastDayAlertsCount[alert.AlertHistory.host_name] = 1;
-  } else {
-lastDayAlertsCount[alert.AlertHistory.host_name] += 1;
+lastDayAlertsCount[alert.AlertHistory.host_name] = 0;
   }
+  lastDayAlertsCount[alert.AlertHistory.host_name]++;
 });
 this.set('lastDayAlertsCount', lastDayAlertsCount);
   },
@@ -149,14 +148,14 @@ App.MainAlertDefinitionDetailsController = 
Em.Controller.extend({
 element.set('isEditing', false);
 
 var data = Em.Object.create({});
-var property_name = "AlertDefinition/" + element.get('name');
-data.set(property_name, element.get('value'));
-var alertDefinition_id = this.get('content.id');
+var propertyName = "AlertDefinition/" + element.get('name');
+data.set(propertyName, element.get('value'));
+var alertDefinitionId = this.get('content.id');
 return App.ajax.send({
   name: 'alerts.update_alert_definition',
   sender: this,
   data: {
-id: alertDefinition_id,
+id: alertDefinitionId,
 data: data
   }
 });
@@ -180,10 +179,9 @@ App.MainAlertDefinitionDetailsController = 
Em.Controller.extend({
 
   /**
* "Delete" button handler
-   * @param {object} event
* @method deleteAlertDefinition
*/
-  deleteAlertDefinition: function (event) {
+  deleteAlertDefinition: function () {
 var alertDefinition = this.get('content');
 var self = this;
 App.showConfirmationPopup(function () {
@@ -229,7 +227,7 @@ App.MainAlertDefinitionDetailsController = 
Em.Controller.extend({
   confirmButton: alertDefinition.get('enabled') ? 
Em.I18n.t('alerts.table.state.enabled.confirm.btn') : 
Em.I18n.t('alerts.table.state.disabled.confirm.btn')
 });
 
-return App.showConfirmationFeedBackPopup(function (query) {
+retu

ambari git commit: AMBARI-19560. Timezone for timestamps in Upgrade History not consistent with Background Operations (onechiporenko)

2017-01-16 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk a4015da1b -> 1f55ea3b0


AMBARI-19560. Timezone for timestamps in Upgrade History not consistent with 
Background Operations (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 1f55ea3b0f741521f55d737de2e535767fa2f2e0
Parents: a4015da
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Mon Jan 16 11:21:29 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Jan 16 17:47:31 2017 +0200

--
 .../app/views/main/admin/stack_upgrade/upgrade_history_view.js   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1f55ea3b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
--
diff --git 
a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js 
b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
index 8df8349..dbdfc55 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
@@ -133,8 +133,8 @@ App.MainAdminStackUpgradeHistoryView = 
App.TableView.extend(App.TableServerViewM
   item.setProperties({
 directionLabel: direction,
 upgradeTypeLabel: method ? method.get('displayName') : method,
-startTimeLabel: date.startTime(item.get('startTime')),
-endTimeLabel: date.startTime(item.get('endTime')),
+startTimeLabel: App.dateTimeWithTimeZone(item.get('startTime')),
+endTimeLabel: App.dateTimeWithTimeZone(item.get('endTime')),
 duration: date.durationSummary(item.get('startTime'), 
item.get('endTime'))
   });
   processedContent.push(item);



ambari git commit: AMBARI-19560. Timezone for timestamps in Upgrade History not consistent with Background Operations (onechiporenko)

2017-01-16 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 ce8e1bd4a -> 6f63e8426


AMBARI-19560. Timezone for timestamps in Upgrade History not consistent with 
Background Operations (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: 6f63e8426c79a59451d05ac4f5628a3163a17679
Parents: ce8e1bd
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Mon Jan 16 11:21:29 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Jan 16 17:43:12 2017 +0200

--
 .../app/views/main/admin/stack_upgrade/upgrade_history_view.js   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6f63e842/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
--
diff --git 
a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js 
b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
index f6a419e..2137f46 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_history_view.js
@@ -133,8 +133,8 @@ App.MainAdminStackUpgradeHistoryView = 
App.TableView.extend(App.TableServerViewM
   item.setProperties({
 directionLabel: direction,
 upgradeTypeLabel: method ? method.get('displayName') : method,
-startTimeLabel: date.startTime(item.get('startTime')),
-endTimeLabel: date.startTime(item.get('endTime')),
+startTimeLabel: App.dateTimeWithTimeZone(item.get('startTime')),
+endTimeLabel: App.dateTimeWithTimeZone(item.get('endTime')),
 duration: date.durationSummary(item.get('startTime'), 
item.get('endTime'))
   });
   processedContent.push(item);



ambari git commit: AMBARI-19517. Two SelectBoxes don't have class `form-control` (onechiporenko)

2017-01-13 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk c63a4d7f6 -> 2d40b127c


AMBARI-19517. Two SelectBoxes don't have class `form-control` (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 2d40b127cd21c8467ec0b9d23251f469ba000ae6
Parents: c63a4d7
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Fri Jan 13 11:12:34 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Fri Jan 13 11:12:34 2017 +0200

--
 .../common/modal_popups/select_groups_popup.hbs|  2 +-
 .../app/templates/main/service/add_host_popup.hbs  | 17 +++--
 2 files changed, 12 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2d40b127/ambari-web/app/templates/common/modal_popups/select_groups_popup.hbs
--
diff --git 
a/ambari-web/app/templates/common/modal_popups/select_groups_popup.hbs 
b/ambari-web/app/templates/common/modal_popups/select_groups_popup.hbs
index c7da8a4..f21be28 100644
--- a/ambari-web/app/templates/common/modal_popups/select_groups_popup.hbs
+++ b/ambari-web/app/templates/common/modal_popups/select_groups_popup.hbs
@@ -21,7 +21,7 @@
 {{view.serviceName}}
 
   {{#if view.hasGroups}}
-{{view Ember.Select contentBinding="view.groups" 
valueBinding="view.selectedGroup" disabledBinding="view.disabled"}}
+{{view Ember.Select classNames="form-control" 
contentBinding="view.groups" valueBinding="view.selectedGroup" 
disabledBinding="view.disabled"}}
   {{else}}
 {{t popup.dependent.configs.select.config.group.no.groups}}
   {{/if}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/2d40b127/ambari-web/app/templates/main/service/add_host_popup.hbs
--
diff --git a/ambari-web/app/templates/main/service/add_host_popup.hbs 
b/ambari-web/app/templates/main/service/add_host_popup.hbs
index 7431080..e5f2c99 100644
--- a/ambari-web/app/templates/main/service/add_host_popup.hbs
+++ b/ambari-web/app/templates/main/service/add_host_popup.hbs
@@ -17,12 +17,17 @@
 }}
 
 {{#if anyHostsWithoutComponent}}
-  {{selectHostMsg}}
-  
-{{view Ember.Select contentBinding="hostsWithoutComponent" 
selectionBinding="selectedHost"}}
+  {{selectHostMsg}}
+  
+
+  {{view Ember.Select contentBinding="hostsWithoutComponent" 
selectionBinding="selectedHost" classNames="form-control"}}
+
+  
+  
+
+  {{addComponentMsg}}
+
   
-
-  {{addComponentMsg}}
 {{else}}
-  {{thereIsNoHostsMsg}}
+  {{thereIsNoHostsMsg}}
 {{/if}}
\ No newline at end of file



ambari git commit: AMBARI-19465. JS error when user click Alert Link in the popup on the service summary page (onechiporenko)

2017-01-11 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 9bf6bdfb1 -> ce08967b9


AMBARI-19465. JS error when user click Alert Link in the popup on the service 
summary page (onechiporenko)


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

Branch: refs/heads/trunk
Commit: ce08967b97c58cc6760f7f5c0547cf24e2af4764
Parents: 9bf6bdf
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Jan 11 15:50:11 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Jan 11 16:40:08 2017 +0200

--
 ambari-web/app/controllers/main/service/info/summary.js | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ce08967b/ambari-web/app/controllers/main/service/info/summary.js
--
diff --git a/ambari-web/app/controllers/main/service/info/summary.js 
b/ambari-web/app/controllers/main/service/info/summary.js
index fc423fe..9bdf83a 100644
--- a/ambari-web/app/controllers/main/service/info/summary.js
+++ b/ambari-web/app/controllers/main/service/info/summary.js
@@ -408,13 +408,14 @@ App.MainServiceInfoSummaryController = 
Em.Controller.extend(App.WidgetSectionMix
 }.property('controller.content'),
 onToggleBlock: function (alert) {
   this.$('#' + alert.context.clientId).toggle('blind', 500);
-  alert.context.set("isCollapsed", !alert.context.get("isCollapsed"));
+  alert.context.toggleProperty('isCollapsed');
 },
-gotoAlertDetails: function (event) {
-  if (event && event.context) {
+gotoAlertDetails: function (e) {
+  if (e && e.context) {
 this.get('parentView').hide();
-App.router.transitionTo('main.alerts.alertDetails', event.context);
+App.router.transitionTo('main.alerts.alertDetails', e.context);
   }
+  return false;
 },
 closePopup: function () {
   this.get('parentView').hide();



ambari git commit: AMBARI-19460. Screen stuck when no suitable OS is detected (onechiporenko)

2017-01-11 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 67b4bdd8e -> b7b21c24c


AMBARI-19460. Screen stuck when no suitable OS is detected (onechiporenko)


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

Branch: refs/heads/trunk
Commit: b7b21c24cebf7d8aa1bcd756b5b779db1f1a336a
Parents: 67b4bdd
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Jan 11 13:05:00 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Jan 11 13:46:05 2017 +0200

--
 .../app/controllers/wizard/step8_controller.js  | 93 +++-
 .../wizard/wizardDeployProgressController.js|  2 +-
 .../test/controllers/wizard/step8_test.js   | 28 +++---
 3 files changed, 68 insertions(+), 55 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b7b21c24/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 6475d49..efd8834 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -18,7 +18,6 @@
 
 var App = require('app');
 var stringUtils = require('utils/string_utils');
-var validator = require('utils/validator');
 
 App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, 
App.wizardDeployProgressControllerMixin, App.ConfigOverridable, 
App.ConfigsSaverMixin, {
 
@@ -226,7 +225,7 @@ App.WizardStep8Controller = 
Em.Controller.extend(App.AddSecurityConfigs, App.wiz
*/
   formatProperties: function () {
 this.get('content.serviceConfigProperties').forEach(function 
(_configProperty) {
-  _configProperty.value = (typeof _configProperty.value === "boolean")
+  _configProperty.value = typeof _configProperty.value === "boolean"
 ? _configProperty.value.toString() : 
App.config.trimProperty(_configProperty, false);
 });
   },
@@ -251,7 +250,7 @@ App.WizardStep8Controller = 
Em.Controller.extend(App.AddSecurityConfigs, App.wiz
 var hosts = [];
 for (var hostName in allHosts) {
   if (allHosts.hasOwnProperty(hostName)) {
-if (allHosts[hostName].bootStatus == 'REGISTERED') {
+if (allHosts[hostName].bootStatus === 'REGISTERED') {
   allHosts[hostName].hostName = allHosts[hostName].name;
   hosts.pushObject(allHosts[hostName]);
 }
@@ -283,7 +282,7 @@ App.WizardStep8Controller = 
Em.Controller.extend(App.AddSecurityConfigs, App.wiz
 var totalHostsCount = 0;
 var hosts = this.get('content.hosts');
 for (var hostName in hosts) {
-  newHostsCount += ~~(!hosts[hostName].isInstalled);
+  newHostsCount += ~~!hosts[hostName].isInstalled;
   totalHostsCount++;
 }
 
@@ -292,7 +291,7 @@ App.WizardStep8Controller = 
Em.Controller.extend(App.AddSecurityConfigs, App.wiz
 this.get('clusterInfo').pushObject(Em.Object.create(totalHostsObj));
 
 //repo
-if (['addHostController', 
'addServiceController'].contains(this.get('content.controllerName'))) {
+if (this.get('isAddService') || this.get('isAddHost')) {
   // For some stacks there is no info regarding stack versions to upgrade, 
e.g. HDP-2.1
   if (App.StackVersion.find().get('content.length')) {
 this.loadRepoInfo();
@@ -415,10 +414,9 @@ App.WizardStep8Controller = 
Em.Controller.extend(App.AddSecurityConfigs, App.wiz
   },
 
   /**
-   * @param {object} request
* @method loadRepoInfoErrorCallback
*/
-  loadRepoInfoErrorCallback: function (request) {
+  loadRepoInfoErrorCallback: function () {
 var allRepos = [];
 allRepos.set('display_name', 
Em.I18n.t("installer.step8.repoInfo.displayName"));
 this.get('clusterInfo').set('repoInfo', allRepos);
@@ -441,7 +439,7 @@ App.WizardStep8Controller = 
Em.Controller.extend(App.AddSecurityConfigs, App.wiz
 // no HA component
 if (component.get('isHAComponentOnly')) return;
 // skip if component is not allowed on single node cluster
-if (Object.keys(this.get('content.hosts')).length == 1 && 
component.get('isNotAllowedOnSingleNodeCluster')) return;
+if (Object.keys(this.get('content.hosts')).length === 1 && 
component.get('isNotAllowedOnSingleNodeCluster')) return;
 var displayName;
 if (component.get('isClient')) {
   displayName = Em.I18n.t('common.clients')
@@ -496,7 +494,7 @@ App.WizardStep8Controller = 
Em.Controller.extend(App.AddSecurityConfigs, App.wiz
 var componen

ambari git commit: AMBARI-19445. Add macros `existsInByKey` and `notExistsInByKey` (onechiporenko)

2017-01-10 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk ba99a2944 -> 67d17f060


AMBARI-19445. Add macros `existsInByKey` and `notExistsInByKey` (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 67d17f060e87530b1ad7ffe47bee9eba8ce43652
Parents: ba99a29
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Tue Jan 10 15:32:49 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Tue Jan 10 16:38:12 2017 +0200

--
 ambari-web/app/utils/ember_computed.js  | 52 ++
 .../main/alerts/definition_details_view.js  |  4 +-
 .../main/host/details/host_component_view.js| 12 +---
 ambari-web/app/views/main/service/menu.js   |  4 +-
 .../test/aliases/computed/existsInByKey.js  | 59 
 .../test/aliases/computed/notExistsInByKey.js   | 59 
 ambari-web/test/app_test.js |  8 ++-
 ambari-web/test/init_computed_aliases.js|  2 +
 ambari-web/test/utils/ember_computed_test.js| 72 
 .../main/alerts/definition_details_view_test.js | 32 +
 .../host/details/host_component_view_test.js| 40 ++-
 ambari-web/test/views/main/service/menu_test.js | 15 
 12 files changed, 274 insertions(+), 85 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/67d17f06/ambari-web/app/utils/ember_computed.js
--
diff --git a/ambari-web/app/utils/ember_computed.js 
b/ambari-web/app/utils/ember_computed.js
index e21f4d3..b64d4a9 100644
--- a/ambari-web/app/utils/ember_computed.js
+++ b/ambari-web/app/utils/ember_computed.js
@@ -966,6 +966,32 @@ computed.existsIn = function (dependentKey, neededValues) {
 };
 
 /**
+ * A computed property that returns true if dependent property exists in the 
property with needed values
+ * 
+ * var o = Em.Object.create({
+ *  p1: 2,
+ *  p2: Em.computed.existsInByKey('p1', 'p3'),
+ *  p3: [1, 2, 3]
+ * });
+ * console.log(o.get('p2')); // true
+ * o.set('p1', 4);
+ * console.log(o.get('p2')); // false
+ * 
+ *
+ * @method existsIn
+ * @param {string} dependentKey
+ * @param {string} neededValuesKey
+ * @returns {Ember.ComputedProperty}
+ */
+computed.existsInByKey = function (dependentKey, neededValuesKey) {
+  return computed(dependentKey, `${neededValuesKey}.[]`, function () {
+var value = smartGet(this, dependentKey);
+var neededValues = smartGet(this, neededValuesKey);
+return makeArray(neededValues).contains(value);
+  });
+};
+
+/**
  * A computed property that returns true if dependent property doesn't exist 
in the needed values
  * 
  * var o = Em.Object.create({
@@ -990,6 +1016,32 @@ computed.notExistsIn = function (dependentKey, 
neededValues) {
 };
 
 /**
+ * A computed property that returns true if dependent property doesn't exist 
in the property with needed values
+ * 
+ * var o = Em.Object.create({
+ *  p1: 2,
+ *  p2: Em.computed.notExistsInByKey('p1', 'p3'),
+ *  p3: [1, 2, 3]
+ * });
+ * console.log(o.get('p2')); // false
+ * o.set('p1', 4);
+ * console.log(o.get('p2')); // true
+ * 
+ *
+ * @method notExistsInByKey
+ * @param {string} dependentKey
+ * @param {string} neededValuesKey
+ * @returns {Ember.ComputedProperty}
+ */
+computed.notExistsInByKey = function (dependentKey, neededValuesKey) {
+  return computed(dependentKey, `${neededValuesKey}.[]`, function () {
+var value = smartGet(this, dependentKey);
+var neededValues = smartGet(this, neededValuesKey);
+return !makeArray(neededValues).contains(value);
+  });
+};
+
+/**
  * A computed property that returns result of calculation 
(dependentProperty1/dependentProperty2 * 100)
  * If accuracy is 0 (by default), result is rounded to integer
  * Otherwise - result is float with provided accuracy

http://git-wip-us.apache.org/repos/asf/ambari/blob/67d17f06/ambari-web/app/views/main/alerts/definition_details_view.js
--
diff --git a/ambari-web/app/views/main/alerts/definition_details_view.js 
b/ambari-web/app/views/main/alerts/definition_details_view.js
index fc80c89..5c8efff 100644
--- a/ambari-web/app/views/main/alerts/definition_details_view.js
+++ b/ambari-web/app/views/main/alerts/definition_details_view.js
@@ -326,9 +326,7 @@ App.AlertInstanceServiceHostView = Em.View.extend({
   /**
* Define whether show link for transition to service page
*/
-  serviceIsLink: function () {
-return 
App.get('services.all').contains(this.get('instance.service.serviceName'));
-  }.property('instance.serv

ambari git commit: AMBARI-19401. Add new macros `ifThenElseByKeys` and write UT (onechiporenko)

2017-01-06 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk e79ff36d5 -> 21975c9ca


AMBARI-19401. Add new macros `ifThenElseByKeys` and write UT (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 21975c9caac148684cbf96a90753e2946e2a5263
Parents: e79ff36
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Fri Jan 6 13:55:43 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Fri Jan 6 15:53:29 2017 +0200

--
 .../configs/objects/service_config_property.js  |  8 +--
 ambari-web/app/models/configs/theme/tab.js  |  9 ++-
 ambari-web/app/utils/ember_computed.js  | 30 +
 ambari-web/test/aliases/computed/filterBy.js|  2 +-
 .../test/aliases/computed/ifThenElseByKeys.js   | 65 
 ambari-web/test/init_computed_aliases.js|  1 +
 .../objects/service_config_property_test.js | 55 +++--
 .../models/configs/theme/sub_section_test.js|  2 +
 .../test/models/configs/theme/tab_test.js   |  2 +
 ambari-web/test/utils/ember_computed_test.js| 42 -
 10 files changed, 159 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/21975c9c/ambari-web/app/models/configs/objects/service_config_property.js
--
diff --git a/ambari-web/app/models/configs/objects/service_config_property.js 
b/ambari-web/app/models/configs/objects/service_config_property.js
index 4459946..ed72dc3 100644
--- a/ambari-web/app/models/configs/objects/service_config_property.js
+++ b/ambari-web/app/models/configs/objects/service_config_property.js
@@ -209,9 +209,7 @@ App.ServiceConfigProperty = Em.Object.extend({
* When true means that property is shown and may affect 
validation process.
* When false means that property won't affect validation.
*/
-  isActive: function() {
-return this.get('isVisible') && !this.get('hiddenBySubSection') && 
!this.get('hiddenBySection');
-  }.property('isVisible', 'hiddenBySubSection', 'hiddenBySection'),
+  isActive: Em.computed.and('isVisible', '!hiddenBySubSection', 
'!hiddenBySection'),
 
   /**
* @type {boolean}
@@ -265,9 +263,7 @@ App.ServiceConfigProperty = Em.Object.extend({
 return overrideable && (editable || !overrides || !overrides.length) && 
(!["componentHost", "password"].contains(dt));
   }.property('isEditable', 'displayType', 'isOverridable', 'overrides.length'),
 
-  isOverridden: function() {
-return (this.get('overrides') != null && this.get('overrides.length') > 0) 
|| !this.get('isOriginalSCP');
-  }.property('overrides', 'overrides.length', 'isOriginalSCP'),
+  isOverridden: Em.computed.or('overrides.length', '!isOriginalSCP'),
 
   isOverrideChanged: function () {
 if (Em.isNone(this.get('overrides')) && this.get('overrideValues.length') 
=== 0) return false;

http://git-wip-us.apache.org/repos/asf/ambari/blob/21975c9c/ambari-web/app/models/configs/theme/tab.js
--
diff --git a/ambari-web/app/models/configs/theme/tab.js 
b/ambari-web/app/models/configs/theme/tab.js
index ad3e6e4..18461b2 100644
--- a/ambari-web/app/models/configs/theme/tab.js
+++ b/ambari-web/app/models/configs/theme/tab.js
@@ -63,13 +63,16 @@ App.Tab = DS.Model.extend({
   tooltipMsg: Em.computed.ifThenElse('isHiddenByFilter', 
Em.I18n.t('services.service.config.nothing.to.display') , ''),
 
   /**
+   * @type {boolean}
+   */
+  allSectionsAreHiddenByFilter: Em.computed.everyBy('sections', 
'isHiddenByFilter', true),
+
+  /**
* Determines if tab is filtered out (all it's sections should be hidden)
* If it's an Advanced Tab it can't be hidden
* @type {boolean}
*/
-  isHiddenByFilter: function () {
-return this.get('isAdvanced') ? this.get('isAdvancedHidden') : 
this.get('sections').everyProperty('isHiddenByFilter', true);
-  }.property('isAdvanced', 'sections.@each.isHiddenByFilter', 
'isAdvancedHidden')
+  isHiddenByFilter: Em.computed.ifThenElseByKeys('isAdvanced', 
'isAdvancedHidden', 'allSectionsAreHiddenByFilter')
 
 });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/21975c9c/ambari-web/app/utils/ember_computed.js
--
diff --git a/ambari-web/app/utils/ember_computed.js 
b/ambari-web/app/utils/ember_computed.js
index 08be4e5..e21f4d3 100644
--- a/ambari-web/app/utils/ember_computed.js
+++ b/ambari-web/app/utils/ember_computed.js
@@ 

ambari git commit: AMBARI-19182. Config Groups: Save button not enabled while trying to overwrite configs (onechiporenko)

2017-01-05 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 1527bd15c -> bca0346b9


AMBARI-19182. Config Groups: Save button not enabled while trying to overwrite 
configs (onechiporenko)


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

Branch: refs/heads/trunk
Commit: bca0346b9f3eb01cd90e00cfce366305fca7a38b
Parents: 1527bd1
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Jan 5 15:44:17 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Jan 5 15:44:17 2017 +0200

--
 .../models/configs/objects/service_config.js|  1 +
 .../journalNode/step4_controller_test.js|  2 +-
 .../resourceManager/step3_controller_test.js| 22 +++-
 ambari-web/test/utils/config_test.js| 10 ++---
 4 files changed, 12 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bca0346b/ambari-web/app/models/configs/objects/service_config.js
--
diff --git a/ambari-web/app/models/configs/objects/service_config.js 
b/ambari-web/app/models/configs/objects/service_config.js
index 7d07467..ea24ec4 100644
--- a/ambari-web/app/models/configs/objects/service_config.js
+++ b/ambari-web/app/models/configs/objects/service_config.js
@@ -158,6 +158,7 @@ App.ServiceConfig = Ember.Object.extend({
 this._super();
 this.set('dependentServiceNames', 
App.StackService.find(this.get('serviceName')).get('dependentServiceNames') || 
[]);
 this.observeForeignKeys();
+this.setActiveProperties();
   },
 
   hasConfigIssues: Em.computed.someBy('activeProperties', 'hasIssues', true)

http://git-wip-us.apache.org/repos/asf/ambari/blob/bca0346b/ambari-web/test/controllers/main/admin/highAvailability/journalNode/step4_controller_test.js
--
diff --git 
a/ambari-web/test/controllers/main/admin/highAvailability/journalNode/step4_controller_test.js
 
b/ambari-web/test/controllers/main/admin/highAvailability/journalNode/step4_controller_test.js
index ba92b54..0c0ef5c 100644
--- 
a/ambari-web/test/controllers/main/admin/highAvailability/journalNode/step4_controller_test.js
+++ 
b/ambari-web/test/controllers/main/admin/highAvailability/journalNode/step4_controller_test.js
@@ -45,7 +45,7 @@ describe('App.ManageJournalNodeWizardStep4Controller', 
function () {
 host_name: 'host1'
   });
   controller.stopStandbyNameNode();
-  expect(controller.updateComponent.calledWith('NAMENODE', 'host1', 
'HDFS',  'INSTALLED')).to.be.true;
+  expect(controller.updateComponent.calledWith('NAMENODE', 'host1', 
'HDFS', 'INSTALLED')).to.be.true;
 });
   });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/bca0346b/ambari-web/test/controllers/main/admin/highAvailability/resourceManager/step3_controller_test.js
--
diff --git 
a/ambari-web/test/controllers/main/admin/highAvailability/resourceManager/step3_controller_test.js
 
b/ambari-web/test/controllers/main/admin/highAvailability/resourceManager/step3_controller_test.js
index 665d8e6..004c5ad 100644
--- 
a/ambari-web/test/controllers/main/admin/highAvailability/resourceManager/step3_controller_test.js
+++ 
b/ambari-web/test/controllers/main/admin/highAvailability/resourceManager/step3_controller_test.js
@@ -374,19 +374,13 @@ describe('App.RMHighAvailabilityWizardStep3Controller', 
function () {
   });
 
   describe("#renderConfigs()", function () {
-var serviceConfig = App.ServiceConfig.create({
-  serviceName: 'MISC',
-  displayName: 'MISC',
-  configCategories: [],
-  showConfig: true,
-  configs: []
-});
 
 beforeEach(function() {
   sinon.stub(controller, 'renderConfigProperties');
   sinon.stub(App.Service, 'find').returns([Em.Object.create({
 serviceName: 'S1'
   })]);
+  controller.renderConfigs();
 });
 
 afterEach(function() {
@@ -395,22 +389,12 @@ describe('App.RMHighAvailabilityWizardStep3Controller', 
function () {
 });
 
 it("renderConfigProperties should be called", function() {
-  controller.renderConfigs();
-  
expect(controller.renderConfigProperties.getCall(0).args[1]).to.be.eql(serviceConfig);
+  
expect(controller.renderConfigProperties.getCall(0).args[1]).to.be.an('object').and.have.property('serviceName').equal('MISC');
 });
 
 it("App.ajax.send should be called", function() {
-  controller.renderConfigs();
   var args = testHelpers.findAjaxRequest('name', 'co

ambari git commit: AMBARI-19182. Config Groups: Save button not enabled while trying to overwrite configs (onechiporenko)

2017-01-05 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 a8ac99aed -> 11c8067e0


AMBARI-19182. Config Groups: Save button not enabled while trying to overwrite 
configs (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: 11c8067e00e0c5abc3e3e269b87dcee0b1944a0f
Parents: a8ac99a
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Jan 5 15:44:17 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Jan 5 15:53:29 2017 +0200

--
 ambari-web/app/models/configs/objects/service_config.js | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/11c8067e/ambari-web/app/models/configs/objects/service_config.js
--
diff --git a/ambari-web/app/models/configs/objects/service_config.js 
b/ambari-web/app/models/configs/objects/service_config.js
index 7d07467..ea24ec4 100644
--- a/ambari-web/app/models/configs/objects/service_config.js
+++ b/ambari-web/app/models/configs/objects/service_config.js
@@ -158,6 +158,7 @@ App.ServiceConfig = Ember.Object.extend({
 this._super();
 this.set('dependentServiceNames', 
App.StackService.find(this.get('serviceName')).get('dependentServiceNames') || 
[]);
 this.observeForeignKeys();
+this.setActiveProperties();
   },
 
   hasConfigIssues: Em.computed.someBy('activeProperties', 'hasIssues', true)



ambari git commit: AMBARI-19341. Not able to update the role for a given user (onechiporenko)

2017-01-05 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 1c1488941 -> 0777ae563


AMBARI-19341. Not able to update the role for a given user (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 0777ae5634c25e7b8bed03f872e17759e4e80f73
Parents: 1c14889
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Jan 4 18:39:05 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Jan 5 10:32:12 2017 +0200

--
 .../app/scripts/controllers/clusters/UserAccessListCtrl.js| 7 ---
 .../ui/admin-web/app/views/clusters/userAccessList.html   | 2 +-
 .../ui/admin-web/test/unit/services/PermissionSaver_test.js   | 5 +
 3 files changed, 10 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0777ae56/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
index 4f00aeb..9869d0b 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
@@ -166,9 +166,10 @@ function($scope, $location, Cluster, $modal, $rootScope, 
$routeParams, Permissio
 
 // Process when it's NONE privilege or higher than current effective 
group privilege
 if (userIndex <= groupIndex || user.permission_name == 
$scope.NONE_ROLE.permission_name) {
-  var privilege_ids = [];
-  privilegesOfTypeUser.forEach(function(privilegeOfTypeUser) {
-privilege_ids.push(privilegeOfTypeUser.privilege_id);
+  var privilege_ids = 
privilegesOfTypeUser.filter(function(privilegeOfTypeUser) {
+return privilegeOfTypeUser.principal_type !== 'ROLE';
+  }).map(function (privilegeOfTypeUser) {
+return privilegeOfTypeUser.privilege_id;
   });
 
   // Purge existing user level privileges if there is any

http://git-wip-us.apache.org/repos/asf/ambari/blob/0777ae56/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/userAccessList.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/userAccessList.html
 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/userAccessList.html
index 7b54f9f..8b29157 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/userAccessList.html
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/userAccessList.html
@@ -68,7 +68,7 @@
   
   
 {{user.permission_label}}
-
 
 {{'common.fromGroupMark' | 
translate}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/0777ae56/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/PermissionSaver_test.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/PermissionSaver_test.js
 
b/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/PermissionSaver_test.js
index 6c662f2..6a409e4 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/PermissionSaver_test.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/PermissionSaver_test.js
@@ -40,6 +40,7 @@ describe('PermissionSaver Service', function () {
   PermissionInfo: {
 permission_name: 'CLUSTER.ADMINISTRATOR'
   },
+  ROLE: {},
   USER: ['u0', 'u1', 'g0'],
   GROUP: ['g0', 'g1', 'u0']
 },
@@ -47,6 +48,7 @@ describe('PermissionSaver Service', function () {
   PermissionInfo: {
 permission_name: 'CLUSTER.OPERATOR'
   },
+  ROLE: {},
   USER: ['g1'],
   GROUP: ['u1']
 }
@@ -118,6 +120,7 @@ describe('PermissionSaver Service', function () {
   PermissionInfo: {
 permission_name: 'CLUSTER.ADMINISTRATOR'
   },
+  ROLE: {},
   USER: ['u0', 'u1'],
   GROUP: ['g0', 'g1']
 },
@@ -125,6 +128,7 @@ describe('PermissionSaver Service', function () {
   

ambari git commit: AMBARI-19341. Not able to update the role for a given user (onechiporenko)

2017-01-05 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 a31a011ce -> 5e3d7b47c


AMBARI-19341. Not able to update the role for a given user (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: 5e3d7b47c60a61db3abedc2c3c9f783bd2827819
Parents: a31a011
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Jan 4 18:39:05 2017 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Jan 5 10:30:20 2017 +0200

--
 .../app/scripts/controllers/clusters/UserAccessListCtrl.js| 7 ---
 .../ui/admin-web/app/views/clusters/userAccessList.html   | 2 +-
 .../ui/admin-web/test/unit/services/PermissionSaver_test.js   | 5 +
 3 files changed, 10 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5e3d7b47/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
index 4f00aeb..9869d0b 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
@@ -166,9 +166,10 @@ function($scope, $location, Cluster, $modal, $rootScope, 
$routeParams, Permissio
 
 // Process when it's NONE privilege or higher than current effective 
group privilege
 if (userIndex <= groupIndex || user.permission_name == 
$scope.NONE_ROLE.permission_name) {
-  var privilege_ids = [];
-  privilegesOfTypeUser.forEach(function(privilegeOfTypeUser) {
-privilege_ids.push(privilegeOfTypeUser.privilege_id);
+  var privilege_ids = 
privilegesOfTypeUser.filter(function(privilegeOfTypeUser) {
+return privilegeOfTypeUser.principal_type !== 'ROLE';
+  }).map(function (privilegeOfTypeUser) {
+return privilegeOfTypeUser.privilege_id;
   });
 
   // Purge existing user level privileges if there is any

http://git-wip-us.apache.org/repos/asf/ambari/blob/5e3d7b47/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/userAccessList.html
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/userAccessList.html
 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/userAccessList.html
index 7b54f9f..8b29157 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/userAccessList.html
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/userAccessList.html
@@ -68,7 +68,7 @@
   
   
 {{user.permission_label}}
-
 
 {{'common.fromGroupMark' | 
translate}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/5e3d7b47/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/PermissionSaver_test.js
--
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/PermissionSaver_test.js
 
b/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/PermissionSaver_test.js
index 6c662f2..6a409e4 100644
--- 
a/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/PermissionSaver_test.js
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/test/unit/services/PermissionSaver_test.js
@@ -40,6 +40,7 @@ describe('PermissionSaver Service', function () {
   PermissionInfo: {
 permission_name: 'CLUSTER.ADMINISTRATOR'
   },
+  ROLE: {},
   USER: ['u0', 'u1', 'g0'],
   GROUP: ['g0', 'g1', 'u0']
 },
@@ -47,6 +48,7 @@ describe('PermissionSaver Service', function () {
   PermissionInfo: {
 permission_name: 'CLUSTER.OPERATOR'
   },
+  ROLE: {},
   USER: ['g1'],
   GROUP: ['u1']
 }
@@ -118,6 +120,7 @@ describe('PermissionSaver Service', function () {
   PermissionInfo: {
 permission_name: 'CLUSTER.ADMINISTRATOR'
   },
+  ROLE: {},
   USER: ['u0', 'u1'],
   GROUP: ['g0', 'g1']
 },
@@ -125,6 +128,7 @@ describe('PermissionSaver Service', function () {
   

ambari git commit: AMBARI-19326. Install Wizard needs to scroll back up to top on step transitions (onechiporenko)

2016-12-30 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 56bcfce3d -> 3b52cbc60


AMBARI-19326. Install Wizard needs to scroll back up to top on step transitions 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: 3b52cbc60830ebdefd24e823c9c8ff838e1fb858
Parents: 56bcfce
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Fri Dec 30 14:00:49 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Fri Dec 30 14:00:49 2016 +0200

--
 ambari-web/app/routes/installer.js   | 22 ++
 ambari-web/app/utils/ember_reopen.js |  5 +
 2 files changed, 27 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3b52cbc6/ambari-web/app/routes/installer.js
--
diff --git a/ambari-web/app/routes/installer.js 
b/ambari-web/app/routes/installer.js
index b4aa799..1048e8e 100644
--- a/ambari-web/app/routes/installer.js
+++ b/ambari-web/app/routes/installer.js
@@ -92,10 +92,12 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
 route: '/step0',
 connectOutlets: function (router) {
   console.time('step0 connectOutlets');
+  var self = this;
   var controller = router.get('installerController');
   controller.setCurrentStep('0');
   controller.loadAllPriorSteps().done(function () {
 controller.connectOutlet('wizardStep0', controller.get('content'));
+self.scrollTop();
 console.timeEnd('step0 connectOutlets');
   });
 },
@@ -146,10 +148,12 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
 route: '/step1',
 connectOutlets: function (router) {
   console.time('step1 connectOutlets');
+  var self = this;
   var controller = router.get('installerController');
   controller.setCurrentStep('1');
   controller.loadAllPriorSteps().done(function () {
 controller.connectOutlet('wizardStep1', controller.get('content'));
+self.scrollTop();
 console.timeEnd('step1 connectOutlets');
   });
 },
@@ -178,11 +182,13 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
 route: '/step2',
 connectOutlets: function (router, context) {
   console.time('step2 connectOutlets');
+  var self = this;
   router.setNavigationFlow('step2');
 
   var controller = router.get('installerController');
   controller.setCurrentStep('2');
   controller.loadAllPriorSteps().done(function () {
+self.scrollTop();
 controller.connectOutlet('wizardStep2', controller.get('content'));
 console.timeEnd('step2 connectOutlets');
   });
@@ -206,12 +212,14 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
 route: '/step3',
 connectOutlets: function (router) {
   console.time('step3 connectOutlets');
+  var self = this;
   var controller = router.get('installerController');
   controller.setCurrentStep('3');
   controller.loadAllPriorSteps().done(function () {
 var wizardStep3Controller = router.get('wizardStep3Controller');
 wizardStep3Controller.set('wizardController', controller);
 controller.connectOutlet('wizardStep3', controller.get('content'));
+self.scrollTop();
 console.timeEnd('step3 connectOutlets');
   });
 },
@@ -255,6 +263,7 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
 route: '/step4',
 connectOutlets: function (router, context) {
   console.time('step4 connectOutlets');
+  var self = this;
   router.setNavigationFlow('step4');
   var controller = router.get('installerController');
   controller.setCurrentStep('4');
@@ -262,6 +271,7 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
 var wizardStep4Controller = router.get('wizardStep4Controller');
 wizardStep4Controller.set('wizardController', controller);
 controller.connectOutlet('wizardStep4', 
App.StackService.find().filterProperty('isInstallable', true));
+self.scrollTop();
 console.timeEnd('step4 connectOutlets');
   });
 },
@@ -294,6 +304,7 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
 route: '/step5',
 connectOutlets: function (router, context) {
   console.time('step5 connectOutlets');
+  var self = this;
   router.setNavigationFlow('step5');
 
   var controller = router.get('installerController');
@@ -305,6 +316,7 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
   controller.se

ambari git commit: AMBARI-19287. Adding custom property should trim white spaces in the prefix and suffix of the key names (onechiporenko)

2016-12-29 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 6db03934b -> a0dc96edc


AMBARI-19287. Adding custom property should trim white spaces in the prefix and 
suffix of the key names (onechiporenko)


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

Branch: refs/heads/trunk
Commit: a0dc96edc6d21bcdda0720257216647581e5dc80
Parents: 6db0393
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Dec 29 14:13:23 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Dec 29 14:13:23 2016 +0200

--
 ambari-web/app/utils/validator.js   |  4 +-
 .../configs/service_configs_by_category_view.js |  7 ++--
 .../test/controllers/main/host/details_test.js  | 40 
 ambari-web/test/utils/validator_test.js |  5 ++-
 4 files changed, 26 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a0dc96ed/ambari-web/app/utils/validator.js
--
diff --git a/ambari-web/app/utils/validator.js 
b/ambari-web/app/utils/validator.js
index c7248bb..5173702 100644
--- a/ambari-web/app/utils/validator.js
+++ b/ambari-web/app/utils/validator.js
@@ -180,11 +180,13 @@ module.exports = {
 
   /**
* validate key of configurations
+   * allow spaces as prefix and suffix
+   *
* @param value
* @return {Boolean}
*/
   isValidConfigKey: function(value) {
-var configKeyRegex = /^[0-9a-z_\-\.\*]+$/i;
+var configKeyRegex = /^\s*[0-9a-z_\-\.\*]+\s*$/i;
 return configKeyRegex.test(value);
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a0dc96ed/ambari-web/app/views/common/configs/service_configs_by_category_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/service_configs_by_category_view.js 
b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
index 3ebc2cf..4148197 100644
--- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js
+++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
@@ -509,8 +509,8 @@ App.ServiceConfigsByCategoryView = 
Em.View.extend(App.UserPref, App.ConfigOverri
   showFilterLink: false,
   errorMessage: '',
   observeAddPropertyValue: function () {
-var name = this.get('name');
-if (name.trim() != '') {
+var name = this.get('name').trim();
+if (name !== '') {
   if (validator.isValidConfigKey(name)) {
 if (!self.isDuplicatedConfigKey(name)) { //no duplication within 
the same confType
   var files = self.isDuplicatedConfigKeyinConfigs(name);
@@ -582,7 +582,7 @@ App.ServiceConfigsByCategoryView = 
Em.View.extend(App.UserPref, App.ConfigOverri
* For the first entrance use this if (serviceConfigObj.name.trim() 
!= '')
*/
   if (!serviceConfigObj.isKeyError) {
-propertyObj.name = serviceConfigObj.get('name');
+propertyObj.name = serviceConfigObj.get('name').trim();
 propertyObj.value = serviceConfigObj.get('value');
 propertyObj.propertyType = serviceConfigObj.get('propertyType');
 self.createProperty(propertyObj);
@@ -751,7 +751,6 @@ App.ServiceConfigsByCategoryView = 
Em.View.extend(App.UserPref, App.ConfigOverri
*/
   doRestoreDefaultValue: function (event) {
 var serviceConfigProperty = event.contexts[0];
-var value = serviceConfigProperty.get('value');
 var savedValue = serviceConfigProperty.get('savedValue');
 var supportsFinal = serviceConfigProperty.get('supportsFinal');
 var savedIsFinal = serviceConfigProperty.get('savedIsFinal');

http://git-wip-us.apache.org/repos/asf/ambari/blob/a0dc96ed/ambari-web/test/controllers/main/host/details_test.js
--
diff --git a/ambari-web/test/controllers/main/host/details_test.js 
b/ambari-web/test/controllers/main/host/details_test.js
index 859320e..cb48ae1 100644
--- a/ambari-web/test/controllers/main/host/details_test.js
+++ b/ambari-web/test/controllers/main/host/details_test.js
@@ -3828,8 +3828,7 @@ describe('App.MainHostDetailsController', function () {
 
   describe('#setConfigsChangesForDisplayObserver', function () {
 
-var configsObject,
-  propertiesToChange = [
+var propertiesToChange = [
 {
   propertyName: 'n0',
   propertyFileName: 'f0'
@@ -3879,28 +3878,21 @@ describe('App.MainHostDetailsController', function () {
 requiredPropertiesToChange: []
   });
  

ambari git commit: AMBARI-19287. Adding custom property should trim white spaces in the prefix and suffix of the key names (onechiporenko)

2016-12-29 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 acedae5fe -> 95ac5be31


AMBARI-19287. Adding custom property should trim white spaces in the prefix and 
suffix of the key names (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: 95ac5be3183b42c91a788aa73dd4cd3b953240c2
Parents: acedae5
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Dec 29 14:13:23 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Dec 29 17:16:49 2016 +0200

--
 ambari-web/app/utils/validator.js | 4 +++-
 .../views/common/configs/service_configs_by_category_view.js  | 7 +++
 ambari-web/test/utils/validator_test.js   | 5 -
 3 files changed, 10 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/95ac5be3/ambari-web/app/utils/validator.js
--
diff --git a/ambari-web/app/utils/validator.js 
b/ambari-web/app/utils/validator.js
index 7b08d37..774215b 100644
--- a/ambari-web/app/utils/validator.js
+++ b/ambari-web/app/utils/validator.js
@@ -180,11 +180,13 @@ module.exports = {
 
   /**
* validate key of configurations
+   * allow spaces as prefix and suffix
+   *
* @param value
* @return {Boolean}
*/
   isValidConfigKey: function(value) {
-var configKeyRegex = /^[0-9a-z_\-\.\*]+$/i;
+var configKeyRegex = /^\s*[0-9a-z_\-\.\*]+\s*$/i;
 return configKeyRegex.test(value);
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/95ac5be3/ambari-web/app/views/common/configs/service_configs_by_category_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/service_configs_by_category_view.js 
b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
index 6305cfe..c38b672 100644
--- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js
+++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
@@ -489,8 +489,8 @@ App.ServiceConfigsByCategoryView = 
Em.View.extend(App.UserPref, App.ConfigOverri
   showFilterLink: false,
   errorMessage: '',
   observeAddPropertyValue: function () {
-var name = this.get('name');
-if (name.trim() != '') {
+var name = this.get('name').trim();
+if (name !== '') {
   if (validator.isValidConfigKey(name)) {
 if (!self.isDuplicatedConfigKey(name)) { //no duplication within 
the same confType
   var files = self.isDuplicatedConfigKeyinConfigs(name);
@@ -561,7 +561,7 @@ App.ServiceConfigsByCategoryView = 
Em.View.extend(App.UserPref, App.ConfigOverri
* For the first entrance use this if (serviceConfigObj.name.trim() 
!= '')
*/
   if (!serviceConfigObj.isKeyError) {
-propertyObj.name = serviceConfigObj.get('name');
+propertyObj.name = serviceConfigObj.get('name').trim();
 propertyObj.value = serviceConfigObj.get('value');
 propertyObj.propertyType = serviceConfigObj.get('propertyType');
 self.createProperty(propertyObj);
@@ -730,7 +730,6 @@ App.ServiceConfigsByCategoryView = 
Em.View.extend(App.UserPref, App.ConfigOverri
*/
   doRestoreDefaultValue: function (event) {
 var serviceConfigProperty = event.contexts[0];
-var value = serviceConfigProperty.get('value');
 var savedValue = serviceConfigProperty.get('savedValue');
 var supportsFinal = serviceConfigProperty.get('supportsFinal');
 var savedIsFinal = serviceConfigProperty.get('savedIsFinal');

http://git-wip-us.apache.org/repos/asf/ambari/blob/95ac5be3/ambari-web/test/utils/validator_test.js
--
diff --git a/ambari-web/test/utils/validator_test.js 
b/ambari-web/test/utils/validator_test.js
index f542c7a..f0167da 100644
--- a/ambari-web/test/utils/validator_test.js
+++ b/ambari-web/test/utils/validator_test.js
@@ -371,7 +371,10 @@ describe('validator', function () {
   {m:'"-abc-" - valid',i:'-abc-',e:true},
   {m:'"abc 123" - invalid',i:'abc 123',e:false},
   {m:'"a"b" - invalid',i:'a"b',e:false},
-  {m:'"a\'b" - invalid',i:'a\'b',e:false}
+  {m:'"a\'b" - invalid',i:'a\'b',e:false},
+  {m:'" a " - valid', i: ' a ', e: true},
+  {m:'" a" - valid', i: ' a', e: true},
+  {m:'"a " - valid', i: 'a ', e: true}
 ];
 tests.forEach(function(test) {
   it(test.m + ' ', function () {



ambari git commit: AMBARI-19307. UI should validate Ranger user password be more than 8 chars (onechiporenko)

2016-12-28 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk e423a65e5 -> 1bfffc0c8


AMBARI-19307. UI should validate Ranger user password be more than 8 chars 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: 1bfffc0c8f231b583dc259c4d4e3fd91079aec0b
Parents: e423a65
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Dec 28 12:36:40 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Dec 28 12:36:40 2016 +0200

--
 ambari-web/app/messages.js  |  1 +
 ambari-web/app/utils/config.js  |  8 +--
 .../objects/service_config_property_test.js | 25 
 3 files changed, 32 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1bfffc0c/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index e9d117a..a1b67e5 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -3206,6 +3206,7 @@ Em.I18n.translations = {
   'errorMessage.config.user': 'Value is not valid',
   'errorMessage.config.ldapUrl': 'Must be a valid LDAP url',
   'errorMessage.config.password': 'Passwords do not match',
+  'errorMessage.config.password.length': 'Password should contain at least {0} 
symbols',
   'errorMessage.config.directory.heterogeneous': 'dir format is wrong, can be 
"[{storage type}]/{dir name}"',
   'errorMessage.config.directory.default': 'Must be a slash or drive at the 
start, and must not contain white spaces',
   'errorMessage.config.directory.allowed': 'Can\'t start with "home(s)"',

http://git-wip-us.apache.org/repos/asf/ambari/blob/1bfffc0c/ambari-web/app/utils/config.js
--
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index cd09e14..d0dbb69 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -615,6 +615,11 @@ App.config = Em.Object.create({
 };
   case 'password':
 return function (value, name, retypedPassword) {
+  if (name === 'ranger_admin_password') {
+if (String(value).length < 9) {
+  return 
Em.I18n.t('errorMessage.config.password.length').format(9);
+}
+  }
   return value !== retypedPassword ? 
Em.I18n.t('errorMessage.config.password') : '';
 };
   case 'user':
@@ -632,9 +637,8 @@ App.config = Em.Object.create({
   if (['javax.jdo.option.ConnectionURL', 
'oozie.service.JPAService.jdbc.url'].contains(name)
 && !validator.isConfigValueLink(value) && 
validator.isConfigValueLink(value)) {
 return Em.I18n.t('errorMessage.config.spaces.trim');
-  } else {
-return validator.isNotTrimmedRight(value) ? 
Em.I18n.t('errorMessage.config.spaces.trailing') : '';
   }
+  return validator.isNotTrimmedRight(value) ? 
Em.I18n.t('errorMessage.config.spaces.trailing') : '';
 };
 }
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/1bfffc0c/ambari-web/test/models/configs/objects/service_config_property_test.js
--
diff --git 
a/ambari-web/test/models/configs/objects/service_config_property_test.js 
b/ambari-web/test/models/configs/objects/service_config_property_test.js
index ef0bd61..728141b 100644
--- a/ambari-web/test/models/configs/objects/service_config_property_test.js
+++ b/ambari-web/test/models/configs/objects/service_config_property_test.js
@@ -322,4 +322,29 @@ describe('App.ServiceConfigProperty', function () {
 });
   });
 
+  describe('custom validation for `ranger_admin_password`', function () {
+
+beforeEach(function () {
+  this.config = App.ServiceConfigProperty.create({
+name: 'ranger_admin_password',
+displayType: 'password'
+  });
+});
+
+it('value less than 9 symbols is invalid', function () {
+  this.config.set('value', 12345678);
+  this.config.set('retypedPassword', 12345678);
+  expect(this.config.get('isValid')).to.be.false;
+  
expect(this.config.get('errorMessage')).to.be.equal(Em.I18n.t('errorMessage.config.password.length').format(9));
+});
+
+it('value with 9 symbols is valid', function () {
+  this.config.set('value', 123456789);
+  this.config.set('retypedPassword', 123456789);
+  expect(this.config.get('isValid')).to.be.true;
+  expect(this.config.get('errorMessage')).to.be.equal('');
+});
+
+  });
+
 });



ambari git commit: AMBARI-19307. UI should validate Ranger user password be more than 8 chars (onechiporenko)

2016-12-28 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 c0f9621f2 -> cf28b98aa


AMBARI-19307. UI should validate Ranger user password be more than 8 chars 
(onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: cf28b98aab7522796ecde08051533a8d38f28369
Parents: c0f9621
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Dec 28 12:36:40 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Dec 28 15:00:51 2016 +0200

--
 ambari-web/app/messages.js  |  1 +
 ambari-web/app/utils/config.js  |  8 +--
 .../objects/service_config_property_test.js | 25 
 3 files changed, 32 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/cf28b98a/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index bb433a2..cd984c5 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -3172,6 +3172,7 @@ Em.I18n.translations = {
   'errorMessage.config.user': 'Value is not valid',
   'errorMessage.config.ldapUrl': 'Must be a valid LDAP url',
   'errorMessage.config.password': 'Passwords do not match',
+  'errorMessage.config.password.length': 'Password should contain at least {0} 
symbols',
   'errorMessage.config.directory.heterogeneous': 'dir format is wrong, can be 
"[{storage type}]/{dir name}"',
   'errorMessage.config.directory.default': 'Must be a slash or drive at the 
start, and must not contain white spaces',
   'errorMessage.config.directory.allowed': 'Can\'t start with "home(s)"',

http://git-wip-us.apache.org/repos/asf/ambari/blob/cf28b98a/ambari-web/app/utils/config.js
--
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index e9c9e24..ffd0e49 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -632,6 +632,11 @@ App.config = Em.Object.create({
 };
   case 'password':
 return function (value, name, retypedPassword) {
+  if (name === 'ranger_admin_password') {
+if (String(value).length < 9) {
+  return 
Em.I18n.t('errorMessage.config.password.length').format(9);
+}
+  }
   return value !== retypedPassword ? 
Em.I18n.t('errorMessage.config.password') : '';
 };
   case 'user':
@@ -649,9 +654,8 @@ App.config = Em.Object.create({
   if (['javax.jdo.option.ConnectionURL', 
'oozie.service.JPAService.jdbc.url'].contains(name)
 && !validator.isConfigValueLink(value) && 
validator.isConfigValueLink(value)) {
 return Em.I18n.t('errorMessage.config.spaces.trim');
-  } else {
-return validator.isNotTrimmedRight(value) ? 
Em.I18n.t('errorMessage.config.spaces.trailing') : '';
   }
+  return validator.isNotTrimmedRight(value) ? 
Em.I18n.t('errorMessage.config.spaces.trailing') : '';
 };
 }
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/cf28b98a/ambari-web/test/models/configs/objects/service_config_property_test.js
--
diff --git 
a/ambari-web/test/models/configs/objects/service_config_property_test.js 
b/ambari-web/test/models/configs/objects/service_config_property_test.js
index 49613a44..dab133d 100644
--- a/ambari-web/test/models/configs/objects/service_config_property_test.js
+++ b/ambari-web/test/models/configs/objects/service_config_property_test.js
@@ -331,4 +331,29 @@ describe('App.ServiceConfigProperty', function () {
 });
   });
 
+  describe('custom validation for `ranger_admin_password`', function () {
+
+beforeEach(function () {
+  this.config = App.ServiceConfigProperty.create({
+name: 'ranger_admin_password',
+displayType: 'password'
+  });
+});
+
+it('value less than 9 symbols is invalid', function () {
+  this.config.set('value', 12345678);
+  this.config.set('retypedPassword', 12345678);
+  expect(this.config.get('isValid')).to.be.false;
+  
expect(this.config.get('errorMessage')).to.be.equal(Em.I18n.t('errorMessage.config.password.length').format(9));
+});
+
+it('value with 9 symbols is valid', function () {
+  this.config.set('value', 123456789);
+  this.config.set('retypedPassword', 123456789);
+  expect(this.config.get('isValid')).to.be.true;
+  expect(this.config.get('errorMessage')).to.be.equal('');
+});
+
+  });
+
 });



ambari git commit: AMBARI-19301.JS-error on the Host details page (onechiporenko)

2016-12-27 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 7d3d71b97 -> 85738c17a


AMBARI-19301.JS-error on the Host details page (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 85738c17a417daccaabe509466e19cd6193996e5
Parents: 7d3d71b
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Tue Dec 27 15:59:57 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Tue Dec 27 15:59:57 2016 +0200

--
 ambari-web/app/views/common/chart/linear_time.js | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/85738c17/ambari-web/app/views/common/chart/linear_time.js
--
diff --git a/ambari-web/app/views/common/chart/linear_time.js 
b/ambari-web/app/views/common/chart/linear_time.js
index 919d7fa..d2a7ae1 100644
--- a/ambari-web/app/views/common/chart/linear_time.js
+++ b/ambari-web/app/views/common/chart/linear_time.js
@@ -1512,11 +1512,9 @@ App.ChartLinearTimeView.LoadAggregator = 
Em.Object.create({
 }, this);
   }
 }).always(function () {
-  _request.context.set('runningRequests', 
_request.context.get('runningRequests').reject(function (item) {
-return item === xhr;
-  }));
+  _request.context.set('runningRequests', 
Em.tryInvoke(_request.context.get('runningRequests'), 'without', [xhr]));
 });
-_request.context.get('runningRequests').push(xhr);
+Em.tryInvoke(_request.context.get('runningRequests'), 'push', [xhr]);
   })(bulks[id]);
 }
   },



ambari git commit: AMBARI-19279. AHW Configurations page looks not like any other wizard page (onechiporenko)

2016-12-22 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 170d3bef6 -> bd3df7db0


AMBARI-19279. AHW Configurations page looks not like any other wizard page 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: bd3df7db06d43c78067df43e53209fd8aa1fac87
Parents: 170d3be
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Dec 22 11:56:43 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Dec 22 11:56:43 2016 +0200

--
 .../app/templates/main/host/addHost/step4.hbs   | 56 +++-
 1 file changed, 30 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bd3df7db/ambari-web/app/templates/main/host/addHost/step4.hbs
--
diff --git a/ambari-web/app/templates/main/host/addHost/step4.hbs 
b/ambari-web/app/templates/main/host/addHost/step4.hbs
index 305b5f4..41e4381 100644
--- a/ambari-web/app/templates/main/host/addHost/step4.hbs
+++ b/ambari-web/app/templates/main/host/addHost/step4.hbs
@@ -15,20 +15,20 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 }}
-
-  {{t addHost.step4.header}}
-  
-{{t addHost.step4.title}}
-  
-  
-  
-
+
+  {{t addHost.step4.header}}
+  {{t addHost.step4.title}}
+  
+
+  
+
+  
   
 {{t common.service}}
 {{t common.conf.group}}
   
-
-
+  
+  
   {{#each service in controller.content.configGroups}}
 
   {{service.displayName}}
@@ -44,21 +44,25 @@
   
 
   {{/each}}
-
-  
-  
-   
-  
- {{t common.back}}
-{{#if App.router.backBtnClickInProgress}}
-  {{view App.SpinnerView tagName="span" 
classNames="service-button-spinner"}}
-{{/if}}
-  
-  
-{{#if App.router.nextBtnClickInProgress}}
-  {{view App.SpinnerView tagName="span" 
classNames="service-button-spinner"}}
-{{/if}}
-{{t common.next}} 
-  
+  
+
+  
 
+  
 
+
+
+  
+ {{t common.back}}
+{{#if App.router.backBtnClickInProgress}}
+  {{view App.SpinnerView tagName="span" 
classNames="service-button-spinner"}}
+{{/if}}
+  
+  
+{{#if App.router.nextBtnClickInProgress}}
+  {{view App.SpinnerView tagName="span" 
classNames="service-button-spinner"}}
+{{/if}}
+{{t common.next}} 
+  
+
\ No newline at end of file



ambari git commit: AMBARI-19267. NN HA Namespace input "jumps" when invalid value provided (onechiporenko)

2016-12-21 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 2b91ffda8 -> 0f2ec4f45


AMBARI-19267. NN HA Namespace input "jumps" when invalid value provided 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: 0f2ec4f45fd094397c5eeb5d6f84ce5ed4d3c2dc
Parents: 2b91ffd
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Dec 21 15:33:49 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Dec 21 15:33:49 2016 +0200

--
 ambari-web/app/styles/wizard.less   |  3 ---
 .../admin/highAvailability/nameNode/step1.hbs   | 26 
 .../test/controllers/main/host/details_test.js  |  2 --
 3 files changed, 16 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0f2ec4f4/ambari-web/app/styles/wizard.less
--
diff --git a/ambari-web/app/styles/wizard.less 
b/ambari-web/app/styles/wizard.less
index 49b6723..1398f12 100644
--- a/ambari-web/app/styles/wizard.less
+++ b/ambari-web/app/styles/wizard.less
@@ -334,9 +334,6 @@
   margin-top: 10px;
   margin-bottom: 10px;
 }
-.nameserviceid-input {
-  display: inline-block;
-}
   }
 
   #ha-step4 li, #ha-step6 li, #ha-step8 li, #mjn-step7 li {

http://git-wip-us.apache.org/repos/asf/ambari/blob/0f2ec4f4/ambari-web/app/templates/main/admin/highAvailability/nameNode/step1.hbs
--
diff --git 
a/ambari-web/app/templates/main/admin/highAvailability/nameNode/step1.hbs 
b/ambari-web/app/templates/main/admin/highAvailability/nameNode/step1.hbs
index f5087f9..db88b63 100644
--- a/ambari-web/app/templates/main/admin/highAvailability/nameNode/step1.hbs
+++ b/ambari-web/app/templates/main/admin/highAvailability/nameNode/step1.hbs
@@ -17,24 +17,30 @@
 }}
 
   {{t admin.highAvailability.wizard.step1.header}}
-  
-{{t admin.highAvailability.wizard.step1.body}}
+  
+{{t admin.highAvailability.wizard.step1.body}}
 
   {{t admin.highAvailability.wizard.step1.alert}}
   {{#if controller.isHawqInstalled}}
 {{{t admin.highAvailability.wizard.step1.hawq.alert}}}
   {{/if}}
 
-  
+  
   
 
-  
-{{t 
admin.highAvailability.wizard.step1.nameserviceid}}:
-
-  {{view Ember.TextField valueBinding="content.nameServiceId" 
classNames="input-sm form-control"}}
-  
-{{t admin.highAvailability.wizard.step1.nameserviceid.error}}
-  
+  
+
+  
+{{t 
admin.highAvailability.wizard.step1.nameserviceid}}:
+  
+  
+{{view Ember.TextField valueBinding="content.nameServiceId" 
classNames="form-control"}}
+  
+  
+
+  {{t admin.highAvailability.wizard.step1.nameserviceid.error}}
+
+  
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/0f2ec4f4/ambari-web/test/controllers/main/host/details_test.js
--
diff --git a/ambari-web/test/controllers/main/host/details_test.js 
b/ambari-web/test/controllers/main/host/details_test.js
index 4203644..cbebcf0 100644
--- a/ambari-web/test/controllers/main/host/details_test.js
+++ b/ambari-web/test/controllers/main/host/details_test.js
@@ -766,8 +766,6 @@ describe('App.MainHostDetailsController', function () {
 
   describe('#showAddComponentPopup()', function () {
 
-var message = 'Comp1';
-
 beforeEach(function () {
   sinon.stub(App.ModalPopup, 'show');
 });



ambari git commit: AMBARI-19213. DataNodes Live widget can't be edited (onechiporenko)

2016-12-15 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 13dd1cf47 -> 65fe71a1b


AMBARI-19213. DataNodes Live widget can't be edited (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 65fe71a1bc41da9e935dff75e92988d4a1c8bff9
Parents: 13dd1cf
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Dec 15 17:37:20 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Dec 15 17:56:15 2016 +0200

--
 .../mixins/main/dashboard/widgets/editable.js   |  28 ++---
 .../dashboard/widgets/editable_with_limit.js| 115 +--
 .../widgets/single_numeric_threshold.js | 108 -
 ambari-web/app/styles/modal_popups.less |  12 --
 .../edit_widget_popup_single_threshold.hbs  |   9 --
 ambari-web/app/views/main/dashboard/widget.js   |  14 +--
 .../views/main/dashboard/widgets/pxf_live.js|   2 +-
 .../admin/highAvailability_controller_test.js   |   2 +-
 8 files changed, 122 insertions(+), 168 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/65fe71a1/ambari-web/app/mixins/main/dashboard/widgets/editable.js
--
diff --git a/ambari-web/app/mixins/main/dashboard/widgets/editable.js 
b/ambari-web/app/mixins/main/dashboard/widgets/editable.js
index 3206229..fcb6bfb 100644
--- a/ambari-web/app/mixins/main/dashboard/widgets/editable.js
+++ b/ambari-web/app/mixins/main/dashboard/widgets/editable.js
@@ -69,7 +69,6 @@ App.EditableWidgetMixin = Em.Mixin.create({
 
 });
 
-var browserVersion = this.getInternetExplorerVersion();
 App.ModalPopup.show({
   header: Em.I18n.t('dashboard.widgets.popupHeader'),
   classNames: [ 'modal-edit-widget'],
@@ -97,23 +96,16 @@ App.EditableWidgetMixin = Em.Mixin.create({
 var colors = [App.healthStatusGreen, App.healthStatusOrange, 
App.healthStatusRed]; //color green, orange ,red
 var handlers = [33, 66]; //fixed value
 
-if (browserVersion === -1 || browserVersion > 9) {
-  configObj.set('isIE9', false);
-  configObj.set('isGreenOrangeRed', true);
-  $("#slider-range").slider({
-range:true,
-disabled:true, //handlers cannot move
-min: 0,
-max: 100,
-values: handlers,
-create: function (event, ui) {
-  self.updateColors(handlers, colors);
-}
-  });
-} else {
-  configObj.set('isIE9', true);
-  configObj.set('isGreenOrangeRed', true);
-}
+$("#slider-range").slider({
+  range: true,
+  disabled: true, //handlers cannot move
+  min: 0,
+  max: 100,
+  values: handlers,
+  create: function (event, ui) {
+self.updateColors(handlers, colors);
+  }
+});
   }
 });
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/65fe71a1/ambari-web/app/mixins/main/dashboard/widgets/editable_with_limit.js
--
diff --git 
a/ambari-web/app/mixins/main/dashboard/widgets/editable_with_limit.js 
b/ambari-web/app/mixins/main/dashboard/widgets/editable_with_limit.js
index df1b645..ddf2a26 100644
--- a/ambari-web/app/mixins/main/dashboard/widgets/editable_with_limit.js
+++ b/ambari-web/app/mixins/main/dashboard/widgets/editable_with_limit.js
@@ -29,56 +29,55 @@ App.EditableWithLimitWidgetMixin = Em.Mixin.create({
 var parent = this;
 var maxTmp = parseFloat(parent.get('maxValue'));
 var configObj = Ember.Object.create({
-  thresh1: parent.get('thresh1') + '',
-  thresh2: parent.get('thresh2') + '',
+  thresholdMin: parent.get('thresholdMin') + '',
+  thresholdMax: parent.get('thresholdMax') + '',
   hintInfo: parent.get('hintInfo'),
-  isThresh1Error: false,
-  isThresh2Error: false,
-  errorMessage1: "",
-  errorMessage2: "",
+  thresholdMinError: false,
+  thresholdMaxError: false,
+  thresholdMinErrorMessage: '',
+  thresholdMaxErrorMessage: '',
   maxValue: maxTmp,
   observeNewThresholdValue: function () {
-var thresh1 = this.get('thresh1');
-var thresh2 = this.get('thresh2');
-if (thresh1.trim() !== "") {
-  if (isNaN(thresh1) || thresh1 > maxTmp || thresh1 < 0){
-this.set('isThresh1Error', true);
-this.set('errorMessage1', 'Invalid! Enter a number between 0 - ' + 
maxTmp);
-  } else if (

ambari git commit: AMBARI-19210. SMTP Username and SMTP Password are not highlighted (onechiporenko)

2016-12-15 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 58443cb7b -> a88c4e841


AMBARI-19210. SMTP Username and SMTP Password are not highlighted 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: a88c4e841ffa986fe01768e70904585b1e9670d4
Parents: 58443cb
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Dec 15 14:35:25 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Dec 15 16:48:57 2016 +0200

--
 .../app/templates/common/configs/notifications_configs.hbs   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a88c4e84/ambari-web/app/templates/common/configs/notifications_configs.hbs
--
diff --git a/ambari-web/app/templates/common/configs/notifications_configs.hbs 
b/ambari-web/app/templates/common/configs/notifications_configs.hbs
index 2dd71aa..6f546e9 100644
--- a/ambari-web/app/templates/common/configs/notifications_configs.hbs
+++ b/ambari-web/app/templates/common/configs/notifications_configs.hbs
@@ -45,14 +45,14 @@
 
   {{#each config in view.categoryConfigs}}
 
-  
+  
 
   {{formatWordBreak config.displayName}}
 
   
 
   
-
+
   
 
 {{view config.viewClass serviceConfigBinding="config" 
categoryConfigsAllBinding="view.categoryConfigsAll" }}



ambari git commit: AMBARI-19196. BG operations modal windows are too small to show the content (in certain scenarios)[Chrome] (onechiporenko)

2016-12-14 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk b0e4c9389 -> 6153b0372


AMBARI-19196. BG operations modal windows are too small to show the content (in 
certain scenarios)[Chrome] (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 6153b03725d41bbfbd7c801643ec808184817dc7
Parents: b0e4c93
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Dec 14 11:59:35 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Dec 14 15:50:37 2016 +0200

--
 ambari-web/app/views/common/modal_popup.js | 6 --
 .../controllers/main/admin/kerberos/step1_controller_test.js   | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6153b037/ambari-web/app/views/common/modal_popup.js
--
diff --git a/ambari-web/app/views/common/modal_popup.js 
b/ambari-web/app/views/common/modal_popup.js
index a643b23..47b7d61 100644
--- a/ambari-web/app/views/common/modal_popup.js
+++ b/ambari-web/app/views/common/modal_popup.js
@@ -119,7 +119,7 @@ App.ModalPopup = Ember.View.extend({
 
   enterKeyPressed: function (event) {
 var primaryButton = this.$().find('.modal-footer > .btn-success').last();
-if ((!$("*:focus").is("textarea")) && primaryButton.length > 0 && 
primaryButton.attr('disabled') !== 'disabled') {
+if (!$("*:focus").is('textarea') && primaryButton.length > 0 && 
primaryButton.attr('disabled') !== 'disabled') {
   event.preventDefault();
   event.stopPropagation();
   primaryButton.click();
@@ -161,7 +161,9 @@ App.ModalPopup = Ember.View.extend({
   'marginTop': 0
 });
 
-block.css('max-height', $(window).height() - top * 2 - (popup.height() - 
block.height()));
+var newMaxHeight = $(window).height() - top * 2 - (popup.height() - 
block.height());
+newMaxHeight = Math.max(newMaxHeight, 500);
+block.css('max-height', newMaxHeight);
   }
 });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6153b037/ambari-web/test/controllers/main/admin/kerberos/step1_controller_test.js
--
diff --git 
a/ambari-web/test/controllers/main/admin/kerberos/step1_controller_test.js 
b/ambari-web/test/controllers/main/admin/kerberos/step1_controller_test.js
index f3f05a4..3181fda 100644
--- a/ambari-web/test/controllers/main/admin/kerberos/step1_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/kerberos/step1_controller_test.js
@@ -53,7 +53,7 @@ describe('App.KerberosWizardStep1Controller', function() {
   expect(controller.get('options')).to.not.be.empty;
   controller.loadStep();
   var options = controller.get('options');
-  expect(options.length == 1).to.be.true;
+  expect(options.length).to.be.equal(1);
 });
 
 it("enableIpa is false", function() {



ambari git commit: AMBARI-19196. BG operations modal windows are too small to show the content (in certain scenarios)[Chrome] (onechiporenko)

2016-12-14 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 18ed88726 -> 22b027efb


AMBARI-19196. BG operations modal windows are too small to show the content (in 
certain scenarios)[Chrome] (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: 22b027efb782cb4b33cc0a487262ad8de9cc097e
Parents: 18ed887
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Dec 14 11:59:35 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Dec 14 15:49:03 2016 +0200

--
 ambari-web/app/views/common/modal_popup.js | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/22b027ef/ambari-web/app/views/common/modal_popup.js
--
diff --git a/ambari-web/app/views/common/modal_popup.js 
b/ambari-web/app/views/common/modal_popup.js
index 252604e..a530ed8 100644
--- a/ambari-web/app/views/common/modal_popup.js
+++ b/ambari-web/app/views/common/modal_popup.js
@@ -100,7 +100,7 @@ App.ModalPopup = Ember.View.extend({
 
   enterKeyPressed: function (event) {
 var primaryButton = this.$().find('.modal-footer > .btn-success').last();
-if ((!$("*:focus").is("textarea")) && primaryButton.length > 0 && 
primaryButton.attr('disabled') !== 'disabled') {
+if (!$("*:focus").is('textarea') && primaryButton.length > 0 && 
primaryButton.attr('disabled') !== 'disabled') {
   event.preventDefault();
   event.stopPropagation();
   primaryButton.click();
@@ -142,7 +142,9 @@ App.ModalPopup = Ember.View.extend({
   'marginTop': 0
 });
 
-block.css('max-height', $(window).height() - top * 2 - (popup.height() - 
block.height()));
+var newMaxHeight = $(window).height() - top * 2 - (popup.height() - 
block.height());
+newMaxHeight = Math.max(newMaxHeight, 500);
+block.css('max-height', newMaxHeight);
   }
 });
 



ambari git commit: AMBARI-19128. Tooltip is not hidden on host alerts page (onechiporenko)

2016-12-07 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 4bc1a73f4 -> 9fc7f0ae1


AMBARI-19128. Tooltip is not hidden on host alerts page (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 9fc7f0ae153ec90229fedc62d2fd35b3eb0c5843
Parents: 4bc1a73
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Dec 7 17:03:33 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Dec 7 19:07:32 2016 +0200

--
 .../app/templates/main/host/host_alerts.hbs |  8 ++--
 .../app/views/main/host/host_alerts_view.js | 41 +++-
 .../views/main/host/host_alerts_view_test.js|  3 +-
 3 files changed, 28 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9fc7f0ae/ambari-web/app/templates/main/host/host_alerts.hbs
--
diff --git a/ambari-web/app/templates/main/host/host_alerts.hbs 
b/ambari-web/app/templates/main/host/host_alerts.hbs
index 17c8bc3..2b02388 100644
--- a/ambari-web/app/templates/main/host/host_alerts.hbs
+++ b/ambari-web/app/templates/main/host/host_alerts.hbs
@@ -56,9 +56,11 @@
 
   {{template "templates/main/alerts/alert_instance/status"}}
 
-{{instance.text}}
+
+  
+{{instance.text}}
+  
+
   
 {{/each}}
   {{else}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/9fc7f0ae/ambari-web/app/views/main/host/host_alerts_view.js
--
diff --git a/ambari-web/app/views/main/host/host_alerts_view.js 
b/ambari-web/app/views/main/host/host_alerts_view.js
index 34a2a3e..fd0979f 100644
--- a/ambari-web/app/views/main/host/host_alerts_view.js
+++ b/ambari-web/app/views/main/host/host_alerts_view.js
@@ -46,10 +46,9 @@ App.MainHostAlertsView = App.TableView.extend({
 }
   });
   return [].concat(criticalAlerts, warningAlerts, okAlerts, otherAlerts);
-} else {
-  return [];
 }
-  }.property('controller.content.@each'),
+return [];
+  }.property('controller.content.[]'),
 
   willInsertElement: function () {
 var hostName = this.get('parentView.controller.content.hostName');
@@ -223,22 +222,16 @@ App.MainHostAlertsView = App.TableView.extend({
* @type {string}
*/
   paginationLeftClass: function () {
-if (this.get("startIndex") > 1) {
-  return "paginate_previous";
-}
-return "paginate_disabled_previous";
-  }.property("startIndex", 'filteredCount'),
+return this.get('startIndex') > 1 ? 'paginate_previous' : 
'paginate_disabled_previous';
+  }.property('startIndex', 'filteredCount'),
 
   /**
* Determines how display "next"-link - as link or text
* @type {string}
*/
   paginationRightClass: function () {
-if ((this.get("endIndex")) < this.get("filteredCount")) {
-  return "paginate_next";
-}
-return "paginate_disabled_next";
-  }.property("endIndex", 'filteredCount'),
+return this.get('endIndex') < this.get('filteredCount') ? 'paginate_next' 
: 'paginate_disabled_next';
+  }.property('endIndex', 'filteredCount'),
 
   /**
* Show previous-page if user not in the first page
@@ -266,12 +259,12 @@ App.MainHostAlertsView = App.TableView.extend({
*/
   tooltipsUpdater: function () {
 Em.run.once(this,this.tooltipsUpdaterOnce);
-  }.observes('pageContent.@each'),
+  }.observes('pageContent.[]'),
 
   tooltipsUpdaterOnce: function() {
 var self = this;
 Em.run.next(this, function () {
-  App.tooltip(self.$(".enable-disable-button, .timeago, .alert-text"));
+  App.tooltip(self.$('.timeago, .alert-text'));
 });
   },
 
@@ -281,14 +274,24 @@ App.MainHostAlertsView = App.TableView.extend({
   clearFilters: function() {
 this.set('filterConditions', []);
 this.get('childViews').forEach(function(childView) {
-  if (childView['clearFilter']) {
-childView.clearFilter();
-  }
+  Em.tryInvoke(childView, 'clearFilter');
 });
   },
 
+  /**
+   * Tooltips should be removed if some filter is applied or cleared
+   *
+   * @method clearTooltips
+   */
+  clearTooltips: function () {
+var $elements = this.$('.timeago, .alert-text');
+if ($elements) {
+  $elements.tooltip('destroy');
+}
+  }.observes('filteredCount'),
+
   willDestroyElement: function() {
-this.$(".enabl

ambari git commit: AMBARI-19125. Active tab is not switched (onechiporenko)

2016-12-07 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 69cdaa775 -> 234838f4b


AMBARI-19125. Active tab is not switched (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 234838f4b6651dbebf09d57910aea925c8247f1c
Parents: 69cdaa7
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Dec 7 15:01:08 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Dec 7 15:01:08 2016 +0200

--
 ambari-web/app/templates/common/host_progress_popup.hbs | 8 +---
 ambari-web/app/views/main/host/menu.js  | 4 ++--
 2 files changed, 7 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/234838f4/ambari-web/app/templates/common/host_progress_popup.hbs
--
diff --git a/ambari-web/app/templates/common/host_progress_popup.hbs 
b/ambari-web/app/templates/common/host_progress_popup.hbs
index f0a8c17..ae411b1 100644
--- a/ambari-web/app/templates/common/host_progress_popup.hbs
+++ b/ambari-web/app/templates/common/host_progress_popup.hbs
@@ -266,9 +266,11 @@
   
 {{#if App.supports.logSearch}}
   {{#if view.isLogSearchInstalled}}
-
-  {{t 
common.host}} {{t common.logs}}
-
+{{#isAuthorized "SERVICE.VIEW_OPERATIONAL_LOGS"}}
+  
+{{t 
common.host}} {{t common.logs}}
+  
+{{/isAuthorized}}
   {{/if}}
 {{/if}}
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/234838f4/ambari-web/app/views/main/host/menu.js
--
diff --git a/ambari-web/app/views/main/host/menu.js 
b/ambari-web/app/views/main/host/menu.js
index b3c52f4..4ebc140 100644
--- a/ambari-web/app/views/main/host/menu.js
+++ b/ambari-web/app/views/main/host/menu.js
@@ -95,9 +95,9 @@ App.MainHostMenuView = Em.CollectionView.extend({
   activateView: function () {
 var defaultRoute = App.router.get('currentState.name') || "summary";
 $.each(this._childViews, function () {
-  this.set('active', (this.get('content.routing') == defaultRoute ? 
"active" : ""));
+  this.set('active', this.get('content.routing') === defaultRoute ? 
'active' : '');
 });
-  },
+  }.observes('App.router.currentState.name'),
 
   deactivateChildViews: function () {
 this.get('_childViews').setEach('active', '');



ambari git commit: AMBARI-19103. Support for multi lines tabs (onechiporenko)

2016-12-06 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 353b2ac00 -> 14c39691e


AMBARI-19103. Support for multi lines tabs (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 14c39691e06bde1d158c75e65251dc1dc1ba20e9
Parents: 353b2ac
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Tue Dec 6 12:14:55 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Tue Dec 6 12:14:55 2016 +0200

--
 ambari-web/app/styles/theme/bootstrap-ambari.css | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/14c39691/ambari-web/app/styles/theme/bootstrap-ambari.css
--
diff --git a/ambari-web/app/styles/theme/bootstrap-ambari.css 
b/ambari-web/app/styles/theme/bootstrap-ambari.css
index d10a13b..738fa59 100644
--- a/ambari-web/app/styles/theme/bootstrap-ambari.css
+++ b/ambari-web/app/styles/theme/bootstrap-ambari.css
@@ -452,7 +452,9 @@ h2.table-title {
 .nav.nav-tabs li a:active,
 .nav.nav-tabs li a:focus {
   color: #333;
-  border-width: 0;
+  border-top-width: 0;
+  border-left-width: 0;
+  border-right-width: 0;
   background: none;
 }
 .nav.nav-tabs li a .badge.badge-important {



ambari git commit: AMBARI-19084. Custom property added to the Notification settings appears twice (onechiporenko)

2016-12-05 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk f5051dcb7 -> b2d2ef168


AMBARI-19084. Custom property added to the Notification settings appears twice 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: b2d2ef1689d5434c20d6a791ace598f58742605a
Parents: f5051dc
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Mon Dec 5 17:08:41 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Dec 5 18:05:42 2016 +0200

--
 .../common/configs/notifications_configs.hbs  |  2 +-
 .../notification_configs_view.js  | 18 ++
 .../configs/service_configs_by_category_view.js   |  9 -
 3 files changed, 23 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b2d2ef16/ambari-web/app/templates/common/configs/notifications_configs.hbs
--
diff --git a/ambari-web/app/templates/common/configs/notifications_configs.hbs 
b/ambari-web/app/templates/common/configs/notifications_configs.hbs
index ca2c208..2dd71aa 100644
--- a/ambari-web/app/templates/common/configs/notifications_configs.hbs
+++ b/ambari-web/app/templates/common/configs/notifications_configs.hbs
@@ -20,7 +20,7 @@
   
 
   
-  {{view.category.displayName}}
+  {{view.category.displayName}}
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b2d2ef16/ambari-web/app/views/common/configs/custom_category_views/notification_configs_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/custom_category_views/notification_configs_view.js
 
b/ambari-web/app/views/common/configs/custom_category_views/notification_configs_view.js
index 9ad8762..d299b5f 100644
--- 
a/ambari-web/app/views/common/configs/custom_category_views/notification_configs_view.js
+++ 
b/ambari-web/app/views/common/configs/custom_category_views/notification_configs_view.js
@@ -62,8 +62,8 @@ App.NotificationsConfigsView = 
App.ServiceConfigsByCategoryView.extend({
 if (!this.get('categoryConfigsAll.length')) return;
 this.set('createNotification', 
this.get('categoryConfigsAll').findProperty('name', 
'create_notification').get('value'));
 this.set('tlsOrSsl', this.get('categoryConfigsAll').findProperty('name', 
'mail.smtp.starttls.enable').get('value') ? 'tls' : 'ssl');
-var smtp_use_auth = this.get('categoryConfigsAll').findProperty('name', 
'smtp_use_auth');
-smtp_use_auth.set('value', Boolean(smtp_use_auth.get('value') === 'true'));
+var smtpUseAuth = this.get('categoryConfigsAll').findProperty('name', 
'smtp_use_auth');
+smtpUseAuth.set('value', Boolean(smtpUseAuth.get('value') === 'true'));
 this.updateCategoryConfigs();
   },
 
@@ -74,8 +74,8 @@ App.NotificationsConfigsView = 
App.ServiceConfigsByCategoryView.extend({
*/
   onTlsOrSslChanged: function () {
 var tlsOrSsl = this.get('tlsOrSsl');
-this.get('categoryConfigsAll').findProperty('name', 
'mail.smtp.starttls.enable').set('value', tlsOrSsl == 'tls');
-this.get('categoryConfigsAll').findProperty('name', 
'mail.smtp.startssl.enable').set('value', tlsOrSsl == 'ssl');
+this.get('categoryConfigsAll').findProperty('name', 
'mail.smtp.starttls.enable').set('value', tlsOrSsl === 'tls');
+this.get('categoryConfigsAll').findProperty('name', 
'mail.smtp.startssl.enable').set('value', tlsOrSsl === 'ssl');
   }.observes('tlsOrSsl'),
 
   /**
@@ -122,6 +122,16 @@ App.NotificationsConfigsView = 
App.ServiceConfigsByCategoryView.extend({
   updateConfig: function (config, flag) {
 config.set('isRequired', flag);
 config.set('isEditable', flag);
+  },
+
+  /**
+   * No sense to store config to serviceConfigs and 
categoryConfigsAll because
+   * categoryConfigsAll is a subset of serviceConfigs
+   *
+   * @override
+   */
+  _appendConfigToCollection: function (serviceConfigProperty) {
+this.get('serviceConfigs').pushObject(serviceConfigProperty);
   }
 
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/b2d2ef16/ambari-web/app/views/common/configs/service_configs_by_category_view.js
--
diff --git 
a/ambari-web/app/views/common/configs/service_configs_by_category_view.js 
b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
index dfcd5df..16258cf 100644
--- a/ambari-web/app/views/common/configs/service_configs_by_category_view.js
+++ b/ambari-web/app/views/common/configs/service_configs_by_category_view.js
@@

ambari git commit: AMBARI-19081. JS error on "User RedHat Satellite" click on step1 installer (onechiporenko)

2016-12-05 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 8ad494e97 -> 7f6ca9d07


AMBARI-19081. JS error on "User RedHat Satellite" click on step1 installer 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: 7f6ca9d07b2f2e389d9e887853238ca3969d99ce
Parents: 8ad494e
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Mon Dec 5 13:29:05 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Dec 5 13:29:05 2016 +0200

--
 ambari-web/app/styles/wizard.less   |  6 -
 ambari-web/app/templates/wizard/step1.hbs   |  2 +-
 ambari-web/app/views/wizard/step1_view.js   | 21 +-
 .../widgets/slider_config_widget_view_test.js   | 23 
 .../test/views/main/dashboard/widgets_test.js   |  2 +-
 5 files changed, 18 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7f6ca9d0/ambari-web/app/styles/wizard.less
--
diff --git a/ambari-web/app/styles/wizard.less 
b/ambari-web/app/styles/wizard.less
index a4dac8c..57dae45 100644
--- a/ambari-web/app/styles/wizard.less
+++ b/ambari-web/app/styles/wizard.less
@@ -554,6 +554,11 @@
   }
 }
   }
+  .inner-table {
+td {
+  vertical-align: middle;
+}
+  }
   .repos-panel {
 .remove-icon {
   color: red;
@@ -567,7 +572,6 @@
 }
 .repo-url input {
   width: 90%;
-  height: 24px;
 }
 #skip-validation, #use-redhat {
   span.disabled {

http://git-wip-us.apache.org/repos/asf/ambari/blob/7f6ca9d0/ambari-web/app/templates/wizard/step1.hbs
--
diff --git a/ambari-web/app/templates/wizard/step1.hbs 
b/ambari-web/app/templates/wizard/step1.hbs
index 5297d12..8179b41 100644
--- a/ambari-web/app/templates/wizard/step1.hbs
+++ b/ambari-web/app/templates/wizard/step1.hbs
@@ -144,7 +144,7 @@
 {{view view.popoverView 
repositoryBinding="repository"}}
   
   
-
+
   {{view Ember.TextField 
placeholderBinding="repository.placeholder" valueBinding="repository.baseUrl" 
disabledBinding="controller.selectedStack.useRedhatSatellite" 
classNames="form-control"}}
   {{#if 
controller.selectedStack.usePublicRepo}}
 http://git-wip-us.apache.org/repos/asf/ambari/blob/7f6ca9d0/ambari-web/app/views/wizard/step1_view.js
--
diff --git a/ambari-web/app/views/wizard/step1_view.js 
b/ambari-web/app/views/wizard/step1_view.js
index d5cbbb5..161d794 100644
--- a/ambari-web/app/views/wizard/step1_view.js
+++ b/ambari-web/app/views/wizard/step1_view.js
@@ -226,17 +226,18 @@ App.WizardStep1View = Em.View.extend({
 checkedBinding: 'controller.selectedStack.useRedhatSatellite',
 disabledBinding: 'controller.selectedStack.usePublicRepo',
 click: function () {
-  // click triggered before value is toggled, so if-statement is inverted
-  if (this.get('disabled')) return;
-  if (!this.get('controller.selectedStack.useRedhatSatellite')) {
-App.ModalPopup.show({
-  header: Em.I18n.t('common.important'),
-  secondary: false,
-  bodyClass: Ember.View.extend({
-template: 
Ember.Handlebars.compile(Em.I18n.t('installer.step1.advancedRepo.useRedhatSatellite.warning'))
-  })
-});
+  if (!this.get('disabled')) {
+this.toggleProperty('controller.selectedStack.useRedhatSatellite');
+if (this.get('controller.selectedStack.useRedhatSatellite')) {
+  App.ModalPopup.show({
+header: Em.I18n.t('common.important'),
+encodeBody: false,
+secondary: false,
+body: 
Em.I18n.t('installer.step1.advancedRepo.useRedhatSatellite.warning')
+  });
+}
   }
+  return false;
 }
   }),
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/7f6ca9d0/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
--
diff --git 
a/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
 
b/ambari-web/test/views/common/configs/widgets/slider_config_wid

ambari git commit: AMBARI-19047. Select Versions page: 'Remove' tooltip does not disappear (onechiporenko)

2016-12-01 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 7c07dd359 -> 9a72a6009


AMBARI-19047. Select Versions page: 'Remove' tooltip does not disappear 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: 9a72a6009c922f26ee47f2841a5ce89089a24883
Parents: 7c07dd3
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Nov 30 13:19:43 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Dec 1 14:51:46 2016 +0200

--
 ambari-web/app/templates/wizard/step1.hbs | 2 +-
 ambari-web/app/views/wizard/step1_view.js | 7 +++
 2 files changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9a72a600/ambari-web/app/templates/wizard/step1.hbs
--
diff --git a/ambari-web/app/templates/wizard/step1.hbs 
b/ambari-web/app/templates/wizard/step1.hbs
index 312898c..5297d12 100644
--- a/ambari-web/app/templates/wizard/step1.hbs
+++ b/ambari-web/app/templates/wizard/step1.hbs
@@ -165,7 +165,7 @@
   
 
 
-  
+  
 
   
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/9a72a600/ambari-web/app/views/wizard/step1_view.js
--
diff --git a/ambari-web/app/views/wizard/step1_view.js 
b/ambari-web/app/views/wizard/step1_view.js
index b7a57ca..d5cbbb5 100644
--- a/ambari-web/app/views/wizard/step1_view.js
+++ b/ambari-web/app/views/wizard/step1_view.js
@@ -51,6 +51,8 @@ App.WizardStep1View = Em.View.extend({
 $("[rel=skip-validation-tooltip]").tooltip('destroy');
 $("[rel=use-redhat-tooltip]").tooltip('destroy');
 $('.add-os-button,.redhat-label').tooltip('destroy');
+$('.icon-undo').tooltip('destroy');
+$('.action .icon').tooltip('destroy');
   },
 
   /**
@@ -68,6 +70,11 @@ App.WizardStep1View = Em.View.extend({
 });
   },
 
+  removeOS() {
+$('.action .icon').tooltip('destroy');
+return this.get('controller').removeOS(...arguments);
+  },
+
   /**
* Disable submit button flag
*



ambari git commit: AMBARI-19027. Manage JournalNode tweaks (onechiporenko)

2016-11-30 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 67292971c -> adde3db03


AMBARI-19027. Manage JournalNode tweaks (onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: adde3db032bf538ba4c872c931c46e28feef3fc1
Parents: 6729297
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Nov 30 13:19:43 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Nov 30 14:28:12 2016 +0200

--
 ambari-web/app/messages.js| 12 +---
 .../main/admin/highAvailability/journalNode/step2.hbs | 14 --
 2 files changed, 13 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/adde3db0/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index e8517b2..7c3ccd3 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1255,7 +1255,7 @@ Em.I18n.translations = {
   'admin.kerberos.disable.notice.completed': 'Services have been successfully 
tested without kerberos environment.',
   'admin.kerberos.wizard.step1.notice.inProgress': 'Please wait while cluster 
is being unkerberized',
 
-  'admin.manageJournalNode.label': 'Manage JournalNode',
+  'admin.manageJournalNode.label': 'Manage JournalNodes',
   'admin.manageJournalNode.wizard.header': 'Manage JournalNodes Wizard',
   'admin.manageJournalNode.wizard.step1.header': 'Assign JournalNodes',
   'admin.manageJournalNode.wizard.step2.header': 'Review',
@@ -1263,14 +1263,12 @@ Em.I18n.translations = {
   'admin.manageJournalNode.wizard.step4.header': 'Add/Remove JournalNodes',
   'admin.manageJournalNode.wizard.step5.header': 'Format JournalNodes',
   'admin.manageJournalNode.wizard.step6.header': 'Start Active NameNode',
-  'admin.manageJournalNode.wizard.step7.header': 'BootStrap StandBy NameNode',
+  'admin.manageJournalNode.wizard.step7.header': 'BootStrap Standby NameNode',
   'admin.manageJournalNode.wizard.step8.header': 'Start All Services',
 
   'admin.manageJournalNode.wizard.step1.body': 'Add, or Remove JournalNodes',
-  'admin.manageJournalNode.wizard.step3.confirm.config.body':'' +
-  'Review Configuration Changes.' +
-  'The following lists the configuration changes that will be made by the 
Wizard to manage JournalNode. This information is for  review only .' +
-  '',
+  'admin.manageJournalNode.wizard.step3.confirm.config.body': 
'Configuration Change Review.' +
+  'As part of this process, configuration changes are required. Please review 
the changes below, and note that they are for review only.  Future steps 
in this wizard will update this configuration, and restart all services 
automatically.',
 
   'admin.manageJournalNode.wizard.step4.task0.title' : 'Stop Standby NameNode',
   'admin.manageJournalNode.wizard.step4.task1.title': 'Stop Services',
@@ -1294,7 +1292,7 @@ Em.I18n.translations = {
   'admin.manageJournalNode.wizard.progressPage.notice.inProgress': 'Please 
wait while JournalNodes are being deployed',
   'admin.manageJournalNode.wizard.step6.notice.inProgress': 'Please wait for 
related services to be started',
   'admin.manageJournalNode.wizard.step4.notice.inProgress': 'Please wait while 
JournalNodes are being deployed',
-  'admin.manageJournalNode.wizard.step8.notice.completed':'JournalNodes has 
been processed successfully.',
+  'admin.manageJournalNode.wizard.step8.notice.completed':'Completed update to 
JournalNodes.',
 
   'admin.manageJournalNode.wizard.step3.body':
   '' +

http://git-wip-us.apache.org/repos/asf/ambari/blob/adde3db0/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs
--
diff --git 
a/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs 
b/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs
index de4e248..456e9ed 100644
--- a/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs
+++ b/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs
@@ -69,12 +69,14 @@
 
 
 
-{{#if controller.isLoaded}}
-{{{t admin.manageJournalNode.wizard.step3.confirm.config.body}}}
-{{view App.ServiceConfigView 
isNotEditableBinding="controller.isNotEditable"}}
-{{else}}
-{{view App.SpinnerView}}
-{{/if}}
+  {{#if controller.isLoaded}}
+
+  {{{t admin.manageJournalNode.wizard.step3.confirm.config.body}}}
+
+{{view App.ServiceConfigV

ambari git commit: AMBARI-19027. Manage JournalNode tweaks (onechiporenko)

2016-11-30 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk d8ba7f1ba -> d369809c9


AMBARI-19027. Manage JournalNode tweaks (onechiporenko)


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

Branch: refs/heads/trunk
Commit: d369809c96377fc06d33e1ef7bb1f53819e3f275
Parents: d8ba7f1
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Nov 30 13:19:43 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Nov 30 13:58:05 2016 +0200

--
 ambari-web/app/messages.js  | 12 +---
 .../main/admin/highAvailability/journalNode/step2.hbs   |  2 ++
 2 files changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d369809c/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index aa43687..a16d0ea 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1292,7 +1292,7 @@ Em.I18n.translations = {
   'admin.kerberos.disable.notice.completed': 'Services have been successfully 
tested without kerberos environment.',
   'admin.kerberos.wizard.step1.notice.inProgress': 'Please wait while cluster 
is being unkerberized',
 
-  'admin.manageJournalNode.label': 'Manage JournalNode',
+  'admin.manageJournalNode.label': 'Manage JournalNodes',
   'admin.manageJournalNode.wizard.header': 'Manage JournalNodes Wizard',
   'admin.manageJournalNode.wizard.step1.header': 'Assign JournalNodes',
   'admin.manageJournalNode.wizard.step2.header': 'Review',
@@ -1300,14 +1300,12 @@ Em.I18n.translations = {
   'admin.manageJournalNode.wizard.step4.header': 'Add/Remove JournalNodes',
   'admin.manageJournalNode.wizard.step5.header': 'Format JournalNodes',
   'admin.manageJournalNode.wizard.step6.header': 'Start Active NameNode',
-  'admin.manageJournalNode.wizard.step7.header': 'BootStrap StandBy NameNode',
+  'admin.manageJournalNode.wizard.step7.header': 'BootStrap Standby NameNode',
   'admin.manageJournalNode.wizard.step8.header': 'Start All Services',
 
   'admin.manageJournalNode.wizard.step1.body': 'Add, or Remove JournalNodes',
-  'admin.manageJournalNode.wizard.step3.confirm.config.body':'' +
-  'Review Configuration Changes.' +
-  'The following lists the configuration changes that will be made by the 
Wizard to manage JournalNode. This information is for  review only .' +
-  '',
+  'admin.manageJournalNode.wizard.step3.confirm.config.body': 
'Configuration Change Review.' +
+  'As part of this process, configuration changes are required. Please review 
the changes below, and note that they are for review only.  Future steps 
in this wizard will update this configuration, and restart all services 
automatically.',
 
   'admin.manageJournalNode.wizard.step4.task0.title' : 'Stop Standby NameNode',
   'admin.manageJournalNode.wizard.step4.task1.title': 'Stop Services',
@@ -1331,7 +1329,7 @@ Em.I18n.translations = {
   'admin.manageJournalNode.wizard.progressPage.notice.inProgress': 'Please 
wait while JournalNodes are being deployed',
   'admin.manageJournalNode.wizard.step6.notice.inProgress': 'Please wait for 
related services to be started',
   'admin.manageJournalNode.wizard.step4.notice.inProgress': 'Please wait while 
JournalNodes are being deployed',
-  'admin.manageJournalNode.wizard.step8.notice.completed':'JournalNodes has 
been processed successfully.',
+  'admin.manageJournalNode.wizard.step8.notice.completed':'Completed update to 
JournalNodes.',
 
   'admin.manageJournalNode.wizard.step3.body':
   '' +

http://git-wip-us.apache.org/repos/asf/ambari/blob/d369809c/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs
--
diff --git 
a/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs 
b/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs
index 547d364..0cd177d 100644
--- a/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs
+++ b/ambari-web/app/templates/main/admin/highAvailability/journalNode/step2.hbs
@@ -69,7 +69,9 @@
 
   
 {{#if controller.isLoaded}}
+  
 {{{t admin.manageJournalNode.wizard.step3.confirm.config.body}}}
+  
 {{view App.ServiceConfigView 
isNotEditableBinding="controller.isNotEditable"}}
 {{else}}
 {{view App.SpinnerView}}



ambari git commit: AMBARI-19011. Fix markup for widgets browser (onechiporenko)

2016-11-29 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 4dda1d739 -> a95284362


AMBARI-19011. Fix markup for widgets browser (onechiporenko)


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

Branch: refs/heads/trunk
Commit: a95284362adf794636c7437e6416ca4389046e63
Parents: 4dda1d7
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Tue Nov 29 15:03:12 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Tue Nov 29 17:43:16 2016 +0200

--
 ambari-web/app/messages.js  |   3 +
 ambari-web/app/styles/application.less  |  10 +-
 ambari-web/app/styles/bootstrap_overrides.less  |   9 +
 .../app/styles/enhanced_service_dashboard.less  | 343 +++
 ambari-web/app/styles/hosts.less|   3 -
 .../modal_popups/widget_browser_popup.hbs   | 108 +++---
 .../main/service/widgets/create/expression.hbs  |  36 +-
 .../main/service/widgets/create/step1.hbs   |  18 +-
 .../main/service/widgets/create/step2.hbs   |  22 +-
 .../service/widgets/create/step2_add_metric.hbs |  12 +-
 .../main/service/widgets/create/step2_graph.hbs |   4 +-
 .../service/widgets/create/step2_number.hbs |   4 +-
 .../service/widgets/create/step2_template.hbs   |   4 +-
 .../main/service/widgets/create/step3.hbs   |  42 ++-
 .../create/widget_property_threshold.hbs|  18 +-
 ambari-web/app/views/common/chosen_plugin.js|  21 +-
 ambari-web/app/views/common/controls_view.js|   2 +-
 .../main/service/widgets/create/step2_view.js   |   2 +
 18 files changed, 308 insertions(+), 353 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a9528436/ambari-web/app/messages.js
--
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index a1d84a3..aa43687 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -3071,6 +3071,9 @@ Em.I18n.translations = {
   'widget.create.wizard.step2.body.text':'Define the expression with any 
metrics and valid operators. Use parentheses when necessary.',
   'widget.create.wizard.step2.body.template':'Define the template with any 
number of expressions and any string. An expression can be referenced from a 
template by enclosing its name with double curly braces.',
   'widget.create.wizard.step2.body.warning':'Note: Valid operators are +, -, 
*, /',
+  'widget.create.wizard.step2.body.invalid.expression':'Expression is not 
complete or is invalid!',
+  'widget.create.wizard.step2.body.invalid.expression2':'Invalid expression!',
+  'widget.create.wizard.step2.body.invalid.msg2':'Only numbers or operators 
are allowed in this field.',
   'widget.create.wizard.step2.body.template.invalid.msg':'Invalid expression 
name existed. Should use name "Expression#" with double curly braces.',
   'widget.create.wizard.step2.addExpression': 'Add Expression',
   'widget.create.wizard.step2.addDataset': 'Add data set',

http://git-wip-us.apache.org/repos/asf/ambari/blob/a9528436/ambari-web/app/styles/application.less
--
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index d449ccb..4a50af7 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -28,6 +28,10 @@ html, body {
   height: 100%;
 }
 
+.form-text {
+  line-height: 34px;
+}
+
 wbr {
   display: inline-block;
 }
@@ -1075,9 +1079,7 @@ a:focus {
   color: #666;
   font-size: 13px;
   line-height: 16px;
-  .row {
-margin-bottom: 8px;
-  }
+
   .upgrade-status-warning {
 color: @health-status-red;
   }
@@ -1535,6 +1537,8 @@ ul.filter {
   height: 38px;
   border: 1px solid #D4D4D4;
   border-radius: 4px;
+  margin-top: 1px;
+  margin-bottom: 1px;
 }
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/a9528436/ambari-web/app/styles/bootstrap_overrides.less
--
diff --git a/ambari-web/app/styles/bootstrap_overrides.less 
b/ambari-web/app/styles/bootstrap_overrides.less
index 97c25ab..b8cdf49 100644
--- a/ambari-web/app/styles/bootstrap_overrides.less
+++ b/ambari-web/app/styles/bootstrap_overrides.less
@@ -113,6 +113,11 @@ select.form-control {
   }
 }
 
+.row {
+  padding-top: 5px;
+  padding-bottom: 5px;
+}
+
 .form-control {
   float: none;
 }
@@ -358,4 +363,8 @@ select.form-control {
 margin-left: 0;
 margin-right: 0;
   }
+}
+
+.wizard .wizard-body {
+  padding: 0 !important;
 }
\ No newline at end of file

htt

ambari git commit: AMBARI-18985. typeahead was lost while bootstrap 2 to bootstrap3 mirgation (onechiporenko)

2016-11-24 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 14d63dd9b -> b7d55f0c9


AMBARI-18985. typeahead was lost while bootstrap 2 to bootstrap3 mirgation 
(onechiporenko)


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

Branch: refs/heads/trunk
Commit: b7d55f0c9375686b8949ada3a4688eb936cf8404
Parents: 14d63dd
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Nov 24 15:49:00 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Nov 24 15:49:00 2016 +0200

--
 .../common/assign_master_components_view.js |   2 +
 ambari-web/brunch-config.js |   1 +
 ambari-web/vendor/scripts/jquery.typeahead.js   | 300 +++
 3 files changed, 303 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b7d55f0c/ambari-web/app/views/common/assign_master_components_view.js
--
diff --git a/ambari-web/app/views/common/assign_master_components_view.js 
b/ambari-web/app/views/common/assign_master_components_view.js
index 53859f6..4646cf0 100644
--- a/ambari-web/app/views/common/assign_master_components_view.js
+++ b/ambari-web/app/views/common/assign_master_components_view.js
@@ -63,6 +63,8 @@ App.InputHostView = Em.TextField.extend(App.SelectHost, {
*/
   typeahead: null,
 
+  classNames: ['form-control'],
+
   /**
* When value (host_info) is changed this method is triggered
* If new hostname is valid, this host is assigned to master component

http://git-wip-us.apache.org/repos/asf/ambari/blob/b7d55f0c/ambari-web/brunch-config.js
--
diff --git a/ambari-web/brunch-config.js b/ambari-web/brunch-config.js
index 27a6057..d646fdc 100644
--- a/ambari-web/brunch-config.js
+++ b/ambari-web/brunch-config.js
@@ -67,6 +67,7 @@ module.exports.config = {
   'vendor/scripts/jquery.timeago.js',
   'vendor/scripts/jquery.ajax-retry.js',
   'vendor/scripts/jquery.sticky-kit.js',
+  'vendor/scripts/jquery.typeahead.js',
   'vendor/scripts/underscore.js',
   'vendor/scripts/backbone.js',
   'vendor/scripts/difflib.js',

http://git-wip-us.apache.org/repos/asf/ambari/blob/b7d55f0c/ambari-web/vendor/scripts/jquery.typeahead.js
--
diff --git a/ambari-web/vendor/scripts/jquery.typeahead.js 
b/ambari-web/vendor/scripts/jquery.typeahead.js
new file mode 100644
index 000..c020a8e
--- /dev/null
+++ b/ambari-web/vendor/scripts/jquery.typeahead.js
@@ -0,0 +1,300 @@
+/* =
+ * bootstrap-typeahead.js v2.1.1
+ * http://twitter.github.com/bootstrap/javascript.html#typeahead
+ * =
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed 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.
+ *  */
+
+
+!function($){
+
+  "use strict"; // jshint ;_;
+
+
+  /* TYPEAHEAD PUBLIC CLASS DEFINITION
+   * = */
+
+  var Typeahead = function (element, options) {
+this.$element = $(element)
+this.options = $.extend({}, $.fn.typeahead.defaults, options)
+this.matcher = this.options.matcher || this.matcher
+this.sorter = this.options.sorter || this.sorter
+this.highlighter = this.options.highlighter || this.highlighter
+this.updater = this.options.updater || this.updater
+this.$menu = $(this.options.menu).appendTo('body')
+this.source = this.options.source
+this.shown = false
+this.listen()
+  }
+
+  Typeahead.prototype = {
+
+constructor: Typeahead
+
+, select: function () {
+  var val = this.$menu.find('.active').attr('data-value')
+  this.$element
+.val(this.updater(val))
+.change()
+  return this.hide()
+}
+
+, updater: function (item) {
+  return item
+}
+
+, show: function () {
+  var pos = $.extend({}, this.$element.offset(), {
+

[2/2] ambari git commit: AMBARI-18921. Remove redundant css (part 3) (onechiporenko)

2016-11-18 Thread onechiporenko
AMBARI-18921. Remove redundant css (part 3) (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 945e5d4dd8fa4b9ee3ed473a69d46695253e6285
Parents: b23623a
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Nov 17 17:27:34 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Fri Nov 18 10:12:59 2016 +0200

--
 .../main/admin/service_auto_start.js|6 +-
 ambari-web/app/styles/alerts.less   |   55 +-
 ambari-web/app/styles/application.less  | 2531 ++
 ambari-web/app/styles/bootstrap_overrides.less  |  294 ++
 ambari-web/app/styles/common.less   |   17 -
 ambari-web/app/styles/dashboard.less|  350 +++
 ambari-web/app/styles/hosts.less|  494 
 ambari-web/app/styles/modal_popups.less |  190 +-
 ambari-web/app/styles/timepicker-overrides.less |   59 +
 ambari-web/app/styles/top-nav.less  |  212 ++
 ambari-web/app/styles/wizard.less   |  611 +
 ambari-web/app/templates/application.hbs|6 +-
 .../templates/common/host_progress_popup.hbs|1 +
 .../common/modal_popups/select_groups_popup.hbs |6 +-
 ambari-web/app/templates/installer.hbs  |2 +-
 ambari-web/app/templates/main.hbs   |4 +-
 ambari-web/app/templates/main/admin.hbs |8 +-
 .../app/templates/main/admin/kerberos.hbs   |3 +-
 .../templates/main/admin/serviceAccounts.hbs|6 +-
 .../templates/main/admin/service_auto_start.hbs |  102 +-
 .../stack_upgrade/stack_upgrade_wizard.hbs  |2 +-
 .../main/alerts/definition_details.hbs  |2 +-
 ambari-web/app/templates/main/dashboard.hbs |2 +-
 .../main/dashboard/edit_widget_popup.hbs|   30 +-
 .../edit_widget_popup_single_threshold.hbs  |   27 +-
 ambari-web/app/templates/main/host/configs.hbs  |4 +-
 .../app/templates/main/host/host_alerts.hbs |   10 +-
 ambari-web/app/templates/main/service.hbs   |2 +-
 .../main/service/all_services_actions.hbs   |   18 +-
 .../public_option_disabled_window_body.hbs  |4 +-
 .../wizard/step9/step9HostTasksLogPopup.hbs |1 +
 ambari-web/app/utils/host_progress_popup.js |6 +-
 .../views/common/helpers/status_icon_view.js|2 +-
 .../views/main/admin/stack_and_upgrade_view.js  |4 +-
 .../views/wizard/step9/hostLogPopupBody_view.js |2 +-
 .../wizard/step9/hostLogPopupBody_view_test.js  |2 +-
 ambari-web/vendor/styles/bootstrap.css  |   34 +-
 37 files changed, 2552 insertions(+), 2557 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/945e5d4d/ambari-web/app/controllers/main/admin/service_auto_start.js
--
diff --git a/ambari-web/app/controllers/main/admin/service_auto_start.js 
b/ambari-web/app/controllers/main/admin/service_auto_start.js
index 8f40f25..b425c78 100644
--- a/ambari-web/app/controllers/main/admin/service_auto_start.js
+++ b/ambari-web/app/controllers/main/admin/service_auto_start.js
@@ -89,11 +89,11 @@ App.MainAdminServiceAutoStartController = 
Em.Controller.extend({
   totalComponents: 1,
   indicator: function () {
 var percentage = this.get('enabledComponents') / 
this.get('totalComponents');
-var indicator = "glyphicon glyphicon-adjust";
+var indicator = "icon-adjust";
 if (percentage === 1) {
-  indicator = "glyphicon glyphicon-circle";
+  indicator = "icon-circle";
 } else if (percentage === 0) {
-  indicator = "glyphicon glyphicon-circle-blank";
+  indicator = "icon-circle-blank";
 }
 return indicator;
   }.property('enabledComponents', 'totalComponents')

http://git-wip-us.apache.org/repos/asf/ambari/blob/945e5d4d/ambari-web/app/styles/alerts.less
--
diff --git a/ambari-web/app/styles/alerts.less 
b/ambari-web/app/styles/alerts.less
index 4569e25..f12393d 100644
--- a/ambari-web/app/styles/alerts.less
+++ b/ambari-web/app/styles/alerts.less
@@ -343,7 +343,6 @@
 
 }
 
-
 .service-block .summary-box-header {
   .alerts-crit-count, .alerts-warn-count, .no-alerts-label {
 padding: 4px 5px;
@@ -528,3 +527,57 @@
   max-height: 200px;
   overflow-y: scroll;
 }
+
+.alert-groups-dropdown {
+  overflow: a

[1/2] ambari git commit: AMBARI-18921. Remove redundant css (part 3) (onechiporenko)

2016-11-18 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk b23623aa8 -> 945e5d4dd


http://git-wip-us.apache.org/repos/asf/ambari/blob/945e5d4d/ambari-web/app/styles/modal_popups.less
--
diff --git a/ambari-web/app/styles/modal_popups.less 
b/ambari-web/app/styles/modal_popups.less
index 48c02b5..1125c2a 100644
--- a/ambari-web/app/styles/modal_popups.less
+++ b/ambari-web/app/styles/modal_popups.less
@@ -17,6 +17,105 @@
  */
 @import 'common.less';
 
+#modal {
+  outline: none;
+}
+
+.host-component-popup-wrap {
+  .task-top-wrap {
+.operation-name-top {
+  width: 36%;
+  padding-left: 20px;
+  float: left;
+  text-align: left;
+}
+  }
+  #service-info{
+.show-more {
+  width: 98.8%;
+  min-height: 20px;
+  cursor: pointer;
+  border-top: 1px solid #CCC;
+  text-align: center;
+  padding: 10px 10px 10px 0;
+  font-size: 16px;
+}
+  }
+
+  #host-info, #service-info{
+overflow: auto;
+width: 100%;
+max-height: 340px;
+&.scheduled{
+  max-height: 255px;
+}
+.col-md-2{
+  width:20%;
+  float: left;
+}
+.host-progress-num{
+  float: left;
+  padding-left: 8px;
+}
+.host-name-icon-wrap{
+  float: left;
+  width: 50%;
+  white-space: nowrap;
+}
+  }
+  #host-info, #service-info, #host-log {
+.log-list-wrap {
+  cursor: pointer;
+  padding: 10px 10px 10px 20px;
+  border-top: 1px solid #CCC;
+  border-bottom: 1px solid #CCC;
+}
+.task-list-line-cursor{
+  width: 100%;
+  min-height: 20px;
+  .progress-wrapper{
+.progress{
+  margin-bottom: 0;
+}
+  }
+  .show-details {
+float: right;
+cursor: pointer;
+font-size: 16px;
+i {
+  color: #333;
+}
+  }
+  .operation-name-icon-wrap {
+float: left;
+width: 35%;
+  }
+  .start-time-text {
+margin-left: 5px;
+width: 20%;
+float: left;
+  }
+  .duration-text {
+margin-left: 5px;
+width: 10%;
+float: left;
+  }
+  .time-summary {
+padding-left: 0;
+color: #808080;
+font-size: 12px;
+  }
+}
+.task-list-line-cursor:before,.task-list-line-cursor:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+.task-list-line-cursor:after {
+  clear: both;
+}
+  }
+}
 
 .modal {
   top: 5%;
@@ -90,30 +189,9 @@
 
 /*60% width modal window start*/
 .modal-edit-widget {
-  .modal-header{
-min-width: 650px;
-  }
-  .modal-footer{
-min-width: 650px;
-  }
-
   .modal-body {
 
-max-height: 403px;
-min-width: 650px;
-
-#slider-range {
-  margin-top: 40px;
-  margin-bottom: 20px;
-  margin-left: 38px;
-  max-width: 630px;
-  max-height: 15px;
-}
-#min-height-limit .col-md-9{
-  min-height: 15px;
-}
-#min-height-limit .progress{
-  margin-left: 40px;
+.progress {
   .bar-success {
 background-image: linear-gradient(to bottom, @health-status-green, 
@health-status-green);
 background-repeat: repeat-x;
@@ -131,35 +209,20 @@
   }
 }
 
-.value-on-slider{
-  max-height: 100px;
-  margin-bottom: 40px;
-  margin-top: 10px;
-  text-align: center;
-}
-#slider-value1{
-  max-width: 65px;
-}
-#slider-value2{
-  max-width: 250px;
-}
-#slider-value3{
-  max-width: 250px;
-}
-#slider-value4{
-  max-width: 65px;
+.value-on-slider {
+  margin-top: 30px;
 }
 .slider-error {
   color: #b94a48;
   .help-block {
 color: #b94a48;
   }
-}
-.slider-error input{
-  border-color: #b94a48;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  input{
+border-color: #b94a48;
+-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  }
 }
   }
 }
@@ -259,7 +322,6 @@
 
 /* modal fill screen popup */
 
-
 .full-height-modal {
   // padding from the top and bottom for full-height popup of window
   @modal-padding: 40px;
@@ -292,8 +354,12 @@
   }
 }
 
-
 .host-progress-popup {
+  #service-info, #host-info, #host-log {
+.log-list-wrap:hover {
+  background-color: #e6e6e6;
+}
+  }
   .task-detail-info {
 
 .task-detail-log-info {
@@ -361,3 +427,33 @@
 }
   }
 }
+
+.modal-graph-line {
+  .modal-dialog {
+width: 810px;
+  }
+  .modal-body {
+min-height: 450px !important;
+overflow: hidden;
+.corner-icon {
+  position: absolute;
+  right: 15px;
+  text-decoration: none;
+  .glyphicon-save {
+color: 

ambari git commit: AMBARI-18843. Add vertical tabs (2) (onechiporenko)

2016-11-16 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk eb71c65f7 -> 7b54b9aef


AMBARI-18843. Add vertical tabs (2) (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 7b54b9aef9d7a9d881643a52619b0e31a0df55ee
Parents: eb71c65
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Nov 16 17:17:51 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Nov 16 17:18:03 2016 +0200

--
 ambari-web/app/styles/theme/bootstrap-ambari.css | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7b54b9ae/ambari-web/app/styles/theme/bootstrap-ambari.css
--
diff --git a/ambari-web/app/styles/theme/bootstrap-ambari.css 
b/ambari-web/app/styles/theme/bootstrap-ambari.css
index 627dd08..fd341a5 100644
--- a/ambari-web/app/styles/theme/bootstrap-ambari.css
+++ b/ambari-web/app/styles/theme/bootstrap-ambari.css
@@ -436,7 +436,7 @@ h2.table-title {
   margin-bottom: 20px;
 }
 .nav.nav-tabs li a {
-  border: none;
+  border-width: 0;
   border-radius: 0;
   border-bottom: 2px solid transparent;
   color: #666;
@@ -446,7 +446,7 @@ h2.table-title {
 .nav.nav-tabs li a:active,
 .nav.nav-tabs li a:focus {
   color: #333;
-  border: none;
+  border-width: 0;
   background: none;
 }
 .nav.nav-tabs li a .badge.badge-important {
@@ -469,25 +469,25 @@ h2.table-title {
   margin-right: -1px;
 }
 .nav-tabs-left li a {
-  border-bottom: 2px solid transparent !important;
+  border: 2px solid transparent !important;
 }
 .nav-tabs-left li.active a,
 .nav-tabs-left li.active a:hover,
 .nav-tabs-left li.active a:active,
 .nav-tabs-left li.active a:focus {
-  border-right: 2px solid #3FAE2A;
+  border-right: 2px solid #3FAE2A !important;
 }
 .nav-tabs-right li {
   margin-left: -1px;
 }
 .nav-tabs-right li a {
-  border-bottom: 2px solid transparent !important;
+  border: 2px solid transparent !important;
 }
 .nav-tabs-right li.active a,
 .nav-tabs-right li.active a:hover,
 .nav-tabs-right li.active a:active,
 .nav-tabs-right li.active a:focus {
-  border-left: 2px solid #3FAE2A;
+  border-left: 2px solid #3FAE2A !important;
 }
 .wizard {
   border: 2px solid #ebecf1;



ambari git commit: AMBARI-18895. Cluster install fails if user accidentally creates a config group (onechiporenko)

2016-11-15 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 ed87ae3e6 -> 67ca85f89


AMBARI-18895. Cluster install fails if user accidentally creates a config group 
(onechiporenko)


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

Branch: refs/heads/branch-2.5
Commit: 67ca85f8982daa3c7d69afc5c078c5a76301eeb6
Parents: ed87ae3
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Tue Nov 15 14:20:10 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Tue Nov 15 14:30:11 2016 +0200

--
 ambari-web/app/mixins/main/service/configs/config_overridable.js | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/67ca85f8/ambari-web/app/mixins/main/service/configs/config_overridable.js
--
diff --git a/ambari-web/app/mixins/main/service/configs/config_overridable.js 
b/ambari-web/app/mixins/main/service/configs/config_overridable.js
index 920e5c4..7147e89 100644
--- a/ambari-web/app/mixins/main/service/configs/config_overridable.js
+++ b/ambari-web/app/mixins/main/service/configs/config_overridable.js
@@ -148,6 +148,7 @@ App.ConfigOverridable = Em.Mixin.create({
   popup.hide();
 });
   } else {
+newConfigGroup.is_temporary = true;
 App.store.load(App.ServiceConfigGroup, newConfigGroup);
 App.store.commit();
 newConfigGroup = App.ServiceConfigGroup.find(newConfigGroup.id);



[2/2] ambari git commit: AMBARI-18893. Remove redundant css (part 2) (onechiporenko)

2016-11-15 Thread onechiporenko
AMBARI-18893. Remove redundant css (part 2) (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 07cde1d74d94bbcf380d195be271491ee5035746
Parents: 5a32eda
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Tue Nov 15 11:55:02 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Tue Nov 15 11:55:02 2016 +0200

--
 ambari-web/app/styles/alerts.less   |  55 -
 ambari-web/app/styles/application.less  | 997 ---
 ambari-web/app/styles/bootstrap_overrides.less  |  14 +
 ambari-web/app/styles/common.less   | 298 +-
 ambari-web/app/styles/config_history_flow.less  |   6 -
 ambari-web/app/styles/modal_popups.less |   3 -
 ambari-web/app/styles/stack_versions.less   |  24 +-
 ambari-web/app/styles/widgets.less  |   4 +-
 .../common/configs/selectCreateConfigGroup.hbs  |   4 +-
 .../templates/common/host_progress_popup.hbs|   4 +-
 .../common/modal_popups/log_tail_popup.hbs  |   2 +-
 ambari-web/app/templates/login.hbs  |   2 +-
 .../main/alerts/definition_details.hbs  |   8 +-
 .../main/dashboard/plus_button_filter.hbs   |   8 +-
 .../main/dashboard/widgets/yarn_links.hbs   |   2 +-
 ambari-web/app/templates/main/host/summary.hbs  |   2 +-
 .../manage_configuration_groups_popup.hbs   |   8 +-
 .../templates/main/service/services/flume.hbs   |   4 +-
 ambari-web/app/templates/main/views.hbs |   5 +-
 ambari-web/app/templates/wizard/step3.hbs   |   4 +-
 ambari-web/app/views/main/dashboard/widgets.js  |   2 +
 .../host_component_recommendation_mixin_test.js |  24 +-
 .../host_component_validation_mixin_test.js |  24 +-
 23 files changed, 476 insertions(+), 1028 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/07cde1d7/ambari-web/app/styles/alerts.less
--
diff --git a/ambari-web/app/styles/alerts.less 
b/ambari-web/app/styles/alerts.less
index 1ea3492..4569e25 100644
--- a/ambari-web/app/styles/alerts.less
+++ b/ambari-web/app/styles/alerts.less
@@ -184,25 +184,8 @@
   .alert-definition-details-header {
 margin-bottom: 30px;
   }
-  .definition-details-block {
-margin-top: 30px;
-.multiline-text {
-  padding-top: 4px;
-  height: 60px;
-}
-  }
-  hr {
-margin: 10px 0 0 0;
-  }
-  .edit-description-button {
-font-size: 14px;
-  }
-  .edit-description-button:hover {
-text-decoration: none;
-  }
 
   .status {
-text-align: right;
 .label {
   font-size: 14px;
   padding: 5px 8px;
@@ -215,8 +198,6 @@
   width: 100%;
 }
 .properties-list {
-  padding: 10px;
-  text-align: left;
   .property-name {
 font-weight: bold;
   }
@@ -231,45 +212,9 @@
 font-weight: bold;
   }
 
-  .definition-name {
-.name-text-field{
-  margin-left: 2px;
-  margin-bottom: 0;
-  input {
-width: 99%;
-margin-bottom: 0;
-margin-top: -4px;
-margin-left: -5px;
-  }
-}
-.edit-buttons {
-  margin-bottom: 0;
-  margin-top: -4px;
-  float: left;
-  margin-left: 7px;
-}
-  }
-
   .error-msg {
   color: #b94a48;
   }
-
-  .edit-buttons {
-text-align: right;
-margin-bottom: 10px;
-  }
-
-  .text-area-edit {
-textarea {
-  width: 99%;
-  height: 100px;
-  margin-left: -5px;
-}
-  }
-
-  .edit-link {
-cursor: pointer;
-  }
 }
 
 .alert-configs {

http://git-wip-us.apache.org/repos/asf/ambari/blob/07cde1d7/ambari-web/app/styles/application.less
--
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index 3d2375e..5312ee2 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -91,6 +91,286 @@ footer {
   height: @footer-height - 60px;
 }
 
+
+.editable-list-container {
+  &:hover {
+.pencil-box {
+  opacity: 1;
+}
+  }
+  &.disabled {
+.pencil-box {
+  display: none;
+}
+  }
+  &.well{
+padding: 10px;
+position: relative;
+margin-bottom: 25px;
+cursor: pointer;
+&.edit-mode{
+  cursor: default;
+}
+&.disabled{
+  background: white;
+}
+  }
+  &.edit-mode {
+&:hover {
+  .pencil-box {
+opacity: 0;
+  }
+}
+.items-box {
+  ul.items-list {
+li.item {
+  &.add-item-input .ember-text-field{
+display: inline

[1/2] ambari git commit: AMBARI-18893. Remove redundant css (part 2) (onechiporenko)

2016-11-15 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 5a32eda86 -> 07cde1d74


http://git-wip-us.apache.org/repos/asf/ambari/blob/07cde1d7/ambari-web/test/mixins/common/hosts/host_component_validation_mixin_test.js
--
diff --git 
a/ambari-web/test/mixins/common/hosts/host_component_validation_mixin_test.js 
b/ambari-web/test/mixins/common/hosts/host_component_validation_mixin_test.js
index 7cbe232..9589f90 100644
--- 
a/ambari-web/test/mixins/common/hosts/host_component_validation_mixin_test.js
+++ 
b/ambari-web/test/mixins/common/hosts/host_component_validation_mixin_test.js
@@ -17,6 +17,7 @@
  */
 
 var App = require('app');
+var helpers = require('test/helpers');
 
 describe('App.HostComponentValidationMixin', function() {
   var mixedObject;
@@ -25,7 +26,7 @@ describe('App.HostComponentValidationMixin', function() {
   });
 
   describe('#formatValidateComponents', function() {
-var cases = [
+[
   {
 components: undefined,
 hosts: [],
@@ -51,9 +52,7 @@ describe('App.HostComponentValidationMixin', function() {
   Em.Object.create({ componentName: 'C2', hostName: 'h3'}),
 ]
   }
-];
-
-cases.forEach(function(test) {
+].forEach(function(test) {
   it(test.m, function() {
 expect(mixedObject.formatValidateComponents(test.components, 
test.hosts)).to.be.eql(test.e);
   });
@@ -61,7 +60,6 @@ describe('App.HostComponentValidationMixin', function() {
   });
 
   describe('#validateSelectedHostComponents', function() {
-var cases;
 beforeEach(function() {
   sinon.stub(mixedObject, 'getHostComponentValidationRequest');
   sinon.stub(mixedObject, 'getHostComponentValidationParams');
@@ -74,7 +72,7 @@ describe('App.HostComponentValidationMixin', function() {
   mixedObject.formatValidateComponents.restore();
 });
 
-cases = [
+[
   {
 opts: null,
 e: {
@@ -100,9 +98,7 @@ describe('App.HostComponentValidationMixin', function() {
 },
 m: 'should normaly merge defaults with passed options'
   }
-];
-
-cases.forEach(function(test) {
+].forEach(function(test) {
   it(test.m, function() {
 mixedObject.validateSelectedHostComponents(test.opts);
 
expect(mixedObject.getHostComponentValidationParams.args[0][0]).to.be.eql(test.e);
@@ -113,7 +109,8 @@ describe('App.HostComponentValidationMixin', function() {
   describe('#getHostComponentValidationRequest', function() {
 it('default request options checking', function() {
   mixedObject.getHostComponentValidationRequest('someData');
-  expect(App.ajax.send.args[0][0]).to.be.eql({
+  var args = helpers.findAjaxRequest('name', 'config.validations');
+  expect(args[0]).to.be.eql({
 name: 'config.validations',
 sender: mixedObject,
 data: 'someData',
@@ -124,14 +121,13 @@ describe('App.HostComponentValidationMixin', function() {
   });
 
   describe('#getHostComponentValidationParams', function() {
-var cases;
 beforeEach(function() {
   sinon.stub(App, 'get').withArgs('stackVersionURL').returns('/stack/url');
 });
 afterEach(function() {
   App.get.restore();
 });
-cases = [
+[
   {
 options: {
   hosts: ['h1'],
@@ -177,9 +173,7 @@ describe('App.HostComponentValidationMixin', function() {
 },
 m: 'when blueprint passed it should be used instead of generated 
blueprint'
   }
-];
-
-cases.forEach(function(test) {
+].forEach(function(test) {
   it(test.m, function() {
 
expect(mixedObject.getHostComponentValidationParams(test.options)).to.be.eql(test.e);
   });



[2/2] ambari git commit: AMBARI-18861. Remove redundant css (part 1) (onechiporenko)

2016-11-11 Thread onechiporenko
AMBARI-18861. Remove redundant css (part 1) (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 2d948db3195286d7ee9eb7fe610628c9993ed865
Parents: 5dea886
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Fri Nov 11 13:50:24 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Fri Nov 11 13:50:24 2016 +0200

--
 ambari-web/app/controllers/application.js   |   4 +-
 ambari-web/app/models/host_component.js |   2 +-
 ambari-web/app/styles/application.less  | 937 +++
 ambari-web/app/styles/common.less   | 148 ++-
 ambari-web/app/styles/config_history_flow.less  |  36 +-
 ambari-web/app/styles/stack_versions.less   |   3 +-
 ambari-web/app/templates/application.hbs|  65 +-
 ambari-web/app/templates/common/about.hbs   |   6 +-
 .../common/assign_master_components.hbs |  10 +-
 ambari-web/app/templates/login.hbs  |   2 +-
 .../app/templates/main/alerts/configs.hbs   |  50 +-
 .../main/alerts/definition_details.hbs  |  66 +-
 .../app/templates/main/charts/heatmap.hbs   |  10 +-
 .../templates/main/charts/heatmap_dropdown.hbs  |   7 +-
 .../templates/main/dashboard/config_history.hbs |   2 +-
 ambari-web/app/templates/main/host/configs.hbs  |   6 +-
 .../templates/main/host/delete_hosts_popup.hbs  |   2 +-
 .../main/host/details/doDeleteHostPopup.hbs |   2 +-
 ambari-web/app/templates/main/host/summary.hbs  |  81 +-
 .../main/service/all_services_actions.hbs   |   2 -
 .../main/service/info/heatmap_dropdown.hbs  |   7 +-
 .../wizard/step1_addLocalRepository.hbs |   2 +-
 ambari-web/app/templates/wizard/step2.hbs   | 105 ++-
 ambari-web/app/templates/wizard/step3.hbs   |   3 +-
 ambari-web/app/views/main/menu.js   |   2 +-
 25 files changed, 462 insertions(+), 1098 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2d948db3/ambari-web/app/controllers/application.js
--
diff --git a/ambari-web/app/controllers/application.js 
b/ambari-web/app/controllers/application.js
index 4bd09c3..df0a8e8 100644
--- a/ambari-web/app/controllers/application.js
+++ b/ambari-web/app/controllers/application.js
@@ -93,14 +93,14 @@ App.ApplicationController = 
Em.Controller.extend(App.UserPref, {
 }
 if (upgradeHolding) {
   return {
-cls: 'upgrade-in-holding',
+cls: 'upgrade-holding',
 icon: 'glyphicon-pause',
 msg: Em.I18n.t('admin.stackVersions.version.' + typeSuffix + '.pause')
   }
 }
 if (upgradeSuspended) {
   return {
-cls: 'upgrade-in-holding',
+cls: 'upgrade-aborted',
 icon: 'glyphicon-pause',
 msg: Em.I18n.t('admin.stackVersions.version.' + typeSuffix + 
'.suspended')
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/2d948db3/ambari-web/app/models/host_component.js
--
diff --git a/ambari-web/app/models/host_component.js 
b/ambari-web/app/models/host_component.js
index 76d1023..d408bfd 100644
--- a/ambari-web/app/models/host_component.js
+++ b/ambari-web/app/models/host_component.js
@@ -250,7 +250,7 @@ App.HostComponentStatus = {
   case this.disabled:
 return 'Disabled';
   case this.init:
-return 'Install Pending...';
+return 'Install Pending';
 }
 return 'Unknown';
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/2d948db3/ambari-web/app/styles/application.less
--
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index 9d7d949..3d2375e 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -21,6 +21,7 @@
 
 body {
   overflow-y: scroll;
+  line-height: 1.3em;
 }
 
 html, body {
@@ -46,20 +47,10 @@ body.modal-open {
   padding-right: 0 !important;
 }
 
-.glyphicon-2x{font-size: 2em;}
-.glyphicon-3x{font-size: 3em;}
-.glyphicon-4x{font-size: 4em;}
-.glyphicon-5x{font-size: 5em;}
-
-body.modal-open {
-  //fix bootstrap padding when modal opened
-  padding-right: 0 !important;
-}
-
 @-moz-document url-prefix() {
-input[type="file"] {
-  line-height: 25px!important;
-}
+  input[type="file"] {
+line-height: 25px!important;
+  }
 }
 
 ul.typeahead.dropdown-menu {
@@ -70,11 +61,6 @@ select.form-control {
   display: inline-block;
 }
 
-// Override bootstrap class to ensu

[1/2] ambari git commit: AMBARI-18861. Remove redundant css (part 1) (onechiporenko)

2016-11-11 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 5dea886ef -> 2d948db31


http://git-wip-us.apache.org/repos/asf/ambari/blob/2d948db3/ambari-web/app/templates/wizard/step2.hbs
--
diff --git a/ambari-web/app/templates/wizard/step2.hbs 
b/ambari-web/app/templates/wizard/step2.hbs
index 55ebd79..4912851 100644
--- a/ambari-web/app/templates/wizard/step2.hbs
+++ b/ambari-web/app/templates/wizard/step2.hbs
@@ -36,13 +36,14 @@
   
 
   
-
+
   {{view Ember.TextArea id="host-names" class="form-control" 
valueBinding="content.installOptions.hostNames" rows="5"
   placeholder="host names"}}
 
-
 {{#if hostsError}}
-  {{hostsError}}
+  
+{{hostsError}}
+  
 {{/if}}
   
 
@@ -77,66 +78,76 @@
   {{view App.SshKeyFileUploader 
disabledBinding="view.sshKeyState"}}
 
   {{/if}}
+
+  {{! ssh key }}
   
-
+
   {{view Ember.TextArea class="form-control" rows="3" 
id="sshKey"
   placeholder="ssh private key" 
disabledBinding="view.sshKeyState" 
valueBinding="content.installOptions.sshKey"}}
 
-
 {{#if sshKeyError}}
-  {{sshKeyError}}
+  
+{{sshKeyError}}
+  
 {{/if}}
   
-  
-
-  {{t installer.step2.sshUser}}
-
+  {{! ssh key end }}
 
-
-  
-
-  {{view view.textFieldView 
valueBinding="content.installOptions.sshUser" 
isEnabledBinding="content.installOptions.useSsh" classNames="form-control"}}
-
-{{#if sshUserError}}
-  {{sshUserError}}
-{{/if}}
-  
+  {{! ssh user }}
+  
+
+  
+{{t installer.step2.sshUser}}
+  
+
+
+  {{view view.textFieldView 
valueBinding="content.installOptions.sshUser" 
isEnabledBinding="content.installOptions.useSsh" classNames="form-control 
pull-right"}}
 
+{{#if sshUserError}}
+  
+{{sshUserError}}
+  
+{{/if}}
   
-   
-
-{{t installer.step2.sshPort}}
-
+  {{! ssh user end }}
 
-
-
-  
-{{view view.textFieldView 
valueBinding="content.installOptions.sshPort" 
isEnabledBinding="content.installOptions.useSsh" classNames="form-control"}}
-  
-  {{#if sshPortError}}
-  {{sshPortError}}
-  {{/if}}
-
-
+  {{! ssh port }}
+   
+ 
+   
+{{t installer.step2.sshPort}}
+   
+ 
+ 
+   {{view view.textFieldView 
valueBinding="content.installOptions.sshPort" 
isEnabledBinding="content.installOptions.useSsh" classNames="form-control"}}
+ 
+ {{#if sshPortError}}
+   
+ {{sshPortError}}
+   
+ {{/if}}

-  {{#if App.supports.customizeAgentUserAccount}}
-
-  
-{{t installer.step2.agentUser}}
-  
+  {{! ssh port end }}
 
-  
-
-  
-{{view view.textFieldView 
valueBinding="content.installOptions.agentUser" 
isEnabledBinding="content.installOptions.useSsh" classNames="form-control"}}
-  
-  {{#if agentUserError}}
-{{agentUserError}}
-  {{/if}}
-
+  {{! ambari agent user }}
+  {{#if App.supports.customizeAgentUserAccount}}
+
+  
+
+  {{t installer.step2.agentUser}}
+
+  
+  
+{{view view.textFieldView 
valueBinding="content.installOptions.agentUser" 
isEnabledBinding="content.installOptions.useSsh" classNames="form-control"}}
   
+  {{#if agentUserError}}
+

ambari git commit: AMBARI-18843. Add vertical tabs (onechiporenko)

2016-11-10 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk db2013a47 -> 56dc09ef7


AMBARI-18843. Add vertical tabs (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 56dc09ef789fff0ad32fe2a68224680518d73a94
Parents: db2013a
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Thu Nov 10 12:46:53 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Thu Nov 10 12:47:05 2016 +0200

--
 .../app/styles/theme/bootstrap-ambari.css   | 81 ++--
 1 file changed, 58 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/56dc09ef/ambari-web/app/styles/theme/bootstrap-ambari.css
--
diff --git a/ambari-web/app/styles/theme/bootstrap-ambari.css 
b/ambari-web/app/styles/theme/bootstrap-ambari.css
index 1a93cbb..627dd08 100644
--- a/ambari-web/app/styles/theme/bootstrap-ambari.css
+++ b/ambari-web/app/styles/theme/bootstrap-ambari.css
@@ -431,6 +431,64 @@ h2.table-title {
   background-color: transparent;
   color: #1491C1;
 }
+.nav.nav-tabs {
+  border: none;
+  margin-bottom: 20px;
+}
+.nav.nav-tabs li a {
+  border: none;
+  border-radius: 0;
+  border-bottom: 2px solid transparent;
+  color: #666;
+  text-transform: uppercase;
+}
+.nav.nav-tabs li a:hover,
+.nav.nav-tabs li a:active,
+.nav.nav-tabs li a:focus {
+  color: #333;
+  border: none;
+  background: none;
+}
+.nav.nav-tabs li a .badge.badge-important {
+  display: inline;
+}
+.nav.nav-tabs li.active a {
+  color: #333;
+  border-bottom: 2px solid #3FAE2A;
+}
+.nav-tabs-left li,
+.nav-tabs-right li {
+  float: none;
+  margin-bottom: 2px;
+}
+.nav-tabs-left li a,
+.nav-tabs-right li a {
+  margin-right: 0;
+}
+.nav-tabs-left li {
+  margin-right: -1px;
+}
+.nav-tabs-left li a {
+  border-bottom: 2px solid transparent !important;
+}
+.nav-tabs-left li.active a,
+.nav-tabs-left li.active a:hover,
+.nav-tabs-left li.active a:active,
+.nav-tabs-left li.active a:focus {
+  border-right: 2px solid #3FAE2A;
+}
+.nav-tabs-right li {
+  margin-left: -1px;
+}
+.nav-tabs-right li a {
+  border-bottom: 2px solid transparent !important;
+}
+.nav-tabs-right li.active a,
+.nav-tabs-right li.active a:hover,
+.nav-tabs-right li.active a:active,
+.nav-tabs-right li.active a:focus {
+  border-left: 2px solid #3FAE2A;
+}
 .wizard {
   border: 2px solid #ebecf1;
 }
@@ -707,29 +765,6 @@ body,
   font-size: 12px;
   color: #000;
 }
-.nav.nav-tabs {
-  border: none;
-}
-.nav.nav-tabs li a {
-  border: none;
-  border-bottom: 2px solid transparent;
-  color: #666;
-  text-transform: uppercase;
-}
-.nav.nav-tabs li a:hover,
-.nav.nav-tabs li a:active,
-.nav.nav-tabs li a:focus {
-  color: #333;
-  border: none;
-  background: none;
-}
-.nav.nav-tabs li a .badge.badge-important {
-  display: inline;
-}
-.nav.nav-tabs li.active a {
-  color: #333;
-  border-bottom: 2px solid #3FAE2A;
-}
 a,
 a:visited,
 a:focus {



[1/2] ambari git commit: AMBARI-18820. Fix markup on the host summary page (onechiporenko)

2016-11-09 Thread onechiporenko
Repository: ambari
Updated Branches:
  refs/heads/trunk dbeb78d5d -> ac7ff8bab


AMBARI-18820. Fix markup on the host summary page (onechiporenko)


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

Branch: refs/heads/trunk
Commit: a2d53ef06f07d680f3db9f3b0b8e86a8cbc71eae
Parents: dbeb78d
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Tue Nov 8 12:47:21 2016 +0200
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Nov 9 10:10:19 2016 +0200

--
 ambari-web/app/styles/application.less  | 98 +++-
 .../main/host/details/host_component.hbs| 61 ++--
 ambari-web/app/templates/main/host/metrics.hbs  | 52 +--
 ambari-web/app/templates/main/host/summary.hbs  | 37 
 4 files changed, 135 insertions(+), 113 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a2d53ef0/ambari-web/app/styles/application.less
--
diff --git a/ambari-web/app/styles/application.less 
b/ambari-web/app/styles/application.less
index aa5069d..b57ebb8 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -144,6 +144,20 @@ table.diff {
   padding: 10px;
 }
 
+.row.row-no-pad {
+  .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, 
.col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
+  .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, 
.col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
+padding-left: 1px;
+padding-right: 1px;
+&:first-child {
+  padding-left: 15px;
+}
+&:last-child {
+  padding-right: 15px;
+}
+  }
+}
+
 .ru-badge {
   text-align: center;
   .upgrade-in-progress {
@@ -3591,12 +3605,6 @@ table.graphs {
 border-bottom-color: #00;
   }
 
-  //hack to apply style only for firefox
-  .host-components .btn-group{
-   white-space: normal;
-  }
-
-
   .marker {
 background-repeat: no-repeat;
 height: 13px;
@@ -3664,8 +3672,7 @@ table.graphs {
   }
 
   .content {
-padding: 10px;
-
+padding: 10px 0;
   }
 
   .host-configuration .dl-horizontal {
@@ -3695,29 +3702,19 @@ table.graphs {
 
   .host-components {
 padding: 10px;
-padding-bottom: 0;
 border-radius: 4px;
 background: #FFF;
+.component-name-block-wrapper {
+  display: table;
+  height: 34px;
+  .component-name-block {
+white-space: normal;
+word-wrap: break-word;
+display: table-cell;
+vertical-align: middle;
+  }
 
-  }
-
-  .host-components .btn-group {
-margin: 0 5px 10px 0;
-
-.component-text-status{
-  cursor: default;
-  display: block;
-  padding: 3px 20px;
-  clear: both;
-  font-weight: normal;
-  line-height: 20px;
-  color: #33;
-  white-space: nowrap;
-  font-style: italic;
 }
-  }
-
-  .host-components {
 .dropdown-menu {
   .disabled {
 pointer-events: none;
@@ -3728,7 +3725,38 @@ table.graphs {
 pointer-events: auto;
   }
 }
+.status-icons {
+  line-height: 34px;
+}
+.client-list {
+  ul {
+list-style: none;
+  }
+}
+&>.row {
+  padding-bottom: 10px;
+}
+.btn-group {
+  //hack to apply style only for firefox
+  white-space: normal;
+  margin: 0 5px 10px 0;
+  & > .btn {
+width: 140px;
+  }
+  .component-text-status {
+cursor: default;
+display: block;
+padding: 3px 20px;
+clear: both;
+font-weight: normal;
+line-height: 20px;
+color: #333;
+white-space: nowrap;
+font-style: italic;
+  }
+}
   }
+
   .host-tab-content,
   .logs-tab-content {
 margin-top: 20px;
@@ -4705,10 +4733,6 @@ ul.list-inline li {
 
 /* TIME RANGE WIDGET END */
 
-#host-details .host-components .btn-group > .btn {
-  width: 140px;
-}
-
 /* fieldset begin */
 .fieldset {
   border: 2px solid black;
@@ -5140,11 +5164,6 @@ i.glyphicon-asterisks {
 }
 
 .row .host-component-block {
-  .health-icon-block {
-width: 6%;
-float: left;
-padding-right: 5px;
-  }
 
   .refresh-icon-block {
 width: 6%;
@@ -5156,13 +5175,6 @@ i.glyphicon-asterisks {
 float: left;
 padding-left: 3px;
   }
-
-  .component-name-block {
-width: 77%;
-float: left;
-white-space: normal;
-word-wrap: break-word;
-  }
 }
 
 .filter-combobox{

http://git-wip-us.apache.org/repos/asf/ambari/blob/a2d53ef0/ambari-web/app/templa

  1   2   3   4   5   6   7   8   9   >