Skip to content

Commit

Permalink
Merge pull request #281 from NebraLtd/shawaj/date
Browse files Browse the repository at this point in the history
add date into template
  • Loading branch information
shawaj authored Jan 6, 2022
2 parents 9e1aedf + 2ffc7dc commit 6f323fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions hw_diag/templates/diagnostics_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,9 @@ <h3 class="text-center mb-4">Diagnostics Breakdown</h3>
{% else %}
<p>Last Updated: Never</p>
{% endif %}
{% now "Y" as current_year %}
<p>To get support please visit <a href="https://nebra.io/helium-support">https://nebra.io/helium-support</a></p>
<p><a href="/json">Download Diagnostics Info for Support</a></p>
<p>&copy; Nebra LTD. 2020-{{ current_year }}<p>
<p>&copy; Nebra LTD. 2020-{{ now.year }}<p>
</div>
</section>
</body>
Expand Down
5 changes: 4 additions & 1 deletion hw_diag/views/diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from flask import Blueprint
from flask import render_template
from flask import jsonify
from datetime import datetime

from hw_diag.cache import cache
from hm_pyhelper.diagnostics.diagnostics_report import DiagnosticsReport
Expand Down Expand Up @@ -61,11 +62,13 @@ def get_diagnostics_json():
def get_diagnostics():
diagnostics = read_diagnostics_file()
display_lte = should_display_lte(diagnostics)
now = datetime.utcnow()

return render_template(
'diagnostics_page.html',
diagnostics=diagnostics,
display_lte=display_lte
display_lte=display_lte,
now=now
)


Expand Down

0 comments on commit 6f323fe

Please sign in to comment.