forked from flyteorg/flyte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Static graph workflow versions (flyteorg#205)
* feat: add workflow versions table Signed-off-by: csirius <[email protected]> Signed-off-by: Jason Porter <[email protected]> * chore(release): Release 0.25.0 [skip ci] # [0.25.0](http://github.com/lyft/flyteconsole/compare/v0.24.0...v0.25.0) (2021-08-31) ### Features * add workflow versions table ([flyteorg#193](http://github.com/lyft/flyteconsole/issues/193)) ([6fff87e](http://github.com/lyft/flyteconsole/commit/6fff87e40007fd15faae634eb6402045c067dd2c)) Signed-off-by: Jason Porter <[email protected]> * improvement: show proper error message for aborted workflows (flyteorg#195) * improvement: show proper error message for aborted workflows Signed-off-by: Pianist038801 <[email protected]> * improvement: show abort message in the execution list Signed-off-by: Pianist038801 <[email protected]> Co-authored-by: Pianist038801 <[email protected]> Signed-off-by: Jason Porter <[email protected]> * Fix/versions executions gap (flyteorg#197) * feat: add workflow versions table Signed-off-by: csirius <[email protected]> * fix: space between versions and executions table Signed-off-by: csirius <[email protected]> Signed-off-by: Jason Porter <[email protected]> * feat: workflow version details page Signed-off-by: csirius <[email protected]> Signed-off-by: Jason Porter <[email protected]> * Pre merge checkin Signed-off-by: Jason Porter <[email protected]> * fix: this is rfc, do not deploy until resolved; details in comments (flyteorg#172) * fix: this is rfc, do not deploy until resolved; details in comments Signed-off-by: Jason Porter <[email protected]> * fix: this is rfc, do not deploy until resolved; details in comments note: deploying with caution; the believe if that it was incorrect to use meta. Signed-off-by: Jason Porter <[email protected]> * fix: show field types on json launch form (flyteorg#199) Signed-off-by: Pianist038801 <[email protected]> Co-authored-by: Pianist038801 <[email protected]> Signed-off-by: Jason Porter <[email protected]> * chore(release): Release 0.25.1 [skip ci] ## [0.25.1](http://github.com/lyft/flyteconsole/compare/v0.25.0...v0.25.1) (2021-09-13) ### Bug Fixes * show field types on json launch form ([flyteorg#199](http://github.com/lyft/flyteconsole/issues/199)) ([a42b9f8](http://github.com/lyft/flyteconsole/commit/a42b9f8520fcd24dee752111e606ad9ae9bd88f5)) * this is rfc, do not deploy until resolved; details in comments ([flyteorg#172](http://github.com/lyft/flyteconsole/issues/172)) ([67dd183](http://github.com/lyft/flyteconsole/commit/67dd18397caf40e350da40e0672e500eaa9f338a)) Signed-off-by: Jason Porter <[email protected]> * Minor fixes Signed-off-by: Jason Porter <[email protected]> * Feat/version details (flyteorg#198) * feat: add workflow versions table Signed-off-by: csirius <[email protected]> * feat: workflow version details page Signed-off-by: csirius <[email protected]> Signed-off-by: Jason Porter <[email protected]> * fix: repopulate struct input fields on relaunch form (flyteorg#201) Signed-off-by: Pianist038801 <[email protected]> Co-authored-by: Pianist038801 <[email protected]> Signed-off-by: Jason Porter <[email protected]> * Graph ux feature add legend (flyteorg#196) * Checkin and merge to master Signed-off-by: Jason Porter <[email protected]> * fixed one more Signed-off-by: Jason Porter <[email protected]> * chore(release): Release 0.25.2 [skip ci] ## [0.25.2](http://github.com/lyft/flyteconsole/compare/v0.25.1...v0.25.2) (2021-09-16) ### Bug Fixes * repopulate struct input fields on relaunch form ([flyteorg#201](http://github.com/lyft/flyteconsole/issues/201)) ([950e080](http://github.com/lyft/flyteconsole/commit/950e080a2c52c6294630f0ffd1410b0e45b50a8d)) Signed-off-by: Jason Porter <[email protected]> * final before pr Signed-off-by: Jason Porter <[email protected]> * Fixed issues created by bad rebase Signed-off-by: Jason Porter <[email protected]> * Fixed more merge issues Signed-off-by: Jason Porter <[email protected]> Co-authored-by: csirius <[email protected]> Co-authored-by: flyte bot <[email protected]> Co-authored-by: pianist <[email protected]> Co-authored-by: Pianist038801 <[email protected]> Co-authored-by: csirius <[email protected]>
- Loading branch information
1 parent
a890e72
commit 0794e3c
Showing
11 changed files
with
332 additions
and
114 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import * as React from 'react'; | ||
import { Workflow, WorkflowId } from 'models/Workflow/types'; | ||
import { useQuery, useQueryClient } from 'react-query'; | ||
import { makeWorkflowQuery } from './workflowQueries'; | ||
import { WaitForQuery } from 'components/common/WaitForQuery'; | ||
import { DataError } from 'components/Errors/DataError'; | ||
import { transformerWorkflowToDAG } from 'components/WorkflowGraph/transformerWorkflowToDAG'; | ||
import { ReactFlowWrapper } from 'components/flytegraph/ReactFlow/ReactFlowWrapper'; | ||
import { ConvertFlyteDagToReactFlows } from 'components/flytegraph/ReactFlow/transformerDAGToReactFlow'; | ||
import { dNode } from 'models/Graph/types'; | ||
import { getRFBackground } from 'components/flytegraph/ReactFlow/utils'; | ||
import { | ||
ConvertDagProps, | ||
RFGraphTypes, | ||
RFWrapperProps | ||
} from 'components/flytegraph/ReactFlow/types'; | ||
|
||
export const renderStaticGraph = props => { | ||
const workflow = props.closure.compiledWorkflow; | ||
const version = props.id.version; | ||
|
||
const dag: dNode = transformerWorkflowToDAG(workflow); | ||
const rfGraphJson = ConvertFlyteDagToReactFlows({ | ||
root: dag, | ||
maxRenderDepth: 0, | ||
isStaticGraph: true | ||
} as ConvertDagProps); | ||
const backgroundStyle = getRFBackground().static; | ||
const ReactFlowProps: RFWrapperProps = { | ||
backgroundStyle, | ||
rfGraphJson: rfGraphJson, | ||
type: RFGraphTypes.static, | ||
version: version | ||
}; | ||
return <ReactFlowWrapper {...ReactFlowProps} />; | ||
}; | ||
|
||
export interface StaticGraphContainerProps { | ||
workflowId: WorkflowId; | ||
} | ||
|
||
export const StaticGraphContainer: React.FC<StaticGraphContainerProps> = ({ | ||
workflowId | ||
}) => { | ||
const containerStyle = { | ||
width: '100%', | ||
height: '30%', | ||
maxHeight: '400px', | ||
minHeight: '220px' | ||
}; | ||
const workflowQuery = useQuery<Workflow, Error>( | ||
makeWorkflowQuery(useQueryClient(), workflowId) | ||
); | ||
|
||
return ( | ||
<div style={containerStyle}> | ||
<WaitForQuery query={workflowQuery} errorComponent={DataError}> | ||
{renderStaticGraph} | ||
</WaitForQuery> | ||
</div> | ||
); | ||
}; |
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
Oops, something went wrong.