2019-11-06 04:06:23 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-06-21 08:07:45 -04:00
|
|
|
class Projects::ServicePingController < Projects::ApplicationController
|
2019-11-06 04:06:23 -05:00
|
|
|
before_action :authenticate_user!
|
|
|
|
|
2022-05-12 11:08:59 -04:00
|
|
|
feature_category :web_ide
|
2020-10-08 14:08:32 -04:00
|
|
|
|
2019-11-06 04:06:23 -05:00
|
|
|
def web_ide_clientside_preview
|
|
|
|
return render_404 unless Gitlab::CurrentSettings.web_ide_clientside_preview_enabled?
|
|
|
|
|
|
|
|
Gitlab::UsageDataCounters::WebIdeCounter.increment_previews_count
|
|
|
|
|
|
|
|
head(200)
|
|
|
|
end
|
2020-05-13 20:07:47 -04:00
|
|
|
|
2022-01-25 16:15:18 -05:00
|
|
|
def web_ide_clientside_preview_success
|
|
|
|
return render_404 unless Gitlab::CurrentSettings.web_ide_clientside_preview_enabled?
|
|
|
|
|
|
|
|
Gitlab::UsageDataCounters::WebIdeCounter.increment_previews_success_count
|
2022-07-01 11:08:30 -04:00
|
|
|
Gitlab::UsageDataCounters::EditorUniqueCounter.track_live_preview_edit_action(author: current_user,
|
|
|
|
project: project)
|
2022-01-25 16:15:18 -05:00
|
|
|
|
|
|
|
head(200)
|
|
|
|
end
|
|
|
|
|
2020-05-13 20:07:47 -04:00
|
|
|
def web_ide_pipelines_count
|
|
|
|
Gitlab::UsageDataCounters::WebIdeCounter.increment_pipelines_count
|
|
|
|
|
|
|
|
head(200)
|
|
|
|
end
|
2019-11-06 04:06:23 -05:00
|
|
|
end
|