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
93bd535e
Commit
93bd535e
authored
Oct 23, 2018
by
Abhishek Kadam
Committed by
kevalbhatt
Oct 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2930: UI changes to handle error message based on softReference attribute
Signed-off-by:
kevalbhatt
<
kbhatt@apache.org
>
parent
46b9b7c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
CommonViewFunction.js
dashboardv2/public/js/utils/CommonViewFunction.js
+7
-4
No files found.
dashboardv2/public/js/utils/CommonViewFunction.js
View file @
93bd535e
...
...
@@ -79,7 +79,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
attributeDefs
=
options
.
attributeDefs
;
var
table
=
""
,
fetchInputOutputValue
=
function
(
id
)
{
fetchInputOutputValue
=
function
(
id
,
defEntity
)
{
var
that
=
this
;
scope
.
entityModel
.
getEntityHeader
(
id
,
{
success
:
function
(
serverData
)
{
...
...
@@ -107,6 +107,8 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
cust_error
:
function
(
error
,
xhr
)
{
if
(
xhr
.
status
==
403
)
{
scope
.
$
(
'td div[data-id="'
+
id
+
'"]'
).
html
(
'<div><span class="text-danger"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Not Authorized</span></div>'
);
}
else
if
(
defEntity
&&
defEntity
.
options
&&
defEntity
.
options
.
isSoftReference
===
"true"
)
{
scope
.
$
(
'td div[data-id="'
+
id
+
'"]'
).
html
(
'<div> '
+
id
+
'</div>'
);
}
else
{
scope
.
$
(
'td div[data-id="'
+
id
+
'"]'
).
html
(
'<div><span class="text-danger"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> '
+
Messages
.
defaultErrorMessage
+
'</span></div>'
);
}
...
...
@@ -117,7 +119,8 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
extractObject
=
function
(
opt
)
{
var
valueOfArray
=
[],
keyValue
=
opt
.
keyValue
,
key
=
opt
.
key
;
key
=
opt
.
key
,
defEntity
=
opt
.
defEntity
;
if
(
!
_
.
isArray
(
keyValue
)
&&
_
.
isObject
(
keyValue
))
{
keyValue
=
[
keyValue
];
}
...
...
@@ -172,7 +175,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
if
((
name
===
"-"
||
name
===
id
)
&&
!
inputOutputField
.
attributes
)
{
var
fetch
=
true
;
var
fetchId
=
(
_
.
isObject
(
id
)
?
id
.
id
:
id
);
fetchInputOutputValue
(
fetchId
);
fetchInputOutputValue
(
fetchId
,
defEntity
);
tempLink
+=
'<div data-id="'
+
fetchId
+
'"><div class="value-loader"></div></div>'
;
}
else
{
tempLink
+=
'<a href="#!/detailPage/'
+
id
+
'">'
+
name
+
'</a>'
...
...
@@ -212,7 +215,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
if
(
defEntityType
===
'date'
)
{
keyValue
=
new
Date
(
keyValue
);
}
else
if
(
_
.
isObject
(
keyValue
))
{
keyValue
=
extractObject
({
"keyValue"
:
keyValue
,
"key"
:
key
});
keyValue
=
extractObject
({
"keyValue"
:
keyValue
,
"key"
:
key
,
'defEntity'
:
defEntity
});
}
}
else
{
if
(
_
.
isObject
(
keyValue
))
{
...
...
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