wip
This commit is contained in:
parent
f162dd4b2e
commit
5a309a0f6d
1 changed files with 26 additions and 3 deletions
|
@ -106,10 +106,10 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
{% if app and app.ports %}
|
||||||
|
{% for port in app.ports %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
{% if app and app.ports %}
|
|
||||||
{% for port in app.ports %}
|
|
||||||
<input type="number" name="port_numbers[]" class="form-control" min="1" max="65535"
|
<input type="number" name="port_numbers[]" class="form-control" min="1" max="65535"
|
||||||
value="{{ port.port_number }}" required>
|
value="{{ port.port_number }}" required>
|
||||||
</td>
|
</td>
|
||||||
|
@ -132,6 +132,29 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
<!-- Always show at least one empty port row if no ports exist -->
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<input type="number" name="port_numbers[]" class="form-control" min="1" max="65535" required>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<select name="protocols[]" class="form-select">
|
||||||
|
<option value="TCP" selected>TCP</option>
|
||||||
|
<option value="UDP">UDP</option>
|
||||||
|
<option value="SCTP">SCTP</option>
|
||||||
|
<option value="OTHER">OTHER</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="port_descriptions[]" class="form-control" placeholder="Description">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<button type="button" class="btn btn-sm btn-ghost-danger" onclick="removePortRow(this)">
|
||||||
|
<span class="ti ti-trash"></span>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -282,4 +305,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue