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
052dec38
Unverified
Commit
052dec38
authored
Jun 26, 2019
by
Tamika Tannis
Committed by
GitHub
Jun 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update TableDetail Page (#210)
* Some fixes * Remove a unecessary workaround * Css cleanup
parent
719f9fcf
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
20 deletions
+37
-20
index.tsx
...omponents/TableDetail/DetailList/DetailListItem/index.tsx
+2
-2
styles.scss
...ponents/TableDetail/DetailList/DetailListItem/styles.scss
+15
-8
index.tsx
...en_application/static/js/components/TableDetail/index.tsx
+20
-9
reducer.ts
...dsen_application/static/js/ducks/tableMetadata/reducer.ts
+0
-1
No files found.
amundsen_application/static/js/components/TableDetail/DetailList/DetailListItem/index.tsx
View file @
052dec38
...
...
@@ -72,10 +72,10 @@ class DetailListItem extends React.Component<DetailListItemProps, DetailListItem
return
(
<
li
className=
'list-group-item detail-list-item'
>
<
div
className=
{
'column-info '
+
(
isExpandable
?
'expandable'
:
''
)
}
onClick=
{
isExpandable
?
this
.
onClick
:
null
}
>
<
div
style=
{
{
width
:
'100%'
,
display
:
'inline-grid'
}
}
>
<
div
className=
'title-section'
>
<
div
className=
'title-row'
>
<
div
className=
'name title-2'
>
{
metadata
.
name
}
</
div
>
<
div
className=
'column-type'
>
{
metadata
.
type
||
'null'
}
</
div
>
<
div
className=
'column-type'
>
{
metadata
.
type
?
metadata
.
type
.
toLowerCase
()
:
'null'
}
</
div
>
</
div
>
</
div
>
{
...
...
amundsen_application/static/js/components/TableDetail/DetailList/DetailListItem/styles.scss
View file @
052dec38
...
...
@@ -31,15 +31,22 @@
margin
:
-10px
-4px
0
;
padding
:
10px
4px
0
;
.title-section
{
width
:
100%
;
overflow-wrap
:
break-word
;
.title-row
{
display
:
flex
;
flex-direction
:
row
;
.name
{
margin-right
:
8px
;
max-width
:
85%
;
}
.column-type
{
margin-top
:
4px
;
max-width
:
15%
;
}
}
}
...
...
amundsen_application/static/js/components/TableDetail/index.tsx
View file @
052dec38
...
...
@@ -195,8 +195,7 @@ export class TableDetail extends React.Component<TableDetailProps & RouteCompone
}
};
getAvatarForLineage
=
()
=>
{
const
href
=
AppConfig
.
tableLineage
.
urlGenerator
(
this
.
database
,
this
.
cluster
,
this
.
schema
,
this
.
tableName
);
renderAvatarForLineage
=
(
href
:
string
)
=>
{
return
(
<
a
href=
{
href
}
target=
'_blank'
id=
"explore-lineage"
onClick=
{
logClick
}
>
<
AvatarLabel
label=
{
this
.
displayName
}
src=
{
AppConfig
.
tableLineage
.
iconPath
}
/>
...
...
@@ -217,6 +216,14 @@ export class TableDetail extends React.Component<TableDetailProps & RouteCompone
const
entityCardSections
=
[];
// "Data Store" section
const
dataStoreRenderer
=
()
=>
{
return
(
<
label
className=
"m-auto"
>
{
data
.
database
.
toUpperCase
()
}
</
label
>
);
};
entityCardSections
.
push
({
'title'
:
'Data Store'
,
'contentRenderer'
:
dataStoreRenderer
,
'isEditable'
:
false
});
// "Owned By" section
const
ownerSectionRenderer
=
()
=>
{
return
(
...
...
@@ -271,23 +278,27 @@ export class TableDetail extends React.Component<TableDetailProps & RouteCompone
// "Lineage" Section
if
(
AppConfig
.
tableLineage
.
isEnabled
)
{
const
href
=
AppConfig
.
tableLineage
.
urlGenerator
(
this
.
database
,
this
.
cluster
,
this
.
schema
,
this
.
tableName
);
if
(
!!
href
)
{
entityCardSections
.
push
({
'title'
:
'Table Lineage'
+
(
AppConfig
.
tableLineage
.
isBeta
?
' (beta)'
:
''
),
'contentRenderer'
:
this
.
getAvatarForLineage
,
'contentRenderer'
:
()
=>
{
return
this
.
renderAvatarForLineage
(
href
)
}
,
'isEditable'
:
false
});
};
}
// "Preview" Section
const
previewSectionRenderer
=
()
=>
{
const
exploreSqlHref
=
AppConfig
.
tableProfile
.
isExploreEnabled
?
this
.
getExploreSqlUrl
()
:
''
;
return
(
<
div
>
<
DataPreviewButton
modalTitle=
{
this
.
displayName
}
/>
{
AppConfig
.
tableProfile
.
isExploreEnabled
&&
exploreSqlHref
&&
<
a
className=
"btn btn-default btn-block"
href=
{
this
.
getExploreSqlUrl
()
}
href=
{
exploreSqlHref
}
role=
"button"
target=
"_blank"
id=
"explore-sql"
...
...
amundsen_application/static/js/ducks/tableMetadata/reducer.ts
View file @
052dec38
...
...
@@ -161,7 +161,6 @@ export default function reducer(state: TableMetadataReducerState = initialState,
case
GetLastIndexed
.
SUCCESS
:
return
{
...
state
,
lastIndexed
:
(
<
GetLastIndexedResponse
>
action
).
payload
.
lastIndexedEpoch
};
case
GetPreviewData
.
FAILURE
:
return
{
...
state
,
preview
:
initialPreviewState
};
case
GetPreviewData
.
SUCCESS
:
return
{
...
state
,
preview
:
(
<
GetPreviewDataResponse
>
action
).
payload
};
case
UpdateTableOwner
.
REQUEST
:
...
...
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