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
c3b1bcb1
Commit
c3b1bcb1
authored
8 years ago
by
Kalyani
Committed by
Madhan Neethiraj
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1755: added checkbox to exclude deleted entities in basic and fulltext search
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
d30fa2c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
16 deletions
+24
-16
SearchResultLayoutView_tmpl.html
...blic/js/templates/search/SearchResultLayoutView_tmpl.html
+4
-0
SearchResultLayoutView.js
dashboardv2/public/js/views/search/SearchResultLayoutView.js
+20
-16
No files found.
dashboardv2/public/js/templates/search/SearchResultLayoutView_tmpl.html
View file @
c3b1bcb1
...
...
@@ -25,6 +25,10 @@
<a
href=
"javascript:void(0)"
class=
"inputAssignTag multiSelectTag assignTag btnAssign"
style=
"display:none"
data-id=
"addAssignTag"
><i
class=
"fa fa-plus"
></i>
Assign Tag
</a>
</div>
<div
class=
"searchTable"
>
<div
style=
"display: none;margin-left: 20px"
data-id=
"checkDeletedEntity"
>
<label
class=
"checkbox"
>
<input
type=
"checkbox"
class=
"input"
name=
"queryType"
value=
"text"
name=
"check"
value=
"1"
/>
Include historical entities
</label>
</div>
<span
style=
"display: none;"
class=
"labelShowRecord pull-left"
data-id=
"pageRecordText"
></span>
<div
data-id=
"paginationDiv"
style=
"display:none"
>
<ul
class=
"pager pull-right"
>
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/search/SearchResultLayoutView.js
View file @
c3b1bcb1
...
...
@@ -60,6 +60,7 @@ define(['require',
addAssignTag
:
"[data-id='addAssignTag']"
,
editEntityButton
:
"[data-id='editEntityButton']"
,
createEntity
:
"[data-id='createEntity']"
,
checkDeletedEntity
:
"[data-id='checkDeletedEntity']"
},
templateHelpers
:
function
()
{
return
{
...
...
@@ -116,6 +117,7 @@ define(['require',
events
[
"click "
+
this
.
ui
.
previousData
]
=
"onClickpreviousData"
;
events
[
"click "
+
this
.
ui
.
editEntityButton
]
=
"onClickEditEntity"
;
events
[
"click "
+
this
.
ui
.
createEntity
]
=
'onClickCreateEntity'
;
events
[
"click "
+
this
.
ui
.
checkDeletedEntity
]
=
'onCheckDeletedEntity'
;
return
events
;
},
/**
...
...
@@ -128,7 +130,6 @@ define(['require',
this
.
entityModel
=
new
VEntity
();
this
.
searchCollection
=
new
VSearchList
();
this
.
limit
=
25
;
this
.
firstFetch
=
true
;
this
.
asyncFetchCounter
=
0
;
this
.
offset
=
0
;
this
.
commonTableOptions
=
{
...
...
@@ -231,18 +232,19 @@ define(['require',
}
}
},
fetchCollection
:
function
(
value
)
{
fetchCollection
:
function
(
value
,
deleteChecked
)
{
var
that
=
this
;
this
.
showLoader
();
if
(
Globals
.
searchApiCallRef
&&
Globals
.
searchApiCallRef
.
readyState
===
1
)
{
Globals
.
searchApiCallRef
.
abort
();
}
if
(
value
&&
!
value
.
paginationChange
)
{
$
.
extend
(
this
.
searchCollection
.
queryParams
,
{
limit
:
this
.
limit
});
if
(
value
.
searchType
)
{
this
.
searchCollection
.
url
=
UrlLinks
.
searchApiUrl
(
value
.
searchType
);
$
.
extend
(
this
.
searchCollection
.
queryParams
,
{
limit
:
this
.
limit
});
if
(
deleteChecked
===
undefined
)
{
$
.
extend
(
this
.
searchCollection
.
queryParams
,
{
limit
:
this
.
limit
,
excludeDeletedEntities
:
true
});
}
this
.
offset
=
0
;
}
_
.
extend
(
this
.
searchCollection
.
queryParams
,
{
'query'
:
(
value
.
query
?
value
.
query
.
trim
()
:
null
),
'typeName'
:
value
.
type
||
null
,
'classification'
:
value
.
tag
||
null
});
...
...
@@ -281,21 +283,10 @@ define(['require',
that
.
ui
.
previousData
.
attr
(
'disabled'
,
true
);
}
if
(
that
.
searchCollection
.
models
.
length
===
0
)
{
that
.
checkTableFetch
();
that
.
offset
=
that
.
offset
-
that
.
limit
;
if
(
that
.
firstFetch
)
{
that
.
renderTableLayoutView
();
}
}
}
if
(
that
.
firstFetch
)
{
that
.
firstFetch
=
false
;
}
// checking length for not rendering the table
if
(
that
.
searchCollection
.
models
.
length
)
{
that
.
renderTableLayoutView
();
}
that
.
renderTableLayoutView
();
if
(
value
)
{
var
resultArr
=
[];
if
(
that
.
searchCollection
.
queryParams
.
typeName
)
{
...
...
@@ -326,6 +317,11 @@ define(['require',
that
.
REntityTableLayoutView
.
show
(
new
TableLayout
(
_
.
extend
({},
that
.
commonTableOptions
,
{
columns
:
columns
})));
if
(
that
.
searchCollection
.
models
.
length
&&
that
.
value
.
searchType
!==
"dsl"
)
{
that
.
ui
.
checkDeletedEntity
.
show
();
}
else
{
that
.
ui
.
checkDeletedEntity
.
hide
();
}
that
.
ui
.
paginationDiv
.
show
();
that
.
$
(
".ellipsis .inputAssignTag"
).
hide
();
that
.
renderBreadcrumb
();
...
...
@@ -656,6 +652,14 @@ define(['require',
}
});
});
},
onCheckDeletedEntity
:
function
(
e
)
{
if
(
e
.
target
.
checked
)
{
$
.
extend
(
this
.
searchCollection
.
queryParams
,
{
limit
:
this
.
limit
,
excludeDeletedEntities
:
false
});
}
else
{
$
.
extend
(
this
.
searchCollection
.
queryParams
,
{
limit
:
this
.
limit
,
excludeDeletedEntities
:
true
});
}
this
.
fetchCollection
(
this
.
value
,
e
.
target
.
checked
);
}
});
return
SearchResultLayoutView
;
...
...
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