Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sairam91
Copy link

@sairam91 sairam91 commented Nov 20, 2024

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

  • 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.

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

@sairam91 sairam91 marked this pull request as ready for review November 20, 2024 05:50
@sairam91 sairam91 changed the title fix(ui): prefill parameters for workflow submit form. Fixes argoproj#… feat(ui): prefill parameters for workflow submit form. Fixes #12124 Nov 20, 2024
Copy link
Contributor

@MasonM MasonM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI: Prefill parameters for the workflow submit form
2 participants