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
eb9eb4cf
Commit
eb9eb4cf
authored
Jun 16, 2015
by
Vishal Kadam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HDPDGI-81:Vishal:Display querytext as tooltip for loadProcess
parent
6c896a7a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
3 deletions
+26
-3
index.html
dashboard/v2/public/index.html
+1
-0
lineageController.js
dashboard/v2/public/modules/lineage/lineageController.js
+25
-3
No files found.
dashboard/v2/public/index.html
View file @
eb9eb4cf
...
...
@@ -65,6 +65,7 @@
<script
src=
"lib/angular-ui-utils/ui-utils.js"
></script>
<script
src=
"lib/lodash/lodash.js"
></script>
<script
src=
"/lib/d3/d3.js"
></script>
<script
src=
"/lib/d3-tip/index.js"
></script>
<script
src=
"js/app.min.js"
></script>
</body>
...
...
dashboard/v2/public/modules/lineage/lineageController.js
View file @
eb9eb4cf
...
...
@@ -91,7 +91,7 @@ angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco
nodes
=
{};
function
getNode
(
guid
)
{
var
name
,
type
;
var
name
,
type
,
tip
;
if
(
vertices
.
hasOwnProperty
(
guid
))
{
name
=
vertices
[
guid
].
values
.
name
;
type
=
vertices
[
guid
].
values
.
vertexId
.
values
.
typeName
;
...
...
@@ -100,6 +100,7 @@ angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco
if
(
typeof
loadProcess
!==
"undefined"
)
{
name
=
loadProcess
.
name
;
type
=
loadProcess
.
typeName
;
tip
=
loadProcess
.
tip
;
}
else
{
name
=
'Load Process'
;
type
=
'Load Process'
;
...
...
@@ -108,7 +109,8 @@ angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco
var
vertex
=
{
guid
:
guid
,
name
:
name
,
type
:
type
type
:
type
,
tip
:
tip
};
if
(
!
nodes
.
hasOwnProperty
(
guid
))
{
nodes
[
guid
]
=
vertex
;
...
...
@@ -122,6 +124,7 @@ angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco
if
(
value
.
id
.
id
===
guid
)
{
procesRes
.
name
=
value
.
values
.
name
;
procesRes
.
typeName
=
value
.
typeName
;
procesRes
.
tip
=
value
.
values
.
queryText
;
}
});
return
procesRes
;
...
...
@@ -176,11 +179,19 @@ angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco
return
[
d
.
y
,
d
.
x
];
});
/* Initialize tooltip */
var
tooltip
=
d3
.
tip
()
.
attr
(
'class'
,
'd3-tip'
)
.
html
(
function
(
d
)
{
return
'<pre class="alert alert-success">'
+
d
.
tip
+
'</pre>'
;
});
var
svg
=
element
.
select
(
'svg'
)
.
attr
(
'width'
,
width
+
margin
.
right
+
margin
.
left
)
.
attr
(
'height'
,
height
+
margin
.
top
+
margin
.
bottom
)
/* Invoke the tip in the context of your visualization */
.
call
(
tooltip
)
.
select
(
'g'
)
.
attr
(
'transform'
,
'translate('
+
margin
.
left
+
','
+
margin
.
right
+
')'
);
//arrow
...
...
@@ -217,10 +228,21 @@ angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco
//return d.icon;
return
d
.
type
===
'Table'
?
'../img/tableicon.png'
:
'../img/process.png'
;
})
.
on
(
'mouseover'
,
function
(
d
)
{
if
(
d
.
type
===
'LoadProcess'
)
{
tooltip
.
show
(
d
);
}
})
.
on
(
'mouseout'
,
function
(
d
)
{
if
(
d
.
type
===
'LoadProcess'
)
{
tooltip
.
hide
(
d
);
}
})
.
attr
(
"x"
,
"-18px"
)
.
attr
(
"y"
,
"-18px"
)
.
attr
(
"width"
,
"34px"
)
.
attr
(
"height"
,
"34px"
);
nodeEnter
.
append
(
'text'
)
.
attr
(
'x'
,
function
(
d
)
{
return
d
.
children
||
d
.
_children
?
...
...
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