From a602b50342633d82a2e451759cf6f91867a1c503 Mon Sep 17 00:00:00 2001 From: Loic Baron Date: Mon, 4 May 2015 11:28:10 +0200 Subject: [PATCH] Footer with version number --- myslice/settings.py | 12 ++++++++++-- myslice/urls.py | 1 + portal/templates/_footer.html | 14 ++++++++++++-- portal/templates/fed4fire/fed4fire_footer.html | 10 ++++++++++ portal/templates/smartfire/smartfire_footer.html | 15 +++++++++++---- 5 files changed, 44 insertions(+), 8 deletions(-) diff --git a/myslice/settings.py b/myslice/settings.py index 5fe21697..371296bb 100644 --- a/myslice/settings.py +++ b/myslice/settings.py @@ -1,5 +1,6 @@ import os.path import logging +import subprocess logger = logging.getLogger('myslice') @@ -17,8 +18,6 @@ config = ConfigEngine() import myslice.components as components - - # import djcelery # djcelery.setup_loader() @@ -29,7 +28,16 @@ try: except: building=True +if not config.myslice.portal_version: + try: + PORTAL_VERSION = subprocess.check_output(["git", "describe"]) + except: + PORTAL_VERSION = 'not using git' +print 'x'*100 +print PORTAL_VERSION +print 'x'*100 +logger.debug('PORTAL_VERSION = ',PORTAL_VERSION) # DEBUG if config.myslice.debug : diff --git a/myslice/urls.py b/myslice/urls.py index 236e5ca5..237c0ab1 100644 --- a/myslice/urls.py +++ b/myslice/urls.py @@ -89,6 +89,7 @@ urls = [ (r'^cache/(?P[^/]+)/?$', 'rest.cache.dispatch'), (r'^initscript/(?P[^/]+)/?$', 'rest.initscript.dispatch'), (r'^authority/(?P[^/]+)/?$', 'rest.authority.dispatch'), + (r'^portal_version/?$', 'rest.portal_version.dispatch'), # # REST monitoring (r'^monitor/services/?$', 'rest.monitor.servicesStatus'), diff --git a/portal/templates/_footer.html b/portal/templates/_footer.html index ad231763..17f0a38f 100644 --- a/portal/templates/_footer.html +++ b/portal/templates/_footer.html @@ -8,9 +8,19 @@
-
+
Copyright © UPMC Sorbonne Universités, on behalf of the OneLab consortium
+
+
- \ No newline at end of file + + diff --git a/portal/templates/fed4fire/fed4fire_footer.html b/portal/templates/fed4fire/fed4fire_footer.html index d4db4be5..6c05c873 100644 --- a/portal/templates/fed4fire/fed4fire_footer.html +++ b/portal/templates/fed4fire/fed4fire_footer.html @@ -1 +1,11 @@ +
+ + diff --git a/portal/templates/smartfire/smartfire_footer.html b/portal/templates/smartfire/smartfire_footer.html index 307f7d3c..7dd4a221 100644 --- a/portal/templates/smartfire/smartfire_footer.html +++ b/portal/templates/smartfire/smartfire_footer.html @@ -8,9 +8,16 @@
-
- -
+
+
- \ No newline at end of file + + -- 2.43.0