Mercurial > kallithea
changeset 800:e41aacb6aa18 beta
small fixes for summary graph, added message about no data for the graph, when empty
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 03 Dec 2010 13:40:40 +0100 |
parents | 6d37fe113da0 |
children | a81bd2a8cdd4 |
files | rhodecode/controllers/summary.py rhodecode/templates/summary/summary.html |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/controllers/summary.py Fri Dec 03 13:09:21 2010 +0100 +++ b/rhodecode/controllers/summary.py Fri Dec 03 13:40:40 2010 +0100 @@ -113,6 +113,7 @@ if stats and stats.languages: + c.no_data = False lang_stats = json.loads(stats.languages) c.commit_data = stats.commit_activity c.overview_data = stats.commit_activity_combined @@ -123,8 +124,9 @@ ) else: c.commit_data = json.dumps({}) - c.overview_data = json.dumps([[ts_min_y, 0], [ts_max_y, 0] ]) + c.overview_data = json.dumps([[ts_min_y, 0], [ts_max_y, 10] ]) c.trending_languages = json.dumps({}) + c.no_data = True return render('summary/summary.html')
--- a/rhodecode/templates/summary/summary.html Fri Dec 03 13:09:21 2010 +0100 +++ b/rhodecode/templates/summary/summary.html Fri Dec 03 13:40:40 2010 +0100 @@ -248,6 +248,10 @@ </div> <div class="table"> + + %if c.no_data: + <div style="padding:0 10px 10px 15px;font-size: 1.2em;">${_('No data loaded yet')}</div> + %endif: <div id="commit_history" style="width:460px;height:300px;float:left"></div> <div style="clear: both;height: 10px"></div> <div id="overview" style="width:460px;height:100px;float:left"></div>