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
6 years ago
by
gutkaBinit
Committed by
kevalbhatt
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3145 UI :Entity showing Active even if the relationshipStatus is Deleted.
parent
2c9376f8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
18 deletions
+109
-18
graph.scss
dashboardv2/public/css/scss/graph.scss
+20
-4
RelationshipLayoutView_tmpl.html
...ublic/js/templates/graph/RelationshipLayoutView_tmpl.html
+7
-1
RelationshipLayoutView.js
dashboardv2/public/js/views/graph/RelationshipLayoutView.js
+82
-13
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
;
...
...
@@ -432,3 +428,22 @@ 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
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/templates/graph/RelationshipLayoutView_tmpl.html
View file @
75bdf791
...
...
@@ -23,10 +23,16 @@
</label>
<span
class=
"pull-left"
>
Table
</span>
</div>
<div
class=
"btn-group pull-right"
data-id=
"zoomControl"
>
<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'
>
<div
class=
"fontLoader"
>
...
...
This diff is collapsed.
Click to expand it.
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"
;
}
});
var
countBox
=
circleContainer
.
append
(
'g'
)
countBox
.
append
(
"circle"
)
...
...
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