Skip to content

Commit

Permalink
AMBARI-20609. Fix Install Wizard data attribute (onechiporenko)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Nechiporenko committed Mar 29, 2017
1 parent edbb549 commit 4d6c80f
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 42 deletions.
4 changes: 2 additions & 2 deletions ambari-web/app/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
</div>
<footer>
<div class="container">
<a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Licensed under the Apache License, Version 2.0</a>.<br>
<a href="/licenses/NOTICE.txt" target="_blank">See third-party tools/resources that Ambari uses and their respective authors</a>
<a data-qa="license-link" href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Licensed under the Apache License, Version 2.0</a>.<br>
<a data-qa="third-party-link" href="/licenses/NOTICE.txt" target="_blank">See third-party tools/resources that Ambari uses and their respective authors</a>
</div>
</footer>
</body>
Expand Down
5 changes: 4 additions & 1 deletion ambari-web/app/controllers/wizard/step6_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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' : ''
};
})
};
Expand Down Expand Up @@ -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'),
Expand Down
1 change: 1 addition & 0 deletions ambari-web/app/mixins/wizard/assign_master_components.js
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,7 @@ App.AssignMasterComponents = Em.Mixin.create(App.HostComponentValidationMixin, A
}

App.ModalPopup.show({
'data-qa': 'validation-issues-modal',
primary: Em.I18n.t('common.continueAnyway'),
header: Em.I18n.t('installer.step5.validationIssuesAttention.header'),
body: Em.I18n.t('installer.step5.validationIssuesAttention'),
Expand Down
4 changes: 2 additions & 2 deletions ambari-web/app/templates/application.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
{{! user dropdown }}
{{#if App.router.loggedIn}}
<div class="top-nav-user navbar-right btn-group">
<button class="dropdown-toggle navbar-btn btn btn-default" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<button {{QAAttr "user-dropdown"}} class="dropdown-toggle navbar-btn btn btn-default" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<i class="glyphicon glyphicon-user"></i>&nbsp;{{App.router.displayLoginName}}&nbsp;<span class="caret"></span>
</button>
<ul class="dropdown-menu">
Expand Down Expand Up @@ -113,7 +113,7 @@
{{! sign out }}
{{#if showExitLink}}
<li role="separator" class="divider"></li>
<li><a href="" id="sign-out" {{action logoff}}>{{t app.signout}}</a></li>
<li><a href="" id="sign-out" {{QAAttr "sign-out"}} {{action logoff}}>{{t app.signout}}</a></li>
{{/if}}
{{! sign out end }}
</ul>
Expand Down
14 changes: 7 additions & 7 deletions ambari-web/app/templates/common/assign_master_components.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
{{#each controller.additionalHostsList}}
<div class="row row-no-pad additional-hosts-list">
<div class="col-md-4">
<label class="pts pull-right">
<label class="pts pull-right" {{QAAttr "component-name"}}>
{{label}}
</label>
</div>
Expand All @@ -60,10 +60,10 @@
</div>
{{/each}}
{{#each servicesMastersToShow}}
<div class="row row-no-pad form-group">
<div {{QAAttr "component-row"}} class="row row-no-pad form-group">
<div class="col-md-4">
<div class="control-group">
<label class="pts pull-right">
<label class="pts pull-right" {{QAAttr "component-name"}}>
{{#if showCurrentPrefix}}
{{t common.current}}
{{/if}}
Expand All @@ -76,7 +76,7 @@
</div>
<div class="col-md-6">
{{#if isServiceCoHost}}
<div class="hostName">
<div class="hostName" {{QAAttr "service-co-host"}}>
{{selectedHost}}<i class="glyphicon glyphicon-asterisks">&#10037;</i>
</div>
{{else}}
Expand Down Expand Up @@ -134,7 +134,7 @@
<div class="col-md-10 col-md-offset-1">
<div class="hostString"><span>{{hostInfo}}</span></div>
{{#each masterServicesToDisplay}}
<span {{bindAttr class="isInstalled:assigned-service:new-service :service-component :label"}}>{{display_name}}</span>
<span {{QAAttr "component-on-host"}} {{bindAttr class="isInstalled:assigned-service:new-service :service-component :label"}}>{{display_name}}</span>
{{/each}}
</div>
</div>
Expand Down Expand Up @@ -164,14 +164,14 @@
<div class="wizard-footer col-md-12">
<div class="btn-area">
{{#if view.isBackButtonVisible}}
<button type="button" class="btn btn-default pull-left installer-back-btn" {{bindAttr disabled="App.router.btnClickInProgress"}} {{action back}}>
<button {{QAAttr "wizard-back"}} type="button" class="btn btn-default pull-left installer-back-btn" {{bindAttr disabled="App.router.btnClickInProgress"}} {{action back}}>
&larr; {{t common.back}}
{{#if App.router.backBtnClickInProgress}}
{{view App.SpinnerView tagName="span" classNames="service-button-spinner"}}
{{/if}}
</button>
{{/if}}
<button type="button" class="btn btn-success pull-right" {{bindAttr disabled="nextButtonDisabled"}} {{action submit target="controller"}}>
<button {{QAAttr "wizard-next"}} type="button" class="btn btn-success pull-right" {{bindAttr disabled="nextButtonDisabled"}} {{action submit target="controller"}}>
{{#if App.router.nextBtnClickInProgress}}
{{view App.SpinnerView tagName="span" classNames="service-button-spinner"}}
{{/if}}
Expand Down
2 changes: 1 addition & 1 deletion ambari-web/app/templates/common/form/dropdown.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
}}

<div class="dropdown">
<div class="dropdown" {{QAAttr "select-host-for-component"}}>
<button {{bindAttr class=":btn :btn-default :dropdown-toggle view.disabled:disabled"}} type="button" data-toggle="dropdown">
{{view App.DropdownOptionView optionBinding="view.selection" optionLabelPathBinding="view.optionLabelPath" class="selected-item"}}
<span class="caret"></span>
Expand Down
8 changes: 4 additions & 4 deletions ambari-web/app/templates/common/modal_popup.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{{! Modal header }}
<div class="modal-header">
{{#if view.showCloseButton}}
<a class="close" {{action onClose target="view"}}>&times;</a>
<a {{QAAttr "close-modal"}} class="close" {{action onClose target="view"}}>&times;</a>
{{/if}}
<h4 id="modal-label">
{{#if view.headerClass}}
Expand Down Expand Up @@ -54,15 +54,15 @@
{{else}}
<div class="modal-footer">
{{#if view.third}}
<button
<button {{QAAttr "modal-tertiary"}}
{{bindAttr disabled="view.disableThird" class=":btn view.thirdClass" id="view.thirdId"}}
{{action onThird target="view"}}>
{{view.third}}
</button>{{/if}}{{#if view.secondary}}<button
</button>{{/if}}{{#if view.secondary}}<button {{QAAttr "modal-secondary"}}
{{bindAttr disabled="view.disableSecondary" class=":btn view.secondaryClass" id="view.secondaryId"}}
{{action onSecondary target="view"}}>
{{view.secondary}}
</button>{{/if}}{{#if view.primary}}<button
</button>{{/if}}{{#if view.primary}}<button {{QAAttr "modal-primary"}}
{{bindAttr disabled="view.disablePrimary" class=":btn view.primaryClass" id="view.primaryId"}}
{{action onPrimary target="view"}}>
{{view.primary}}
Expand Down
24 changes: 12 additions & 12 deletions ambari-web/app/templates/installer.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@
<div class="wizard">
<div class="wizard-body row">
<div class="wizard-nav col-md-3">
<ul class="nav nav-pills nav-stacked">
<li {{bindAttr class="isStep0:active view.isStep0Disabled:disabled view.isStep0Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep0 target="controller"}}><i class="step-marker"><span class="step-index">0</span></i><p class="step-name">{{t installer.step0.header}}</p></a></li>
<li {{bindAttr class="isStep1:active view.isStep1Disabled:disabled view.isStep1Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep1 target="controller"}}><i class="step-marker"><span class="step-index">1</span></i><p class="step-name">{{t installer.step1.header}}</p></a></li>
<li {{bindAttr class="isStep2:active view.isStep2Disabled:disabled view.isStep2Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep2 target="controller"}}><i class="step-marker"><span class="step-index">2</span></i><p class="step-name">{{t installer.step2.header}}</p></a></li>
<li {{bindAttr class="isStep3:active view.isStep3Disabled:disabled view.isStep3Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep3 target="controller"}}><i class="step-marker"><span class="step-index">3</span></i><p class="step-name">{{t installer.step3.header}}</p></a></li>
<li {{bindAttr class="isStep4:active view.isStep4Disabled:disabled view.isStep4Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep4 target="controller"}}><i class="step-marker"><span class="step-index">4</span></i><p class="step-name">{{t installer.step4.header}}</p></a></li>
<li {{bindAttr class="isStep5:active view.isStep5Disabled:disabled view.isStep5Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep5 target="controller"}}><i class="step-marker"><span class="step-index">5</span></i><p class="step-name">{{t installer.step5.header}}</p></a></li>
<li {{bindAttr class="isStep6:active view.isStep6Disabled:disabled view.isStep6Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep6 target="controller"}}><i class="step-marker"><span class="step-index">6</span></i><p class="step-name">{{t installer.step6.header}}</p></a></li>
<li {{bindAttr class="isStep7:active view.isStep7Disabled:disabled view.isStep7Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep7 target="controller"}}><i class="step-marker"><span class="step-index">7</span></i><p class="step-name">{{t installer.step7.header}}</p></a></li>
<li {{bindAttr class="isStep8:active view.isStep8Disabled:disabled view.isStep8Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep8 target="controller"}}><i class="step-marker"><span class="step-index">8</span></i><p class="step-name">{{t installer.step8.header}}</p></a></li>
<li {{bindAttr class="isStep9:active view.isStep9Disabled:disabled view.isStep9Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep9 target="controller"}}><i class="step-marker"><span class="step-index">9</span></i><p class="step-name">{{t installer.step9.header}}</p></a></li>
<li {{bindAttr class="isStep10:active view.isStep10Disabled:disabled view.isStep10Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep10 target="controller"}}><i class="step-marker"><span class="step-index">10</span></i><p class="step-name">{{t installer.step10.header}}</p></a></li>
<ul class="nav nav-pills nav-stacked" {{QAAttr "wizard-nav"}}>
<li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep0:active view.isStep0Disabled:disabled view.isStep0Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep0 target="controller"}}><i class="step-marker"><span class="step-index">0</span></i><p class="step-name">{{t installer.step0.header}}</p></a></li>
<li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep1:active view.isStep1Disabled:disabled view.isStep1Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep1 target="controller"}}><i class="step-marker"><span class="step-index">1</span></i><p class="step-name">{{t installer.step1.header}}</p></a></li>
<li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep2:active view.isStep2Disabled:disabled view.isStep2Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep2 target="controller"}}><i class="step-marker"><span class="step-index">2</span></i><p class="step-name">{{t installer.step2.header}}</p></a></li>
<li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep3:active view.isStep3Disabled:disabled view.isStep3Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep3 target="controller"}}><i class="step-marker"><span class="step-index">3</span></i><p class="step-name">{{t installer.step3.header}}</p></a></li>
<li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep4:active view.isStep4Disabled:disabled view.isStep4Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep4 target="controller"}}><i class="step-marker"><span class="step-index">4</span></i><p class="step-name">{{t installer.step4.header}}</p></a></li>
<li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep5:active view.isStep5Disabled:disabled view.isStep5Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep5 target="controller"}}><i class="step-marker"><span class="step-index">5</span></i><p class="step-name">{{t installer.step5.header}}</p></a></li>
<li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep6:active view.isStep6Disabled:disabled view.isStep6Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep6 target="controller"}}><i class="step-marker"><span class="step-index">6</span></i><p class="step-name">{{t installer.step6.header}}</p></a></li>
<li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep7:active view.isStep7Disabled:disabled view.isStep7Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep7 target="controller"}}><i class="step-marker"><span class="step-index">7</span></i><p class="step-name">{{t installer.step7.header}}</p></a></li>
<li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep8:active view.isStep8Disabled:disabled view.isStep8Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep8 target="controller"}}><i class="step-marker"><span class="step-index">8</span></i><p class="step-name">{{t installer.step8.header}}</p></a></li>
<li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep9:active view.isStep9Disabled:disabled view.isStep9Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep9 target="controller"}}><i class="step-marker"><span class="step-index">9</span></i><p class="step-name">{{t installer.step9.header}}</p></a></li>
<li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep10:active view.isStep10Disabled:disabled view.isStep10Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep10 target="controller"}}><i class="step-marker"><span class="step-index">10</span></i><p class="step-name">{{t installer.step10.header}}</p></a></li>
</ul>
</div>
{{! outlet includes body and footer }}
Expand Down
18 changes: 9 additions & 9 deletions ambari-web/app/templates/wizard/step6.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -23,43 +23,43 @@
<div class="panel panel-default">
<div class="panel-body">
{{#if anyGeneralIssues}}
<div class="alert alert-danger">
<div class="alert alert-danger" {{QAAttr "error-message"}}>
{{t installer.step6.validationSlavesAndClients.hasIssues}}
<a href="javascript:void(null);" {{action openSlavesAndClientsIssues target="controller"}}>{{t installer.step6.validationSlavesAndClients.click}}</a>
{{t installer.step6.validationSlavesAndClients.forDetails}}
</div>
{{/if}}

<div class="pre-scrollable col-sm-12">
<table class="table table-hover" id="component_assign_table">
<table class="table table-hover" id="component_assign_table" {{QAAttr "slave-clients-table"}}>
<thead>
<tr>
<th class="host-column">{{t common.host}}</th>
{{#each header in controller.headers}}
<th {{bindAttr class="header.name"}}>
<a href="#" {{bindAttr class="header.allChecked:selected:deselected header.isDisabled:remove-link" id="header.allId"}}
<a href="#" {{QAAttr "select-all"}} {{bindAttr class="header.allChecked:selected:deselected header.isDisabled:remove-link" id="header.allId"}}
{{action "selectAllNodes" header target="controller"}}>{{t all}}</a> &nbsp;|&nbsp; <a
href="#" {{bindAttr class="header.noChecked:selected:deselected header.isDisabled:remove-link" id="header.noneId"}}
{{QAAttr "deselect-all"}} href="#" {{bindAttr class="header.noChecked:selected:deselected header.isDisabled:remove-link" id="header.noneId"}}
{{action "deselectAllNodes" header target="controller"}}>{{t none}}</a>
</th>
{{/each}}
</tr>
</thead>
<tbody>
{{#each host in view.pageContent}}
<tr>
<tr {{QAAttr "host-row"}}>
{{#view App.WizardStep6HostView hostBinding="host" }}
<div class="checkbox">
<span class="trim_hostname">{{host.hostName}}</span>
{{#if host.hasMaster}}
<i class="glyphicon glyphicon-asterisks">&#10037;</i>
<i {{QAAttr "has-masters"}} class="glyphicon glyphicon-asterisks">&#10037;</i>
{{/if}}
</div>
{{/view}}
{{#each checkbox in host.checkboxes}}
<td {{bindAttr class="checkbox.hasErrorMessage:error checkbox.hasWarnMessage:warning checkbox.component"}}>
<div class="checkbox">
<input {{bindAttr id="checkbox.uId" checked = "checkbox.checked" disabled="checkbox.isDisabled"}} {{action "checkboxClick" checkbox target="view" }}
<td {{QAAttr "toggle-component"}} {{bindAttr class="checkbox.hasErrorMessage:error checkbox.hasWarnMessage:warning checkbox.component"}}>
<div class="checkbox" {{bindAttr data-qa="checkbox.dataQaAttr"}}>
<input {{bindAttr id="checkbox.uId" checked="checkbox.checked" disabled="checkbox.isDisabled"}} {{action "checkboxClick" checkbox target="view" }}
type="checkbox"/>
<label {{bindAttr for="checkbox.uId"}}>{{checkbox.title}}</label>
</div>
Expand Down
4 changes: 4 additions & 0 deletions ambari-web/app/views/common/assign_master_components_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ App.AddControlView = Em.View.extend({

classNameBindings: ['uniqueId'],

'data-qa': 'add-master',

template: Em.Handlebars.compile('+'),

/**
Expand Down Expand Up @@ -209,6 +211,8 @@ App.RemoveControlView = Em.View.extend({

tagName: "span",

'data-qa': 'remove-master',

classNames: ["label", 'extra-component'],

template: Em.Handlebars.compile('-'),
Expand Down
1 change: 1 addition & 0 deletions ambari-web/app/views/common/modal_popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ App.ModalPopup = Ember.View.extend({
primaryId: '',
secondaryId: '',
thirdId: '',
'data-qa': 'modal',
onPrimary: function () {
this.hide();
},
Expand Down
1 change: 1 addition & 0 deletions ambari-web/app/views/common/modal_popups/alert_popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ var App = require('app');
*/
App.showAlertPopup = function (header, body, callback) {
return App.ModalPopup.show({
'data-qa': 'alert-modal',
primary: Em.I18n.t('ok'),
secondary: null,
header: header,
Expand Down
Loading

0 comments on commit 4d6c80f

Please sign in to comment.