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 2017/09/12 14:49:27 UTC

[1/2] atlas git commit: ATLAS-2128 : UI Regression : DSL Results pagination doesn't spawn more than 2 pages

Repository: atlas
Updated Branches:
  refs/heads/master 4deee50c2 -> 2acf41fd1


ATLAS-2128 : UI Regression : DSL Results pagination doesn't spawn more than 2 pages

Signed-off-by: nixonrodrigues <ni...@apache.org>


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

Branch: refs/heads/master
Commit: d603afa2708948d6d33478baf05b5adca2089149
Parents: 4deee50
Author: kevalbhatt <kb...@apache.org>
Authored: Mon Sep 11 17:02:46 2017 +0530
Committer: nixonrodrigues <ni...@apache.org>
Committed: Tue Sep 12 19:14:46 2017 +0530

----------------------------------------------------------------------
 .../js/views/search/SearchResultLayoutView.js   | 22 ++++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/d603afa2/dashboardv2/public/js/views/search/SearchResultLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
index 970d6a3..5be5f00 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -358,20 +358,20 @@ define(['require',
                 var apiObj = {
                     skipDefaultError: true,
                     sort: false,
-                    success: function(model, response) {
+                    success: function(dataOrCollection, response) {
                         Globals.searchApiCallRef = undefined;
                         if (!(that.ui.pageRecordText instanceof jQuery)) {
                             return;
                         }
-                        if (!model.entities && that.offset > that.limit) {
+                        if ((isPostMethod ? !dataOrCollection.entities : !dataOrCollection.length) && that.offset >= that.limit) {
                             that.ui.nextData.attr('disabled', true);
                             that.offset = that.offset - that.limit;
                             that.hideLoader();
                             return;
                         }
                         if (isPostMethod) {
-                            that.searchCollection.referredEntities = model.referredEntities;
-                            that.searchCollection.reset(model.entities);
+                            that.searchCollection.referredEntities = dataOrCollection.referredEntities;
+                            that.searchCollection.reset(dataOrCollection.entities);
                         }
                         if (that.searchCollection.models.length < that.limit) {
                             that.ui.nextData.attr('disabled', true);
@@ -407,11 +407,10 @@ define(['require',
                     reset: true
                 }
                 if (value) {
-                    $.extend(this.searchCollection.queryParams, { limit: this.limit, excludeDeletedEntities: (value.includeDE ? false : true) });
                     if (value.searchType) {
                         this.searchCollection.url = UrlLinks.searchApiUrl(value.searchType);
                     }
-                    _.extend(this.searchCollection.queryParams, { 'query': (value.query ? value.query.trim() : null), 'typeName': value.type || null, 'classification': value.tag || null });
+                    _.extend(this.searchCollection.queryParams, { 'limit': this.limit, 'query': (value.query ? value.query.trim() : null), 'typeName': value.type || null, 'classification': value.tag || null });
                     if (value.profileDBView && value.guid) {
                         var profileParam = {};
                         profileParam['guid'] = value.guid;
@@ -422,7 +421,9 @@ define(['require',
                     }
                     if (isPostMethod) {
                         this.searchCollection.filterObj = _.extend({}, filterObj);
-                        apiObj['data'] = _.extend({}, filterObj, _.pick(this.searchCollection.queryParams, 'query', 'excludeDeletedEntities', 'limit', 'offset', 'typeName', 'classification'))
+                        apiObj['data'] = _.extend({
+                            'excludeDeletedEntities': (this.value && this.value.includeDE ? false : true)
+                        }, filterObj, _.pick(this.searchCollection.queryParams, 'query', 'limit', 'offset', 'typeName', 'classification'))
                         Globals.searchApiCallRef = this.searchCollection.getBasicRearchResult(apiObj);
                     } else {
                         apiObj.data = null;
@@ -431,7 +432,9 @@ define(['require',
                     }
                 } else {
                     if (isPostMethod) {
-                        apiObj['data'] = _.extend({}, filterObj, _.pick(this.searchCollection.queryParams, 'query', 'excludeDeletedEntities', 'limit', 'offset', 'typeName', 'classification'));
+                        apiObj['data'] = _.extend({
+                            'excludeDeletedEntities': (this.value && this.value.includeDE ? false : true)
+                        }, filterObj, _.pick(this.searchCollection.queryParams, 'query', 'limit', 'offset', 'typeName', 'classification'));
                         Globals.searchApiCallRef = this.searchCollection.getBasicRearchResult(apiObj);
                     } else {
                         apiObj.data = null;
@@ -900,9 +903,6 @@ define(['require',
                 var includeDE = false;
                 if (e.target.checked) {
                     includeDE = true;
-                    $.extend(this.searchCollection.queryParams, { limit: this.limit, excludeDeletedEntities: false });
-                } else {
-                    $.extend(this.searchCollection.queryParams, { limit: this.limit, excludeDeletedEntities: true });
                 }
                 if (this.value) {
                     this.value.includeDE = includeDE;


[2/2] atlas git commit: ATLAS-2111 : UI: Select query is not able to render the search table in Advance search

Posted by ni...@apache.org.
ATLAS-2111 : UI: Select query is not able to render the search table in Advance search

Signed-off-by: nixonrodrigues <ni...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/2acf41fd
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/2acf41fd
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/2acf41fd

Branch: refs/heads/master
Commit: 2acf41fd1e5e3c86a9b377c407f8aee2b7be53a0
Parents: d603afa
Author: kevalbhatt <kb...@apache.org>
Authored: Wed Sep 6 14:46:05 2017 +0530
Committer: nixonrodrigues <ni...@apache.org>
Committed: Tue Sep 12 19:14:54 2017 +0530

----------------------------------------------------------------------
 dashboardv2/public/js/collection/VSearchList.js     | 16 ++++++++++++++--
 .../js/views/search/SearchResultLayoutView.js       |  2 +-
 2 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/2acf41fd/dashboardv2/public/js/collection/VSearchList.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/collection/VSearchList.js b/dashboardv2/public/js/collection/VSearchList.js
index 0a7b713..2005fe3 100644
--- a/dashboardv2/public/js/collection/VSearchList.js
+++ b/dashboardv2/public/js/collection/VSearchList.js
@@ -31,14 +31,26 @@ define(['require',
             model: VSearch,
 
             initialize: function() {
-                this.modelName = 'VSearch';
+                this.modelName = 'VSearchList';
                 this.modelAttrName = '';
             },
             parseRecords: function(resp, options) {
                 this.queryType = resp.queryType;
                 this.queryText = resp.queryText;
                 this.referredEntities = resp.referredEntities;
-                return resp.entities ? resp.entities : [];
+                if (resp.attributes) {
+                    var entities = [];
+                    _.each(resp.attributes.values, function(obj) {
+                        var temp = { attributes: {} }
+                        _.each(obj, function(val, key) {
+                            temp.attributes[resp.attributes.name[key]] = val;
+                        });
+                        entities.push(temp);
+                    });
+                    return entities;
+                } else {
+                    return resp.entities ? resp.entities : [];
+                }
             },
             getBasicRearchResult: function(options) {
                 var url = UrlLinks.searchApiUrl('basic');

http://git-wip-us.apache.org/repos/asf/atlas/blob/2acf41fd/dashboardv2/public/js/views/search/SearchResultLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
index 5be5f00..c8c83de 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -532,7 +532,7 @@ define(['require',
                             if (obj.guid) {
                                 nameHtml = '<a title="' + name + '" href="#!/detailPage/' + obj.guid + '">' + name + '</a>';
                             } else {
-                                nameHtml = '<a title="' + name + '">' + name + '</a>';
+                                nameHtml = '<span title="' + name + '">' + name + '</span>';
                             }
                             if (obj.status && Enums.entityStateReadOnly[obj.status]) {
                                 nameHtml += '<button type="button" title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>';