kestra-io / kestra

:zap: Workflow Automation Platform. Orchestrate & Schedule code in any language, run anywhere, 500+ plugins. Alternative to Zapier, Rundeck, Camunda, Airflow...
https://kestra.io
Apache License 2.0
11.47k stars 976 forks source link

Extend the SELECT input with a radio-button option #5591

Open anna-geller opened 1 week ago

anna-geller commented 1 week ago

Feature description

Using this flow:

id: choose_your_cloud
namespace: company.team

inputs:
  - id: cloud
    type: SELECT
    allowCustomValue: true
    values:
      - AWS
      - GCP
      - Azure
      - Oracle

tasks:
  - id: hello
    type: io.kestra.plugin.core.log.Log
    message: Hello {{ inputs.cloud }}

You can see the SELECT will be by default shown as a dropdown:

image

For some use cases, a radio button might be more desirable. We can add an ENUM option displayType: RADIO_BUTTON:

id: choose_your_cloud
namespace: company.team

inputs:
  - id: cloud
    type: SELECT
    allowCustomValue: true
    displayType: RADIO_BUTTON # default is DROPDOWN
    values:
      - AWS
      - GCP
      - Azure
      - Oracle

tasks:
  - id: hello
    type: io.kestra.plugin.core.log.Log
    message: Hello {{ inputs.cloud }}

DROPDOWN should stay as the default option as it's more compact.


Note: Adding the ENUM property has a small backend part.

Pk9697 commented 1 week ago

/assign

MilosPaunovic commented 1 week ago

@Pk9697 Why don't we close the other issue you're assigned to first, and then you can take over this one.

SanjyotX commented 1 week ago

/assign

Ben8t commented 1 week ago

@SanjyotX I assigned you to another one minutes ago, let's go one by one, when that is completed, I'm perfectly happy with you taking over this one, also.

yoyounik commented 1 week ago

Hii @anna-geller i wanted to contribute to this work, can it be assigned to me ?

yoyounik commented 3 days ago

Hey @anna-geller @MilosPaunovic I added an isRadio field to SelectInput.java to identify radio button inputs. In InputsForm.vue, I have included a condition to render el-radio-group when input.isRadio is true.

Please review the changes when you have a chance. Thanks!

anna-geller commented 3 days ago

could you link your PR?

yoyounik commented 3 days ago

sure:

https://github.com/kestra-io/kestra/pull/5692

yoyounik commented 3 days ago

Hey @Skraye @anna-geller @MilosPaunovic please go through my PR once and let me know if any changes are required thanks!

yoyounik commented 19 hours ago

Hii Team, @Skraye @anna-geller @MilosPaunovic @Ben8t Wishing you all a very happy Diwali. Hope you have a wonderful celebration. When you have a moment , could you please take a look at my PR and let me know if any adjustments are needed ? Thanks so much.