Merge "Show the time of last data update"
This commit is contained in:
@@ -443,8 +443,10 @@ def templated(template=None, return_code=200):
|
|||||||
stackalytics_version.version_info.version_string())
|
stackalytics_version.version_info.version_string())
|
||||||
ctx['stackalytics_release'] = (
|
ctx['stackalytics_release'] = (
|
||||||
stackalytics_version.version_info.release_string())
|
stackalytics_version.version_info.release_string())
|
||||||
ctx['runtime_storage_update_time'] = (
|
update_time = vault_inst['runtime_storage_update_time']
|
||||||
vault_inst['runtime_storage_update_time'])
|
ctx['runtime_storage_update_time'] = update_time
|
||||||
|
ctx['runtime_storage_update_time_str'] = helpers.format_datetime(
|
||||||
|
update_time) if update_time else None
|
||||||
|
|
||||||
# deprecated -- top mentor report
|
# deprecated -- top mentor report
|
||||||
ctx['review_nth'] = parameters.get_single_parameter(
|
ctx['review_nth'] = parameters.get_single_parameter(
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ def get_contribution_summary(records):
|
|||||||
|
|
||||||
def format_datetime(timestamp):
|
def format_datetime(timestamp):
|
||||||
return datetime.datetime.utcfromtimestamp(
|
return datetime.datetime.utcfromtimestamp(
|
||||||
timestamp).strftime('%d %b %Y %H:%M:%S')
|
timestamp).strftime('%d %b %Y %H:%M:%S') + ' UTC'
|
||||||
|
|
||||||
|
|
||||||
def format_date(timestamp):
|
def format_date(timestamp):
|
||||||
|
|||||||
@@ -25,10 +25,13 @@ Stackalytics {% if page_title %}| {{ page_title }} {% endif %}
|
|||||||
<div class="page">
|
<div class="page">
|
||||||
{% if not runtime_storage_update_time %}
|
{% if not runtime_storage_update_time %}
|
||||||
<div class="banner">Please note! The data is being loaded now and may be not complete.</div>
|
<div class="banner">Please note! The data is being loaded now and may be not complete.</div>
|
||||||
|
{% set update_time_title = '' %}
|
||||||
|
{% else %}
|
||||||
|
{% set update_time_title = 'Last updated on ' + runtime_storage_update_time_str %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="aheader">
|
<div class="aheader">
|
||||||
<div style="float: right; margin-top: 10px; margin-right: 20px;">
|
<div style="float: right; margin-top: 10px; margin-right: 20px;">
|
||||||
<a href="https://wiki.openstack.org/wiki/Stackalytics" target="_blank">About</a>
|
<a href="https://wiki.openstack.org/wiki/Stackalytics" target="_blank" title="{{ update_time_title }}">About</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="analytics_header">
|
<div id="analytics_header">
|
||||||
<div style="float: left;">
|
<div style="float: left;">
|
||||||
|
|||||||
Reference in New Issue
Block a user