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 2021/01/14 10:32:54 UTC
[atlas] 01/02: Atlas-4102: UI - Atlas UI hangs When Executing
Certain Queries fixed in DSL Search.
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
commit f47334a7475cd80960c070b4b2204ea2ab3e42ca
Author: prasad pawar <pr...@freestoneinfotech.com>
AuthorDate: Wed Jan 13 23:23:54 2021 +0530
Atlas-4102: UI - Atlas UI hangs When Executing Certain Queries fixed in DSL Search.
Signed-off-by: nixonrodrigues <ni...@apache.org>
---
dashboardv2/public/js/views/search/SearchResultLayoutView.js | 8 ++++++++
dashboardv3/public/js/views/search/SearchResultLayoutView.js | 8 ++++++++
2 files changed, 16 insertions(+)
diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
index 08d8781..0e8fd94 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -564,6 +564,14 @@ define(['require',
});
var columns = new columnCollection((that.searchCollection.dynamicTable ? that.getDaynamicColumns(that.searchCollection.toJSON()) : that.getFixedDslColumn()));
columns.setPositions().sort();
+ if (this.searchType == "Advanced Search" && columns.length) {
+ //for dsl search with Select clause, default column to be use as sorting
+ var tableColumnNames = Object.keys(that.searchCollection.toJSON()[0]);
+ that.commonTableOptions['sortOpts'] = {
+ sortColumn: tableColumnNames[0],
+ sortDirection: "ascending"
+ };
+ }
var table = new TableLayout(_.extend({}, that.commonTableOptions, {
columns: columns
}));
diff --git a/dashboardv3/public/js/views/search/SearchResultLayoutView.js b/dashboardv3/public/js/views/search/SearchResultLayoutView.js
index 02d63aa..17f2e3b 100644
--- a/dashboardv3/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv3/public/js/views/search/SearchResultLayoutView.js
@@ -575,6 +575,14 @@ define(['require',
});
var columns = new columnCollection((that.searchCollection.dynamicTable ? that.getDaynamicColumns(that.searchCollection.toJSON()) : that.getFixedDslColumn()));
columns.setPositions().sort();
+ if (this.searchType == "Advanced Search" && columns.length) {
+ //for dsl search with Select clause, default column to be use as sorting
+ var tableColumnNames = Object.keys(that.searchCollection.toJSON()[0]);
+ that.commonTableOptions['sortOpts'] = {
+ sortColumn: tableColumnNames[0],
+ sortDirection: "ascending"
+ };
+ }
var table = new TableLayout(_.extend({}, that.commonTableOptions, {
columns: columns
}));