Mercurial > kallithea
diff rhodecode/controllers/summary.py @ 1719:4a28aff31a15 beta
optimized summary page for disabled stats
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 25 Nov 2011 20:05:59 +0200 |
parents | 8384eaabeb19 |
children | e2d76554d2c6 |
line wrap: on
line diff
--- a/rhodecode/controllers/summary.py Fri Nov 25 19:25:10 2011 +0200 +++ b/rhodecode/controllers/summary.py Fri Nov 25 20:05:59 2011 +0200 @@ -88,18 +88,18 @@ password = '@' parsed_url = urlparse(url.current(qualified=True)) - + default_clone_uri = '{scheme}://{user}{pass}{netloc}{path}' - - uri_tmpl = config.get('clone_uri',default_clone_uri) - uri_tmpl = uri_tmpl.replace('{','%(').replace('}',')s') - - uri = uri_tmpl % {'user': username, + + uri_tmpl = config.get('clone_uri', default_clone_uri) + uri_tmpl = uri_tmpl.replace('{', '%(').replace('}', ')s') + + uri = uri_tmpl % {'user': username, 'pass': password, 'scheme': parsed_url.scheme, 'netloc':parsed_url.netloc, 'path':parsed_url.path} - + c.clone_repo_url = uri c.repo_tags = OrderedDict() for name, hash in c.rhodecode_repo.tags.items()[:10]: @@ -124,9 +124,11 @@ ts_max_y = mktime(td.timetuple()) if dbrepo.enable_statistics: + c.show_stats = True c.no_data_msg = _('No data loaded yet') run_task(get_commits_stats, c.dbrepo.repo_name, ts_min_y, ts_max_y) else: + c.show_stats = False c.no_data_msg = _('Statistics are disabled for this repository') c.ts_min = ts_min_m c.ts_max = ts_max_y