This is an automated email from the ASF dual-hosted git repository.

ishanbha pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 8b8c832  [AMBARI-23066] Freeze the hostname column in Assign 
Slaves/Clients page (Install and Add Service Wizards) (#459)
8b8c832 is described below

commit 8b8c832d8edff102407ff4273eca28053ed1d750
Author: Ishan Bhatt <ishanbhatt.1...@gmail.com>
AuthorDate: Fri Feb 23 15:54:43 2018 -0800

    [AMBARI-23066] Freeze the hostname column in Assign Slaves/Clients page 
(Install and Add Service Wizards) (#459)
---
 .../app/controllers/wizard/step6_controller.js       |  6 ++++--
 ambari-web/app/styles/wizard.less                    | 20 ++++++++++++++++++++
 ambari-web/app/templates/wizard/step6.hbs            |  6 +++---
 ambari-web/app/views/wizard/step6_view.js            |  2 ++
 4 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/ambari-web/app/controllers/wizard/step6_controller.js 
b/ambari-web/app/controllers/wizard/step6_controller.js
index d726dce..eb3e2cf 100644
--- a/ambari-web/app/controllers/wizard/step6_controller.js
+++ b/ambari-web/app/controllers/wizard/step6_controller.js
@@ -381,9 +381,9 @@ App.WizardStep6Controller = 
Em.Controller.extend(App.HostComponentValidationMixi
       masterHostNamesMap = masterHostNames.toWickMap(),
       hosts = this.get('isAddHostWizard') ? this.getNewHosts() : 
this.getAllHosts();
 
+    var i = 1;
     hosts.mapProperty('hostName').forEach(function (_hostName) {
       var hasMaster = masterHostNamesMap[_hostName];
-
       var obj = {
         hostName: _hostName,
         hasMaster: hasMaster,
@@ -397,7 +397,8 @@ App.WizardStep6Controller = 
Em.Controller.extend(App.HostComponentValidationMixi
             uId: _hostName + '-checkbox-' + index,
             dataQaAttr: header.name === 'CLIENT' ? 'client-component' : ''
           };
-        })
+        }),
+        isLast: i === hosts.length ? true : false
       };
 
       if (hasMaster) {
@@ -405,6 +406,7 @@ App.WizardStep6Controller = 
Em.Controller.extend(App.HostComponentValidationMixi
       } else {
         hostsObj.pushObject(obj);
       }
+      i++;
     });
     //hosts with master components should be in the beginning of list
     hostsObj.unshift.apply(hostsObj, masterHosts);
diff --git a/ambari-web/app/styles/wizard.less 
b/ambari-web/app/styles/wizard.less
index dcf5947..4d4eeaf 100644
--- a/ambari-web/app/styles/wizard.less
+++ b/ambari-web/app/styles/wizard.less
@@ -244,7 +244,12 @@
     .pre-scrollable {
       max-height: 440px;
       position: relative;
+      display: flex;
+      overflow-y: visible;
       #component_assign_table {
+        display: inline-block;
+        overflow-x: scroll;
+        margin-left: 190px;
         tbody td, th {
           white-space: nowrap;
         }
@@ -264,6 +269,21 @@
           font-size: 12px;
           top: 0px;
         }
+        .freeze {
+          position: absolute;
+          left: 0px;
+          width: 210px;
+          border-top-color: #eee;
+          border-bottom: 1px solid #eee;
+        }
+        td.freeze {
+          padding-bottom: 11px;
+        }
+        tr.last-row {
+          td {
+            border-bottom: 2px solid #eee;
+          }
+        }
       }
     }
     .spinner-overlay {
diff --git a/ambari-web/app/templates/wizard/step6.hbs 
b/ambari-web/app/templates/wizard/step6.hbs
index ac538b6..eaeff4e 100644
--- a/ambari-web/app/templates/wizard/step6.hbs
+++ b/ambari-web/app/templates/wizard/step6.hbs
@@ -54,7 +54,7 @@
         <table class="table table-hover" id="component_assign_table" {{QAAttr 
"slave-clients-table"}}>
           <thead>
           <tr>
-            <th class="host-column">{{t common.host}}</th>
+            <th class="host-column freeze">{{t common.host}}</th>
             {{#each header in controller.headers}}
               <th {{bindAttr class="header.name"}}>
                 <a href="#" {{QAAttr "select-all"}} {{bindAttr 
class="header.allChecked:selected:deselected header.isDisabled:remove-link" 
id="header.allId"}}
@@ -67,8 +67,8 @@
           </thead>
           <tbody>
             {{#each host in view.pageContent}}
-              <tr {{QAAttr "host-row"}}>
-                {{#view App.WizardStep6HostView hostBinding="host" }}
+              <tr {{QAAttr "host-row"}} {{bindAttr 
class="host.isLast:last-row"}}>
+                  {{#view App.WizardStep6HostView hostBinding="host" }}
                   <div class="checkbox">
                     <span class="trim_hostname">{{host.hostName}}</span>
                     {{#if host.hasMaster}}
diff --git a/ambari-web/app/views/wizard/step6_view.js 
b/ambari-web/app/views/wizard/step6_view.js
index ab37245..fdd0777 100644
--- a/ambari-web/app/views/wizard/step6_view.js
+++ b/ambari-web/app/views/wizard/step6_view.js
@@ -101,6 +101,8 @@ App.WizardStep6HostView = Em.View.extend({
 
   'data-qa': 'hostname-block',
 
+  classNames: ['freeze'],
+
   tagName: 'td',
 
   /**

-- 
To stop receiving notification emails like this one, please contact
ishan...@apache.org.

Reply via email to