Add an “index” to the Port Object of Rockon conf file

Hello again,

Current Port Object schema:

{
  "description": "<A detailed description of this port mapping, why it's for etc..>",
  "label": "<A short label for this mapping. eg: Web-UI port>",
  "host_default": <integer: suggested port number on the host. eg: 8080>,
  (optional)"protocol": "<tcp or udp>",
  (optional)"ui":true,  not needed if false
}

Proposed changed:

{
  "description": "<A detailed description of this port mapping, why it's for etc..>",
  "label": "<A short label for this mapping. eg: Web-UI port>",
  "host_default": <integer: suggested port number on the host. eg: 8080>,
  (optional)"protocol": "<tcp or udp>",
  (optional)"ui":true,  not needed if false
  (optional)"index": "<integer: 1 or above. order of this port, if relevant>"
}

Why?
Sometimes one might want to group together the ports that logically fit together. Or one might want to put the most important (most likely that the user will want to change) on top.

2 Likes

Maybe a name like “groupId” or “priority” might be a better name for this field?

However, I am failing to see what the use-case is of this change. Do you have specific examples?