# HG changeset patch # User BenoƮt Allard # Date 1412081103 -7200 # Node ID f8d51aaac8bc618ed060eda8dce22e83c170776d # Parent a52995b50ecc9c5a328fef3b7770443dd2dca170 Display sessionID in about page as well as various versions diff -r a52995b50ecc -r f8d51aaac8bc farol/main.py --- a/farol/main.py Tue Sep 30 14:25:53 2014 +0200 +++ b/farol/main.py Tue Sep 30 14:45:03 2014 +0200 @@ -26,16 +26,18 @@ import logging from logging import FileHandler +import farolluz from farolluz.cvrf import CVRF, ValidationError from farolluz.parsers.cvrf import parse from farolluz.py2 import urlopen from farolluz.renderer import render as render_cvrf from farolluz.utils import utcnow +import flask from flask import Flask, request, render_template, redirect, url_for, flash from werkzeug import secure_filename -from . import cache +from . import __version__, cache from .document import document from .session import get_current, set_current, has_current, document_required from .vulnerability import vulnerability @@ -131,5 +133,6 @@ @app.route('/about') def about(): - return render_template('about.j2', instance_dir=app.instance_path) + versions = (('farol', __version__), ('farolluz', farolluz.__version__), ('flask', flask.__version__)) + return render_template('about.j2', instance_dir=app.instance_path, versions=versions) diff -r a52995b50ecc -r f8d51aaac8bc farol/templates/about.j2 --- a/farol/templates/about.j2 Tue Sep 30 14:25:53 2014 +0200 +++ b/farol/templates/about.j2 Tue Sep 30 14:45:03 2014 +0200 @@ -54,6 +54,13 @@

Each session have a private cache, sessions are bound to a browser session. They are usually reset when the browser is restarted.

{% endif %}
+
Versions:
+

Farol is published under GPLv2+, and is Copyright © Greenbone Networks GmbH.

+

SessionID: {{ session.get('id', '') }}

{% endblock %}