🚸 Include Python version in footer

As suggested in https://community.octoprint.org/t/17819
This commit is contained in:
Gina Häußge committed 2020-04-02 18:03:53 +02:00
1 parent 2cc0e91c38
commit ee70e9d546
3 files changed
+7 -5

No files matched your search

@@ -29,13 +29,11 @@ $(function() {
self.fromThrottleState(response.throttle_state);
// OctoPi version
$("#octopi_support_footer").remove();
$("#pi_support_footer").remove();
if (!response.octopi_version) return;
var octoPrintVersion = $(".footer span.version");
var octoPiVersion = $("<span id='octopi_support_footer'> " + gettext("running on") + " " + gettext("OctoPi")
+ " <span class='octopi_version'>" + response.octopi_version + "</span></span>");
$(octoPiVersion).insertAfter(octoPrintVersion);
var octoPiVersion = $("<li id='pi_support_footer'><small>" + gettext("OctoPi") + " " + "<span class='octopi_version'>" + response.octopi_version + "</span></small></li>");
$("#footer_version").append(octoPiVersion);
})
};
+3
View File
@@ -23,6 +23,7 @@ from octoprint.access.permissions import Permissions
from octoprint.settings import settings
from octoprint.filemanager import full_extension_tree, get_all_extensions
from octoprint.util import to_unicode, to_bytes, sv
from octoprint.util.version import get_python_version_string
import re
import base64
@@ -317,6 +318,7 @@ def index():
def hash_update(value):
hash.update(to_bytes(value, encoding="utf-8", errors="replace"))
hash_update(octoprint.__version__)
hash_update(get_python_version_string())
hash_update(",".join(sorted(files)))
if lastmodified:
hash_update(lastmodified)
@@ -476,6 +478,7 @@ def _get_render_kwargs(templates, plugin_names, plugin_vars, now):
debug=debug,
firstRun=first_run,
version=dict(number=VERSION, display=DISPLAY_VERSION, branch=BRANCH),
python_version=get_python_version_string(),
templates=templates,
pluginNames=plugin_names,
locales=locales,
+1
View File
@@ -153,6 +153,7 @@
<div class="footer">
<ul id="footer_version" class="pull-left muted">
<li><small>{{ _('OctoPrint') }} <span class="version">{{ display_version|e }}</span></small></li>
<li><small>{{ _('Python') }} <span class="python_version">{{ python_version|e }}</span></small></li>
</ul>
<ul id="footer_links" class="pull-right">
<li><a href="https://octoprint.org" target="_blank" rel="noreferrer noopener"><i class="fa fa-home"></i> {{ _('Homepage') }}</a></li>