From d9505f15e14ff6b7e77122ade159926eb8125b6b Mon Sep 17 00:00:00 2001 From: Ilya Shakhat Date: Wed, 11 Jun 2014 20:18:30 +0400 Subject: [PATCH] Minor UI improvements Change-Id: I6ac4b603d80e88f2c9b8bad852767056eac1a791 --- dashboard/decorators.py | 8 +++----- dashboard/templates/overview.html | 8 ++++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/dashboard/decorators.py b/dashboard/decorators.py index 1233b8812..b8e0b4780 100644 --- a/dashboard/decorators.py +++ b/dashboard/decorators.py @@ -387,11 +387,6 @@ def templated(template=None, return_code=200): ctx['review_nth'] = (flask.request.args.get('review_nth') or parameters.get_default('review_nth')) - ctx['project_type_options'] = vault.get_project_types() - ctx['release_options'] = vault.get_release_options() - ctx['metric_options'] = sorted(parameters.METRIC_LABELS.items(), - key=lambda x: x[0]) - ctx['company'] = parameters.get_single_parameter(kwargs, 'company') ctx['company_original'] = ( vault.get_memory_storage().get_original_company_name( @@ -403,6 +398,9 @@ def templated(template=None, return_code=200): ctx['module_inst'] = vault_inst['module_id_index'][module] ctx['user_id'] = parameters.get_single_parameter(kwargs, 'user_id') + if ctx['user_id']: + ctx['user_inst'] = vault.get_user_from_runtime_storage( + ctx['user_id']) ctx['page_title'] = helpers.make_page_title( ctx['company'], ctx['user_id'], ctx['module'], ctx['release']) ctx['stackalytics_version'] = ( diff --git a/dashboard/templates/overview.html b/dashboard/templates/overview.html index cab25db8c..e80976ac7 100644 --- a/dashboard/templates/overview.html +++ b/dashboard/templates/overview.html @@ -18,15 +18,15 @@ {% macro show_report_links(module=None, company=None, user_id=None) -%} {% if module %} -
Show open reviews for {{ module }}
-
Contribution for the last 30 days in {{ module }}
-
Contribution for the last 90 days in {{ module }}
+
Show open reviews for {{ module_inst.module_group_name }}
+
Contribution for the last 30 days in {{ module_inst.module_group_name }}
+
Contribution for the last 90 days in {{ module_inst.module_group_name }}
{% endif %} {% if company %}
Show activity report for {{ company_original }}
{% endif %} {% if user_id %} -
Show activity report for {{ user_id }}
+
Show activity report for {{ user_inst.user_name }}
{% endif %} {%- endmacro %}