-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cluster-ui: add getTableMetadataApi and connect tables page #131123
Conversation
8183448
to
528111f
Compare
https://www.loom.com/share/9d9ab55daa484920851e8377d5bcca0c Note that the percentage live data column has a bug in that video that is fixed in #131124 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. Just have a couple small nits
percent_live_data: number; | ||
total_live_data_bytes: number; | ||
total_data_bytes: number; | ||
store_ids: number[] | null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this nullable / Are you seeing cases where this is null instead of an empty array?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I just saw that the system schema defines this column as not nullable. Removed.
dbID?: number; | ||
sortBy?: string; | ||
sortOrder?: "asc" | "desc"; | ||
storeID?: StoreID[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should this be storeIds
? Also same comment about the the capital D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
type TableMetadataResponse = APIV2ResponseWithPaginationState<TableMetadata[]>; | ||
|
||
export type TableMetadataRequest = { | ||
dbID?: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I know this is pretty inconsistent in the repo, but I think I personally don't think the "D" in "ID" should be uppercase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
<div> | ||
{Bytes(t.liveDataBytes)} / {Bytes(t.totalDataBytes)} | ||
<div>{t.liveDataPercentage * 100}%</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: We should maybe talk to Inna about what level of precision we want and should round to that. Also one thing about rounding logic that we should keep in mind is that we shouldnt round "99.99x" up to 100%
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack - yeah let's get her to review and leave design requests.
528111f
to
5cebce1
Compare
This commit connects the v2 db details - tables page to the new `api/v2/table_metadata` api route. The following components are now connected to the api: - listing tables for a db - sorting by column - searching by table name - filtering by node id Epic: CRDB-37558 Fixes: cockroachdb#131122 Release note: None
5cebce1
to
47dfdab
Compare
TFTR! |
Only the latest commit should be reviewed in this PR.
Previous: #131046
This commit connects the v2 db details - tables page to the
new
api/v2/table_metadata
api route.The following components are now connected to the api:
Epic: CRDB-37558
Fixes: #131122
Release note: None