bugy / script-server

Web UI for your scripts with execution management
Other
1.52k stars 244 forks source link

Dependant parameter is loaded twice on page opening #655

Open bugy opened 1 year ago

bugy commented 1 year ago

If there is a dependent parameter, which is based on another parameter and a script, it is loaded twice, if another parameter has a default value. E.g.:

 {
      "name": "Required Text",
      "default": "apt"
    },
    {
      "name": "Command-based list",
      "default": "lib",
      "type": "list",
      "values": {
        "script": "ls /var | grep -v lock | grep -v backups"
      }
    },

    {
      "name": "Dependant list",
      "type": "list",
      "values": {
        "script": "sleep 10 && ls /var/${Command-based list}/${Required Text}",
        "shell": true
      }
    }

In this cage, the script is invoked when a page is loading and then once again, after UI is rendered already