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
30138316
Commit
30138316
authored
7 years ago
by
pratik pandey
Committed by
kevalbhatt
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2162 : Add hyperlink for URI formatted attribute value on property table
Signed-off-by:
kevalbhatt
<
kbhatt@apache.org
>
parent
f75871f4
master
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
theme.scss
dashboardv2/public/css/scss/theme.scss
+6
-1
CommonViewFunction.js
dashboardv2/public/js/utils/CommonViewFunction.js
+10
-2
Utils.js
dashboardv2/public/js/utils/Utils.js
+5
-0
No files found.
dashboardv2/public/css/scss/theme.scss
View file @
30138316
...
@@ -130,7 +130,7 @@ a {
...
@@ -130,7 +130,7 @@ a {
}
}
}
}
a
[
href
^=
"#!/"
]
:not
(
.btn
,
.not-blue-link
)
{
.blue-link
{
color
:
$color_havelock_blue_approx
;
color
:
$color_havelock_blue_approx
;
&
:focus
{
&
:focus
{
color
:
$color_havelock_blue_approx
;
color
:
$color_havelock_blue_approx
;
...
@@ -143,6 +143,11 @@ a[href^="#!/"]:not(.btn, .not-blue-link) {
...
@@ -143,6 +143,11 @@ a[href^="#!/"]:not(.btn, .not-blue-link) {
}
}
}
}
a
[
href
^=
"#!/"
]
:not
(
.btn
,
.not-blue-link
)
{
@extend
.blue-link
;
}
th
{
th
{
text-transform
:
capitalize
;
text-transform
:
capitalize
;
}
}
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/utils/CommonViewFunction.js
View file @
30138316
...
@@ -216,10 +216,18 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
...
@@ -216,10 +216,18 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
keyValue
=
extractObject
(
keyValue
)
keyValue
=
extractObject
(
keyValue
)
}
}
}
}
var
val
=
""
;
if
(
_
.
isObject
(
valueObject
[
key
]))
{
val
=
keyValue
}
else
if
(
Utils
.
isUrl
(
keyValue
))
{
val
=
'<a target="_blank" class="blue-link" href="'
+
keyValue
+
'">'
+
keyValue
+
'</a>'
;
}
else
{
val
=
_
.
escape
(
keyValue
);
}
if
(
isTable
)
{
if
(
isTable
)
{
table
+=
'<tr><td>'
+
_
.
escape
(
key
)
+
'</td><td><div '
+
(
_
.
isObject
(
valueObject
[
key
])
?
'class="scroll-y"'
:
''
)
+
'>'
+
(
_
.
isObject
(
valueObject
[
key
])
?
keyValue
:
_
.
escape
(
keyValue
))
+
'</div></td></tr>'
;
table
+=
'<tr><td>'
+
_
.
escape
(
key
)
+
'</td><td><div '
+
(
_
.
isObject
(
valueObject
[
key
])
?
'class="scroll-y"'
:
''
)
+
'>'
+
val
+
'</div></td></tr>'
;
}
else
{
}
else
{
table
+=
'<div>'
+
(
_
.
isObject
(
valueObject
[
key
])
?
keyValue
:
_
.
escape
(
keyValue
))
+
'</div>'
;
table
+=
'<div>'
+
val
+
'</div>'
;
}
}
});
});
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/utils/Utils.js
View file @
30138316
...
@@ -41,6 +41,7 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
...
@@ -41,6 +41,7 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
return
options
.
el
.
popover
(
_
.
extend
({
return
options
.
el
.
popover
(
_
.
extend
({
placement
:
'auto bottom'
,
placement
:
'auto bottom'
,
html
:
true
,
html
:
true
,
animation
:
false
,
template
:
'<div class="popover fixed-popover fade bottom"><div class="arrow"></div><h3 class="popover-title"></h3><div class="'
+
(
options
.
contentClass
?
options
.
contentClass
:
''
)
+
' popover-content"></div></div>'
template
:
'<div class="popover fixed-popover fade bottom"><div class="arrow"></div><h3 class="popover-title"></h3><div class="'
+
(
options
.
contentClass
?
options
.
contentClass
:
''
)
+
' popover-content"></div></div>'
},
options
.
popoverOptions
));
},
options
.
popoverOptions
));
}
}
...
@@ -642,6 +643,10 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
...
@@ -642,6 +643,10 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
}
}
}
}
}
}
Utils
.
isUrl
=
function
(
url
)
{
var
regexp
=
/
(
ftp|http|https
)
:
\/\/(\w
+:
{0,1}\w
*@
)?(\S
+
)(
:
[
0-9
]
+
)?(\/
|
\/([\w
#!:.?+=&%@!
\-\/]))?
/
return
regexp
.
test
(
url
);
}
$
.
fn
.
toggleAttribute
=
function
(
attributeName
,
firstString
,
secondString
)
{
$
.
fn
.
toggleAttribute
=
function
(
attributeName
,
firstString
,
secondString
)
{
if
(
this
.
attr
(
attributeName
)
==
firstString
)
{
if
(
this
.
attr
(
attributeName
)
==
firstString
)
{
this
.
attr
(
attributeName
,
secondString
);
this
.
attr
(
attributeName
,
secondString
);
...
...
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