Skip to content

Commit

Permalink
feat: CronWorkflow/WorkflowTemplate title/description in list view (#…
Browse files Browse the repository at this point in the history
…12674)

Signed-off-by: panicboat <panicboat@gmail.com>
Co-authored-by: Anton Gilgur <4970083+agilgur5@users.noreply.github.com>
  • Loading branch information
panicboat and agilgur5 committed Feb 18, 2024
1 parent 4ad0db9 commit 33c51ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as React from 'react';
import {useContext, useEffect, useState} from 'react';
import {Link, RouteComponentProps} from 'react-router-dom';
import {CronWorkflow} from '../../../../models';
import {ANNOTATION_DESCRIPTION, ANNOTATION_TITLE} from '../../../shared/annotations';
import {uiUrl} from '../../../shared/base';
import {ErrorNotice} from '../../../shared/components/error-notice';
import {ExampleManifests} from '../../../shared/components/example-manifests';
Expand Down Expand Up @@ -145,7 +146,10 @@ export function CronWorkflowList({match, location, history}: RouteComponentProps
key={`${w.metadata.namespace}/${w.metadata.name}`}
to={uiUrl(`cron-workflows/${w.metadata.namespace}/${w.metadata.name}`)}>
<div className='columns small-1'>{w.spec.suspend ? <i className='fa fa-pause' /> : <i className='fa fa-clock' />}</div>
<div className='columns small-3'>{w.metadata.name}</div>
<div className='columns small-3'>
{w.metadata.annotations?.[ANNOTATION_TITLE] ?? w.metadata.name}
{w.metadata.annotations?.[ANNOTATION_DESCRIPTION] ? <p>{w.metadata.annotations[ANNOTATION_DESCRIPTION]}</p> : null}
</div>
<div className='columns small-2'>{w.metadata.namespace}</div>
<div className='columns small-1'>{w.spec.timezone}</div>
<div className='columns small-1'>{w.spec.schedule}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {useContext, useEffect, useState} from 'react';
import {Link, RouteComponentProps} from 'react-router-dom';

import {WorkflowTemplate} from '../../../../models';
import {ANNOTATION_DESCRIPTION, ANNOTATION_TITLE} from '../../../shared/annotations';
import {uiUrl} from '../../../shared/base';
import {ErrorNotice} from '../../../shared/components/error-notice';
import {ExampleManifests} from '../../../shared/components/example-manifests';
Expand Down Expand Up @@ -146,7 +147,10 @@ export function WorkflowTemplateList({match, location, history}: RouteComponentP
<div className='columns small-1'>
<i className='fa fa-clone' />
</div>
<div className='columns small-5'>{t.metadata.name}</div>
<div className='columns small-5'>
{t.metadata.annotations?.[ANNOTATION_TITLE] ?? t.metadata.name}
{t.metadata.annotations?.[ANNOTATION_DESCRIPTION] ? <p>{t.metadata.annotations[ANNOTATION_DESCRIPTION]}</p> : null}
</div>
<div className='columns small-3'>{t.metadata.namespace}</div>
<div className='columns small-3'>
<Timestamp date={t.metadata.creationTimestamp} />
Expand Down

0 comments on commit 33c51ed

Please sign in to comment.