diff --git a/ui/src/app/workflows/components/workflow-creator-info/workflow-creator-info.tsx b/ui/src/app/workflows/components/workflow-creator-info/workflow-creator-info.tsx index 4d71f27ec6db..011750e5ed21 100644 --- a/ui/src/app/workflows/components/workflow-creator-info/workflow-creator-info.tsx +++ b/ui/src/app/workflows/components/workflow-creator-info/workflow-creator-info.tsx @@ -18,24 +18,25 @@ export class WorkflowCreatorInfo extends React.Component([ - ['Name', w.metadata.labels[labels.creator]], - ['Email', w.metadata.labels[labels.creatorEmail]], - ['Preferred username', w.metadata.labels[labels.creatorPreferredUsername]] + const creatorInfoMap = new Map([ + ['Name', [labels.creator, w.metadata.labels[labels.creator]]], + ['Email', [labels.creatorEmail, w.metadata.labels[labels.creatorEmail]]], + ['Preferred username', [labels.creatorPreferredUsername, w.metadata.labels[labels.creatorPreferredUsername]]] ]); - creatorInfoMap.forEach((value: string, key: string) => { - if (value !== '' && value !== undefined) { + creatorInfoMap.forEach((value: [string, string], key: string) => { + const [searchKey, searchValue] = value; + if (searchValue !== '' && searchValue !== undefined) { creatorLabels.push(
{ e.preventDefault(); - this.props.onChange(key, value); + this.props.onChange(searchKey, searchValue); }}>
{key}
-
{value}
+
{searchValue}
); }