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
7d27b685
Commit
7d27b685
authored
Oct 26, 2018
by
Abhishek Kadam
Committed by
nixonrodrigues
Oct 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2937: UI: Lineage filter- support added for depth filter
Signed-off-by:
nixonrodrigues
<
nixon@apache.org
>
parent
da78c483
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
9 deletions
+60
-9
graph.scss
dashboardv2/public/css/scss/graph.scss
+13
-0
LineageLayoutView_tmpl.html
...dv2/public/js/templates/graph/LineageLayoutView_tmpl.html
+8
-0
Overrides.js
dashboardv2/public/js/utils/Overrides.js
+8
-0
LineageLayoutView.js
dashboardv2/public/js/views/graph/LineageLayoutView.js
+31
-9
No files found.
dashboardv2/public/css/scss/graph.scss
View file @
7d27b685
...
@@ -239,3 +239,15 @@ g.type-TK>rect {
...
@@ -239,3 +239,15 @@ g.type-TK>rect {
width
:
100%
;
width
:
100%
;
box-shadow
:
1px
3px
3px
2px
#bfbfbf
;
box-shadow
:
1px
3px
3px
2px
#bfbfbf
;
}
}
.zoomButtonGroup
{
text-align
:
right
;
}
.depthContainer
{
display
:
inline-block
;
margin-top
:
3px
;
.inline
{
display
:
inline-block
;
}
}
\ No newline at end of file
dashboardv2/public/js/templates/graph/LineageLayoutView_tmpl.html
View file @
7d27b685
...
@@ -26,6 +26,14 @@
...
@@ -26,6 +26,14 @@
</label>
</label>
<span
class=
"pull-left"
>
Hide
</span>
<span
class=
"pull-left"
>
Hide
</span>
</div>
</div>
<div
class=
"depthContainer"
>
<div>
<span
class=
"control-label-sm inline "
>
Depth :
</span>
<div
class=
"select inline"
style=
"width: 80px;"
>
<select
data-id=
"selectDepth"
class=
"form-control"
></select>
</div>
</div>
</div>
<div
class=
"zoomButtonGroup pull-right"
>
<div
class=
"zoomButtonGroup pull-right"
>
<span
type=
"button"
id=
"zoom_in"
class=
"btn btn-atlas btn-md lineageZoomButton"
title=
"Zoom In"
data-id=
"refreshBtn"
>
<i
class=
"fa fa-search-plus"
></i></span>
<span
type=
"button"
id=
"zoom_in"
class=
"btn btn-atlas btn-md lineageZoomButton"
title=
"Zoom In"
data-id=
"refreshBtn"
>
<i
class=
"fa fa-search-plus"
></i></span>
<span
type=
"button"
id=
"zoom_out"
class=
"btn btn-atlas btn-md lineageZoomButton"
title=
"Zoom Out"
data-id=
"refreshBtn"
>
<i
class=
"fa fa-search-minus"
></i></span>
<span
type=
"button"
id=
"zoom_out"
class=
"btn btn-atlas btn-md lineageZoomButton"
title=
"Zoom Out"
data-id=
"refreshBtn"
>
<i
class=
"fa fa-search-minus"
></i></span>
...
...
dashboardv2/public/js/utils/Overrides.js
View file @
7d27b685
...
@@ -26,6 +26,14 @@ define(['require', 'utils/Utils', 'marionette', 'backgrid', 'asBreadcrumbs', 'jq
...
@@ -26,6 +26,14 @@ define(['require', 'utils/Utils', 'marionette', 'backgrid', 'asBreadcrumbs', 'jq
var
oldBackboneSync
=
Backbone
.
sync
;
var
oldBackboneSync
=
Backbone
.
sync
;
Backbone
.
sync
=
function
(
method
,
model
,
options
)
{
Backbone
.
sync
=
function
(
method
,
model
,
options
)
{
var
that
=
this
;
var
that
=
this
;
if
(
options
.
queryParam
)
{
var
generateQueryParam
=
$
.
param
(
options
.
queryParam
);
if
(
options
.
url
.
indexOf
(
'?'
)
!==
-
1
)
{
options
.
url
=
options
.
url
+
"&"
+
generateQueryParam
;
}
else
{
options
.
url
=
options
.
url
+
"?"
+
generateQueryParam
;
}
}
return
oldBackboneSync
.
apply
(
this
,
[
method
,
model
,
return
oldBackboneSync
.
apply
(
this
,
[
method
,
model
,
_
.
extend
(
options
,
{
_
.
extend
(
options
,
{
error
:
function
(
response
)
{
error
:
function
(
response
)
{
...
...
dashboardv2/public/js/views/graph/LineageLayoutView.js
View file @
7d27b685
...
@@ -43,13 +43,15 @@ define(['require',
...
@@ -43,13 +43,15 @@ define(['require',
/** ui selector cache */
/** ui selector cache */
ui
:
{
ui
:
{
graph
:
".graph"
,
graph
:
".graph"
,
checkHideProcess
:
"[data-id='checkHideProcess']"
checkHideProcess
:
"[data-id='checkHideProcess']"
,
selectDepth
:
'select[data-id="selectDepth"]'
},
},
/** ui events hash */
/** ui events hash */
events
:
function
()
{
events
:
function
()
{
var
events
=
{};
var
events
=
{};
events
[
"click "
+
this
.
ui
.
checkHideProcess
]
=
'onCheckHideProcess'
;
events
[
"click "
+
this
.
ui
.
checkHideProcess
]
=
'onCheckHideProcess'
;
events
[
'change '
+
this
.
ui
.
selectDepth
]
=
'onSelectDepthChange'
;
return
events
;
return
events
;
},
},
...
@@ -65,6 +67,10 @@ define(['require',
...
@@ -65,6 +67,10 @@ define(['require',
this
.
apiGuid
=
{};
this
.
apiGuid
=
{};
this
.
asyncFetchCounter
=
0
;
this
.
asyncFetchCounter
=
0
;
this
.
edgeCall
;
this
.
edgeCall
;
this
.
filterObj
=
{
isProcessHideCheck
:
false
,
depthCount
:
''
};
},
},
initializeGraph
:
function
()
{
initializeGraph
:
function
()
{
...
@@ -98,6 +104,12 @@ define(['require',
...
@@ -98,6 +104,12 @@ define(['require',
this
.
hideCheckForProcess
();
this
.
hideCheckForProcess
();
}
}
this
.
initializeGraph
();
this
.
initializeGraph
();
this
.
ui
.
selectDepth
.
select2
({
data
:
_
.
sortBy
([
3
,
6
,
9
,
12
,
15
,
18
,
21
]),
tags
:
true
,
dropdownCssClass
:
"number-input"
,
multiple
:
false
});
},
},
onShow
:
function
()
{
onShow
:
function
()
{
this
.
$
(
'.fontLoader'
).
show
();
this
.
$
(
'.fontLoader'
).
show
();
...
@@ -106,14 +118,23 @@ define(['require',
...
@@ -106,14 +118,23 @@ define(['require',
var
data
=
$
.
extend
(
true
,
{},
this
.
lineageData
);
var
data
=
$
.
extend
(
true
,
{},
this
.
lineageData
);
this
.
fromToObj
=
{};
this
.
fromToObj
=
{};
this
.
initializeGraph
();
this
.
initializeGraph
();
this
.
generateData
(
data
.
relations
,
data
.
guidEntityMap
,
e
.
target
.
checked
);
this
.
filterObj
.
isProcessHideCheck
=
e
.
target
.
checked
;
this
.
generateData
(
data
.
relations
,
data
.
guidEntityMap
);
},
},
fetchGraphData
:
function
()
{
onSelectDepthChange
:
function
(
e
,
options
)
{
var
that
=
this
;
this
.
initializeGraph
();
this
.
filterObj
.
depthCount
=
e
.
currentTarget
.
value
;
this
.
fetchGraphData
({
queryParam
:
{
'depth'
:
this
.
filterObj
.
depthCount
}
});
},
fetchGraphData
:
function
(
options
)
{
var
that
=
this
,
queryParam
=
options
&&
options
.
queryParam
||
{};
this
.
fromToObj
=
{};
this
.
fromToObj
=
{};
this
.
collection
.
getLineage
(
this
.
guid
,
{
this
.
collection
.
getLineage
(
this
.
guid
,
{
skipDefaultError
:
true
,
skipDefaultError
:
true
,
queryParam
:
queryParam
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
relations
.
length
)
{
if
(
data
.
relations
.
length
)
{
that
.
lineageData
=
$
.
extend
(
true
,
{},
data
)
that
.
lineageData
=
$
.
extend
(
true
,
{},
data
)
...
@@ -131,6 +152,7 @@ define(['require',
...
@@ -131,6 +152,7 @@ define(['require',
},
},
noLineage
:
function
()
{
noLineage
:
function
()
{
this
.
$
(
'.fontLoader'
).
hide
();
this
.
$
(
'.fontLoader'
).
hide
();
this
.
$
(
'.depthContainer'
).
hide
();
//this.$('svg').height('100');
//this.$('svg').height('100');
this
.
$
(
'svg'
).
html
(
'<text x="50%" y="50%" alignment-baseline="middle" text-anchor="middle">No lineage data found</text>'
);
this
.
$
(
'svg'
).
html
(
'<text x="50%" y="50%" alignment-baseline="middle" text-anchor="middle">No lineage data found</text>'
);
if
(
this
.
actionCallBack
)
{
if
(
this
.
actionCallBack
)
{
...
@@ -140,12 +162,12 @@ define(['require',
...
@@ -140,12 +162,12 @@ define(['require',
hideCheckForProcess
:
function
()
{
hideCheckForProcess
:
function
()
{
this
.
$
(
'.hideProcessContainer'
).
hide
();
this
.
$
(
'.hideProcessContainer'
).
hide
();
},
},
generateData
:
function
(
relations
,
guidEntityMap
,
hideProcess
)
{
generateData
:
function
(
relations
,
guidEntityMap
)
{
var
that
=
this
;
var
that
=
this
;
function
isProcess
(
typeName
)
{
function
isProcess
(
typeName
)
{
var
entityDef
=
that
.
entityDefCollection
.
fullCollection
.
find
({
name
:
typeName
});
var
entityDef
=
that
.
entityDefCollection
.
fullCollection
.
find
({
name
:
typeName
});
return
_
.
contains
(
Utils
.
getNestedSuperTypes
({
data
:
entityDef
.
toJSON
(),
collection
:
that
.
entityDefCollection
}),
"Process"
)
return
_
.
contains
(
Utils
.
getNestedSuperTypes
({
data
:
entityDef
.
toJSON
(),
collection
:
that
.
entityDefCollection
}),
"Process"
)
}
}
function
makeNodeObj
(
relationObj
)
{
function
makeNodeObj
(
relationObj
)
{
...
@@ -160,7 +182,7 @@ define(['require',
...
@@ -160,7 +182,7 @@ define(['require',
if
(
relationObj
.
status
)
{
if
(
relationObj
.
status
)
{
obj
[
'status'
]
=
relationObj
.
status
;
obj
[
'status'
]
=
relationObj
.
status
;
}
}
if
(
hideProcess
)
{
if
(
that
.
filterObj
.
isProcessHideCheck
)
{
obj
[
'isProcess'
]
=
relationObj
.
isProcess
;
obj
[
'isProcess'
]
=
relationObj
.
isProcess
;
}
else
{
}
else
{
obj
[
'isProcess'
]
=
isProcess
(
relationObj
.
typeName
);
obj
[
'isProcess'
]
=
isProcess
(
relationObj
.
typeName
);
...
@@ -171,7 +193,7 @@ define(['require',
...
@@ -171,7 +193,7 @@ define(['require',
var
newRelations
=
[];
var
newRelations
=
[];
if
(
hideProcess
)
{
if
(
this
.
filterObj
.
isProcessHideCheck
)
{
_
.
each
(
relations
,
function
(
obj
,
index
,
relationArr
)
{
_
.
each
(
relations
,
function
(
obj
,
index
,
relationArr
)
{
var
isFromEntityIdProcess
=
isProcess
(
guidEntityMap
[
obj
.
fromEntityId
].
typeName
);
var
isFromEntityIdProcess
=
isProcess
(
guidEntityMap
[
obj
.
fromEntityId
].
typeName
);
var
isToEntityProcess
=
isProcess
(
guidEntityMap
[
obj
.
toEntityId
].
typeName
);
var
isToEntityProcess
=
isProcess
(
guidEntityMap
[
obj
.
toEntityId
].
typeName
);
...
@@ -202,7 +224,7 @@ define(['require',
...
@@ -202,7 +224,7 @@ define(['require',
}
}
var
finalRelations
=
hideProcess
?
newRelations
:
relations
;
var
finalRelations
=
this
.
filterObj
.
isProcessHideCheck
?
newRelations
:
relations
;
...
...
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