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
ac2c1a77
Commit
ac2c1a77
authored
7 years ago
by
kevalbhatt
Committed by
Madhan Neethiraj
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2497: Relationship UI improvements
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
8120947b
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
99 additions
and
19 deletions
+99
-19
relationship.scss
dashboardv2/public/css/scss/relationship.scss
+1
-1
RelationshipLayoutView_tmpl.html
...ublic/js/templates/graph/RelationshipLayoutView_tmpl.html
+4
-0
TagAttributeDetailLayoutView_tmpl.html
...c/js/templates/tag/TagAttributeDetailLayoutView_tmpl.html
+1
-1
RelationshipLayoutView.js
dashboardv2/public/js/views/graph/RelationshipLayoutView.js
+65
-6
SearchResultLayoutView.js
dashboardv2/public/js/views/search/SearchResultLayoutView.js
+3
-3
Header.js
dashboardv2/public/js/views/site/Header.js
+6
-1
SideNavLayoutView.js
dashboardv2/public/js/views/site/SideNavLayoutView.js
+17
-6
TagDetailLayoutView.js
dashboardv2/public/js/views/tag/TagDetailLayoutView.js
+2
-1
No files found.
dashboardv2/public/css/scss/relationship.scss
View file @
ac2c1a77
...
...
@@ -53,7 +53,7 @@
}
.entity-list
{
overflow
:
auto
;
list-style-type
:
d
isc
;
list-style-type
:
d
ecimal
;
list-style-position
:
outside
;
padding-left
:
18px
;
}
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/templates/graph/RelationshipLayoutView_tmpl.html
View file @
ac2c1a77
...
...
@@ -22,6 +22,10 @@
<div
style=
"position: absolute;height:100%;width:100%;"
>
<svg
width=
"100%"
height=
"100%"
viewBox=
"0 0 854 330"
enable-background=
"new 0 0 854 330"
xml:space=
"preserve"
></svg>
</div>
<div
class=
"zoomButtonGroup"
>
<span
type=
"button"
id=
"zoom_in"
class=
"btn btn-action btn-md lineageZoomButton"
title=
"Zoom In"
>
<i
class=
"fa fa-search-plus"
></i></span>
<span
type=
"button"
id=
"zoom_out"
class=
"btn btn-action btn-md lineageZoomButton"
title=
"Zoom Out"
>
<i
class=
"fa fa-search-minus"
></i></span>
</div>
<div
class=
"relationship-details"
>
<div
data-id=
"close"
class=
"close-details"
><i
class=
"fa fa-times"
></i></div>
<h4
class=
"title"
><span
data-id=
"typeName"
></span></h4>
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/templates/tag/TagAttributeDetailLayoutView_tmpl.html
View file @
ac2c1a77
...
...
@@ -19,7 +19,7 @@
<i
class=
"fa fa-refresh fa-spin-custom"
></i>
</div>
<div
class=
"tagDetail clearfix form-horizontal col-sm-12"
>
<h1
class=
"
form-group
"
><span
data-id=
"title"
></span></h1>
<h1
class=
"
row title
"
><span
data-id=
"title"
></span></h1>
<button
type=
"button"
data-id=
"editButton"
class=
"btn btn-sm btn-action pull-right"
><i
class=
"fa fa-pencil"
></i></button>
<p
class=
"form-group"
data-id=
"description"
></p>
<div
class=
"superType form-group"
style=
"display:none"
>
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/graph/RelationshipLayoutView.js
View file @
ac2c1a77
...
...
@@ -114,13 +114,16 @@ define(['require',
typeName
=
data
.
typeName
||
options
.
obj
.
name
,
searchString
=
options
.
searchString
,
listString
=
""
;
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><a href=#!/detailPage/"
+
options
.
guid
+
"?tabActive=relationship>"
+
_
.
escape
(
name
)
+
" ("
+
options
.
typeName
+
")</a></li>"
;
}
if
(
_
.
isArray
(
data
))
{
if
(
data
.
length
>
1
)
{
this
.
ui
.
searchNode
.
show
();
}
_
.
each
(
_
.
sortBy
(
data
,
"displayText"
),
function
(
val
)
{
var
name
=
Utils
.
getName
(
val
,
"displayText"
),
valObj
=
_
.
extend
({},
val
,
{
entityName
:
name
});
...
...
@@ -166,12 +169,58 @@ define(['require',
.
on
(
"zoom"
,
zoomed
);
function
zoomed
()
{
var
translateX
=
d3
.
event
.
translate
[
0
];
var
translateY
=
d3
.
event
.
translate
[
1
];
var
xScale
=
d3
.
event
.
scale
;
container
.
attr
(
"transform"
,
"translate("
+
translateX
+
","
+
translateY
+
")scale("
+
xScale
+
")"
);
container
.
attr
(
"transform"
,
"translate("
+
zoom
.
translate
()
+
")"
+
"scale("
+
zoom
.
scale
()
+
")"
);
}
function
interpolateZoom
(
translate
,
scale
)
{
var
self
=
this
;
return
d3
.
transition
().
duration
(
350
).
tween
(
"zoom"
,
function
()
{
var
iTranslate
=
d3
.
interpolate
(
zoom
.
translate
(),
translate
),
iScale
=
d3
.
interpolate
(
zoom
.
scale
(),
scale
);
return
function
(
t
)
{
zoom
.
scale
(
iScale
(
t
))
.
translate
(
iTranslate
(
t
));
zoomed
();
};
});
}
function
zoomClick
()
{
var
clicked
=
d3
.
event
.
target
,
direction
=
1
,
factor
=
0.5
,
target_zoom
=
1
,
center
=
[
width
/
2
,
height
/
2
],
extent
=
zoom
.
scaleExtent
(),
translate
=
zoom
.
translate
(),
translate0
=
[],
l
=
[],
view
=
{
x
:
translate
[
0
],
y
:
translate
[
1
],
k
:
zoom
.
scale
()
};
d3
.
event
.
preventDefault
();
direction
=
(
this
.
id
===
'zoom_in'
)
?
1
:
-
1
;
target_zoom
=
zoom
.
scale
()
*
(
1
+
factor
*
direction
);
if
(
target_zoom
<
extent
[
0
]
||
target_zoom
>
extent
[
1
])
{
return
false
;
}
translate0
=
[(
center
[
0
]
-
view
.
x
)
/
view
.
k
,
(
center
[
1
]
-
view
.
y
)
/
view
.
k
];
view
.
k
=
target_zoom
;
l
=
[
translate0
[
0
]
*
view
.
k
+
view
.
x
,
translate0
[
1
]
*
view
.
k
+
view
.
y
];
view
.
x
+=
center
[
0
]
-
l
[
0
];
view
.
y
+=
center
[
1
]
-
l
[
1
];
interpolateZoom
([
view
.
x
,
view
.
y
],
view
.
k
);
}
d3
.
selectAll
(
this
.
$
(
'span.lineageZoomButton'
)).
on
(
'click'
,
zoomClick
);
var
svg
=
d3
.
select
(
this
.
$
(
"svg"
)[
0
])
.
attr
(
"viewBox"
,
"0 0 "
+
width
+
" "
+
height
)
.
attr
(
"enable-background"
,
"new 0 0 "
+
width
+
" "
+
height
)
...
...
@@ -214,6 +263,16 @@ define(['require',
.
data
(
force
.
nodes
())
.
enter
().
append
(
"g"
)
.
attr
(
"class"
,
"node"
)
.
on
(
'touchstart'
,
function
(
d
)
{
if
(
d
&&
d
.
value
&&
d
.
value
.
guid
!=
that
.
guid
)
{
d3
.
event
.
stopPropagation
();
}
})
.
on
(
'mousedown'
,
function
(
d
)
{
if
(
d
&&
d
.
value
&&
d
.
value
.
guid
!=
that
.
guid
)
{
d3
.
event
.
stopPropagation
();
}
})
.
on
(
'click'
,
function
(
d
)
{
if
(
d3
.
event
.
defaultPrevented
)
return
;
// ignore drag
that
.
toggleInformationSlider
({
open
:
true
,
obj
:
d
});
...
...
@@ -302,7 +361,7 @@ define(['require',
.
attr
(
"text-anchor"
,
"middle"
)
.
attr
(
"fill"
,
"#e0e0e0"
)
.
text
(
function
(
d
)
{
if
(
_
.
isArray
(
d
.
value
))
{
if
(
_
.
isArray
(
d
.
value
)
&&
d
.
value
.
length
>
1
)
{
return
d
.
value
.
length
;
}
});
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/search/SearchResultLayoutView.js
View file @
ac2c1a77
...
...
@@ -124,7 +124,7 @@ define(['require',
* @constructs
*/
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
_
.
pick
(
options
,
'value'
,
'initialView'
,
'isTypeTagNotExists'
,
'classificationDefCollection'
,
'entityDefCollection'
,
'typeHeaders'
,
'searchVent'
,
'enumDefCollection'
,
'tagCollection'
,
'searchTableColumns'
,
'isDisable'
));
_
.
extend
(
this
,
_
.
pick
(
options
,
'value'
,
'initialView'
,
'isTypeTagNotExists'
,
'classificationDefCollection'
,
'entityDefCollection'
,
'typeHeaders'
,
'searchVent'
,
'enumDefCollection'
,
'tagCollection'
,
'searchTableColumns'
,
'isDisable'
,
'fromView'
));
this
.
entityModel
=
new
VEntity
();
this
.
searchCollection
=
new
VSearchList
();
this
.
limit
=
25
;
...
...
@@ -600,7 +600,7 @@ define(['require',
nameHtml
=
""
,
name
=
Utils
.
getName
(
obj
);
if
(
obj
.
guid
)
{
nameHtml
=
'<a title="'
+
name
+
'" href="#!/detailPage/'
+
obj
.
guid
+
'">'
+
name
+
'</a>'
;
nameHtml
=
'<a title="'
+
name
+
'" href="#!/detailPage/'
+
obj
.
guid
+
(
that
.
fromView
?
"?from="
+
that
.
fromView
:
""
)
+
'">'
+
name
+
'</a>'
;
}
else
{
nameHtml
=
'<span title="'
+
name
+
'">'
+
name
+
'</span>'
;
}
...
...
@@ -747,7 +747,7 @@ define(['require',
var
nameHtml
=
""
,
name
=
modelObj
[
key
];
if
(
modelObj
.
guid
)
{
nameHtml
=
'<a title="'
+
name
+
'" href="#!/detailPage/'
+
modelObj
.
guid
+
'">'
+
name
+
'</a>'
;
nameHtml
=
'<a title="'
+
name
+
'" href="#!/detailPage/'
+
modelObj
.
guid
+
(
that
.
fromView
?
"?from="
+
that
.
fromView
:
""
)
+
'">'
+
name
+
'</a>'
;
}
else
{
nameHtml
=
'<span title="'
+
name
+
'">'
+
name
+
'</span>'
;
}
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/site/Header.js
View file @
ac2c1a77
...
...
@@ -34,8 +34,13 @@ define(['require',
events
:
function
()
{
var
events
=
{};
events
[
'click '
+
this
.
ui
.
backButton
]
=
function
()
{
var
queryParams
=
Utils
.
getUrlState
.
getQueryParams
(),
urlPath
=
"searchUrl"
;
if
(
queryParams
&&
queryParams
.
from
&&
queryParams
.
from
==
"classification"
)
{
urlPath
=
"tagUrl"
;
}
Utils
.
setUrl
({
url
:
Globals
.
saveApplicationState
.
tabState
.
searchUrl
,
url
:
Globals
.
saveApplicationState
.
tabState
[
urlPath
]
,
mergeBrowserUrl
:
false
,
trigger
:
true
,
updateTabState
:
true
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/site/SideNavLayoutView.js
View file @
ac2c1a77
...
...
@@ -112,12 +112,23 @@ define(['require',
});
},
selectTab
:
function
()
{
if
(
Utils
.
getUrlState
.
isTagTab
())
{
this
.
$
(
'.tabs'
).
find
(
'li a[aria-controls="tab-tag"]'
).
parents
(
'li'
).
addClass
(
'active'
).
siblings
().
removeClass
(
'active'
);
this
.
$
(
'.tab-content'
).
find
(
'div#tab-tag'
).
addClass
(
'active'
).
siblings
().
removeClass
(
'active'
);
}
else
if
(
Utils
.
getUrlState
.
isSearchTab
()
||
(
Utils
.
getUrlState
.
isDetailPage
())
||
Utils
.
getUrlState
.
isInitial
())
{
this
.
$
(
'.tabs'
).
find
(
'li a[aria-controls="tab-search"]'
).
parents
(
'li'
).
addClass
(
'active'
).
siblings
().
removeClass
(
'active'
);
this
.
$
(
'.tab-content'
).
find
(
'div#tab-search'
).
addClass
(
'active'
).
siblings
().
removeClass
(
'active'
);
var
that
=
this
;
var
activeTab
=
function
(
options
)
{
var
view
=
options
.
view
;
that
.
$
(
'.tabs'
).
find
(
'li a[aria-controls="tab-'
+
view
+
'"]'
).
parents
(
'li'
).
addClass
(
'active'
).
siblings
().
removeClass
(
'active'
);
that
.
$
(
'.tab-content'
).
find
(
'div#tab-'
+
view
).
addClass
(
'active'
).
siblings
().
removeClass
(
'active'
);
};
if
(
Utils
.
getUrlState
.
isSearchTab
()
||
Utils
.
getUrlState
.
isInitial
())
{
activeTab
({
"view"
:
"search"
});
}
else
if
(
Utils
.
getUrlState
.
isTagTab
())
{
activeTab
({
"view"
:
"tag"
});
}
else
if
(
Utils
.
getUrlState
.
isDetailPage
())
{
var
queryParams
=
Utils
.
getUrlState
.
getQueryParams
(),
view
=
"search"
;
if
(
queryParams
&&
queryParams
.
from
&&
queryParams
.
from
==
"classification"
)
{
view
=
"tag"
;
}
activeTab
({
"view"
:
view
});
}
},
});
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/tag/TagDetailLayoutView.js
View file @
ac2c1a77
...
...
@@ -66,7 +66,8 @@ define(['require',
typeHeaders
:
that
.
typeHeaders
,
tagCollection
:
that
.
collection
,
enumDefCollection
:
that
.
enumDefCollection
,
classificationDefCollection
:
that
.
classificationDefCollection
classificationDefCollection
:
that
.
classificationDefCollection
,
fromView
:
"classification"
}));
}
});
...
...
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