Skip to content

Commit

Permalink
updating the details on screen after edit dbt
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishankoradia committed Jul 14, 2023
1 parent ec30354 commit 8551f7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/DBT/DBTSetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ interface DBTSetupProps {
gitrepoUrl: string;
schema: string;
mode: string;
fetchUpdatedWorkspace: (...args: any) => any;
}

interface DBTCreateWorkspaceParams {
Expand All @@ -34,6 +35,7 @@ export const DBTSetup = ({
gitrepoUrl,
schema,
mode,
fetchUpdatedWorkspace,
}: DBTSetupProps) => {
const { register, handleSubmit, reset } = useForm<DBTCreateWorkspaceParams>();
const { data: session }: any = useSession();
Expand Down Expand Up @@ -138,6 +140,7 @@ export const DBTSetup = ({
};
try {
await httpPut(session, 'dbt/schema/', updateSchemaPayload);
fetchUpdatedWorkspace();
} catch (err: any) {
console.error(err);
errorToast(err.message, [], toastContext);
Expand All @@ -159,6 +162,7 @@ export const DBTSetup = ({
setTimeout(() => {
checkProgress(message.task_id);
}, 1000);
fetchUpdatedWorkspace();
} catch (err: any) {
console.error(err);
errorToast(err.message, [], toastContext);
Expand Down
2 changes: 2 additions & 0 deletions src/pages/pipeline/transform.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ const Transform = () => {
gitrepoUrl=""
schema=""
mode="create"
fetchUpdatedWorkspace={() => setRerender(!rerender)}
/>
) : dbtSetupStage === 'complete' && workspace ? (
<DBTSetup
Expand All @@ -293,6 +294,7 @@ const Transform = () => {
gitrepoUrl={workspace?.gitrepo_url}
schema={workspace?.default_schema}
mode="edit"
fetchUpdatedWorkspace={() => setRerender(!rerender)}
/>
) : (
''
Expand Down

0 comments on commit 8551f7b

Please sign in to comment.