From a0b82bc80ff29c8c1b3237cd119e71be9e23cb64 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Tue, 10 Feb 2015 15:48:29 +0000 Subject: [PATCH] dropped msg and paths when returning history as json. changed the commits-per-month graph to show every 3 x-labeas only --- codepot/src/codepot/controllers/code.php | 6 ++++++ codepot/src/codepot/views/project_home.php | 2 ++ 2 files changed, 8 insertions(+) diff --git a/codepot/src/codepot/controllers/code.php b/codepot/src/codepot/controllers/code.php index a6780d61..598cc308 100644 --- a/codepot/src/codepot/controllers/code.php +++ b/codepot/src/codepot/controllers/code.php @@ -709,6 +709,12 @@ class Code extends Controller else { $history = $file['history']; + $count = count($history); + for ($i = 0; $i < $count; $i++) + { + unset ($history[$i]['msg']); + unset ($history[$i]['paths']); + } } print codepot_json_encode ($history); diff --git a/codepot/src/codepot/views/project_home.php b/codepot/src/codepot/views/project_home.php index 724b0f1d..ad3cf520 100644 --- a/codepot/src/codepot/views/project_home.php +++ b/codepot/src/codepot/views/project_home.php @@ -124,6 +124,8 @@ function show_commits_per_month_graph(response) { commits_per_month_values.push (commits_per_month[commits_per_month_keys[i]]); committers_per_month_values.push (committers_per_month[commits_per_month_keys[i]]); + + if (commits_per_month_keys.length > 12 && (i % 3)) commits_per_month_keys[i] = ''; } var commits_per_month_data = {