From 5b4c94893180587192175fb3b1d441dff5beba05 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 02 2017 09:41:39 +0000 Subject: Add titles to the different section, fix style and fix date in the authors stats Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/static/issues_stats.js b/pagure/static/issues_stats.js index 32c1e11..571f3f0 100644 --- a/pagure/static/issues_stats.js +++ b/pagure/static/issues_stats.js @@ -72,7 +72,8 @@ wait_for_task = function(url, callback){ show_commits_authors = function(data) { var _b = $("#data_stats"); var _s = $("#data_stats_spinner"); - var html = '

Since ' + data.results[3] + ' there has been ' + var html = '

Authors stats

Since ' + + new Date(data.results[3]*1000) + ' there has been ' + data.results[0] + ' commits found in this repo, from ' + data.results[2] + ' contributors

\n' + '
\n'; diff --git a/pagure/templates/repo_stats.html b/pagure/templates/repo_stats.html index 4ae0b29..22b90cb 100644 --- a/pagure/templates/repo_stats.html +++ b/pagure/templates/repo_stats.html @@ -52,7 +52,7 @@ var view_commits_url = "{{ url_for('view_commits', namespace=repo.namespace, author='---') }}"; -issues_history_stats_plot_call = function(){ +issues_history_stats_plot_call = function() { var _stats_url = "{{ url_for( 'api_ns.api_view_issues_history_stats', repo=g.repo.name, @@ -65,13 +65,13 @@ issues_history_stats_plot_call = function(){ ) _s.show(); _b.html( - "

Number of issues open on 7 days windows

" + "

Issues stats

Number of issues open on 7 days windows

" + "" ); issues_history_stats_plot(_stats_url, _b, _s); }; -commits_authors_call = function(){ +commits_authors_call = function() { var _stats_url = "{{ url_for('internal_ns.get_stats_commits') }}"; var _b = $("#data_stats"); var _s = $("#data_stats_spinner"); @@ -88,7 +88,7 @@ commits_authors_call = function(){ commits_authors(_stats_url, data); }; -commits_history_call = function(){ +commits_history_call = function() { var _stats_url = "{{ url_for('internal_ns.get_stats_commits_trend') }}"; var _b = $("#data_stats"); var _s = $("#data_stats_spinner"); @@ -97,7 +97,7 @@ commits_history_call = function(){ ) _s.show(); _b.html( - "

Evolution of the number of commits over the last year

" + "

Commits stats

Evolution of the number of commits over the last year

" + "" ); var data = { @@ -110,8 +110,8 @@ commits_history_call = function(){ }; -$(document).ready(function() { +$(document).ready(function() { $('.stats_btn').click(function(ev){ var _b = $("#data_stats"); _b.hide();