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
97ae3a3c
Commit
97ae3a3c
authored
Aug 23, 2017
by
kevalbhatt
Committed by
Madhan Neethiraj
Aug 23, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2080: fix - tag filters should not be added in the results attributes list
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
024fd221
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
34 deletions
+38
-34
SearchLayoutView.js
dashboardv2/public/js/views/search/SearchLayoutView.js
+13
-10
SearchResultLayoutView.js
dashboardv2/public/js/views/search/SearchResultLayoutView.js
+2
-2
TagLayoutView.js
dashboardv2/public/js/views/tag/TagLayoutView.js
+23
-22
No files found.
dashboardv2/public/js/views/search/SearchLayoutView.js
View file @
97ae3a3c
...
...
@@ -297,7 +297,7 @@ define(['require',
var
ruleUrl
=
CommonViewFunction
.
attributeFilter
.
generateUrl
(
rule
.
rules
);
this
.
searchTableFilters
[
filtertype
][(
isTag
?
this
.
value
.
tag
:
this
.
value
.
type
)]
=
ruleUrl
;
this
.
makeFilterButtonActive
(
filtertype
);
if
(
this
.
valu
e
&&
this
.
searchTableColumns
)
{
if
(
!
isTag
&&
this
.
value
&&
this
.
value
.
typ
e
&&
this
.
searchTableColumns
)
{
if
(
!
this
.
searchTableColumns
[
this
.
value
.
type
])
{
this
.
searchTableColumns
[
this
.
value
.
type
]
=
[
"selected"
,
"name"
,
"owner"
,
"description"
,
"tag"
,
"typeName"
]
}
...
...
@@ -344,9 +344,13 @@ define(['require',
}
if
(
this
.
value
)
{
if
(
this
.
value
.
dslChecked
==
"true"
)
{
this
.
ui
.
searchType
.
prop
(
"checked"
,
true
).
trigger
(
"change"
);
if
(
!
this
.
ui
.
searchType
.
prop
(
"checked"
))
{
this
.
ui
.
searchType
.
prop
(
"checked"
,
true
).
trigger
(
"change"
);
}
}
else
{
this
.
ui
.
searchType
.
prop
(
"checked"
,
false
).
trigger
(
"change"
);
if
(
this
.
ui
.
searchType
.
prop
(
"checked"
))
{
this
.
ui
.
searchType
.
prop
(
"checked"
,
false
).
trigger
(
"change"
);
}
}
this
.
ui
.
typeLov
.
val
(
this
.
value
.
type
);
if
(
this
.
ui
.
typeLov
.
data
(
'select2'
))
{
...
...
@@ -385,7 +389,9 @@ define(['require',
searchType
:
this
.
type
,
dslChecked
:
this
.
ui
.
searchType
.
is
(
':checked'
),
tagFilters
:
null
,
entityFilters
:
null
entityFilters
:
null
,
attributes
:
null
,
includeDE
:
null
}
this
.
query
[
this
.
type
].
type
=
this
.
ui
.
typeLov
.
select2
(
'val'
)
||
null
;
if
(
!
this
.
dsl
)
{
...
...
@@ -398,15 +404,12 @@ define(['require',
if
(
this
.
value
.
type
)
{
params
[
'entityFilters'
]
=
entityFilterObj
[
this
.
value
.
type
]
}
}
if
(
this
.
dsl
)
{
params
[
'attributes'
]
=
null
;
}
else
{
var
columnList
=
this
.
value
&&
this
.
value
.
type
&&
this
.
searchTableColumns
?
this
.
searchTableColumns
[
this
.
value
.
type
]
:
null
;
if
(
columnList
)
{
params
[
'attributes'
]
=
columnList
.
join
(
','
);
}
else
{
params
[
'attributes'
]
=
null
;
}
if
(
this
.
value
.
includeDE
)
{
params
[
'includeDE'
]
=
this
.
value
.
includeDE
}
}
...
...
dashboardv2/public/js/views/search/SearchResultLayoutView.js
View file @
97ae3a3c
...
...
@@ -294,7 +294,7 @@ define(['require',
});
listOfColumns
=
_
.
sortBy
(
listOfColumns
);
this
.
value
.
attributes
=
listOfColumns
.
length
?
listOfColumns
.
join
(
","
)
:
null
;
if
(
this
.
value
&&
this
.
searchTableColumns
)
{
if
(
this
.
value
&&
this
.
value
.
type
&&
this
.
searchTableColumns
)
{
this
.
searchTableColumns
[
this
.
value
.
type
]
=
listOfColumns
.
length
?
listOfColumns
:
null
;
}
}
else
if
(
this
.
value
&&
this
.
value
.
type
&&
this
.
searchTableColumns
&&
this
.
value
.
attributes
)
{
...
...
@@ -343,7 +343,7 @@ define(['require',
tagFilters
=
CommonViewFunction
.
attributeFilter
.
generateAPIObj
(
this
.
value
.
tagFilters
),
entityFilters
=
CommonViewFunction
.
attributeFilter
.
generateAPIObj
(
this
.
value
.
entityFilters
);
if
(
isPostMethod
)
{
var
excludeDefaultColumn
=
this
.
searchTableColumns
?
_
.
without
(
this
.
searchTableColumns
[
this
.
value
.
type
],
"selected"
,
"name"
,
"description"
,
"typeName"
,
"owner"
,
"tag"
,
"terms"
)
:
null
,
var
excludeDefaultColumn
=
this
.
value
.
type
&&
this
.
searchTableColumns
?
_
.
without
(
this
.
searchTableColumns
[
this
.
value
.
type
],
"selected"
,
"name"
,
"description"
,
"typeName"
,
"owner"
,
"tag"
,
"terms"
)
:
null
,
filterObj
=
{
'entityFilters'
:
entityFilters
,
'tagFilters'
:
tagFilters
,
...
...
dashboardv2/public/js/views/tag/TagLayoutView.js
View file @
97ae3a3c
...
...
@@ -73,7 +73,7 @@ define(['require',
onRender
:
function
()
{
var
that
=
this
;
this
.
bindEvents
();
this
.
fetchCollections
();
this
.
tagsGenerator
();
$
(
'body'
).
on
(
"click"
,
'.tagPopoverList li'
,
function
(
e
)
{
that
[
$
(
this
).
find
(
"a"
).
data
(
'fn'
)](
e
);
});
...
...
@@ -148,31 +148,32 @@ define(['require',
}
},
tagsGenerator
:
function
(
searchString
)
{
var
that
=
this
,
str
=
''
;
that
.
collection
.
fullCollection
.
comparator
=
function
(
model
)
{
return
Utils
.
getName
(
model
.
toJSON
(),
'name'
).
toLowerCase
();
};
that
.
collection
.
fullCollection
.
sort
().
each
(
function
(
model
)
{
var
name
=
Utils
.
getName
(
model
.
toJSON
(),
'name'
);
var
checkTagOrTerm
=
Utils
.
checkTagOrTerm
(
name
);
if
(
checkTagOrTerm
.
tag
)
{
if
(
searchString
)
{
if
(
name
.
search
(
new
RegExp
(
searchString
,
"i"
))
!=
-
1
)
{
str
+=
'<li class="parent-node" data-id="tags"><div class="tools"><i class="fa fa-ellipsis-h tagPopover"></i></div><a href="#!/tag/tagAttribute/'
+
name
+
'" data-name="'
+
name
+
'" >'
+
name
+
'</a></li>'
;
var
str
=
''
;
if
(
this
.
collection
&&
this
.
collection
.
fullCollection
.
length
)
{
this
.
collection
.
fullCollection
.
comparator
=
function
(
model
)
{
return
Utils
.
getName
(
model
.
toJSON
(),
'name'
).
toLowerCase
();
};
this
.
collection
.
fullCollection
.
sort
().
each
(
function
(
model
)
{
var
name
=
Utils
.
getName
(
model
.
toJSON
(),
'name'
);
var
checkTagOrTerm
=
Utils
.
checkTagOrTerm
(
name
);
if
(
checkTagOrTerm
.
tag
)
{
if
(
searchString
)
{
if
(
name
.
search
(
new
RegExp
(
searchString
,
"i"
))
!=
-
1
)
{
str
+=
'<li class="parent-node" data-id="tags"><div class="tools"><i class="fa fa-ellipsis-h tagPopover"></i></div><a href="#!/tag/tagAttribute/'
+
name
+
'" data-name="'
+
name
+
'" >'
+
name
+
'</a></li>'
;
}
else
{
return
;
}
}
else
{
return
;
str
+=
'<li class="parent-node" data-id="tags"><div class="tools"><i class="fa fa-ellipsis-h tagPopover"></i></div><a href="#!/tag/tagAttribute/'
+
name
+
'" data-name="'
+
name
+
'">'
+
name
+
'</a></li>'
;
}
}
else
{
str
+=
'<li class="parent-node" data-id="tags"><div class="tools"><i class="fa fa-ellipsis-h tagPopover"></i></div><a href="#!/tag/tagAttribute/'
+
name
+
'" data-name="'
+
name
+
'">'
+
name
+
'</a></li>'
;
}
});
this
.
ui
.
tagsParent
.
empty
().
html
(
str
);
this
.
setValues
();
this
.
createTagAction
();
if
(
this
.
createTag
)
{
this
.
createTag
=
false
;
}
});
this
.
ui
.
tagsParent
.
empty
().
html
(
str
);
this
.
setValues
();
this
.
createTagAction
();
if
(
this
.
createTag
)
{
this
.
createTag
=
false
;
}
},
onClickCreateTag
:
function
(
e
)
{
...
...
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