Skip to content

Multiple select in web UI for custom arguments #3260

@jFompe

Description

@jFompe

Prerequisites

Description

Introduction

In my team we would like to execute tests for many services at a time from the same script.
So it would be really helpful to be able to have a Select with all our services as "choices", and be able to select a subset of them depending on our needs.

Describe the solution you'd like

I'd like to specify a parameter "is_multiple" when defining a custom argument, so it would be passed to the Select form component. For example:

@events.init_command_line_parser.add_listener
def _(parser):
    parser.add_argument("--endpoints", choices=["status", "test", "users"], is_multiple=True, default=["status"], help="Endpoints")

Describe alternatives you've considered

The "ugly" option would be having a string argument and passing a comma-separated list of my selected services which then I would handle in the script.
Or having one checkbox option for each service and selecting them as necessary, which might be a bit better but still not the most elegant solution.

Additional context

I'm already working on a PR in case you think this feature makes sense.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions