From 185705a8568246d18c380778aacac314c0ea38ae Mon Sep 17 00:00:00 2001 From: "J.C. Zhong" Date: Thu, 23 Mar 2023 18:20:56 +0000 Subject: [PATCH] fix: column name overlaps with type --- querybook/server/datasources/metastore.py | 1 + .../DataTableViewColumn/DataTableColumnCard.scss | 7 ++++--- .../webapp/ui/KeyContentDisplay/KeyContentDisplay.scss | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/querybook/server/datasources/metastore.py b/querybook/server/datasources/metastore.py index 5ee384b52..c86a80614 100644 --- a/querybook/server/datasources/metastore.py +++ b/querybook/server/datasources/metastore.py @@ -375,6 +375,7 @@ def get_column_by_table(table_id, column_name, with_table=False): @register("/column//", methods=["GET"]) +@limiter.limit("120 per minute") def get_column(column_id, with_table=False): column = logic.get_column_by_id(column_id) verify_data_table_permission(column.table_id) diff --git a/querybook/webapp/components/DataTableViewColumn/DataTableColumnCard.scss b/querybook/webapp/components/DataTableViewColumn/DataTableColumnCard.scss index 84c98ae1b..20ea5d577 100644 --- a/querybook/webapp/components/DataTableViewColumn/DataTableColumnCard.scss +++ b/querybook/webapp/components/DataTableViewColumn/DataTableColumnCard.scss @@ -8,13 +8,14 @@ display: flex; flex-direction: row; align-items: center; + gap: 12px; + .column-name { - width: 180px; - margin-right: 12px; + min-width: 160px; } .column-type { - width: 100%; + flex: 1; word-break: break-all; } } diff --git a/querybook/webapp/ui/KeyContentDisplay/KeyContentDisplay.scss b/querybook/webapp/ui/KeyContentDisplay/KeyContentDisplay.scss index 8f046e136..82aa1b899 100644 --- a/querybook/webapp/ui/KeyContentDisplay/KeyContentDisplay.scss +++ b/querybook/webapp/ui/KeyContentDisplay/KeyContentDisplay.scss @@ -3,16 +3,16 @@ flex-direction: row; margin-bottom: 8px; cursor: default; + gap: 12px; .KeyContentDisplay-key { - width: 180px; - margin-right: 12px; + min-width: 160px; color: var(--text-light); font-size: var(--text-size); font-weight: var(--light-bold-font); } .KeyContentDisplay-content { - width: 100%; + flex: 1; align-self: center; &.right-align {