2020-04-21 11:21:10 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Projects::AlertManagementHelper
|
2020-04-27 14:09:41 -04:00
|
|
|
def alert_management_data(current_user, project)
|
2020-04-21 11:21:10 -04:00
|
|
|
{
|
2020-04-30 08:09:45 -04:00
|
|
|
'project-path' => project.full_path,
|
2020-04-21 11:21:10 -04:00
|
|
|
'enable-alert-management-path' => project_settings_operations_path(project),
|
2020-04-27 14:09:41 -04:00
|
|
|
'empty-alert-svg-path' => image_path('illustrations/alert-management-empty-state.svg'),
|
|
|
|
'user-can-enable-alert-management' => 'false',
|
|
|
|
'alert-management-enabled' => Feature.enabled?(:alert_management_minimal, project).to_s
|
2020-04-21 11:21:10 -04:00
|
|
|
}
|
|
|
|
end
|
2020-05-06 11:09:42 -04:00
|
|
|
|
|
|
|
def alert_management_detail_data(project_path, alert_id)
|
|
|
|
{
|
|
|
|
'alert-id' => alert_id,
|
|
|
|
'project-path' => project_path
|
|
|
|
}
|
|
|
|
end
|
2020-04-21 11:21:10 -04:00
|
|
|
end
|