Skip to content

Commit

Permalink
fix(ui): missing url href formatting in template link. Fixes #9764 (#…
Browse files Browse the repository at this point in the history
…9790)

Signed-off-by: Tianchu Zhao <[email protected]>
  • Loading branch information
tczhao committed Oct 13, 2022
1 parent d4817ef commit ebae212
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export const CronWorkflowDetails = ({match, location, history}: RouteComponentPr
if (cronWorkflow?.spec?.workflowSpec?.workflowTemplateRef) {
const templateName = cronWorkflow.spec.workflowSpec.workflowTemplateRef.name;
const clusterScope = cronWorkflow.spec.workflowSpec.workflowTemplateRef.clusterScope;
const url: string = clusterScope ? `/cluster-workflow-templates/${templateName}` : `/workflow-templates/${cronWorkflow.metadata.namespace}/${templateName}`;
const url: string = clusterScope ? uiUrl(`cluster-workflow-templates/${templateName}`) : uiUrl(`workflow-templates/${cronWorkflow.metadata.namespace}/${templateName}`);
const icon: string = clusterScope ? 'fa fa-window-restore' : 'fa fa-window-maximize';

const templateLink: Link = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export const WorkflowDetails = ({history, location, match}: RouteComponentProps<
if (workflow?.spec?.workflowTemplateRef) {
const templateName: string = workflow.spec.workflowTemplateRef.name;
const clusterScope: boolean = workflow.spec.workflowTemplateRef.clusterScope;
const url: string = clusterScope ? `/cluster-workflow-templates/${templateName}` : `/workflow-templates/${workflow.metadata.namespace}/${templateName}`;
const url: string = clusterScope ? uiUrl(`cluster-workflow-templates/${templateName}`) : uiUrl(`workflow-templates/${workflow.metadata.namespace}/${templateName}`);
const icon: string = clusterScope ? 'fa fa-window-restore' : 'fa fa-window-maximize';

const templateLink: Link = {
Expand Down

0 comments on commit ebae212

Please sign in to comment.