You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ni...@apache.org on 2019/06/06 12:21:25 UTC
[atlas] branch master updated: ATLAS-3247 UI:Search page showing
unnecessary UI elements when no records are found.
This is an automated email from the ASF dual-hosted git repository.
nixon 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 ab8b756 ATLAS-3247 UI:Search page showing unnecessary UI elements when no records are found.
ab8b756 is described below
commit ab8b75640d5a7c28b1d048a569c43d9192a024de
Author: gutkaBinit <bi...@gmail.com>
AuthorDate: Wed Jun 5 14:00:41 2019 +0530
ATLAS-3247 UI:Search page showing unnecessary UI elements when no records are found.
---
.../js/templates/search/SearchResultLayoutView_tmpl.html | 13 +++++++++++++
.../public/js/views/search/SearchResultLayoutView.js | 11 ++++++++++-
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html b/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html
index d287ac9..1f6fb3c 100644
--- a/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html
+++ b/dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html
@@ -23,6 +23,19 @@
<div class="ellipsis" style="display: none;"><span class="searchResult" style=" font-size: 16px;"></span>
</div>
<div class="searchTable">
+ <div class="row no-data" style="display: none;">
+ <div class="position-relative thick-border">
+ <div style="padding-top: 20px; " class="table-responsive tableBorder">
+ <table class="table table-hover backgrid table-quickMenu">
+ <tbody>
+ <tr class="empty">
+ <td colspan="16"><span>No Records found!</span></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
<div class="{{#unless isGlossaryView}}row well{{/unless}}" style="padding-top: 0px;">
<div class="row form-group pagination-box filter-box" style="display: none;">
<div class="col-sm-3">
diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
index 50dbbb7..683ea5c 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -70,7 +70,8 @@ define(['require',
showPage: "[data-id='showPage']",
gotoPage: "[data-id='gotoPage']",
gotoPagebtn: "[data-id='gotoPagebtn']",
- activePage: "[data-id='activePage']"
+ activePage: "[data-id='activePage']",
+ rowData: ".row"
},
templateHelpers: function() {
return {
@@ -561,6 +562,10 @@ define(['require',
var table = new TableLayout(_.extend({}, that.commonTableOptions, {
columns: columns
}));
+ if (table.collection.length === 0) {
+ this.hideIrreleventElements();
+ return;
+ }
if (!that.REntityTableLayoutView) {
return;
}
@@ -792,6 +797,10 @@ define(['require',
}
return this.searchCollection.constructor.getTableCols(col, this.searchCollection);
},
+ hideIrreleventElements: function() {
+ this.ui.rowData.siblings('.well').hide();
+ this.ui.rowData.siblings('.no-data').show();
+ },
getDaynamicColumns: function(valueObj) {
var that = this,
col = {};