Commit e39fc789 authored by Fabio Pitino's avatar Fabio Pitino

Merge branch 'lm-jobs-helper' into 'master'

Moves JobsHelper to CI namespace

See merge request gitlab-org/gitlab!35389
parents 43329054 489cb00d
# frozen_string_literal: true
module Ci
module JobsHelper
def jobs_data
{
"endpoint" => project_job_path(@project, @build, format: :json),
"project_path" => @project.full_path,
"deployment_help_url" => help_page_path('user/project/clusters/index.html', anchor: 'troubleshooting'),
"runner_help_url" => help_page_path('ci/runners/README.html', anchor: 'set-maximum-job-timeout-for-a-runner'),
"runner_settings_url" => project_runners_path(@build.project, anchor: 'js-runners-settings'),
"variables_settings_url" => project_variables_path(@build.project, anchor: 'js-cicd-variables-settings'),
"page_path" => project_job_path(@project, @build),
"build_status" => @build.status,
"build_stage" => @build.stage,
"log_state" => '',
"build_options" => javascript_build_options
}
end
end
end
Ci::JobsHelper.prepend_if_ee('::EE::Ci::JobsHelper')
# frozen_string_literal: true
module JobsHelper
def jobs_data
{
"endpoint" => project_job_path(@project, @build, format: :json),
"project_path" => @project.full_path,
"deployment_help_url" => help_page_path('user/project/clusters/index.md', anchor: 'troubleshooting'),
"runner_help_url" => help_page_path('ci/runners/README.md', anchor: 'set-maximum-job-timeout-for-a-runner'),
"runner_settings_url" => project_runners_path(@build.project, anchor: 'js-runners-settings'),
"variables_settings_url" => project_variables_path(@build.project, anchor: 'js-cicd-variables-settings'),
"page_path" => project_job_path(@project, @build),
"build_status" => @build.status,
"build_stage" => @build.stage,
"log_state" => '',
"build_options" => javascript_build_options
}
end
end
# frozen_string_literal: true
module EE
module Ci
module JobsHelper
extend ::Gitlab::Utils::Override
override :jobs_data
def jobs_data
super.merge({
"subscriptions_more_minutes_url" => ::EE::SUBSCRIPTIONS_MORE_MINUTES_URL
})
end
end
end
end
# frozen_string_literal: true
module EE
module JobsHelper
extend ::Gitlab::Utils::Override
override :jobs_data
def jobs_data
super.merge({
"subscriptions_more_minutes_url" => ::EE::SUBSCRIPTIONS_MORE_MINUTES_URL
})
end
end
end
::JobsHelper.prepend_if_ee('::EE::JobsHelper')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment