Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2016-09-21 07:27:14 +0300
committerTimothy Andrew <mail@timothyandrew.net>2016-09-21 07:27:14 +0300
commit244ec0a84c969454bfa05f66dedb22f2b1172323 (patch)
treeddcaf211d04f42e778bd8fe0cbf8daf53ca6fd4b /app
parentcc3adcd4bffe262f8581354b8190869f94ef17f2 (diff)
Implement fourth round of comments from @DouweM.
- Pluralize summary titles - Remove the `run_query` method - always return sql strings from the `date_time_sql` methods
Diffstat (limited to 'app')
-rw-r--r--app/controllers/projects/cycle_analytics_controller.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/controllers/projects/cycle_analytics_controller.rb b/app/controllers/projects/cycle_analytics_controller.rb
index 7f0689306be..16a7b1fc6e2 100644
--- a/app/controllers/projects/cycle_analytics_controller.rb
+++ b/app/controllers/projects/cycle_analytics_controller.rb
@@ -1,5 +1,6 @@
class Projects::CycleAnalyticsController < Projects::ApplicationController
include ActionView::Helpers::DateHelper
+ include ActionView::Helpers::TextHelper
before_action :authorize_read_cycle_analytics!
@@ -48,10 +49,14 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController
stats
end
+ issues = @cycle_analytics.summary.new_issues
+ commits = @cycle_analytics.summary.commits
+ deploys = @cycle_analytics.summary.deploys
+
summary = [
- { title: "New Issues", value: @cycle_analytics.summary.new_issues },
- { title: "Commits", value: @cycle_analytics.summary.commits },
- { title: "Deploys", value: @cycle_analytics.summary.deploys }
+ { title: "New Issue".pluralize(issues), value: issues },
+ { title: "Commit".pluralize(commits), value: commits },
+ { title: "Deploy".pluralize(deploys), value: deploys }
]
{