diff --git a/orthos2/frontend/static/frontend/custom.css b/orthos2/frontend/static/frontend/custom.css index d7e7c158..39731e6d 100644 --- a/orthos2/frontend/static/frontend/custom.css +++ b/orthos2/frontend/static/frontend/custom.css @@ -1,9 +1,34 @@ body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + /* Bound the whole page to the viewport height instead of letting the + document scroll: the header (a flex-shrink:0 sibling of #app-shell) + then never scrolls out of view, and #app-shell's own children get a + real height to scroll independently within (see #sidenav/ + #page-content-wrapper below). */ + display: flex; + flex-direction: column; + height: 100vh; + margin: 0; +} + +.navbar { + flex-shrink: 0; } #app-shell { - min-height: 100vh; + flex: 1 1 auto; + /* Without this, a flex item won't shrink below its content's intrinsic + height, so overflow-y: auto on its children would never actually + kick in - #app-shell would just grow past the viewport instead. */ + min-height: 0; +} + +#sidenav { + overflow-y: auto; +} + +#page-content-wrapper { + overflow-y: auto; } /* .offcanvas-lg resets background/width to transparent/auto above the lg diff --git a/orthos2/frontend/templates/frontend/architectures/architecture.html b/orthos2/frontend/templates/frontend/architectures/architecture.html index 748d44f1..0e6a5893 100644 --- a/orthos2/frontend/templates/frontend/architectures/architecture.html +++ b/orthos2/frontend/templates/frontend/architectures/architecture.html @@ -29,10 +29,6 @@ >API: {% url 'api:architecture' %}?name={{ architecture.name }} - | Edit: - {% url 'frontend:edit_architecture' architecture.id %} diff --git a/orthos2/frontend/templates/frontend/dailytasks/dailytask.html b/orthos2/frontend/templates/frontend/dailytasks/dailytask.html index 46bc1f85..e63d192f 100644 --- a/orthos2/frontend/templates/frontend/dailytasks/dailytask.html +++ b/orthos2/frontend/templates/frontend/dailytasks/dailytask.html @@ -29,10 +29,6 @@ >API: {% url 'api:dailytask' %}?id={{ dailytask.pk }} - | Edit: - {% url 'frontend:edit_dailytask' dailytask.id %} diff --git a/orthos2/frontend/templates/frontend/devicetypes/detail/actions.html b/orthos2/frontend/templates/frontend/devicetypes/detail/actions.html index 3ec47a26..b23fc304 100644 --- a/orthos2/frontend/templates/frontend/devicetypes/detail/actions.html +++ b/orthos2/frontend/templates/frontend/devicetypes/detail/actions.html @@ -13,12 +13,22 @@
Actions

- Fetch Netbox + {% if devicetype.netbox_id %} + Fetch Netbox + {% else %} + Fetch Netbox + {% endif %}

diff --git a/orthos2/frontend/templates/frontend/devicetypes/detail/netbox_comparison.html b/orthos2/frontend/templates/frontend/devicetypes/detail/netbox_comparison.html index 6e4146ec..86314d55 100644 --- a/orthos2/frontend/templates/frontend/devicetypes/detail/netbox_comparison.html +++ b/orthos2/frontend/templates/frontend/devicetypes/detail/netbox_comparison.html @@ -4,12 +4,22 @@ {% block tabcontent %}
diff --git a/orthos2/frontend/templates/frontend/devicetypes/devicetype.html b/orthos2/frontend/templates/frontend/devicetypes/devicetype.html index 8d53ef74..47fea7ef 100644 --- a/orthos2/frontend/templates/frontend/devicetypes/devicetype.html +++ b/orthos2/frontend/templates/frontend/devicetypes/devicetype.html @@ -36,10 +36,6 @@ >API: {% url 'api:devicetype' %}?name={{ devicetype.name }} - | Edit: - {% url 'frontend:edit_devicetype' devicetype.id %} diff --git a/orthos2/frontend/templates/frontend/domains/detail/overview.html b/orthos2/frontend/templates/frontend/domains/detail/overview.html index 0a2a5d79..f36107bb 100644 --- a/orthos2/frontend/templates/frontend/domains/detail/overview.html +++ b/orthos2/frontend/templates/frontend/domains/detail/overview.html @@ -26,7 +26,13 @@
{{ domain.name }}
TFTP Server - {{ domain.tftp_server|default_if_none:"-" }} + + {% if domain.tftp_server %} + {{ domain.tftp_server }} + {% else %} + - + {% endif %} + CScreen Server diff --git a/orthos2/frontend/templates/frontend/domains/domain.html b/orthos2/frontend/templates/frontend/domains/domain.html index 29f41af1..964b0124 100644 --- a/orthos2/frontend/templates/frontend/domains/domain.html +++ b/orthos2/frontend/templates/frontend/domains/domain.html @@ -33,9 +33,9 @@ {% endblock %}
Edit: - {% url 'frontend:edit_domain' domain.id %}API: + {% url 'api:domain' %}?name={{ domain.name }} diff --git a/orthos2/frontend/templates/frontend/enclosures/detail/actions.html b/orthos2/frontend/templates/frontend/enclosures/detail/actions.html index aee33c07..0ff0e32f 100644 --- a/orthos2/frontend/templates/frontend/enclosures/detail/actions.html +++ b/orthos2/frontend/templates/frontend/enclosures/detail/actions.html @@ -13,12 +13,22 @@
Actions

- Fetch Netbox + {% if enclosure.netbox_id %} + Fetch Netbox + {% else %} + Fetch Netbox + {% endif %}

diff --git a/orthos2/frontend/templates/frontend/enclosures/detail/netbox_comparison.html b/orthos2/frontend/templates/frontend/enclosures/detail/netbox_comparison.html index 9452682a..72aaacdf 100644 --- a/orthos2/frontend/templates/frontend/enclosures/detail/netbox_comparison.html +++ b/orthos2/frontend/templates/frontend/enclosures/detail/netbox_comparison.html @@ -4,7 +4,11 @@ {% block tabcontent %}
diff --git a/orthos2/frontend/templates/frontend/enclosures/enclosure.html b/orthos2/frontend/templates/frontend/enclosures/enclosure.html index b6b076e1..67dddc2b 100644 --- a/orthos2/frontend/templates/frontend/enclosures/enclosure.html +++ b/orthos2/frontend/templates/frontend/enclosures/enclosure.html @@ -39,10 +39,6 @@ >API: {% url 'api:enclosure' %}?name={{ enclosure.name }} - | Edit: - {% url 'frontend:edit_enclosure' enclosure.id %} diff --git a/orthos2/frontend/templates/frontend/enclosures/enclosures_filterbar.html b/orthos2/frontend/templates/frontend/enclosures/enclosures_filterbar.html index ba1f5d1c..eff138ef 100644 --- a/orthos2/frontend/templates/frontend/enclosures/enclosures_filterbar.html +++ b/orthos2/frontend/templates/frontend/enclosures/enclosures_filterbar.html @@ -20,6 +20,15 @@ + NetBox Synchronized +
+ Yes + No + × +
+ + + {% include 'frontend/snippet.search.html' with search_hint='Name' %} diff --git a/orthos2/frontend/templates/frontend/groups/detail/overview.html b/orthos2/frontend/templates/frontend/groups/detail/overview.html index fc817eeb..12b27607 100644 --- a/orthos2/frontend/templates/frontend/groups/detail/overview.html +++ b/orthos2/frontend/templates/frontend/groups/detail/overview.html @@ -56,12 +56,5 @@
Actions
- - Edit: - {% url 'frontend:edit_group' group.id %} {% endblock %} diff --git a/orthos2/frontend/templates/frontend/machines/detail/edit_machine.html b/orthos2/frontend/templates/frontend/machines/detail/edit_machine.html index cb9a59e4..0ef95229 100644 --- a/orthos2/frontend/templates/frontend/machines/detail/edit_machine.html +++ b/orthos2/frontend/templates/frontend/machines/detail/edit_machine.html @@ -43,6 +43,11 @@
VIRTUALIZATION SERVER
> + {% else %} + {# Field isn't relevant for this system, but it's still a + required part of the form - submit its unchanged value as + hidden so unrelated edits don't fail validation. #} + {{ field.as_hidden }} {% endif %} {% elif field.name == "hypervisor" %} {% if object.system.virtual %} @@ -61,6 +66,8 @@
VIRTUALIZATION CLIENT
> + {% else %} + {{ field.as_hidden }} {% endif %} {% else %} {{ field.errors }} diff --git a/orthos2/frontend/templates/frontend/machines/detail/netboxcomparison.html b/orthos2/frontend/templates/frontend/machines/detail/netboxcomparison.html index 406ffd22..8aee25f7 100644 --- a/orthos2/frontend/templates/frontend/machines/detail/netboxcomparison.html +++ b/orthos2/frontend/templates/frontend/machines/detail/netboxcomparison.html @@ -4,7 +4,11 @@ {% block tabcontent %}
- Preview and Compare data with NetBox + {% if machine.netbox_id %} + Preview and Compare data with NetBox + {% else %} + Preview and Compare data with NetBox + {% endif %}
diff --git a/orthos2/frontend/templates/frontend/machines/detail/remotepower.html b/orthos2/frontend/templates/frontend/machines/detail/remotepower.html index 1a3c4f25..0785c508 100644 --- a/orthos2/frontend/templates/frontend/machines/detail/remotepower.html +++ b/orthos2/frontend/templates/frontend/machines/detail/remotepower.html @@ -2,60 +2,71 @@ {% load filters %} {% block tabcontent %} -
-
Remote Power
- {% if request.user.is_superuser and not machine.has_remotepower %} - + - {% endif %} -
- {% if machine.has_remotepower %} - - - - - - - - - - - - - - - - - - - - - - - -
Fence Agent{{ machine.remotepower.get_remotepower_fence.name }}
Remote Power Device{{ machine.remotepower.remote_power_device }}
Port{{ machine.remotepower.port }}
Comment{{ machine.remotepower.comment }}
Options{{ machine.remotepower.options }}
- {% if request.user.is_superuser %} -
- Edit Remote Power +
+
+
+
Remote Power
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Fence Agent{{ machine.remotepower.get_remotepower_fence.name }}
Remote Power Device{{ machine.remotepower.remote_power_device }}
Port{{ machine.remotepower.port }}
Comment{{ machine.remotepower.comment }}
Options{{ machine.remotepower.options }}
-
-
+ {% if request.user.is_superuser %} +
+
+
Actions
+
+ +
+ +
+ {% endif %} +
+ {% else %} +
+
Remote Power
+ {% if request.user.is_superuser %} Delete Remote Power+ -
- {% endif %} - {% else %} + {% endif %} +
No remote power configured for this machine!
diff --git a/orthos2/frontend/templates/frontend/machines/detail/serialconsole.html b/orthos2/frontend/templates/frontend/machines/detail/serialconsole.html index e275a156..55cbdda6 100644 --- a/orthos2/frontend/templates/frontend/machines/detail/serialconsole.html +++ b/orthos2/frontend/templates/frontend/machines/detail/serialconsole.html @@ -2,60 +2,71 @@ {% load filters %} {% block tabcontent %} -
-
Serial Console
- {% if request.user.is_superuser and not machine.has_serialconsole %} - + - {% endif %} -
- {% if machine.has_serialconsole %} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type{{ machine.serialconsole.stype.name }}
Console Server{{ machine.serialconsole.console_server }}
Port{{ machine.serialconsole.port }}
Command{{ machine.serialconsole.command }}
Comment{{ machine.serialconsole.comment }}
Baud Rate{{ machine.serialconsole.baud_rate }}
Kernel Device{{ machine.serialconsole.kernel_device }}{{ machine.serialconsole.kernel_device_num }}
Rendered Command{{ machine.serialconsole.rendered_command }}
- {% if request.user.is_superuser %} -
- Edit Serial Console -
-
-
- Delete Serial Console +
+
+
+
Serial Console
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Type{{ machine.serialconsole.stype.name }}
Console Server{{ machine.serialconsole.console_server }}
Port{{ machine.serialconsole.port }}
Command{{ machine.serialconsole.command }}
Comment{{ machine.serialconsole.comment }}
Baud Rate{{ machine.serialconsole.baud_rate }}
Kernel Device{{ machine.serialconsole.kernel_device }}{{ machine.serialconsole.kernel_device_num }}
Rendered Command{{ machine.serialconsole.rendered_command }}
+
+ {% if request.user.is_superuser %} +
+
+
Actions
+
+ +
+ +
+ {% endif %}
- {% endif %} {% else %} +
+
Serial Console
+ {% if request.user.is_superuser %} + + + {% endif %} +
No serial console configured for this machine!
{% endif %} {% endblock %} diff --git a/orthos2/frontend/templates/frontend/machines/detail/snippets/sidebar.html b/orthos2/frontend/templates/frontend/machines/detail/snippets/sidebar.html index cc6c5f6a..13dd4cf0 100644 --- a/orthos2/frontend/templates/frontend/machines/detail/snippets/sidebar.html +++ b/orthos2/frontend/templates/frontend/machines/detail/snippets/sidebar.html @@ -3,6 +3,13 @@
Actions
+{% if user.is_superuser %} +
+ Edit Machine +
+
+{% endif %} +
{% if machine.reserved_by and user.username == machine.reserved_by.username %} Extend Reservation @@ -58,7 +65,11 @@
Actions

+ {% if machine.netbox_id %} Fetch Netbox + {% else %} + Fetch Netbox + {% endif %}

diff --git a/orthos2/frontend/templates/frontend/machines/machine.html b/orthos2/frontend/templates/frontend/machines/machine.html index b6b4ea6a..51656373 100644 --- a/orthos2/frontend/templates/frontend/machines/machine.html +++ b/orthos2/frontend/templates/frontend/machines/machine.html @@ -134,10 +134,6 @@ >API: {% url 'api:machine' %}?fqdn={{ machine.fqdn }} - | Edit: - {% url 'frontend:edit_machine' machine.id %} diff --git a/orthos2/frontend/templates/frontend/machines/statistics.html b/orthos2/frontend/templates/frontend/machines/statistics.html index 9c79d83d..01b552ee 100644 --- a/orthos2/frontend/templates/frontend/machines/statistics.html +++ b/orthos2/frontend/templates/frontend/machines/statistics.html @@ -142,15 +142,6 @@
Machine Status
{{ data.total }} Machines {% block javascript %}