Skip to content
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

Feature/drc 1028 UI checklist view when no models for row count diff preset #575

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 31 additions & 18 deletions js/src/components/check/CheckDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,22 @@ export const CheckDetail = ({ checkId }: CheckDetailProps) => {
/>
) : (
<Center bg="rgb(249,249,249)" height="100%">
<Button onClick={handleRerun} colorScheme="blue" size="sm">
Run Query
</Button>
<Flex direction="column" gap={4}>
{(check && check.is_preset && check.type === "row_count_diff") && (
<Box>
This action is part of the initial preset and has not been performed yet.
Once performed, the result will be shown here.
</Box>
)}
<Box display="flex" justifyContent="center">
<Button onClick={handleRerun} colorScheme="blue" size="sm">
{check && check.is_preset &&
check.type === "row_count_diff" ?
"Execute Row Count Diff" : "Run Query"
}
</Button>
</Box>
</Flex>
</Center>
))}
{check && check.type === "schema_diff" && (
Expand All @@ -402,21 +415,21 @@ export const CheckDetail = ({ checkId }: CheckDetailProps) => {
{(check?.type === "query" ||
check?.type === "query_diff" ||
check?.type === "query_base") && (
<TabPanel p={0} height="100%" width="100%">
{check.params?.base_sql_template ? (
<DualSqlEditor
value={(check?.params as any)?.sql_template || ""}
baseValue={(check?.params as any)?.base_sql_template || ""}
options={{ readOnly: true }}
/>
) : (
<SqlEditor
value={(check?.params as any)?.sql_template || ""}
options={{ readOnly: true }}
/>
)}
</TabPanel>
)}
<TabPanel p={0} height="100%" width="100%">
{check.params?.base_sql_template ? (
<DualSqlEditor
value={(check?.params as any)?.sql_template || ""}
baseValue={(check?.params as any)?.base_sql_template || ""}
options={{ readOnly: true }}
/>
) : (
<SqlEditor
value={(check?.params as any)?.sql_template || ""}
options={{ readOnly: true }}
/>
)}
</TabPanel>
)}
</TabPanels>
</Tabs>
</Box>
Expand Down
Loading