2016-11-16 06:01:10 -05:00
|
|
|
module Gitlab
|
|
|
|
module CycleAnalytics
|
2016-11-17 07:22:27 -05:00
|
|
|
class ProductionEvent < BaseEvent
|
2016-11-18 06:05:29 -05:00
|
|
|
include IssueAllowed
|
|
|
|
|
2016-11-17 12:00:37 -05:00
|
|
|
def initialize(*args)
|
|
|
|
@start_time_attrs = issue_table[:created_at]
|
|
|
|
@end_time_attrs = mr_metrics_table[:first_deployed_to_production_at]
|
|
|
|
@projections = [issue_table[:title],
|
|
|
|
issue_table[:iid],
|
|
|
|
issue_table[:id],
|
|
|
|
issue_table[:created_at],
|
|
|
|
issue_table[:author_id]]
|
2016-11-16 06:01:10 -05:00
|
|
|
|
2016-11-17 12:00:37 -05:00
|
|
|
super(*args)
|
|
|
|
end
|
2016-11-16 06:01:10 -05:00
|
|
|
|
2016-11-17 12:00:37 -05:00
|
|
|
private
|
2016-11-17 07:22:27 -05:00
|
|
|
|
2016-11-17 12:00:37 -05:00
|
|
|
def serialize(event)
|
|
|
|
AnalyticsIssueSerializer.new(project: @project).represent(event).as_json
|
|
|
|
end
|
2016-11-16 06:01:10 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|