diff --git a/codepot/etc/codepot.ini.in b/codepot/etc/codepot.ini.in index 95c1eb3a..f45a28fb 100644 --- a/codepot/etc/codepot.ini.in +++ b/codepot/etc/codepot.ini.in @@ -152,6 +152,16 @@ max_upload_size = "10000" ;------------------------------------------------------------------------------ max_latest_projects = "10" +;------------------------------------------------------------------------------ +; Maximum number of projects to show in the top projects graph +;------------------------------------------------------------------------------ +max_top_projects = "10" + +;------------------------------------------------------------------------------ +; Maximum number of committers to show in the top committers graph +;------------------------------------------------------------------------------ +max_top_committers = "10" + ;------------------------------------------------------------------------------ ; Maximum number of projects to show ;------------------------------------------------------------------------------ diff --git a/codepot/src/codepot/controllers/site.php b/codepot/src/codepot/controllers/site.php index 2d214e5d..d13b3d81 100644 --- a/codepot/src/codepot/controllers/site.php +++ b/codepot/src/codepot/controllers/site.php @@ -104,9 +104,8 @@ class Site extends Controller $login['id'], $this->issuehelper->_get_open_status_array($this->lang), 0); } - // TODO: make count_limit configurable instead of using 20 - $commit_counts_per_project = $this->logs->countCodeCommitsPerProject ('', 0, 20); - $commit_counts_per_user = $this->logs->countCodeCommitsPerUser ('', 0, 20); + $commit_counts_per_project = $this->logs->countCodeCommitsPerProject ('', 0, CODEPOT_MAX_TOP_PROJECTS); + $commit_counts_per_user = $this->logs->countCodeCommitsPerUser ('', 0, CODEPOT_MAX_TOP_COMMITTERS); if (/*$issues === FALSE || $recently_resolved_issues === FALSE ||*/ $open_issue_counts_per_project === FALSE || diff --git a/codepot/src/codepot/views/site_home.php b/codepot/src/codepot/views/site_home.php index c7598246..2eb51e8e 100644 --- a/codepot/src/codepot/views/site_home.php +++ b/codepot/src/codepot/views/site_home.php @@ -159,7 +159,7 @@ function show_commits_per_project() innerRadius: 0.1, label: { show: true, - radius: 7/10, + radius: 0.9, formatter: labelFormatter, background: { opacity: 0.8 } } @@ -201,7 +201,7 @@ function show_commits_per_user() innerRadius: 0.1, label: { show: true, - radius: 7/10, + radius: 0.9, formatter: labelFormatter, background: { opacity: 0.8 } } @@ -328,7 +328,7 @@ $this->load->view (
-
+
@@ -340,7 +340,7 @@ $this->load->view (
-
+
diff --git a/codepot/src/config.php.in b/codepot/src/config.php.in index c284cd76..429ca936 100644 --- a/codepot/src/config.php.in +++ b/codepot/src/config.php.in @@ -41,6 +41,8 @@ function load_ini ($file) array ('sysadmin_userids', 'string', ''), array ('max_upload_size', 'string', '10000'), // kbytes array ('max_latest_projects', 'integer', 10), + array ('max_top_projects', 'integer', 10), + array ('max_top_committers', 'integer', 10), array ('max_projects_per_page', 'integer', 50), array ('max_issues_per_page', 'integer', 50), array ('max_logs_per_page', 'integer', 50),