You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2017/03/31 07:22:56 UTC
[49/55] [abbrv] ambari git commit: AMBARI-20609. Fix Install Wizard
data attribute (alexantonenko)
AMBARI-20609. Fix Install Wizard data attribute (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c614fb71
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c614fb71
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c614fb71
Branch: refs/heads/branch-3.0-perf
Commit: c614fb71059f9c57ad91f2b5842c9c140d29b9ac
Parents: f6917a9
Author: Alex Antonenko <hi...@gmail.com>
Authored: Thu Mar 30 19:00:01 2017 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Fri Mar 31 10:21:45 2017 +0300
----------------------------------------------------------------------
.../app/controllers/wizard/step4_controller.js | 2 ++
ambari-web/app/templates/common/modal_popup.hbs | 2 +-
ambari-web/app/templates/wizard/step4.hbs | 20 +++++++++-----------
.../step4/step4_ranger_requirements_popup.hbs | 2 +-
ambari-web/app/views/common/checkbox_view.js | 2 +-
5 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/c614fb71/ambari-web/app/controllers/wizard/step4_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step4_controller.js b/ambari-web/app/controllers/wizard/step4_controller.js
index 8165c8d..d82bf34 100644
--- a/ambari-web/app/controllers/wizard/step4_controller.js
+++ b/ambari-web/app/controllers/wizard/step4_controller.js
@@ -484,6 +484,7 @@ App.WizardStep4Controller = Em.ArrayController.extend({
needToAddServicePopup: function (services, i18nSuffix, serviceName, callback, id) {
var self = this;
return App.ModalPopup.show({
+ 'data-qa': 'need-add-service-confirmation-modal',
header: Em.I18n.t('installer.step4.' + i18nSuffix + '.popup.header').format(serviceName),
body: Em.I18n.t('installer.step4.' + i18nSuffix + '.popup.body').format(serviceName),
onPrimary: function () {
@@ -551,6 +552,7 @@ App.WizardStep4Controller = Em.ArrayController.extend({
rangerRequirementsPopup: function (callback, id) {
var self = this;
return App.ModalPopup.show({
+ 'data-qa': 'ranger-requirements-modal',
header: Em.I18n.t('installer.step4.rangerRequirements.popup.header'),
bodyClass: Em.View.extend({
templateName: require('templates/wizard/step4/step4_ranger_requirements_popup')
http://git-wip-us.apache.org/repos/asf/ambari/blob/c614fb71/ambari-web/app/templates/common/modal_popup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/modal_popup.hbs b/ambari-web/app/templates/common/modal_popup.hbs
index cf3b235..96aa6dc 100644
--- a/ambari-web/app/templates/common/modal_popup.hbs
+++ b/ambari-web/app/templates/common/modal_popup.hbs
@@ -26,7 +26,7 @@
{{#if view.showCloseButton}}
<a {{QAAttr "close-modal"}} class="close" {{action onClose target="view"}}>×</a>
{{/if}}
- <h4 id="modal-label">
+ <h4 {{QAAttr "modal-title"}} id="modal-label">
{{#if view.headerClass}}
{{view view.headerClass}}
{{else}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/c614fb71/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 1dbf5e6..c688981 100644
--- a/ambari-web/app/templates/wizard/step4.hbs
+++ b/ambari-web/app/templates/wizard/step4.hbs
@@ -25,26 +25,24 @@
<table class="table table-hover">
<thead>
<tr>
- <th class="col-md-3">{{t common.service}}</th>
- <th id="service-version">{{t common.version}}</th>
- <th id="service-description">{{t common.description}}</th>
+ <th {{QAAttr "service-name-header"}} class="col-md-3">{{t common.service}}</th>
+ <th {{QAAttr "service-version-header"}} id="service-version">{{t common.version}}</th>
+ <th {{QAAttr "service-description-header"}} id="service-description">{{t common.description}}</th>
<th>
- {{view App.CheckboxView disabledBinding="isInstalled" checkedBinding="isAllChecked"}}
+ {{view App.CheckboxView data-qa="toggle-all" disabledBinding="isInstalled" checkedBinding="isAllChecked"}}
</th>
</tr>
</thead>
<tbody>
{{#each controller}}
{{#unless isHiddenOnSelectServicePage}}
- <tr {{bindAttr class="isSelected:active isSelected:service-selected"}}>
- <td>
- <div class="checkbox">{{displayNameOnSelectServicePage}}</div>
- </td>
- <td>{{serviceVersionDisplay}}</td>
- <td>{{{comments}}}</td>
+ <tr {{QAAttr "service-row"}} {{bindAttr class="isSelected:active isSelected:service-selected"}}>
+ <td {{QAAttr "service-name"}}>{{displayNameOnSelectServicePage}}</td>
+ <td {{QAAttr "service-version"}}>{{serviceVersionDisplay}}</td>
+ <td {{QAAttr "service-description"}}>{{{comments}}}</td>
<td>
<div class="checkbox">
- {{view App.CheckboxView checkboxClassNamesBinding="serviceName"
+ {{view App.CheckboxView checkboxClassNamesBinding="serviceName" data-qa="toggle-service"
disabledBinding="isDisabled"
checkedBinding="isSelected"
}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/c614fb71/ambari-web/app/templates/wizard/step4/step4_ranger_requirements_popup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step4/step4_ranger_requirements_popup.hbs b/ambari-web/app/templates/wizard/step4/step4_ranger_requirements_popup.hbs
index 107b861..9726556 100644
--- a/ambari-web/app/templates/wizard/step4/step4_ranger_requirements_popup.hbs
+++ b/ambari-web/app/templates/wizard/step4/step4_ranger_requirements_popup.hbs
@@ -18,5 +18,5 @@
{{t installer.step4.rangerRequirements.popup.body.requirements}}
<div class="checkbox">
- {{view App.CheckboxView checkedBinding="isChecked" labelTranslate="installer.step4.rangerRequirements.popup.body.confirmation"}}
+ {{view App.CheckboxView data-qa="ranger-requirements-confirmation" checkedBinding="isChecked" labelTranslate="installer.step4.rangerRequirements.popup.body.confirmation"}}
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/c614fb71/ambari-web/app/views/common/checkbox_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/checkbox_view.js b/ambari-web/app/views/common/checkbox_view.js
index 517f6eb..2e1d763 100644
--- a/ambari-web/app/views/common/checkbox_view.js
+++ b/ambari-web/app/views/common/checkbox_view.js
@@ -135,7 +135,7 @@ App.CheckboxView = Em.View.extend({
labelTextBinding: 'parentView.labelText',
classNameBindings: 'parentView.labelClassNames',
tagName: 'label',
- attributeBindings: ['for'],
+ attributeBindings: ['for', 'parentView.checked:checked'],
template: Em.Handlebars.compile('{{view.labelText}}'),
for: Em.computed.alias('parentView.checkboxId')
})