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
75bdf791
Commit
75bdf791
authored
Apr 24, 2019
by
gutkaBinit
Committed by
kevalbhatt
Apr 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3145 UI :Entity showing Active even if the relationshipStatus is Deleted.
parent
2c9376f8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
112 additions
and
21 deletions
+112
-21
graph.scss
dashboardv2/public/css/scss/graph.scss
+20
-4
RelationshipLayoutView_tmpl.html
...ublic/js/templates/graph/RelationshipLayoutView_tmpl.html
+9
-3
RelationshipLayoutView.js
dashboardv2/public/js/views/graph/RelationshipLayoutView.js
+83
-14
No files found.
dashboardv2/public/css/scss/graph.scss
View file @
75bdf791
...
...
@@ -61,7 +61,6 @@
&
.node-detail-highlight
{
stroke
:
$color_havelock_blue_approx
;
stroke-width
:
2px
;
opacity
:
0
.8
;
}
&
.nodeImage
{
...
...
@@ -268,9 +267,6 @@ g.type-TK>rect {
text-align
:
left
;
&
.deleted-relation
{
a
{
color
:
#BB5838
!
important
;
}
.deleteBtn
{
padding
:
2px
8px
!
important
;
...
...
@@ -431,4 +427,23 @@ span#zoom_in {
.hidden-svg
{
visibility
:
hidden
;
}
#tab-relationship
{
.entity-status
{
&
.active
{
color
:
$color_jungle_green_approx
;
}
&
.deleted
{
color
:
$delete_link
;
}
}
.entity-list
{
list-style-position
:
inside
;
}
}
\ No newline at end of file
dashboardv2/public/js/templates/graph/RelationshipLayoutView_tmpl.html
View file @
75bdf791
...
...
@@ -23,9 +23,15 @@
</label>
<span
class=
"pull-left"
>
Table
</span>
</div>
<div
class=
"btn-group pull-right"
data-id=
"zoomControl"
>
<button
type=
"button"
id=
"zoom_in"
class=
"btn btn-action btn-gray btn-sm lineageZoomButton"
title=
"Zoom In"
data-id=
"refreshBtn"
>
<i
class=
"fa fa-search-plus"
></i></button>
<button
type=
"button"
id=
"zoom_out"
class=
"btn btn-action btn-gray btn-sm lineageZoomButton"
title=
"Zoom Out"
data-id=
"refreshBtn"
>
<i
class=
"fa fa-search-minus"
></i></button>
<div
class=
"pull-right"
data-id=
"zoomControl"
>
<div
class=
"btn-group pull-right"
>
<button
type=
"button"
id=
"zoom_in"
class=
"btn btn-action btn-gray btn-sm lineageZoomButton"
title=
"Zoom In"
data-id=
"refreshBtn"
>
<i
class=
"fa fa-search-plus"
></i></button>
<button
type=
"button"
id=
"zoom_out"
class=
"btn btn-action btn-gray btn-sm lineageZoomButton"
title=
"Zoom Out"
data-id=
"refreshBtn"
>
<i
class=
"fa fa-search-minus"
></i></button>
</div>
<div
class=
"btn-group pull-right"
style=
"padding: 4px 15px;"
>
<span
class=
"entity-status active"
title=
"Active Entity"
><i
class=
"fa fa-long-arrow-right fa-fw"
aria-hidden=
"true"
></i>
Active
</span>
<span
class=
"entity-status deleted"
title=
"Deleted Entity"
><i
class=
"fa fa-long-arrow-right fa-fw"
aria-hidden=
"true"
></i>
Deleted
</span>
</div>
</div>
</div>
<div
class=
"white-bg no-padding relationship-box invisible"
data-id=
'relationshipSVG'
>
...
...
dashboardv2/public/js/views/graph/RelationshipLayoutView.js
View file @
75bdf791
...
...
@@ -143,14 +143,84 @@ define(['require',
var
data
=
options
.
obj
.
value
,
typeName
=
data
.
typeName
||
options
.
obj
.
name
,
searchString
=
options
.
searchString
,
listString
=
""
;
listString
=
""
,
getEntityTypelist
=
function
(
options
)
{
var
activeEntityColor
=
"#4a90e2"
,
deletedEntityColor
=
"#BB5838"
,
entityTypeHtml
=
''
,
getdefault
=
function
(
obj
)
{
var
options
=
obj
.
options
,
status
=
(
Enums
.
entityStateReadOnly
[
options
.
entityStatus
||
options
.
status
]
?
" deleted-relation"
:
''
),
guid
=
options
.
guid
,
entityColor
=
obj
.
color
,
name
=
obj
.
name
,
typeName
=
options
.
typeName
;
return
"<li class="
+
status
+
">"
+
"<a style='color:"
+
entityColor
+
"' href=#!/detailPage/"
+
guid
+
"?tabActive=relationship>"
+
name
+
" ("
+
typeName
+
")</a>"
+
"</li>"
;
},
getWithButton
=
function
(
obj
)
{
var
options
=
obj
.
options
,
status
=
(
Enums
.
entityStateReadOnly
[
options
.
entityStatus
||
options
.
status
]
?
" deleted-relation"
:
''
),
guid
=
options
.
guid
,
entityColor
=
obj
.
color
,
name
=
obj
.
name
,
typeName
=
options
.
typeName
,
relationship
=
obj
.
relationship
||
false
,
entity
=
obj
.
entity
||
false
,
icon
=
'<i class="fa fa-trash"></i>'
,
title
=
"Deleted"
;
if
(
relationship
)
{
icon
=
'<i class="fa fa-long-arrow-right"></i>'
;
status
=
(
Enums
.
entityStateReadOnly
[
options
.
relationshipStatus
||
options
.
status
]
?
"deleted-relation"
:
''
);
title
=
"Relationship Deleted"
;
}
return
"<li class="
+
status
+
">"
+
"<a style='color:"
+
entityColor
+
"' href=#!/detailPage/"
+
options
.
guid
+
"?tabActive=relationship>"
+
_
.
escape
(
name
)
+
" ("
+
options
.
typeName
+
")</a>"
+
'<button type="button" title="'
+
title
+
'" class="btn btn-sm deleteBtn deletedTableBtn btn-action ">'
+
icon
+
'</button>'
+
"</li>"
;
};
var
name
=
options
.
entityName
?
options
.
entityName
:
Utils
.
getName
(
options
,
"displayText"
);
if
(
options
.
entityStatus
==
"ACTIVE"
)
{
if
(
options
.
relationshipStatus
==
"ACTIVE"
)
{
entityTypeHtml
=
getdefault
({
"color"
:
activeEntityColor
,
"options"
:
options
,
"name"
:
_
.
escape
(
name
)
});
}
else
if
(
options
.
relationshipStatus
==
"DELETED"
)
{
entityTypeHtml
=
getWithButton
({
"color"
:
activeEntityColor
,
"options"
:
options
,
"name"
:
_
.
escape
(
name
),
"relationship"
:
true
})
}
}
else
if
(
options
.
entityStatus
==
"DELETED"
)
{
entityTypeHtml
=
getWithButton
({
"color"
:
deletedEntityColor
,
"options"
:
options
,
"name"
:
_
.
escape
(
name
),
"entity"
:
true
})
}
else
{
entityTypeHtml
=
getdefault
({
"color"
:
activeEntityColor
,
"options"
:
options
,
"name"
:
_
.
escape
(
name
)
});
}
return
entityTypeHtml
;
};
this
.
ui
.
searchNode
.
hide
();
this
.
$
(
"[data-id='typeName']"
).
text
(
typeName
);
var
getElement
=
function
(
options
)
{
var
name
=
options
.
entityName
?
options
.
entityName
:
Utils
.
getName
(
options
,
"displayText"
);
return
"<li class="
+
(
Enums
.
entityStateReadOnly
[
options
.
entityStatus
||
options
.
status
]
?
"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
.
entityStatus
||
options
.
status
]
?
""
:
'hide'
)
+
'"><i class="fa fa-trash"></i></button>'
+
"</li>"
;
var
entityTypeButton
=
getEntityTypelist
(
options
);
return
entityTypeButton
;
}
if
(
_
.
isArray
(
data
))
{
if
(
data
.
length
>
1
)
{
...
...
@@ -182,7 +252,8 @@ define(['require',
var
scale
=
1.0
,
activeEntityColor
=
"#00b98b"
,
deletedEntityColor
=
"#BB5838"
,
defaultEntityColor
=
"#e0e0e0"
;
defaultEntityColor
=
"#e0e0e0"
,
selectedNodeColor
=
"#4a90e2"
;
var
force
=
d3
.
layout
.
force
()
.
nodes
(
d3
.
values
(
data
.
nodes
))
...
...
@@ -336,6 +407,10 @@ define(['require',
})
.
on
(
'click'
,
function
(
d
)
{
if
(
d3
.
event
.
defaultPrevented
)
return
;
// ignore drag
if
(
d
&&
d
.
value
&&
d
.
value
.
guid
==
that
.
guid
)
{
that
.
ui
.
boxClose
.
trigger
(
'click'
);
return
;
}
that
.
toggleBoxPanel
({
el
:
that
.
$
(
'.relationship-node-details'
)
});
that
.
ui
.
searchNode
.
data
({
obj
:
d
});
$
(
this
).
find
(
'circle'
).
addClass
(
"node-detail-highlight"
);
...
...
@@ -370,12 +445,12 @@ define(['require',
if
(
isAllEntityRelationDeleted
({
data
:
d
,
type
:
'node'
}))
{
return
deletedEntityColor
;
}
else
{
return
activeEntity
Color
;
return
selectedNode
Color
;
}
}
else
if
(
isAllEntityRelationDeleted
({
data
:
d
,
type
:
'node'
}))
{
return
deletedEntityColor
;
}
else
{
return
default
EntityColor
;
return
active
EntityColor
;
}
})
.
attr
(
"typename"
,
function
(
d
)
{
...
...
@@ -401,13 +476,7 @@ define(['require',
}
})
.
attr
(
"fill"
,
function
(
d
)
{
if
(
d
&&
d
.
value
&&
d
.
value
.
guid
==
that
.
guid
)
{
return
"#fff"
;
}
else
if
(
isAllEntityRelationDeleted
({
data
:
d
,
type
:
'node'
}))
{
return
"#fff"
;
}
else
{
return
"#000"
;
}
return
"#fff"
;
});
var
countBox
=
circleContainer
.
append
(
'g'
)
countBox
.
append
(
"circle"
)
...
...
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