Skip to content

Add mapping possibility for list parameters #129

Closed

Description

@bugy

When a user selects a value for the list parameter, this value is passed to the script as an argument.
However, sometimes required value could be too complicated (IP or MAC address, for example), then it would be possible to have some kind of mapping: user-friendly name is shown on the UI, but corresponding "technical" value is passed to the script.
Example:

{
    "name": "server",
    "type": "list",
    "values": {
        "prod": "192.168.0.10",
        "dev": "192.168.0.11",
        "qa": "192.168.0.12"
    }   
}

In this case user will select from prod, dev an qa, but 192.168.0.xx will be passed to a script

Activity

  1. giuman2 commented on Nov 15, 2021

    @giuman2

    Hi,
    any news about this feature? It could be very useful in test case like the one you've mentioned.

  2. bugy commented on Nov 15, 2021

    @bugy
    OwnerAuthor
  3. added this to the 1.18.0 milestone on Apr 9, 2023
  4. added a commit that references this issue on Apr 9, 2023
  5. bugy commented on Apr 9, 2023

    @bugy
    OwnerAuthor

    Done, now it's possible to specify values_ui_mapping: https://github.com/bugy/script-server/wiki/Script-config#values_ui_mapping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions