Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
amundsen_dev
Project
Project
Details
Activity
Releases
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
Surendar Reddy Mangannagari
amundsen_dev
Commits
f8e129a8
Unverified
Commit
f8e129a8
authored
Nov 19, 2019
by
Daniel
Committed by
GitHub
Nov 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added 'tooltip' to nested column types (#345)
This was a regression from merging search_v2 into master
parent
047d3ea6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
3 deletions
+43
-3
index.tsx
...static/js/components/TableDetail/ColumnListItem/index.tsx
+42
-2
styles.scss
...atic/js/components/TableDetail/ColumnListItem/styles.scss
+1
-1
No files found.
amundsen_application/static/js/components/TableDetail/ColumnListItem/index.tsx
View file @
f8e129a8
import
*
as
React
from
'react'
;
import
{
Dropdown
,
MenuItem
}
from
'react-bootstrap'
;
import
{
Dropdown
,
MenuItem
,
OverlayTrigger
,
Popover
}
from
'react-bootstrap'
;
import
{
bindActionCreators
}
from
'redux'
;
import
{
connect
}
from
'react-redux'
;
...
...
@@ -57,6 +57,46 @@ export class ColumnListItem extends React.Component<ColumnListItemProps, ColumnL
e
.
stopPropagation
();
};
renderColumnType
=
(
columnIndex
:
number
,
type
:
string
)
=>
{
const
truncatedTypes
:
string
[]
=
[
'array'
,
'struct'
,
'map'
];
let
shouldTrucate
=
false
;
const
fullText
=
type
.
toLowerCase
();
let
text
=
fullText
;
truncatedTypes
.
forEach
((
truncatedType
)
=>
{
if
(
type
.
startsWith
(
truncatedType
)
&&
type
!==
truncatedType
)
{
shouldTrucate
=
true
;
text
=
`
${
truncatedType
}
<...>`
;
return
;
};
});
if
(
shouldTrucate
)
{
const
popoverHover
=
(
<
Popover
className=
'column-type-popover'
id=
{
`column-type-popover:${columnIndex}`
}
>
{
fullText
}
</
Popover
>
);
return
(
<
OverlayTrigger
trigger=
{
[
'click'
]
}
placement=
'left'
overlay=
{
popoverHover
}
rootClose=
{
true
}
>
<
a
className=
'column-type'
href=
"JavaScript:void(0)"
onClick=
{
this
.
stopPropagation
}
>
{
text
}
</
a
>
</
OverlayTrigger
>
)
}
return
(<
div
className=
'column-type'
>
{
text
}
</
div
>);
};
render
()
{
const
metadata
=
this
.
props
.
data
;
return
(
...
...
@@ -75,7 +115,7 @@ export class ColumnListItem extends React.Component<ColumnListItemProps, ColumnL
}
</
div
>
<
div
className=
"resource-type"
>
{
metadata
.
type
?
metadata
.
type
.
toLowerCase
()
:
'null'
}
{
this
.
renderColumnType
(
this
.
props
.
index
,
metadata
.
type
)
}
</
div
>
<
div
className=
"badges"
>
{
/* Placeholder */
}
...
...
amundsen_application/static/js/components/TableDetail/ColumnListItem/styles.scss
View file @
f8e129a8
...
...
@@ -10,7 +10,7 @@
.column-details
{
flex-basis
:
50%
;
flex-grow
:
1
;
padding
-right
:
16px
;
margin
-right
:
16px
;
}
.resource-type
,
...
...
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