Closes #15908: Establish canonical & local sources for release info (#16420)

* Closes #15908: Establish canonical & local sources for release info

* Update references to settings.VERSION
This commit is contained in:
Jeremy Stretch
2024-06-07 13:41:48 -04:00
committed by GitHub
parent 1952d3e63a
commit c6bd714a04
15 changed files with 93 additions and 30 deletions

View File

@@ -20,7 +20,7 @@
{# Initialize color mode #}
<script
type="text/javascript"
src="{% static 'setmode.js' %}?v={{ settings.VERSION }}"
src="{% static 'setmode.js' %}?v={{ settings.RELEASE.version }}"
onerror="window.location='{% url 'media_failure' %}?filename=setmode.js'">
</script>
<script type="text/javascript">
@@ -33,12 +33,12 @@
{# Static resources #}
<link
rel="stylesheet"
href="{% static 'netbox-external.css'%}?v={{ settings.VERSION }}"
href="{% static 'netbox-external.css'%}?v={{ settings.RELEASE.version }}"
onerror="window.location='{% url 'media_failure' %}?filename=netbox-external.css'"
/>
<link
rel="stylesheet"
href="{% static 'netbox.css'%}?v={{ settings.VERSION }}"
href="{% static 'netbox.css'%}?v={{ settings.RELEASE.version }}"
onerror="window.location='{% url 'media_failure' %}?filename=netbox.css'"
/>
<link rel="icon" type="image/png" href="{% static 'netbox.ico' %}" />
@@ -47,7 +47,7 @@
{# Javascript #}
<script
type="text/javascript"
src="{% static 'netbox.js' %}?v={{ settings.VERSION }}"
src="{% static 'netbox.js' %}?v={{ settings.RELEASE.version }}"
onerror="window.location='{% url 'media_failure' %}?filename=netbox.js'">
</script>
{% django_htmx_script %}

View File

@@ -188,12 +188,9 @@ Blocks:
{# Footer text #}
<ul class="list-inline list-inline-dots fs-5 mb-0" id="footer-stamp" hx-swap-oob="true">
<li class="list-inline-item">
{% now 'Y-m-d H:i:s T' %}
</li>
<li class="list-inline-item">
{{ settings.HOSTNAME }} (v{{ settings.VERSION }})
</li>
<li class="list-inline-item">{% now 'Y-m-d H:i:s T' %}</li>
<li class="list-inline-item">{{ settings.HOSTNAME }}</li>
<li class="list-inline-item">{{ settings.RELEASE.name }}</li>
</ul>
{# /Footer text #}

View File

@@ -28,8 +28,13 @@
<h5 class="card-header">{% trans "System Status" %}</h5>
<table class="table table-hover attr-table">
<tr>
<th scope="row">{% trans "NetBox version" %}</th>
<td>{{ stats.netbox_version }}</td>
<th scope="row">{% trans "NetBox release" %}</th>
<td>
{{ stats.netbox_release.name }}
{% if stats.netbox_release.published %}
({{ stats.netbox_release.published|isodate }})
{% endif %}
</td>
</tr>
<tr>
<th scope="row">{% trans "Python version" %}</th>