Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
c572e541
Commit
c572e541
authored
Mar 05, 2017
by
kevalbhatt
Committed by
Madhan Neethiraj
Mar 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1608: search UI improvement (queryParam change from type -> typeName)
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
bcc138ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
SearchResultLayoutView.js
dashboardv2/public/js/views/search/SearchResultLayoutView.js
+1
-1
DiscoveryREST.java
...rc/main/java/org/apache/atlas/web/rest/DiscoveryREST.java
+11
-11
No files found.
dashboardv2/public/js/views/search/SearchResultLayoutView.js
View file @
c572e541
...
...
@@ -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
,
'type
Name
'
:
value
.
type
||
null
,
'classification'
:
value
.
tag
||
null
});
}
Globals
.
searchApiCallRef
=
this
.
searchCollection
.
fetch
({
skipDefaultError
:
true
,
...
...
webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java
View file @
c572e541
...
...
@@ -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 type
Name
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
typ
e
,
@QueryParam
(
"type
Name"
)
String
typeNam
e
,
@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
+
","
+
type
Name
+
","
+
classification
+
","
+
limit
+
","
+
offset
+
")"
);
}
String
queryStr
=
query
==
null
?
""
:
query
;
if
(
StringUtils
.
isNoneEmpty
(
type
))
{
queryStr
=
type
+
" "
+
queryStr
;
if
(
StringUtils
.
isNoneEmpty
(
type
Name
))
{
queryStr
=
type
Name
+
" "
+
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 type
Name
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
typ
e
,
@QueryParam
(
"type
Name"
)
String
typeNam
e
,
@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
,
type
Name
,
classification
,
limit
,
offset
);
}
finally
{
AtlasPerfTracer
.
log
(
perf
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment