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
246e5f79
Unverified
Commit
246e5f79
authored
Jul 28, 2020
by
Tamika Tannis
Committed by
GitHub
Jul 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly set column editable state (#524)
parent
1a2e125c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
metadata_utils.py
amundsen_application/api/utils/metadata_utils.py
+6
-5
No files found.
amundsen_application/api/utils/metadata_utils.py
View file @
246e5f79
...
@@ -96,14 +96,15 @@ def marshall_table_full(table_dict: Dict) -> Dict:
...
@@ -96,14 +96,15 @@ def marshall_table_full(table_dict: Dict) -> Dict:
for
reader_object
in
readers
:
for
reader_object
in
readers
:
reader_object
[
'user'
]
=
_map_user_object_to_schema
(
reader_object
[
'user'
])
reader_object
[
'user'
]
=
_map_user_object_to_schema
(
reader_object
[
'user'
])
# If order is provided, we sort the column based on the pre-defined order
columns
=
results
[
'columns'
]
if
app
.
config
[
'COLUMN_STAT_ORDER'
]:
for
col
in
columns
:
columns
=
results
[
'columns'
]
# Set editable state
for
col
in
columns
:
col
[
'is_editable'
]
=
is_editable
# If order is provided, we sort the column based on the pre-defined order
if
app
.
config
[
'COLUMN_STAT_ORDER'
]:
# the stat_type isn't defined in COLUMN_STAT_ORDER, we just use the max index for sorting
# the stat_type isn't defined in COLUMN_STAT_ORDER, we just use the max index for sorting
col
[
'stats'
]
.
sort
(
key
=
lambda
x
:
app
.
config
[
'COLUMN_STAT_ORDER'
]
.
col
[
'stats'
]
.
sort
(
key
=
lambda
x
:
app
.
config
[
'COLUMN_STAT_ORDER'
]
.
get
(
x
[
'stat_type'
],
len
(
app
.
config
[
'COLUMN_STAT_ORDER'
])))
get
(
x
[
'stat_type'
],
len
(
app
.
config
[
'COLUMN_STAT_ORDER'
])))
col
[
'is_editable'
]
=
is_editable
# TODO: Add the 'key' or 'id' to the base TableSchema
# TODO: Add the 'key' or 'id' to the base TableSchema
results
[
'key'
]
=
f
'{table.database}://{table.cluster}.{table.schema}/{table.name}'
results
[
'key'
]
=
f
'{table.database}://{table.cluster}.{table.schema}/{table.name}'
...
...
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