This PR adds support for developers to prefil submit workflow form by passing in the values through query parameters.
To prefil a submit workflow developers can pass in the following query parameters
sidePanel=submit-new-workflow
template=<template that the workflow should follow>
parameters[key]=value // Here the key would be the parameter for the job and value would be the value of the parameter.
You should provide the keys that are supported by the specified template
Modifications
Updated workflow-list component
Updated submit-workflow-panel.tsx component to default entry point if provided.
Updated workflow-creator.tsx to read default values from query parameters.
The workflow will be prefilled with the parameters that the template supports
Added new shared helper function to parse query parameter of the format ?parameters[key]=value.
Fixes #12124
Motivation
This PR adds support for developers to prefil submit workflow form by passing in the values through query parameters.
To prefil a submit workflow developers can pass in the following query parameters
Modifications
workflow-list
componentsubmit-workflow-panel.tsx
component to default entry point if provided.workflow-creator.tsx
to read default values from query parameters.?parameters[key]=value
.Verification
✅ Visit http://localhost:8080/workflows?namespace=argo&limit=50 and create a new workflow and ensure the default values are populated.
✅ Visit the prefilled URL and ensure that the values from url query are populated.