Skip to content

Commit

Permalink
handle json parsing in edit rerun tab (#1554)
Browse files Browse the repository at this point in the history
* handle json parsing in edit rerun tab

* add rerendering when workflow is in running state to see real life changes

* refactor omitDeep function to be more performant and use new mutation for workflow exporting and cloning in builder
  • Loading branch information
MarcoMruz authored May 20, 2024
1 parent 1035178 commit f59f9e7
Show file tree
Hide file tree
Showing 13 changed files with 343 additions and 222 deletions.
135 changes: 129 additions & 6 deletions packages/frinx-workflow-builder/src/__generated__/graphql.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC } from 'react';
import { ClientWorkflowWithTasks, Editor, removeGraphqlSpecsFromWorkflow } from '@frinx/shared';
import { ClientWorkflowWithTasks, Editor, omitDeep } from '@frinx/shared';
import { Modal, ModalBody, ModalCloseButton, ModalContent, ModalHeader, ModalOverlay } from '@chakra-ui/react';

type Props = {
Expand All @@ -16,7 +16,10 @@ const WorkflowDefinitionModal: FC<Props> = ({ isOpen, onClose, workflow }) => {
<ModalHeader>Workflow definition</ModalHeader>
<ModalCloseButton />
<ModalBody>
<Editor language="json" defaultValue={JSON.stringify(removeGraphqlSpecsFromWorkflow(workflow), null, 2)} />
<Editor
language="json"
defaultValue={JSON.stringify(omitDeep(workflow, ['id', 'tasksJson', '__typename']), null, 2)}
/>
</ModalBody>
</ModalContent>
</Modal>
Expand Down
Loading

0 comments on commit f59f9e7

Please sign in to comment.