Class: Gitlab::CycleAnalytics::CodeStage

Inherits:
BaseStage
  • Object
show all
Includes:
CodeHelper
Defined in:
lib/gitlab/cycle_analytics/code_stage.rb

Constant Summary

Constants included from Database::Median

Database::Median::NotSupportedError

Instance Attribute Summary

Attributes inherited from BaseStage

#options

Instance Method Summary collapse

Methods included from CodeHelper

#stage_query

Methods inherited from BaseStage

#as_json, #cte_table, #events, #group_median, #initialize, #interval_query, #median_query, #project_median

Methods included from GroupProjectsProvider

#group, #project, #projects

Methods included from Database::DateTime

#subtract_datetimes, #subtract_datetimes_diff

Methods included from Database::Median

#extract_median, #extract_medians, #median_datetime, #median_datetimes, #pg_median_datetime_sql

Methods included from MetricsTables

#build_table, #issue_metrics_table, #issue_table, #mr_closing_issues_table, #mr_diff_commits_table, #mr_diff_table, #mr_metrics_table, #mr_table, #projects_table, #routes_table, #user_table

Constructor Details

This class inherits a constructor from Gitlab::CycleAnalytics::BaseStage

Instance Method Details

#descriptionObject


28
29
30
# File 'lib/gitlab/cycle_analytics/code_stage.rb', line 28

def description
  _("Time until first merge request")
end

#end_time_attrsObject


12
13
14
# File 'lib/gitlab/cycle_analytics/code_stage.rb', line 12

def end_time_attrs
  @end_time_attrs ||= mr_table[:created_at]
end

#legendObject


24
25
26
# File 'lib/gitlab/cycle_analytics/code_stage.rb', line 24

def legend
  _("Related Merge Requests")
end

#nameObject


16
17
18
# File 'lib/gitlab/cycle_analytics/code_stage.rb', line 16

def name
  :code
end

#start_time_attrsObject


8
9
10
# File 'lib/gitlab/cycle_analytics/code_stage.rb', line 8

def start_time_attrs
  @start_time_attrs ||= issue_metrics_table[:first_mentioned_in_commit_at]
end

#titleObject


20
21
22
# File 'lib/gitlab/cycle_analytics/code_stage.rb', line 20

def title
  s_('CycleAnalyticsStage|Code')
end