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

💡 [REQUEST] - Support for Multiple CLIs #39

Open
Kiyo5hi opened this issue Jul 20, 2023 · 1 comment
Open

💡 [REQUEST] - Support for Multiple CLIs #39

Kiyo5hi opened this issue Jul 20, 2023 · 1 comment
Labels
enhancement New feature or request question Further information is requested

Comments

@Kiyo5hi
Copy link
Contributor

Kiyo5hi commented Jul 20, 2023

Start Date

No response

Implementation PR

No response

Reference Issues

No response

Summary

The app now supports one CLI in runtime. There are times when users want to allow multiple CLIs to be shown on the page at the same time so that one will not have to run multiple processes at the same time or restart the app with different CLI configs over and over.

Basic Example

By calling the app like so:

cli2ui cli1.yaml cli2.yaml cli3.yaml

There should be three CLIs available on the rendered page, and it is user's choice to invoke any on them.

Drawbacks

No response

Unresolved questions

No response

@Kiyo5hi Kiyo5hi added question Further information is requested enhancement New feature or request labels Jul 20, 2023
@Kiyo5hi
Copy link
Contributor Author

Kiyo5hi commented Jul 20, 2023

Since this feature needs a lot of changes, thus the following checklist is proposed:

  • Add session.CLIName string
  • GetOrCreateSession add cliName string as parameter, change template config.Form to templates map[string]config.Form
  • Change BaseUI.FormTemplate to BaseUI.FormTemplates map[string]*config.Form
  • When GetOrCreate, if cliName != s.CLIName, update session.Form with a new clone of the corresponding form
  • On UpdateSubcommand, send CLIName
  • Update page.go accordingly

Modification to this plan may be made at any time without notification if trivial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant