ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject ambari git commit: AMBARI-20609 Fix Install Wizard data attribute. (akovalenko)
Date Fri, 31 Mar 2017 16:28:18 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 8342abd21 -> 3dcfe53f3


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


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

Branch: refs/heads/trunk
Commit: 3dcfe53f378101998d822168f153649355e9714f
Parents: 8342abd
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Fri Mar 31 18:49:25 2017 +0300
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Fri Mar 31 19:07:47 2017 +0300

----------------------------------------------------------------------
 .../templates/common/configs/overriddenProperty.hbs |  4 ++--
 .../common/configs/service_config_category.hbs      | 16 ++++++++--------
 .../templates/common/configs/services_config.hbs    |  6 +++---
 ambari-web/app/templates/common/modal_popup.hbs     |  4 ++--
 ambari-web/app/templates/wizard/step7.hbs           |  4 ++--
 .../configs/service_configs_by_category_view.js     |  6 +++++-
 ambari-web/app/views/common/controls_view.js        |  5 ++---
 7 files changed, 24 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3dcfe53f/ambari-web/app/templates/common/configs/overriddenProperty.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/overriddenProperty.hbs b/ambari-web/app/templates/common/configs/overriddenProperty.hbs
index ff3e812..3c34d70 100644
--- a/ambari-web/app/templates/common/configs/overriddenProperty.hbs
+++ b/ambari-web/app/templates/common/configs/overriddenProperty.hbs
@@ -16,7 +16,7 @@
 * limitations under the License.
 }}
 {{! Here serviceConfigBinding should ideally be serviceConfigPropertyBinding }}
-<div {{bindAttr class="view.overriddenSCP.errorMessage:has-error: :form-group :overrideField"}}>
+<div {{bindAttr class="view.overriddenSCP.errorMessage:has-error: :form-group :overrideField"}}
{{QAAttr "override-field"}}>
   <div class="row">
     <div class="col-md-9">
       {{view view.overriddenSCP.viewClass serviceConfigBinding="view.overriddenSCP" categoryConfigsBinding="view.parentView.categoryConfigs"}}
@@ -51,7 +51,7 @@
             </a>
           {{/isAuthorized}}
           {{#if view.overriddenSCP.errorMessage}}
-            <span class="help-block validation-block pull-right">{{view.overriddenSCP.errorMessage}}</span>
+            <span class="help-block validation-block pull-right" {{QAAttr "validation-block"}}>{{view.overriddenSCP.errorMessage}}</span>
           {{/if}}
         {{else}}
           <a class="action">{{view.overriddenSCP.group.switchGroupTextShort}}</a>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dcfe53f/ambari-web/app/templates/common/configs/service_config_category.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/service_config_category.hbs b/ambari-web/app/templates/common/configs/service_config_category.hbs
index 0a4bf7f..87a716c 100644
--- a/ambari-web/app/templates/common/configs/service_config_category.hbs
+++ b/ambari-web/app/templates/common/configs/service_config_category.hbs
@@ -19,8 +19,8 @@
   <div class="panel-heading" {{action "onToggleBlock" category target="view"}}>
     <h3 class="panel-title">
       <i {{bindAttr class=":pull-right :panel-toggle view.category.isCollapsed:icon-angle-down:icon-angle-up"}}></i>
-      <a class="panel-toggle category-header">
-        <span class="category-name">{{view.category.displayName}}</span>
+      <a class="panel-toggle category-header" {{QAAttr "category-header"}}>
+        <span class="category-name" {{QAAttr "category-name"}}>{{view.category.displayName}}</span>
         {{#if view.category.errorCount}}
           <span class="badge badge-important">{{view.category.errorCount}}</span>
         {{/if}}
@@ -28,16 +28,16 @@
     </h3>
   </div>
 
-  <div class="panel-body collapse in" {{bindAttr style="view.isCategoryBodyVisible"}}>
+  <div class="panel-body collapse in" {{bindAttr style="view.isCategoryBodyVisible"}}
{{QAAttr "panel-body"}}>
   <div class="service-config-section">
     <form class="form-horizontal" autocomplete="off">
       {{#each view.categoryConfigs}}
         {{#unless widget}} {{! configs with widgets should be shown only on the EnhancedConfigs
tabs }}
-          <div {{bindAttr class=":entry-row :form-group isHiddenByFilter:hide isOverridden:overridden-property
hasCompareDiffs:overridden-property"}}>
+          <div {{bindAttr class=":entry-row :form-group isHiddenByFilter:hide isOverridden:overridden-property
hasCompareDiffs:overridden-property"}} {{QAAttr "property-row"}}>
             {{#if showLabel}}
               {{#unless rightSideLabel}}
                 <span {{bindAttr class="errorMessage:has-error: :form-group :control-label-span
:col-md-3"}}>
-                  <label class="control-label">
+                  <label class="control-label" {{QAAttr "control-label"}}>
                     {{formatWordBreak displayName}}
                     {{#if isSecureConfig}}
                       <a href="javascript:void(null);"><i class="glyphicon glyphicon-lock"
rel="tooltip" data-toggle="tooltip"
@@ -52,7 +52,7 @@
             <div class="col-md-9">
               {{! Here serviceConfigBinding should ideally be serviceConfigPropertyBinding
}}
               {{#if this.isOriginalSCP}}
-                <div {{bindAttr class="errorMessage:has-error: warnMessage:has-warning:
:form-group"}}>
+                <div {{bindAttr class="errorMessage:has-error: warnMessage:has-warning:
:form-group"}} {{QAAttr "property-form-group"}}>
                   {{view viewClass serviceConfigBinding="this" categoryConfigsAllBinding="view.categoryConfigsAll"
}}
                   {{#if rightSideLabel}}
                     <span {{bindAttr class="isEditable::muted"}}>{{formatWordBreak
displayName}}</span>
@@ -75,11 +75,11 @@
                   {{/if}}
                   {{view App.ControlsView serviceConfigPropertyBinding="this"}}
                   {{#if errorMessage}}
-                    <span class="help-block validation-block">{{errorMessage}}</span>
+                    <span class="help-block validation-block" {{QAAttr "validation-block"}}>{{errorMessage}}</span>
                   {{/if}}
                   {{#if warnMessage}}
                     <span class="has-warning">
-                      <span class="help-block validation-block">{{warnMessage}}</span>
+                      <span class="help-block validation-block" {{QAAttr "validation-block"}}>{{warnMessage}}</span>
                     </span>
                   {{/if}}
                 </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dcfe53f/ambari-web/app/templates/common/configs/services_config.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/services_config.hbs b/ambari-web/app/templates/common/configs/services_config.hbs
index d052424..914a1dc 100644
--- a/ambari-web/app/templates/common/configs/services_config.hbs
+++ b/ambari-web/app/templates/common/configs/services_config.hbs
@@ -16,14 +16,14 @@
 * limitations under the License.
 }}
 {{#if controller.isRecommendedLoaded}}
-    <ul class="nav nav-tabs">
+    <ul class="nav nav-tabs" {{QAAttr "config-tabs"}}>
       {{#each service in controller.stepConfigs}}
         {{#if service.showConfig}}
           {{#view App.ServiceConfigTab}}
               <a href="#{{unbound service.serviceName}}" {{bindAttr class=":active service.selected:new"}}
                  data-toggle="tab" {{action selectService service target="view"}}>
                 {{service.displayName}}{{#if service.errorCount}}<span
-                      class="badge badge-important">{{service.errorCount}}</span>{{/if}}</a>
+                      class="badge badge-important" {{QAAttr "error-badge"}}>{{service.errorCount}}</span>{{/if}}</a>
           {{/view}}
         {{/if}}
       {{/each}}
@@ -46,7 +46,7 @@
     <p class="loading align-center"></p>
     {{#unless controller.transitionInProgress}}
       {{#if controller.hasStepConfigIssues}}
-        <div class="alert alert-warning">
+        <div class="alert alert-warning" {{QAAttr "warning-alert"}}>
           <span class="glyphicon glyphicon-warning-sign"></span> {{t installer.step7.attentionNeeded}}<br
/>
           {{issuesFilterText}} <a href="#" {{action toggleIssuesFilter target="controller"}}>{{issuesFilterLinkText}}</a>
         </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dcfe53f/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 476d331..afc5d9f 100644
--- a/ambari-web/app/templates/common/modal_popup.hbs
+++ b/ambari-web/app/templates/common/modal_popup.hbs
@@ -18,11 +18,11 @@
 
 
 <div class="modal-backdrop in"></div>
-<div {{bindAttr class=":modal view.showFooter:with-footer:no-footer"}} id="modal" tabindex="-1"
role="dialog" aria-labelledby="modal-label" aria-hidden="true">
+<div {{bindAttr class=":modal view.showFooter:with-footer:no-footer"}} id="modal" tabindex="-1"
role="dialog" aria-labelledby="modal-label" aria-hidden="true" {{QAAttr "modal"}}>
   <div {{bindAttr class="view.modalDialogClassesStr :modal-dialog"}}>
     <div class="modal-content">
       {{! Modal header }}
-      <div class="modal-header">
+      <div class="modal-header" {{QAAttr "modal-header"}}>
         {{#if view.showCloseButton}}
           <a {{QAAttr "close-modal"}} class="close" {{action onClose target="view"}}>&times;</a>
         {{/if}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dcfe53f/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 a939e27..aecaf82 100644
--- a/ambari-web/app/templates/wizard/step7.hbs
+++ b/ambari-web/app/templates/wizard/step7.hbs
@@ -16,8 +16,8 @@
 * limitations under the License.
 }}
 
-<div id="serviceConfig" class="wizard-content col-md-9">
-  <h4 class="step-title">{{t installer.step7.header}}{{controller.finnalyLoaded}}</h4>
+<div id="serviceConfig" class="wizard-content col-md-9" {{QAAttr "service-configs"}}>
+  <h4 class="step-title" {{QAAttr "step-title"}}>{{t installer.step7.header}}{{controller.finnalyLoaded}}</h4>
   <p class="step-description">{{t installer.step7.body}}</p>
 
   <div class="panel panel-default">

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dcfe53f/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 68bf22c..16c828c 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
@@ -27,7 +27,11 @@ App.ServiceConfigsByCategoryView = Em.View.extend(App.UserPref, App.ConfigOverri
 
   classNames: ['panel-group', 'common-config-category'],
 
-  classNameBindings: ['category.name', 'isShowBlock::hidden'],
+  classNameBindings: ['isShowBlock::hidden'],
+
+  'data-qa': function () {
+    return this.get('category.name') + ' ' + 'panel-group';
+  }.property('category.name'),
 
   content: null,
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/3dcfe53f/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 da886ed..edeaf0a 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -199,15 +199,14 @@ App.WidgetValueObserver = Em.Mixin.create(App.ValueObserver, {
  * id not used in order to avoid collision with ember ids
  */
 App.ServiceConfigCalculateId = Ember.Mixin.create({
-  idClass: Ember.computed(function () {
+  'data-qa': Ember.computed(function () {
     var config = this.get('config') && this.get('config.widget') ? this.get('config')
: this.get('serviceConfig') || {};
     var label = Em.get(config, 'name') ? Em.get(config, 'name').toLowerCase().replace(/\./g,
'-') : '',
         fileName = Em.get(config, 'filename') ? Em.get(config, 'filename').toLowerCase().replace(/\./g,
'-') : '',
         group = Em.get(config, 'group.name') || 'default',
         isOrigin = Em.getWithDefault(config, 'compareConfigs.length', 0) > 0 ? '-origin'
: '';
     return 'service-config-' + label + '-' + fileName + '-' + group + isOrigin;
-  }),
-  classNameBindings: 'idClass'
+  })
 });
 
 /**


Mime
View raw message