-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
229 changed files
with
24,107 additions
and
16,801 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
19 changes: 19 additions & 0 deletions
19
...flows-dashboard/src/common/hooks/useWorkflowDefinitionQuery/useWorkflowDefinitionQuery.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { workflowDefinitionsQueryKeys } from '@/domains/workflow-definitions'; | ||
import { useQuery } from '@tanstack/react-query'; | ||
|
||
export const useWorkflowDefinitionQuery = (workflowId?: string) => { | ||
console.log('keys', workflowDefinitionsQueryKeys.get({ workflowDefinitionId: workflowId! })); | ||
|
||
const { data, isLoading, error } = useQuery({ | ||
...workflowDefinitionsQueryKeys.get({ workflowDefinitionId: workflowId! }), | ||
// @ts-ignore | ||
enabled: Boolean(workflowId), | ||
retry: false, | ||
}); | ||
|
||
return { | ||
data, | ||
isLoading, | ||
error, | ||
}; | ||
}; |
33 changes: 33 additions & 0 deletions
33
apps/workflows-dashboard/src/components/molecules/JSONViewButton/JSONViewButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Button } from '@/components/atoms/Button'; | ||
import { Dialog, DialogContent, DialogTrigger } from '@/components/atoms/Dialog'; | ||
import { JSONEditorComponent } from '@/components/organisms/JsonEditor'; | ||
import { CodeIcon } from 'lucide-react'; | ||
import Scrollbars from 'react-custom-scrollbars'; | ||
|
||
interface Props { | ||
json: string; | ||
trigger?: JSX.Element; | ||
} | ||
|
||
export const JSONViewButton = ({ | ||
json, | ||
trigger = ( | ||
<Button className="flex items-center gap-2"> | ||
<CodeIcon size="16" /> | ||
View context | ||
</Button> | ||
), | ||
}: Props) => { | ||
return ( | ||
<Dialog> | ||
<DialogTrigger asChild>{trigger}</DialogTrigger> | ||
<DialogContent className="h-[80vh] min-w-[80%]"> | ||
<div className="pr-4"> | ||
<Scrollbars> | ||
<JSONEditorComponent readOnly value={json ? JSON.parse(json) : {}} /> | ||
</Scrollbars> | ||
</div> | ||
</DialogContent> | ||
</Dialog> | ||
); | ||
}; |
1 change: 1 addition & 0 deletions
1
apps/workflows-dashboard/src/components/molecules/JSONViewButton/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './JSONViewButton'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.