From 3869028d53f470ae2f6720d6222590e8a7d75d57 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 29 Mar 2021 16:17:25 -0400 Subject: [PATCH] Clean up organizational object URLs --- netbox/templates/circuits/circuit.html | 2 +- netbox/templates/circuits/provider.html | 2 +- netbox/templates/dcim/device.html | 2 +- netbox/templates/dcim/device/base.html | 2 +- netbox/templates/dcim/devicetype.html | 4 ++-- netbox/templates/dcim/platform.html | 12 +++++++++- netbox/templates/dcim/rack.html | 2 +- netbox/templates/dcim/rackreservation.html | 2 +- netbox/templates/dcim/site.html | 14 +++++------ netbox/templates/dcim/virtualchassis.html | 2 +- netbox/templates/ipam/aggregate.html | 4 ++-- netbox/templates/ipam/prefix.html | 2 +- netbox/templates/ipam/vlan.html | 6 ++--- netbox/templates/secrets/secret.html | 6 +++-- netbox/templates/tenancy/tenant.html | 24 +++++++++---------- .../virtualization/virtualmachine.html | 4 ++-- 16 files changed, 51 insertions(+), 39 deletions(-) diff --git a/netbox/templates/circuits/circuit.html b/netbox/templates/circuits/circuit.html index 09feaae5e..1890570d1 100644 --- a/netbox/templates/circuits/circuit.html +++ b/netbox/templates/circuits/circuit.html @@ -4,7 +4,7 @@ {% block breadcrumbs %}
  • Circuits
  • -
  • {{ object.provider }}
  • +
  • {{ object.provider }}
  • {{ object.cid }}
  • {% endblock %} diff --git a/netbox/templates/circuits/provider.html b/netbox/templates/circuits/provider.html index bb467e622..85cd4352c 100644 --- a/netbox/templates/circuits/provider.html +++ b/netbox/templates/circuits/provider.html @@ -45,7 +45,7 @@ Circuits - {{ circuits_table.rows|length }} + {{ circuits_table.rows|length }} diff --git a/netbox/templates/dcim/device.html b/netbox/templates/dcim/device.html index 81d8bd9b3..6c5d8588e 100644 --- a/netbox/templates/dcim/device.html +++ b/netbox/templates/dcim/device.html @@ -145,7 +145,7 @@ Role - {{ object.device_role }} + {{ object.device_role }} diff --git a/netbox/templates/dcim/device/base.html b/netbox/templates/dcim/device/base.html index b9409472b..27cc3e992 100644 --- a/netbox/templates/dcim/device/base.html +++ b/netbox/templates/dcim/device/base.html @@ -7,7 +7,7 @@ {% block breadcrumbs %}
  • Devices
  • -
  • {{ object.site }}
  • +
  • {{ object.site }}
  • {% if object.parent_bay %}
  • {{ object.parent_bay.device }}
  • {{ object.parent_bay }}
  • diff --git a/netbox/templates/dcim/devicetype.html b/netbox/templates/dcim/devicetype.html index dd7734b6b..95dd8909e 100644 --- a/netbox/templates/dcim/devicetype.html +++ b/netbox/templates/dcim/devicetype.html @@ -7,7 +7,7 @@ {% block breadcrumbs %}
  • Device Types
  • -
  • {{ object.manufacturer }}
  • +
  • {{ object.manufacturer }}
  • {{ object.model }}
  • {% endblock %} @@ -66,7 +66,7 @@ - + diff --git a/netbox/templates/dcim/platform.html b/netbox/templates/dcim/platform.html index 8a3ff5b6e..f620bc4c9 100644 --- a/netbox/templates/dcim/platform.html +++ b/netbox/templates/dcim/platform.html @@ -23,9 +23,19 @@ + + + + - + diff --git a/netbox/templates/dcim/rack.html b/netbox/templates/dcim/rack.html index 8812157ef..3bb0084a3 100644 --- a/netbox/templates/dcim/rack.html +++ b/netbox/templates/dcim/rack.html @@ -8,7 +8,7 @@ {% block breadcrumbs %}
  • Racks
  • -
  • {{ object.site }}
  • +
  • {{ object.site }}
  • {% if object.group %} {% for group in object.group.get_ancestors %}
  • {{ group }}
  • diff --git a/netbox/templates/dcim/rackreservation.html b/netbox/templates/dcim/rackreservation.html index 2affb7946..06e14e7db 100644 --- a/netbox/templates/dcim/rackreservation.html +++ b/netbox/templates/dcim/rackreservation.html @@ -42,7 +42,7 @@ diff --git a/netbox/templates/dcim/virtualchassis.html b/netbox/templates/dcim/virtualchassis.html index 21678fa79..6887c01ca 100644 --- a/netbox/templates/dcim/virtualchassis.html +++ b/netbox/templates/dcim/virtualchassis.html @@ -7,7 +7,7 @@ {% block breadcrumbs %}
  • Virtual Chassis
  • {% if object.master %} -
  • {{ object.master.site }}
  • +
  • {{ object.master.site }}
  • {% endif %}
  • {{ object }}
  • {% endblock %} diff --git a/netbox/templates/ipam/aggregate.html b/netbox/templates/ipam/aggregate.html index 69403f9b6..468531b55 100644 --- a/netbox/templates/ipam/aggregate.html +++ b/netbox/templates/ipam/aggregate.html @@ -6,7 +6,7 @@ {% block breadcrumbs %}
  • Aggregates
  • -
  • {{ object.rir }}
  • +
  • {{ object.rir }}
  • {{ object }}
  • {% endblock %} @@ -30,7 +30,7 @@ diff --git a/netbox/templates/ipam/prefix.html b/netbox/templates/ipam/prefix.html index 51152a99b..ec3745bbf 100644 --- a/netbox/templates/ipam/prefix.html +++ b/netbox/templates/ipam/prefix.html @@ -128,7 +128,7 @@ - + diff --git a/netbox/templates/tenancy/tenant.html b/netbox/templates/tenancy/tenant.html index 2dd7ac7b0..684b1d8b1 100644 --- a/netbox/templates/tenancy/tenant.html +++ b/netbox/templates/tenancy/tenant.html @@ -5,7 +5,7 @@ {% block breadcrumbs %}
  • Tenants
  • {% if object.group %} -
  • {{ object.group }}
  • +
  • {{ object.group }}
  • {% endif %}
  • {{ object }}
  • {% endblock %} @@ -57,47 +57,47 @@
    diff --git a/netbox/templates/virtualization/virtualmachine.html b/netbox/templates/virtualization/virtualmachine.html index 71196b45a..03512d02f 100644 --- a/netbox/templates/virtualization/virtualmachine.html +++ b/netbox/templates/virtualization/virtualmachine.html @@ -27,7 +27,7 @@
    Manufacturer{{ object.manufacturer }}{{ object.manufacturer }}
    Model NameDescription {{ object.description|placeholder }}
    Manufacturer + {% if object.manufacturer %} + {{ object.manufacturer }} + {% else %} + None + {% endif %} +
    NAPALM Driver{{ object.napalm_driver }}{{ object.napalm_driver|placeholder }}
    NAPALM ArgumentsGroup {% if rack.group %} - {{ rack.group }} + {{ rack.group }} {% else %} None {% endif %} diff --git a/netbox/templates/dcim/site.html b/netbox/templates/dcim/site.html index 2d0d7b1a4..b68fc1f02 100644 --- a/netbox/templates/dcim/site.html +++ b/netbox/templates/dcim/site.html @@ -180,27 +180,27 @@ @@ -227,7 +227,7 @@ All racks {{ stats.rack_count }} - +
    RIR - {{ object.rir }} + {{ object.rir }}
    Role {% if object.role %} - {{ object.role }} + {{ object.role }} {% else %} None {% endif %} diff --git a/netbox/templates/ipam/vlan.html b/netbox/templates/ipam/vlan.html index f4db12f25..91dd9f1d8 100644 --- a/netbox/templates/ipam/vlan.html +++ b/netbox/templates/ipam/vlan.html @@ -7,10 +7,10 @@ {% block breadcrumbs %}
  • VLANs
  • {% if object.site %} -
  • {{ object.site }}
  • +
  • {{ object.site }}
  • {% endif %} {% if object.group %} -
  • {{ object.group }}
  • +
  • {{ object.group }}
  • {% endif %}
  • {{ object }}
  • {% endblock %} @@ -96,7 +96,7 @@
    Role {% if object.role %} - {{ object.role }} + {{ object.role }} {% else %} None {% endif %} diff --git a/netbox/templates/secrets/secret.html b/netbox/templates/secrets/secret.html index 3c0d1977d..7b03bfc80 100644 --- a/netbox/templates/secrets/secret.html +++ b/netbox/templates/secrets/secret.html @@ -6,7 +6,7 @@ {% block breadcrumbs %}
  • Secrets
  • -
  • {{ object.role }}
  • +
  • {{ object.role }}
  • {{ object.assigned_object }}
  • {{ object }}
  • {% endblock %} @@ -36,7 +36,9 @@
    Role{{ object.role }} + {{ object.role }} +
    Name Role {% if object.role %} - {{ object.role }} + {{ object.role }} {% else %} None {% endif %} @@ -37,7 +37,7 @@ Platform {% if object.platform %} - {{ object.platform }} + {{ object.platform }} {% else %} None {% endif %}