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
0ce149e8
Commit
0ce149e8
authored
Oct 31, 2019
by
sameer79
Committed by
nixonrodrigues
Oct 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3502 : UI : Atlas UI accepts the partial search for classifications
Signed-off-by:
nixonrodrigues
<
nixon@apache.org
>
parent
25044cee
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
7 deletions
+54
-7
Router.js
dashboardv2/public/js/router/Router.js
+19
-0
SearchLayoutView.js
dashboardv2/public/js/views/search/SearchLayoutView.js
+11
-3
Router.js
dashboardv3/public/js/router/Router.js
+20
-3
ClassificationTreeLayoutView.js
...blic/js/views/search/tree/ClassificationTreeLayoutView.js
+4
-1
No files found.
dashboardv2/public/js/router/Router.js
View file @
0ce149e8
...
...
@@ -308,6 +308,25 @@ define([
'views/search/SearchDetailLayoutView'
],
function
(
Header
,
SideNavLayoutView
,
SearchDetailLayoutView
)
{
var
paramObj
=
Utils
.
getUrlState
.
getQueryParams
();
if
(
paramObj
.
tag
)
{
var
tagValidate
=
paramObj
.
tag
,
isTagPresent
=
false
;
if
((
tagValidate
.
indexOf
(
'*'
)
==
-
1
))
{
classificationDefCollection
.
fullCollection
.
each
(
function
(
model
)
{
var
name
=
Utils
.
getName
(
model
.
toJSON
(),
'name'
);
if
(
model
.
get
(
'category'
)
==
'CLASSIFICATION'
)
{
if
(
tagValidate
)
{
if
(
name
===
tagValidate
)
{
isTagPresent
=
true
;
}
}
}
});
if
(
!
isTagPresent
)
{
paramObj
.
tag
=
null
;
}
}
}
var
isinitialView
=
true
,
isTypeTagNotExists
=
false
,
tempParam
=
_
.
extend
({},
paramObj
);
...
...
dashboardv2/public/js/views/search/SearchLayoutView.js
View file @
0ce149e8
...
...
@@ -521,7 +521,16 @@ define(['require',
this
.
ui
.
tagLov
.
select2
({
placeholder
:
"Select Classification"
,
allowClear
:
true
,
tags
:
true
tags
:
true
,
createTag
:
function
(
tag
)
{
if
(
tag
.
term
.
indexOf
(
'*'
)
!=
-
1
)
{
return
{
id
:
tag
.
term
,
text
:
tag
.
term
,
isNew
:
true
};
}
}
});
}
that
.
ui
.
typeLov
.
html
(
typeStr
);
...
...
@@ -769,4 +778,4 @@ define(['require',
}
});
return
SearchLayoutView
;
});
\ No newline at end of file
});
dashboardv3/public/js/router/Router.js
View file @
0ce149e8
...
...
@@ -286,6 +286,24 @@ define([
if
(
paramObj
.
tagFilters
)
{
paramObj
.
tagFilters
=
null
;
}
}
else
{
var
tagValidate
=
paramObj
.
tag
,
isTagPresent
=
false
;
if
((
tagValidate
.
indexOf
(
'*'
)
==
-
1
))
{
classificationDefCollection
.
fullCollection
.
each
(
function
(
model
)
{
var
name
=
Utils
.
getName
(
model
.
toJSON
(),
'name'
);
if
(
model
.
get
(
'category'
)
==
'CLASSIFICATION'
)
{
if
(
tagValidate
)
{
if
(
name
===
tagValidate
)
{
isTagPresent
=
true
;
}
}
}
});
if
(
!
isTagPresent
)
{
paramObj
.
tag
=
null
;
}
}
}
}
...
...
@@ -447,7 +465,7 @@ define([
// 'value': paramObj
// }, that.preFetchedCollectionLists, that.sharedObj)
// );
// }
// }
// });
that
.
renderViewIfNotExists
({
...
...
@@ -581,4 +599,4 @@ define([
}
});
return
AppRouter
;
});
\ No newline at end of file
});
dashboardv3/public/js/views/search/tree/ClassificationTreeLayoutView.js
View file @
0ce149e8
...
...
@@ -114,7 +114,10 @@ define([
}
if
(
code
==
13
)
{
var
tagValue
=
this
.
ui
.
wildCardValue
.
val
();
that
.
findSearchResult
(
tagValue
);
if
(
tagValue
.
indexOf
(
"*"
)
!=
-
1
){
that
.
findSearchResult
(
tagValue
);
}
}
};
...
...
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