-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui): Add links to wft, cwf, or cwft to workflow list and details. …
- Loading branch information
Showing
14 changed files
with
112 additions
and
25 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
ui/src/app/cluster-workflow-templates/components/cluster-workflow-template-link.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,9 @@ | ||
import * as React from 'react'; | ||
import {uiUrl} from '../../shared/base'; | ||
import {LinkButton} from '../../shared/components/link-button'; | ||
|
||
export const ClusterWorkflowTemplateLink = (props: {name: string}) => ( | ||
<LinkButton to={uiUrl('cluster-workflow-templates/' + props.name)}> | ||
<i className='fa fa-window-restore' /> {props.name} | ||
</LinkButton> | ||
); |
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,9 @@ | ||
import * as React from 'react'; | ||
import {uiUrl} from '../../shared/base'; | ||
import {LinkButton} from '../../shared/components/link-button'; | ||
|
||
export const CronWorkflowLink = (props: {namespace: string; name: string}) => ( | ||
<LinkButton to={uiUrl('cron-workflows/' + props.namespace + '/' + props.name)}> | ||
<i className='fa fa-clock' /> {props.name} | ||
</LinkButton> | ||
); |
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,8 @@ | ||
import * as React from 'react'; | ||
import {ReactNode} from 'react'; | ||
|
||
export const LinkButton = (props: {to: string; children?: ReactNode}) => ( | ||
<button className='argo-button argo-button--base-o' onClick={() => (document.location.href = props.to)}> | ||
{props.children} | ||
</button> | ||
); |
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
9 changes: 9 additions & 0 deletions
9
ui/src/app/workflow-templates/components/workflow-template-link.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,9 @@ | ||
import * as React from 'react'; | ||
import {uiUrl} from '../../shared/base'; | ||
import {LinkButton} from '../../shared/components/link-button'; | ||
|
||
export const WorkflowTemplateLink = (props: {namespace: string; name: string}) => ( | ||
<LinkButton to={uiUrl('workflow-templates/' + props.namespace + '/' + props.name)}> | ||
<i className='fa fa-window-maximize' /> {props.name} | ||
</LinkButton> | ||
); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as React from 'react'; | ||
import {labels} from '../../../models'; | ||
import {ClusterWorkflowTemplateLink} from '../../cluster-workflow-templates/components/cluster-workflow-template-link'; | ||
import {CronWorkflowLink} from '../../cron-workflows/components/cron-workflow-link'; | ||
import {WorkflowTemplateLink} from '../../workflow-templates/components/workflow-template-link'; | ||
|
||
export const WorkflowFrom = (props: {namespace: string; labels: {[name: string]: string}}) => { | ||
const workflowTemplate = props.labels[labels.workflowTemplate]; | ||
const clusterWorkflowTemplate = props.labels[labels.clusterWorkflowTemplate]; | ||
const cronWorkflow = props.labels[labels.cronWorkflow]; | ||
return ( | ||
<> | ||
{workflowTemplate && <WorkflowTemplateLink namespace={props.namespace} name={workflowTemplate} />} | ||
{clusterWorkflowTemplate && <ClusterWorkflowTemplateLink name={clusterWorkflowTemplate} />} | ||
{cronWorkflow && <CronWorkflowLink namespace={props.namespace} name={cronWorkflow} />} | ||
{!workflowTemplate && !clusterWorkflowTemplate && !cronWorkflow && '-'} | ||
</> | ||
); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import * as React from 'react'; | ||
import {uiUrl} from '../../shared/base'; | ||
import {LinkButton} from '../../shared/components/link-button'; | ||
|
||
export const WorkflowLink = (props: {namespace: string; name: string}) => ( | ||
<LinkButton to={uiUrl('workflows/' + props.namespace + '/' + props.name)}> | ||
<i className='fa fa-stream' /> {props.name} | ||
</LinkButton> | ||
); |
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