diff options
Diffstat (limited to 'lib/gitlab/cycle_analytics/summary')
-rw-r--r-- | lib/gitlab/cycle_analytics/summary/base.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/cycle_analytics/summary/deployment_frequency.rb | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/gitlab/cycle_analytics/summary/base.rb b/lib/gitlab/cycle_analytics/summary/base.rb index e30e526f017..f2ff86a40a2 100644 --- a/lib/gitlab/cycle_analytics/summary/base.rb +++ b/lib/gitlab/cycle_analytics/summary/base.rb @@ -17,6 +17,10 @@ module Gitlab raise NotImplementedError, "Expected #{self.name} to implement value" end + def links + [] + end + private attr_reader :project, :options diff --git a/lib/gitlab/cycle_analytics/summary/deployment_frequency.rb b/lib/gitlab/cycle_analytics/summary/deployment_frequency.rb index 1947866d772..2b1529bdc1a 100644 --- a/lib/gitlab/cycle_analytics/summary/deployment_frequency.rb +++ b/lib/gitlab/cycle_analytics/summary/deployment_frequency.rb @@ -6,7 +6,7 @@ module Gitlab class DeploymentFrequency < Base include SummaryHelper - def initialize(deployments:, options:, project: nil) + def initialize(deployments:, options:, project:) @deployments = deployments super(project: project, options: options) @@ -23,6 +23,13 @@ module Gitlab def unit _('per day') end + + def links + [ + { "name" => _('Deployment frequency'), "url" => Gitlab::Routing.url_helpers.charts_project_pipelines_path(project, chart: 'deployment-frequency'), "label" => s_('ValueStreamAnalytics|Dashboard') }, + { "name" => _('Deployment frequency'), "url" => Gitlab::Routing.url_helpers.help_page_path('user/analytics/index', anchor: 'definitions'), "docs_link" => true, "label" => s_('ValueStreamAnalytics|Go to docs') } + ] + end end end end |