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
4d28dc24
Commit
4d28dc24
authored
6 years ago
by
kevalbhatt
Committed by
Madhan Neethiraj
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2692: updated UI to render deleted relationships differently from active ones
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
8119492f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
3 deletions
+40
-3
common.scss
dashboardv2/public/css/scss/common.scss
+6
-0
relationship.scss
dashboardv2/public/css/scss/relationship.scss
+13
-2
RelationshipLayoutView.js
dashboardv2/public/js/views/graph/RelationshipLayoutView.js
+21
-1
No files found.
dashboardv2/public/css/scss/common.scss
View file @
4d28dc24
...
@@ -34,6 +34,12 @@
...
@@ -34,6 +34,12 @@
&
.btn
[
data-id
=
"addTag"
]
{
&
.btn
[
data-id
=
"addTag"
]
{
display
:
none
;
display
:
none
;
}
}
&
.btn
[
data-id
=
"addTerm"
]
{
display
:
none
;
}
&
.btn
[
data-id
=
"editButton"
]
{
display
:
none
;
}
&
.editbutton
[
data-id
=
"editButton"
]
{
&
.editbutton
[
data-id
=
"editButton"
]
{
display
:
none
!
important
;
display
:
none
!
important
;
}
}
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/css/scss/relationship.scss
View file @
4d28dc24
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
box-shadow
:
4px
13px
14px
-12px
;
box-shadow
:
4px
13px
14px
-12px
;
background
:
#e7e7e7
;
background
:
#e7e7e7
;
transform
:
scaleX
(
0
);
transform
:
scaleX
(
0
);
width
:
2
0
0px
;
width
:
2
4
0px
;
transition
:
transform
0
.3s
ease-in
;
transition
:
transform
0
.3s
ease-in
;
&
.open
{
&
.open
{
transform
:
scaleX
(
1
);
transform
:
scaleX
(
1
);
...
@@ -55,12 +55,22 @@
...
@@ -55,12 +55,22 @@
overflow
:
auto
;
overflow
:
auto
;
list-style-type
:
decimal
;
list-style-type
:
decimal
;
list-style-position
:
outside
;
list-style-position
:
outside
;
padding-left
:
30
px
;
padding-left
:
15
px
;
}
}
ul
>
li
{
ul
>
li
{
word-wrap
:
break-word
;
word-wrap
:
break-word
;
margin-bottom
:
5px
;
margin-bottom
:
5px
;
text-align
:
left
;
text-align
:
left
;
&
.deleted-relation
{
a
{
color
:
#BB5838
!
important
;
}
.deleteBtn
{
padding
:
2px
8px
!
important
;
margin
:
5px
5px
!
important
;
}
}
}
}
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/graph/RelationshipLayoutView.js
View file @
4d28dc24
...
@@ -118,7 +118,9 @@ define(['require',
...
@@ -118,7 +118,9 @@ define(['require',
this
.
$
(
"[data-id='typeName']"
).
text
(
typeName
);
this
.
$
(
"[data-id='typeName']"
).
text
(
typeName
);
var
getElement
=
function
(
options
)
{
var
getElement
=
function
(
options
)
{
var
name
=
options
.
entityName
?
options
.
entityName
:
Utils
.
getName
(
options
,
"displayText"
);
var
name
=
options
.
entityName
?
options
.
entityName
:
Utils
.
getName
(
options
,
"displayText"
);
return
"<li><a href=#!/detailPage/"
+
options
.
guid
+
"?tabActive=relationship>"
+
_
.
escape
(
name
)
+
" ("
+
options
.
typeName
+
")</a></li>"
;
return
"<li class="
+
(
Enums
.
entityStateReadOnly
[
options
.
relationshipStatus
]
?
"deleted-relation"
:
''
)
+
"><a href=#!/detailPage/"
+
options
.
guid
+
"?tabActive=relationship>"
+
_
.
escape
(
name
)
+
" ("
+
options
.
typeName
+
")</a>"
+
'<button type="button" title="Deleted" class="btn btn-sm deleteBtn deletedTableBtn '
+
(
Enums
.
entityStateReadOnly
[
options
.
relationshipStatus
]
?
""
:
'hide'
)
+
'"><i class="fa fa-trash"></i></button>'
+
"</li>"
;
}
}
if
(
_
.
isArray
(
data
))
{
if
(
_
.
isArray
(
data
))
{
if
(
data
.
length
>
1
)
{
if
(
data
.
length
>
1
)
{
...
@@ -304,6 +306,20 @@ define(['require',
...
@@ -304,6 +306,20 @@ define(['require',
});
});
}
}
})
})
function
isSingleRelationDeleted
(
data
)
{
var
d
=
$
.
extend
(
true
,
{},
data
);
if
(
!
_
.
isArray
(
d
.
value
))
{
d
.
value
=
[
d
.
value
];
}
if
(
d
&&
_
.
isArray
(
d
.
value
))
{
if
(
d
.
value
.
length
==
1
&&
Enums
.
entityStateReadOnly
[
_
.
first
(
d
.
value
).
relationshipStatus
])
{
return
true
;
}
else
{
return
false
;
}
}
}
circleContainer
.
append
(
"circle"
)
circleContainer
.
append
(
"circle"
)
.
attr
(
"cx"
,
0
)
.
attr
(
"cx"
,
0
)
.
attr
(
"cy"
,
0
)
.
attr
(
"cy"
,
0
)
...
@@ -314,6 +330,8 @@ define(['require',
...
@@ -314,6 +330,8 @@ define(['require',
.
attr
(
"fill"
,
function
(
d
)
{
.
attr
(
"fill"
,
function
(
d
)
{
if
(
d
&&
d
.
value
&&
d
.
value
.
guid
==
that
.
guid
)
{
if
(
d
&&
d
.
value
&&
d
.
value
.
guid
==
that
.
guid
)
{
return
activeEntityColor
;
return
activeEntityColor
;
}
else
if
(
isSingleRelationDeleted
(
d
))
{
return
"#BB5838"
;
}
else
{
}
else
{
return
"#e0e0e0"
;
return
"#e0e0e0"
;
}
}
...
@@ -343,6 +361,8 @@ define(['require',
...
@@ -343,6 +361,8 @@ define(['require',
.
attr
(
"fill"
,
function
(
d
)
{
.
attr
(
"fill"
,
function
(
d
)
{
if
(
d
&&
d
.
value
&&
d
.
value
.
guid
==
that
.
guid
)
{
if
(
d
&&
d
.
value
&&
d
.
value
.
guid
==
that
.
guid
)
{
return
"#fff"
;
return
"#fff"
;
}
else
if
(
isSingleRelationDeleted
(
d
))
{
return
"#fff"
;
}
else
{
}
else
{
return
"#000"
;
return
"#000"
;
}
}
...
...
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