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
4fe70de8
Commit
4fe70de8
authored
7 years ago
by
kevalbhatt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2188 : UI can trim whitespaces at the beginning or end of search query
parent
dd7eb14e
master
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
CommonViewFunction.js
dashboardv2/public/js/utils/CommonViewFunction.js
+4
-4
Overrides.js
dashboardv2/public/js/utils/Overrides.js
+7
-0
SearchResultLayoutView.js
dashboardv2/public/js/views/search/SearchResultLayoutView.js
+1
-1
No files found.
dashboardv2/public/js/utils/CommonViewFunction.js
View file @
4fe70de8
...
...
@@ -409,7 +409,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
queryArray
.
push
(
tagKeyValue
);
}
if
(
value
.
query
)
{
queryArray
.
push
(
'<span class="key">Query:</span> <span class="value">'
+
_
.
escape
(
value
.
query
)
+
'</span> '
);
queryArray
.
push
(
'<span class="key">Query:</span> <span class="value">'
+
_
.
trim
(
_
.
escape
(
value
.
query
)
)
+
'</span> '
);
}
if
(
queryArray
.
length
==
1
)
{
return
queryArray
.
join
();
...
...
@@ -544,7 +544,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
var
attrQuery
=
[];
if
(
attrObj
)
{
_
.
each
(
attrObj
,
function
(
obj
)
{
var
url
=
[(
obj
.
id
||
obj
.
attributeName
),
mapApiOperatorToUI
(
obj
.
operator
),
(
obj
.
value
||
obj
.
attributeValue
)],
var
url
=
[(
obj
.
id
||
obj
.
attributeName
),
mapApiOperatorToUI
(
obj
.
operator
),
_
.
trim
(
obj
.
value
||
obj
.
attributeValue
)],
type
=
(
obj
.
type
||
obj
.
attributeType
);
if
(
type
)
{
url
.
push
(
type
);
...
...
@@ -588,7 +588,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
if
(
urlObj
&&
urlObj
.
length
)
{
_
.
each
(
urlObj
.
split
(
","
),
function
(
obj
)
{
var
temp
=
obj
.
split
(
"::"
);
var
finalObj
=
{
id
:
temp
[
0
],
operator
:
temp
[
1
],
value
:
temp
[
2
]
}
var
finalObj
=
{
id
:
temp
[
0
],
operator
:
temp
[
1
],
value
:
_
.
trim
(
temp
[
2
])
}
if
(
temp
[
3
])
{
finalObj
[
'type'
]
=
temp
[
3
];
}
...
...
@@ -617,7 +617,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
tempObj
=
{
"attributeName"
:
rulObj
.
id
,
"operator"
:
mapUiOperatorToAPI
(
rulObj
.
operator
),
"attributeValue"
:
(
rulObj
.
type
===
"date"
?
Date
.
parse
(
rulObj
.
value
)
:
rulObj
.
value
)
"attributeValue"
:
_
.
trim
(
rulObj
.
type
===
"date"
?
Date
.
parse
(
rulObj
.
value
)
:
rulObj
.
value
)
}
convertObj
.
push
(
tempObj
);
});
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/utils/Overrides.js
View file @
4fe70de8
...
...
@@ -54,6 +54,13 @@ define(['require', 'utils/Utils', 'marionette', 'backgrid', 'asBreadcrumbs', 'jq
}
else
{
return
false
;
}
},
trim
:
function
(
val
)
{
if
(
val
&&
val
.
trim
)
{
return
val
.
trim
();
}
else
{
return
val
;
}
}
});
var
getPopoverEl
=
function
(
e
)
{
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/search/SearchResultLayoutView.js
View file @
4fe70de8
...
...
@@ -467,7 +467,7 @@ define(['require',
if
(
value
.
searchType
)
{
this
.
searchCollection
.
url
=
UrlLinks
.
searchApiUrl
(
value
.
searchType
);
}
_
.
extend
(
this
.
searchCollection
.
queryParams
,
{
'limit'
:
this
.
limit
,
'offset'
:
this
.
offset
,
'query'
:
(
value
.
query
?
value
.
query
.
trim
()
:
null
),
'typeName'
:
value
.
type
||
null
,
'classification'
:
value
.
tag
||
null
});
_
.
extend
(
this
.
searchCollection
.
queryParams
,
{
'limit'
:
this
.
limit
,
'offset'
:
this
.
offset
,
'query'
:
_
.
trim
(
value
.
query
),
'typeName'
:
value
.
type
||
null
,
'classification'
:
value
.
tag
||
null
});
if
(
value
.
profileDBView
&&
value
.
guid
)
{
var
profileParam
=
{};
profileParam
[
'guid'
]
=
value
.
guid
;
...
...
This diff is collapsed.
Click to expand it.
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