2019-12-26 22:10:19 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-09-30 23:02:18 +05:30
|
|
|
class Projects::ServicePingController < Projects::ApplicationController
|
2019-12-26 22:10:19 +05:30
|
|
|
before_action :authenticate_user!
|
|
|
|
|
2022-07-16 23:28:13 +05:30
|
|
|
feature_category :web_ide
|
2021-01-03 14:25:43 +05:30
|
|
|
|
2019-12-26 22:10:19 +05:30
|
|
|
def web_ide_clientside_preview
|
|
|
|
return render_404 unless Gitlab::CurrentSettings.web_ide_clientside_preview_enabled?
|
|
|
|
|
|
|
|
Gitlab::UsageDataCounters::WebIdeCounter.increment_previews_count
|
|
|
|
|
2023-03-04 22:38:38 +05:30
|
|
|
head(:ok)
|
2019-12-26 22:10:19 +05:30
|
|
|
end
|
2020-05-24 23:13:21 +05:30
|
|
|
|
2022-04-04 11:22:00 +05:30
|
|
|
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-08-13 15:12:31 +05:30
|
|
|
Gitlab::UsageDataCounters::EditorUniqueCounter.track_live_preview_edit_action(author: current_user,
|
|
|
|
project: project)
|
2022-04-04 11:22:00 +05:30
|
|
|
|
2023-03-04 22:38:38 +05:30
|
|
|
head(:ok)
|
2022-04-04 11:22:00 +05:30
|
|
|
end
|
|
|
|
|
2020-05-24 23:13:21 +05:30
|
|
|
def web_ide_pipelines_count
|
|
|
|
Gitlab::UsageDataCounters::WebIdeCounter.increment_pipelines_count
|
|
|
|
|
2023-03-04 22:38:38 +05:30
|
|
|
head(:ok)
|
2020-05-24 23:13:21 +05:30
|
|
|
end
|
2019-12-26 22:10:19 +05:30
|
|
|
end
|