diff --git a/plinth/modules/networks/static/networks.css b/plinth/modules/networks/static/networks.css new file mode 100644 index 000000000..8d8c690b7 --- /dev/null +++ b/plinth/modules/networks/static/networks.css @@ -0,0 +1,65 @@ +/* +# SPDX-License-Identifier: AGPL-3.0-or-later +*/ + +.connection-status-cell { + width: 4.125rem; +} + +.connection-status-label { + width: 4.125rem; + padding: 0.3125rem 0; + text-align: center; + margin-right: 0.625rem; +} + +.connection-actions { + width: 10rem; +} + +.form-action { + display: inline; +} + +.form-action button { + min-width: 6.25rem; +} + + +/* Connection diagram */ +.connection-diagram { + margin-top: 2rem; + margin-bottom: 2rem; +} + +.col-image { + display: block; + width: 100%; +} + +.network-entity { + max-width: 8rem; +} + +.network-type-icon { + width: 1.5rem; + height: 1.5rem; +} + +.network-connection { + height: 0.5rem; + margin-bottom: 0.75rem; +} + +.network-connection-vertical { + width: 0.5rem; + margin-left: 3.75rem; +} + +.connection-list { + margin-left: 1.5rem; +} + +.connection-list-heading { + font-weight: bold; +} diff --git a/plinth/modules/networks/templates/connections_diagram.html b/plinth/modules/networks/templates/connections_diagram.html index 3f0e3f375..720433792 100644 --- a/plinth/modules/networks/templates/connections_diagram.html +++ b/plinth/modules/networks/templates/connections_diagram.html @@ -5,45 +5,6 @@ {% load static %} {% load i18n %} - -
-
- {% for connection in connections %} -
- - - +
+ + + {% for connection in connections %} + + - {% if connection.is_active %} - - {% csrf_token %} + - - - {% else %} - - {% csrf_token %} + - - - {% endif %} + + + {% endfor %} + +
+ {% if connection.is_active %} + + {% trans "Active" %} + + {% else %} + + {% trans "Inactive" %} + + {% endif %} +
+ + {{ connection.name }} + +
+ + {{ connection.type_name }} + + + {% if connection.is_active %} +
+ {% csrf_token %} + +
+ {% else %} +
+ {% csrf_token %} + +
+ {% endif %} - {% if connection.is_active %} - - {% trans "Active" %} - {% else %} - - {% trans "Inactive" %} - {% endif %} - - - {{ connection.name }} - - - {{ connection.type_name }} - - {% endfor %} + + + +
{% include "connections_diagram.html" %} diff --git a/plinth/modules/networks/templates/networks_configuration.html b/plinth/modules/networks/templates/networks_configuration.html index 577c87fdc..2c4ed99a0 100644 --- a/plinth/modules/networks/templates/networks_configuration.html +++ b/plinth/modules/networks/templates/networks_configuration.html @@ -3,40 +3,13 @@ # SPDX-License-Identifier: AGPL-3.0-or-later {% endcomment %} +{% load static %} {% load bootstrap %} {% load i18n %} {% block page_head %} - + {% endblock %} {% block configuration %}