-
Notifications
You must be signed in to change notification settings - Fork 234
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
fix: move workflow link to source query tab #1445
Conversation
@@ -80,6 +81,21 @@ export const DataTableViewSourceQuery: React.FunctionComponent<IProps> = ({ | |||
); | |||
}); | |||
|
|||
const customProperties = table.custom_properties ?? {}; | |||
const workflowValue = customProperties['workflow']?.toString() ?? 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.
nit: the workflow is already a string I think?
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.
custom_property values are string | number, so change to string type for Link component
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.
@zhangvi7 it doesn't make sense to convert if it is a 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.
updated to use typeof to assert string type
querybook/webapp/components/DataTableViewSourceQuery/DataTableViewSourceQuery.tsx
Show resolved
Hide resolved
const workflowValue = customProperties['workflow']?.toString() ?? null; | ||
const workflowDOM = workflowValue ? ( | ||
<div className="DataTableViewSourceQuery-workflow"> | ||
<div className="data-job-source-query-top"> |
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.
this class data-job-source-query-top
is from component DataJobMetadataInfo
, looks weird to be here. better to define its own.
querybook/webapp/components/DataTableViewSourceQuery/DataTableViewSourceQuery.tsx
Outdated
Show resolved
Hide resolved
@@ -80,6 +81,21 @@ export const DataTableViewSourceQuery: React.FunctionComponent<IProps> = ({ | |||
); | |||
}); | |||
|
|||
const customProperties = table.custom_properties ?? {}; | |||
const workflowValue = customProperties['workflow']?.toString() ?? 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.
@zhangvi7 it doesn't make sense to convert if it is a 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.
nice!
Workflow | ||
</Title> | ||
</div> | ||
{/https?:\/\/[^\s]+/.test(workflowValue.trim()) ? ( |
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.
use isValidUrl in lib/utils/
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.
thanks! added
[ER-7007] Minor Querybook Improvements for Tier 1 tables
Test Plan
Added workflow link to bottom of source query tab