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

kbhatt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git


The following commit(s) were added to refs/heads/master by this push:
     new 5a443e1  ATLAS-3330 UI : Some default search page elements do not 
appear under a certain condition.
5a443e1 is described below

commit 5a443e17fb81def5dd41eaf62ab0f0ee9676cc14
Author: gutkaBinit <binitgu...@gmail.com>
AuthorDate: Thu Jul 11 15:29:27 2019 +0530

    ATLAS-3330 UI : Some default search page elements do not appear under a 
certain condition.
    
    Signed-off-by: kevalbhatt <kbh...@apache.org>
---
 dashboardv2/public/css/scss/search.scss                  | 10 ++++++++++
 .../js/templates/search/SearchResultLayoutView_tmpl.html |  2 +-
 .../public/js/views/search/SearchResultLayoutView.js     | 16 +++++++---------
 3 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/dashboardv2/public/css/scss/search.scss 
b/dashboardv2/public/css/scss/search.scss
index 11c9948..34ca2be 100644
--- a/dashboardv2/public/css/scss/search.scss
+++ b/dashboardv2/public/css/scss/search.scss
@@ -226,4 +226,14 @@ hr.hr-filter {
     margin-bottom: 7px;
     border: 0;
     border-top: 1px solid #bdc3c7;
+}
+
+
+
+.searchTable{
+    &.noData{
+        
.labelShowRecord,.inline[data-id="colManager"],.row.searach-result-pagination,table
 thead{
+            display: none !important;
+        }
+    }
 }
\ No newline at end of file
diff --git 
a/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html 
b/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html
index 7874958..a58b3bb 100644
--- a/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html
+++ b/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html
@@ -75,7 +75,7 @@
                 </div>
                 {{/if}}
             </div>
-            <div class="row pagination-box" style="display: none">
+            <div class="row pagination-box searach-result-pagination" 
style="display: none">
                 <div class="col-sm-offset-4 col-sm-8">
                     <div class="inline-content-fr">
                         <div class="backgrid-paginator inline">
diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js 
b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
index 1d46339..63387da 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -70,8 +70,7 @@ define(['require',
                 showPage: "[data-id='showPage']",
                 gotoPage: "[data-id='gotoPage']",
                 gotoPagebtn: "[data-id='gotoPagebtn']",
-                activePage: "[data-id='activePage']",
-                rowData: ".row"
+                activePage: "[data-id='activePage']"
             },
             templateHelpers: function() {
                 return {
@@ -474,7 +473,9 @@ define(['require',
                         that.ui.activePage.attr('title', "Page " + 
that.activePage);
                         that.ui.activePage.text(that.activePage);
                         that.renderTableLayoutView();
-
+                        if(dataLength>0){
+                            that.$('.searchTable').removeClass('noData')
+                        }
                         if (Utils.getUrlState.isSearchTab() && value && 
!value.profileDBView) {
                             var searchString = 'Results for: <span 
class="filterQuery">' + CommonViewFunction.generateQueryOfFilter(that.value) + 
"</span>";
                             if (Globals.entityCreate && 
Globals.entityTypeConfList && Utils.getUrlState.isSearchTab()) {
@@ -531,6 +532,7 @@ define(['require',
                         Globals.searchApiCallRef = 
this.searchCollection.fetch(apiObj);
                     }
                 }
+
             },
             renderSearchQueryView: function() {
                 var that = this;
@@ -564,8 +566,7 @@ define(['require',
                     columns: columns
                 }));
                 if (table.collection.length === 0) {
-                    this.hideIrreleventElements();
-                    return;
+                    that.$(".searchTable").addClass('noData');
                 }
                 if (!that.REntityTableLayoutView) {
                     return;
@@ -826,10 +827,6 @@ define(['require',
                     }
                 });
             },
-            hideIrreleventElements: function() {
-                this.ui.rowData.siblings('.well').hide();
-                this.ui.rowData.siblings('.no-data').show();
-            },
             getDaynamicColumns: function(valueObj) {
                 var that = this,
                     col = {};
@@ -1116,6 +1113,7 @@ define(['require',
                 }
                 _.extend(this.searchCollection.queryParams, { limit: 
this.limit, offset: this.offset });
                 this.fetchCollection();
+
             },
             changePageLimit: function(e, obj) {
                 if (!obj || (obj && !obj.skipViewChange)) {

Reply via email to