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

Support parameter grouping #313

Open
FRosner opened this issue Oct 30, 2017 · 1 comment
Open

Support parameter grouping #313

FRosner opened this issue Oct 30, 2017 · 1 comment

Comments

@FRosner
Copy link
Owner

FRosner commented Oct 30, 2017

Problem

When templates have a lot of parameters, the UI becomes harder to parse.

Solution

Allow grouping of parameters by assigning an optional group to each parameter. Then all parameters of the same group will be shown together in a separate section of the form, having the group name in the title. Ordering within the groups works just as before, while the groups themselves have an order index to indicate ordering of the groups.

This requires us to add also a new configuration stanza to each template to add parameter groups. The parameter will then contain the group ID, and the group ID will have an optional name in the groups stanza.

Groups for ID will be ignored.

Example

parameters = {
  "username" = {
    name = "Username"
    type = string
    group = "credentials"
  }
  "password" = {
    name = "Password"
    secret = true
    group = "credentials"
  }
  "http-port" = {
    name = "HTTP Port"
    default = 80
    group = "network"
  }
}

groups = {
  "credentials" = {
    name = "Credentials"
    order-index = 1
  }
  "network" = {
    name = "Network"
    order-index = 2
  }
}
@FRosner FRosner added this to the 0.8.0 milestone Oct 30, 2017
@FRosner
Copy link
Owner Author

FRosner commented Oct 30, 2017

@Gerrrr what do you think?

@FRosner FRosner modified the milestones: 0.8.0, 0.9.0 Mar 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant