Skip to content

Commit

Permalink
feat: Workflow title/description in workflow list view. Fixes #6529
Browse files Browse the repository at this point in the history
Fixes #6529

- [x] title and description in list view

Signed-off-by: jmeridth <jmeridth@gmail.com>
  • Loading branch information
jmeridth committed Nov 28, 2022
1 parent b5dbd00 commit d28d2ee
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ui/src/app/shared/annotations.ts
@@ -1 +1,3 @@
export const ANNOTATION_KEY_POD_NAME_VERSION = 'workflows.argoproj.io/pod-name-format';
export const ANNOTATION_TITLE = 'workflows.argoproj.io/title';
export const ANNOTATION_DESCRIPTION = 'workflows.argoproj.io/description';
2 changes: 2 additions & 0 deletions ui/src/app/shared/services/workflows-service.ts
Expand Up @@ -33,6 +33,7 @@ export class WorkflowsService {
'items.metadata.namespace',
'items.metadata.creationTimestamp',
'items.metadata.labels',
'items.metadata.annotations',
'items.status.phase',
'items.status.message',
'items.status.finishedAt',
Expand Down Expand Up @@ -90,6 +91,7 @@ export class WorkflowsService {
'result.object.status.progress',
'result.type',
'result.object.metadata.labels',
'result.object.metadata.annotations',
'result.object.spec.suspend'
];
params.push(`fields=${fields.join(',')}`);
Expand Down
Expand Up @@ -2,6 +2,7 @@ import {Ticker} from 'argo-ui/src/index';
import * as React from 'react';
import {Link} from 'react-router-dom';
import {Workflow} from '../../../../models';
import {ANNOTATION_DESCRIPTION, ANNOTATION_TITLE} from '../../../shared/annotations';
import {uiUrl} from '../../../shared/base';
import {DurationPanel} from '../../../shared/components/duration-panel';
import {PhaseIcon} from '../../../shared/components/phase-icon';
Expand Down Expand Up @@ -48,7 +49,10 @@ export class WorkflowsRow extends React.Component<WorkflowsRowProps, WorkflowRow
<PhaseIcon value={wf.status.phase} />
</div>
<Link to={uiUrl(`workflows/${wf.metadata.namespace}/${wf.metadata.name}`)} className='small-11 row'>
<div className='columns small-3'>{wf.metadata.name}</div>
<div className='columns small-3'>
{(wf.metadata.annotations && wf.metadata.annotations[ANNOTATION_TITLE]) || wf.metadata.name}
{wf.metadata.annotations && wf.metadata.annotations[ANNOTATION_DESCRIPTION] ? <p>{wf.metadata.annotations[ANNOTATION_DESCRIPTION]}</p> : null}
</div>
<div className='columns small-1'>{wf.metadata.namespace}</div>
<div className='columns small-1'>
<Timestamp date={wf.status.startedAt} />
Expand Down

0 comments on commit d28d2ee

Please sign in to comment.