diff options
author | Taurie Davis, Simon Knox and Adam Niedzielski <awesome@gitlab.com> | 2017-05-24 12:25:44 +0200 |
---|---|---|
committer | Adam Niedzielski <adamsunday@gmail.com> | 2017-06-01 17:37:21 +0200 |
commit | 26dde5f55f1dac2e6bea4f7e1dfa51c72dc756cb (patch) | |
tree | f0168cb9ad0be7c4bf8657a5321e5da0bda8e83b /app/presenters | |
parent | c72abcefe79dd906cbbf0088b442a8979e9fc746 (diff) | |
download | gitlab-ce-26dde5f55f1dac2e6bea4f7e1dfa51c72dc756cb.tar.gz |
Add Conversational Development Index page to admin panel
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/conversational_development_index/metric_presenter.rb | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/app/presenters/conversational_development_index/metric_presenter.rb b/app/presenters/conversational_development_index/metric_presenter.rb new file mode 100644 index 00000000000..220014a955a --- /dev/null +++ b/app/presenters/conversational_development_index/metric_presenter.rb @@ -0,0 +1,144 @@ +module ConversationalDevelopmentIndex + class MetricPresenter < Gitlab::View::Presenter::Simple + def cards + [ + Card.new( + metric: subject, + title: 'Issues', + description: 'created per active user', + feature: 'issues', + blog: 'https://www2.deloitte.com/content/dam/Deloitte/se/Documents/technology-media-telecommunications/deloitte-digital-collaboration.pdf' + ), + Card.new( + metric: subject, + title: 'Comments', + description: 'created per active user', + feature: 'notes', + blog: 'http://conversationaldevelopment.com/why/' + ), + Card.new( + metric: subject, + title: 'Milestones', + description: 'created per active user', + feature: 'milestones', + blog: 'http://conversationaldevelopment.com/shorten-cycle/', + docs: help_page_path('user/project/milestones/index') + ), + Card.new( + metric: subject, + title: 'Boards', + description: 'created per active user', + feature: 'boards', + blog: 'http://jpattonassociates.com/user-story-mapping/', + docs: help_page_path('user/project/issue_board') + ), + Card.new( + metric: subject, + title: 'Merge Requests', + description: 'per active user', + feature: 'merge_requests', + blog: 'https://8thlight.com/blog/uncle-bob/2013/02/01/The-Humble-Craftsman.html', + docs: help_page_path('user/project/merge_requests/index') + ), + Card.new( + metric: subject, + title: 'Pipelines', + description: 'created per active user', + feature: 'ci_pipelines', + blog: 'https://martinfowler.com/bliki/ContinuousDelivery.html', + docs: help_page_path('ci/README') + ), + Card.new( + metric: subject, + title: 'Environments', + description: 'created per active user', + feature: 'environments', + blog: 'https://about.gitlab.com/2016/08/26/ci-deployment-and-environments/', + docs: help_page_path('ci/environments') + ), + Card.new( + metric: subject, + title: 'Deployments', + description: 'created per active user', + feature: 'deployments', + blog: 'https://puppet.com/blog/continuous-delivery-vs-continuous-deployment-what-s-diff' + ), + Card.new( + metric: subject, + title: 'Monitoring', + description: 'fraction of all projects', + feature: 'projects_prometheus_active', + blog: 'https://prometheus.io/docs/introduction/overview/', + docs: help_page_path('user/project/integrations/prometheus') + ), + Card.new( + metric: subject, + title: 'Service Desk', + description: 'issues created per active user', + feature: 'service_desk_issues', + blog: 'http://blogs.forrester.com/kate_leggett/17-01-30-top_trends_for_customer_service_in_2017_operations_become_smarter_and_more_strategic', + docs: 'https://docs.gitlab.com/ee/user/project/service_desk.html' + ) + ] + end + + def idea_to_production_steps + [ + IdeaToProductionStep.new( + metric: subject, + title: 'Idea', + features: %w(issues) + ), + IdeaToProductionStep.new( + metric: subject, + title: 'Issue', + features: %w(issues notes) + ), + IdeaToProductionStep.new( + metric: subject, + title: 'Plan', + features: %w(milestones boards) + ), + IdeaToProductionStep.new( + metric: subject, + title: 'Code', + features: %w(merge_requests) + ), + IdeaToProductionStep.new( + metric: subject, + title: 'Commit', + features: %w(merge_requests) + ), + IdeaToProductionStep.new( + metric: subject, + title: 'Test', + features: %w(ci_pipelines) + ), + IdeaToProductionStep.new( + metric: subject, + title: 'Review', + features: %w(ci_pipelines environments) + ), + IdeaToProductionStep.new( + metric: subject, + title: 'Staging', + features: %w(environments deployments) + ), + IdeaToProductionStep.new( + metric: subject, + title: 'Production', + features: %w(deployments) + ), + IdeaToProductionStep.new( + metric: subject, + title: 'Feedback', + features: %w(projects_prometheus_active service_desk_issues) + ) + ] + end + + def average_percentage_score + cards.map(&:percentage_score).inject(:+) / cards.size.to_f + end + end +end |