Repository: incubator-atlas Updated Branches: refs/heads/master bcc138ac6 -> c572e5412
ATLAS-1608: search UI improvement (queryParam change from type -> typeName) Signed-off-by: Madhan Neethiraj <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/c572e541 Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/c572e541 Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/c572e541 Branch: refs/heads/master Commit: c572e54120b79bd362d6d4e78490277ce2741b8e Parents: bcc138a Author: kevalbhatt <[email protected]> Authored: Sun Mar 5 11:01:35 2017 +0530 Committer: Madhan Neethiraj <[email protected]> Committed: Sat Mar 4 23:08:45 2017 -0800 ---------------------------------------------------------------------- .../js/views/search/SearchResultLayoutView.js | 2 +- .../apache/atlas/web/rest/DiscoveryREST.java | 22 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/c572e541/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 46c3229..0cee90f 100644 --- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js +++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js @@ -238,7 +238,7 @@ define(['require', if (Utils.getUrlState.isTagTab()) { this.searchCollection.url = UrlLinks.searchApiUrl(Enums.searchUrlType.DSL); } - _.extend(this.searchCollection.queryParams, { 'query': value.query.trim() || null, 'type': value.type || null, 'classification': value.tag || null }); + _.extend(this.searchCollection.queryParams, { 'query': value.query.trim() || null, 'typeName': value.type || null, 'classification': value.tag || null }); } Globals.searchApiCallRef = this.searchCollection.fetch({ skipDefaultError: true, http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/c572e541/webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ---------------------------------------------------------------------- diff --git a/webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java b/webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java index 4801b5e..61f9847 100644 --- a/webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java +++ b/webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java @@ -51,7 +51,7 @@ public class DiscoveryREST { /** * Retrieve data for the specified DSL * @param query DSL query - * @param type limit the result to only entities of specified type or its sub-types + * @param typeName limit the result to only entities of specified type or its sub-types * @param classification limit the result to only entities tagged with the given classification or or its sub-types * @param limit limit the result set to only include the specified number of entries * @param offset start offset of the result set (useful for pagination) @@ -66,7 +66,7 @@ public class DiscoveryREST { @Consumes(Servlets.JSON_MEDIA_TYPE) @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasSearchResult searchUsingDSL(@QueryParam("query") String query, - @QueryParam("type") String type, + @QueryParam("typeName") String typeName, @QueryParam("classification") String classification, @QueryParam("limit") int limit, @QueryParam("offset") int offset) throws AtlasBaseException { @@ -74,14 +74,14 @@ public class DiscoveryREST { try { if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) { - perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "DiscoveryREST.searchUsingDSL(" + query + "," + type + - "," + classification + "," + limit + "," + offset + ")"); + perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "DiscoveryREST.searchUsingDSL(" + query + "," + typeName + + "," + classification + "," + limit + "," + offset + ")"); } String queryStr = query == null ? "" : query; - if (StringUtils.isNoneEmpty(type)) { - queryStr = type + " " + queryStr; + if (StringUtils.isNoneEmpty(typeName)) { + queryStr = typeName + " " + queryStr; } if (StringUtils.isNoneEmpty(classification)) { @@ -132,7 +132,7 @@ public class DiscoveryREST { /** * Retrieve data for the specified fulltext query * @param query Fulltext query - * @param type limit the result to only entities of specified type or its sub-types + * @param typeName limit the result to only entities of specified type or its sub-types * @param classification limit the result to only entities tagged with the given classification or or its sub-types * @param limit limit the result set to only include the specified number of entries * @param offset start offset of the result set (useful for pagination) @@ -147,7 +147,7 @@ public class DiscoveryREST { @Consumes(Servlets.JSON_MEDIA_TYPE) @Produces(Servlets.JSON_MEDIA_TYPE) public AtlasSearchResult searchUsingBasic(@QueryParam("query") String query, - @QueryParam("type") String type, + @QueryParam("typeName") String typeName, @QueryParam("classification") String classification, @QueryParam("limit") int limit, @QueryParam("offset") int offset) throws AtlasBaseException { @@ -155,11 +155,11 @@ public class DiscoveryREST { try { if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) { - perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "DiscoveryREST.searchUsingBasic(" + query + "," + type + - "," + classification + "," + limit + "," + offset + ")"); + perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "DiscoveryREST.searchUsingBasic(" + query + "," + + typeName + "," + classification + "," + limit + "," + offset + ")"); } - return atlasDiscoveryService.searchUsingBasicQuery(query, type, classification, limit, offset); + return atlasDiscoveryService.searchUsingBasicQuery(query, typeName, classification, limit, offset); } finally { AtlasPerfTracer.log(perf); }
