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
9ca6136e
Commit
9ca6136e
authored
8 years ago
by
kevalbhatt
Committed by
Madhan Neethiraj
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1658: UI updates to fix incorrect terms display in search results and detail pages
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
d0f2ce5e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
+17
-8
CommonViewFunction.js
dashboardv2/public/js/utils/CommonViewFunction.js
+5
-3
Utils.js
dashboardv2/public/js/utils/Utils.js
+8
-0
DetailPageLayoutView.js
...ardv2/public/js/views/detail_page/DetailPageLayoutView.js
+4
-5
No files found.
dashboardv2/public/js/utils/CommonViewFunction.js
View file @
9ca6136e
...
@@ -307,7 +307,8 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -307,7 +307,8 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
entityName
=
Utils
.
getName
(
obj
);
entityName
=
Utils
.
getName
(
obj
);
if
(
traits
)
{
if
(
traits
)
{
traits
.
map
(
function
(
term
)
{
traits
.
map
(
function
(
term
)
{
if
(
term
.
split
(
"."
).
length
>
1
)
{
var
checkTagOrTerm
=
Utils
.
checkTagOrTerm
(
term
);
if
(
checkTagOrTerm
.
term
)
{
terms
.
push
({
terms
.
push
({
deleteHtml
:
'<a class="pull-left" title="Remove Term"><i class="fa fa-trash" data-id="tagClick" data-type="term" data-assetname="'
+
entityName
+
'" data-name="'
+
term
+
'" data-guid="'
+
obj
.
guid
+
'" ></i></a>'
,
deleteHtml
:
'<a class="pull-left" title="Remove Term"><i class="fa fa-trash" data-id="tagClick" data-type="term" data-assetname="'
+
entityName
+
'" data-name="'
+
term
+
'" data-guid="'
+
obj
.
guid
+
'" ></i></a>'
,
url
:
_
.
unescape
(
term
).
split
(
"."
).
join
(
"/"
),
url
:
_
.
unescape
(
term
).
split
(
"."
).
join
(
"/"
),
...
@@ -322,7 +323,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -322,7 +323,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
className
+=
"showHideDiv hide"
;
className
+=
"showHideDiv hide"
;
}
}
obj
[
'valueUrl'
]
=
CommonViewFunction
.
breadcrumbUrlMaker
(
obj
.
url
);
obj
[
'valueUrl'
]
=
CommonViewFunction
.
breadcrumbUrlMaker
(
obj
.
url
);
html
+=
'<div class="'
+
className
+
'" dataterm-name="'
+
entityN
ame
+
'"><div class="liContent"></div>'
+
obj
.
deleteHtml
+
'</div>'
;
html
+=
'<div class="'
+
className
+
'" dataterm-name="'
+
obj
.
n
ame
+
'"><div class="liContent"></div>'
+
obj
.
deleteHtml
+
'</div>'
;
})
})
if
(
terms
.
length
>
1
)
{
if
(
terms
.
length
>
1
)
{
html
+=
'<div><a href="javascript:void(0)" data-id="showMoreLessTerm" class="inputTag inputTagGreen"><span>Show More </span><i class="fa fa-angle-right"></i></a></div>'
html
+=
'<div><a href="javascript:void(0)" data-id="showMoreLessTerm" class="inputTag inputTagGreen"><span>Show More </span><i class="fa fa-angle-right"></i></a></div>'
...
@@ -349,7 +350,8 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -349,7 +350,8 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
entityName
=
Utils
.
getName
(
obj
);
entityName
=
Utils
.
getName
(
obj
);
if
(
traits
)
{
if
(
traits
)
{
traits
.
map
(
function
(
tag
)
{
traits
.
map
(
function
(
tag
)
{
if
(
tag
.
split
(
"."
).
length
===
1
)
{
var
checkTagOrTerm
=
Utils
.
checkTagOrTerm
(
tag
);
if
(
checkTagOrTerm
.
tag
)
{
var
className
=
"inputTag"
;
var
className
=
"inputTag"
;
if
(
count
>=
1
)
{
if
(
count
>=
1
)
{
popTag
+=
'<a class="'
+
className
+
'" data-id="tagClick"><span class="inputValue">'
+
tag
+
'</span><i class="fa fa-times" data-id="delete" data-assetname="'
+
entityName
+
'"data-name="'
+
tag
+
'" data-type="tag" data-guid="'
+
obj
.
guid
+
'" ></i></a>'
;
popTag
+=
'<a class="'
+
className
+
'" data-id="tagClick"><span class="inputValue">'
+
tag
+
'</span><i class="fa fa-times" data-id="delete" data-assetname="'
+
entityName
+
'"data-name="'
+
tag
+
'" data-type="tag" data-guid="'
+
obj
.
guid
+
'" ></i></a>'
;
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/utils/Utils.js
View file @
9ca6136e
...
@@ -295,6 +295,11 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'pnotify.button
...
@@ -295,6 +295,11 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'pnotify.button
fullName
:
value
fullName
:
value
}
}
}
}
if
(
value
&&
_
.
isString
(
value
))
{
value
=
{
typeName
:
value
}
}
if
(
_
.
isObject
(
value
))
{
if
(
_
.
isObject
(
value
))
{
var
name
=
""
;
var
name
=
""
;
if
(
value
&&
value
.
$typeName$
)
{
if
(
value
&&
value
.
$typeName$
)
{
...
@@ -306,11 +311,14 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'pnotify.button
...
@@ -306,11 +311,14 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'pnotify.button
return
{}
return
{}
}
}
name
=
_
.
escape
(
name
).
split
(
'.'
);
name
=
_
.
escape
(
name
).
split
(
'.'
);
var
trem
=
false
;
var
trem
=
false
;
if
(
value
[
'taxonomy.namespace'
])
{
if
(
value
[
'taxonomy.namespace'
])
{
trem
=
true
;
trem
=
true
;
}
else
if
(
value
.
values
&&
value
.
values
[
'taxonomy.namespace'
])
{
}
else
if
(
value
.
values
&&
value
.
values
[
'taxonomy.namespace'
])
{
trem
=
true
;
trem
=
true
;
}
else
if
(
name
.
length
>
1
)
{
trem
=
true
;
// Temp fix
}
}
if
(
trem
)
{
if
(
trem
)
{
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
View file @
9ca6136e
...
@@ -247,12 +247,11 @@ define(['require',
...
@@ -247,12 +247,11 @@ define(['require',
termData
=
""
;
termData
=
""
;
_
.
each
(
tagObject
,
function
(
val
)
{
_
.
each
(
tagObject
,
function
(
val
)
{
//var isTerm = Utils.checkTagOrTerm(val);
var
checkTagOrTerm
=
Utils
.
checkTagOrTerm
(
val
);
if
(
val
.
typeName
&&
val
.
typeName
.
split
(
'.'
).
length
===
1
)
{
if
(
checkTagOrTerm
.
term
)
{
tagData
+=
'<span class="inputTag" data-id="tagClick"><span class="inputValue">'
+
val
.
typeName
+
'</span><i class="fa fa-close" data-id="deleteTag" data-type="tag"></i></span>'
;
}
if
(
val
.
typeName
&&
val
.
typeName
.
split
(
'.'
).
length
>
1
)
{
termData
+=
'<span class="inputTag term" data-id="tagClick" data-href="'
+
val
.
typeName
+
'"><span class="inputValue">'
+
val
.
typeName
+
'</span><i class="fa fa-close" data-id="deleteTag" data-type="term"></i></span>'
;
termData
+=
'<span class="inputTag term" data-id="tagClick" data-href="'
+
val
.
typeName
+
'"><span class="inputValue">'
+
val
.
typeName
+
'</span><i class="fa fa-close" data-id="deleteTag" data-type="term"></i></span>'
;
}
else
{
tagData
+=
'<span class="inputTag" data-id="tagClick"><span class="inputValue">'
+
val
.
typeName
+
'</span><i class="fa fa-close" data-id="deleteTag" data-type="tag"></i></span>'
;
}
}
});
});
this
.
ui
.
tagList
.
find
(
"span.inputTag"
).
remove
();
this
.
ui
.
tagList
.
find
(
"span.inputTag"
).
remove
();
...
...
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