argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
15.11k stars 3.2k forks source link

feat(ui): prefill parameters for workflow submit form. Fixes #12124 #13922

Open sairam91 opened 1 day ago

sairam91 commented 1 day ago

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

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

Verification

✅ Visit http://localhost:8080/workflows?namespace=argo&limit=50 and create a new workflow and ensure the default values are populated. Screenshot 2024-11-19 at 9 56 16 PM

✅ Visit the prefilled URL and ensure that the values from url query are populated. Screenshot 2024-11-19 at 9 56 33 PM