bugy / script-server

Web UI for your scripts with execution management
Other
1.61k stars 249 forks source link

Value and variable parameter #491

Closed antonellocaroli closed 3 years ago

antonellocaroli commented 3 years ago

Hi @bugy

can you confirm that this does not work and there is no way to make it work?

"parameters": [
    {
      "name": "Select Iface",
      "param": "-a",
      "required": true,
      "type": "list",
      "default": {
        "script": "/script/rete/iface00.sh"
      },
      "values": {
        "script": "/script/rete/iface0.sh"
      },
      "description": "Select the network interface"
    },
    {
      "name": "Enable/Disable IP static",
      "param": "-f",
      "required": true,
      "type": "list",
      "default": {
        "script": "/script/rete/enadis.sh '${Select Iface}'"
      },
      "values": [
        "enable",
        "disable"
      ],
      "description": "Enable/Disable IP static - also shows the current status"
    },

/script/rete/iface00.sh > returns eth0 /script/rete/iface0.sh > lists the network interfaces, ex. eth0 eth1 wlan0 etc

/script/rete/enadis.sh eth0 > returns enable or disable

if I remember correctly the parameter in dafault doesn't work, right?

bugy commented 3 years ago

Hi @antonellocaroli, you are right, this is not supported yet, here is a corresponding PR: https://github.com/bugy/script-server/pull/445

bugy commented 3 years ago

And I think this ticket is a duplicate of #320 :sweat_smile:

antonellocaroli commented 3 years ago

@bugy sorry, I had completely forgotten... pardon :)

bugy commented 3 years ago

No problem, it was created quite long ago already, easy to forget

antonellocaroli @.***> schrieb am Sa., 11. Sept. 2021, 09:10:

@bugy https://github.com/bugy sorry, I had completely forgotten... pardon :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bugy/script-server/issues/491#issuecomment-917356805, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJXPJK47BAN7II6B6PAWH3UBL6GVANCNFSM5D2RRE7Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.