Commit 091c4b74 authored by Scott Hampton's avatar Scott Hampton

Merge branch '327199-consistently-indicate-runner-type-using-the-alert-component' into 'master'

Update runner type indicators in view/edit pages

See merge request gitlab-org/gitlab!59005
parents 422f14b4 1c05866e
...@@ -8,22 +8,10 @@ ...@@ -8,22 +8,10 @@
#js-runner-detail{ data: {runner_id: @runner.id} } #js-runner-detail{ data: {runner_id: @runner.id} }
- else - else
%h2.page-title %h2.page-title
= sprintf(s_('Runners|Runner #%{runner_id}'), {runner_id: @runner.id}) = s_('Runners|Runner #%{runner_id}' % { runner_id: @runner.id })
= render 'shared/runners/runner_type_badge', runner: @runner
- if @runner.instance_type? = render 'shared/runners/runner_type_alert', runner: @runner
.bs-callout.bs-callout-success
%h4= _('This runner processes jobs for all unassigned projects.')
%p
= _('If you want a runner to build only specific projects, restrict the project in the table below. After you restrict a runner to a project, you cannot change it back to a shared runner.')
- elsif @runner.group_type?
.bs-callout.bs-callout-success
%h4= _('This runner processes jobs for all projects in its group and subgroups.')
- else
.bs-callout.bs-callout-info
%h4= _('This runner processes jobs for assigned projects only.')
%p
= _('You cannot make this a shared runner.')
%hr
.gl-mb-6 .gl-mb-6
= render 'shared/runners/form', runner: @runner, runner_form_url: admin_runner_path(@runner), in_gitlab_com_admin_context: Gitlab.com? = render 'shared/runners/form', runner: @runner, runner_form_url: admin_runner_path(@runner), in_gitlab_com_admin_context: Gitlab.com?
......
- page_title _('Edit'), "#{@runner.description} ##{@runner.id}", _('Runners') - page_title _('Edit'), "#{@runner.description} ##{@runner.id}", _('Runners')
%h4 Runner ##{@runner.id} %h2.page-title
= s_('Runners|Runner #%{runner_id}' % { runner_id: @runner.id })
= render 'shared/runners/runner_type_badge', runner: @runner
%hr = render 'shared/runners/runner_type_alert', runner: @runner
= render 'shared/runners/form', runner: @runner, runner_form_url: group_runner_path(@group, @runner)
= render 'shared/runners/form', runner: @runner, runner_form_url: group_runner_path(@group, @runner)
- page_title _('Edit'), "#{@runner.description} ##{@runner.id}", _('runners') - page_title _('Edit'), "#{@runner.description} ##{@runner.id}", _('Runners')
%h4 Runner ##{@runner.id} %h2.page-title
= s_('Runners|Runner #%{runner_id}' % { runner_id: @runner.id })
= render 'shared/runners/runner_type_badge', runner: @runner
%hr = render 'shared/runners/runner_type_alert', runner: @runner
= render 'shared/runners/form', runner: @runner, runner_form_url: project_runner_path(@project, @runner)
= render 'shared/runners/form', runner: @runner, runner_form_url: project_runner_path(@project, @runner)
.gl-alert.gl-alert-info.gl-my-5
= sprite_icon('information-o', css_class: 'gl-alert-icon')
- if runner.instance_type?
%h4.gl-alert-title
= s_('Runners|This runner is available to all groups and projects in your GitLab instance.')
.gl-alert-body
= s_('Runners|Shared runners are available to every project in a GitLab instance. If you want a runner to build only specific projects, restrict the project in the table below. After you restrict a runner to a project, you cannot change it back to a shared runner.')
= link_to _('Learn more.'), help_page_path('ci/runners/README', anchor: 'shared-runners'), target: '_blank', rel: 'noopener noreferrer'
- elsif runner.group_type?
%h4.gl-alert-title
= s_('Runners|This runner is available to all projects and subgroups in a group.')
.gl-alert-body
= s_('Runners|Use Group runners when you want all projects in a group to have access to a set of runners.')
= link_to _('Learn more.'), help_page_path('ci/runners/README', anchor: 'group-runners'), target: '_blank', rel: 'noopener noreferrer'
- else
%h4.gl-alert-title
= s_('Runners|This runner is associated with specific projects.')
.gl-alert-body
= s_('Runners|You can set up a specific runner to be used by multiple projects but you cannot make this a shared runner.')
= link_to _('Learn more.'), help_page_path('ci/runners/README', anchor: 'specific-runners'), target: '_blank', rel: 'noopener noreferrer'
- if runner.instance_type?
%span.badge.badge-pill.gl-badge.badge-success
= s_('Runners|shared')
- elsif runner.group_type?
%span.badge.badge-pill.gl-badge.badge-success
= s_('Runners|group')
- else
%span.badge.badge-pill.gl-badge.badge-info
= s_('Runners|specific')
- page_title "#{@runner.description} ##{@runner.id}", _("Runners") - page_title "#{@runner.description} ##{@runner.id}", _("Runners")
%h3.page-title %h2.page-title
= s_('Runners|Runner #%{id}' % { id: @runner.id }) = s_('Runners|Runner #%{runner_id}' % { runner_id: @runner.id })
.float-right = render 'shared/runners/runner_type_badge', runner: @runner
- if @runner.instance_type?
%span.runner-state.runner-state-shared
= s_('Runners|Shared')
- elsif @runner.group_type?
%span.runner-state.runner-state-shared
= s_('Runners|Group')
- else
%span.runner-state.runner-state-specific
= s_('Runners|Specific')
.table-holder .table-holder
%table.table %table.table
......
---
title: Update runner type indicators in view/edit pages
merge_request: 59005
author:
type: changed
...@@ -16121,9 +16121,6 @@ msgstr "" ...@@ -16121,9 +16121,6 @@ msgstr ""
msgid "If you remove this license, GitLab will fall back on the previous license, if any." msgid "If you remove this license, GitLab will fall back on the previous license, if any."
msgstr "" msgstr ""
msgid "If you want a runner to build only specific projects, restrict the project in the table below. After you restrict a runner to a project, you cannot change it back to a shared runner."
msgstr ""
msgid "If you want to re-enable two-factor authentication, visit %{two_factor_link}" msgid "If you want to re-enable two-factor authentication, visit %{two_factor_link}"
msgstr "" msgstr ""
...@@ -27217,9 +27214,6 @@ msgstr "" ...@@ -27217,9 +27214,6 @@ msgstr ""
msgid "Runners|Download latest binary" msgid "Runners|Download latest binary"
msgstr "" msgstr ""
msgid "Runners|Group"
msgstr ""
msgid "Runners|IP Address" msgid "Runners|IP Address"
msgstr "" msgstr ""
...@@ -27265,16 +27259,22 @@ msgstr "" ...@@ -27265,16 +27259,22 @@ msgstr ""
msgid "Runners|Runner is paused, last contact was %{runner_contact} ago" msgid "Runners|Runner is paused, last contact was %{runner_contact} ago"
msgstr "" msgstr ""
msgid "Runners|Shared" msgid "Runners|Shared runners are available to every project in a GitLab instance. If you want a runner to build only specific projects, restrict the project in the table below. After you restrict a runner to a project, you cannot change it back to a shared runner."
msgstr "" msgstr ""
msgid "Runners|Show Runner installation instructions" msgid "Runners|Show Runner installation instructions"
msgstr "" msgstr ""
msgid "Runners|Specific" msgid "Runners|Tags"
msgstr "" msgstr ""
msgid "Runners|Tags" msgid "Runners|This runner is associated with specific projects."
msgstr ""
msgid "Runners|This runner is available to all groups and projects in your GitLab instance."
msgstr ""
msgid "Runners|This runner is available to all projects and subgroups in a group."
msgstr "" msgstr ""
msgid "Runners|To install Runner in Kubernetes follow the instructions described in the GitLab documentation." msgid "Runners|To install Runner in Kubernetes follow the instructions described in the GitLab documentation."
...@@ -27283,6 +27283,9 @@ msgstr "" ...@@ -27283,6 +27283,9 @@ msgstr ""
msgid "Runners|To install Runner in a container follow the instructions described in the GitLab documentation" msgid "Runners|To install Runner in a container follow the instructions described in the GitLab documentation"
msgstr "" msgstr ""
msgid "Runners|Use Group runners when you want all projects in a group to have access to a set of runners."
msgstr ""
msgid "Runners|Value" msgid "Runners|Value"
msgstr "" msgstr ""
...@@ -27292,9 +27295,21 @@ msgstr "" ...@@ -27292,9 +27295,21 @@ msgstr ""
msgid "Runners|View installation instructions" msgid "Runners|View installation instructions"
msgstr "" msgstr ""
msgid "Runners|You can set up a specific runner to be used by multiple projects but you cannot make this a shared runner."
msgstr ""
msgid "Runners|You have used %{quotaUsed} out of %{quotaLimit} of your shared Runners pipeline minutes." msgid "Runners|You have used %{quotaUsed} out of %{quotaLimit} of your shared Runners pipeline minutes."
msgstr "" msgstr ""
msgid "Runners|group"
msgstr ""
msgid "Runners|shared"
msgstr ""
msgid "Runners|specific"
msgstr ""
msgid "Running" msgid "Running"
msgstr "" msgstr ""
...@@ -32187,15 +32202,6 @@ msgstr "" ...@@ -32187,15 +32202,6 @@ msgstr ""
msgid "This repository was last checked %{last_check_timestamp}. The check passed." msgid "This repository was last checked %{last_check_timestamp}. The check passed."
msgstr "" msgstr ""
msgid "This runner processes jobs for all projects in its group and subgroups."
msgstr ""
msgid "This runner processes jobs for all unassigned projects."
msgstr ""
msgid "This runner processes jobs for assigned projects only."
msgstr ""
msgid "This runner will only run on pipelines triggered on protected branches" msgid "This runner will only run on pipelines triggered on protected branches"
msgstr "" msgstr ""
...@@ -35787,9 +35793,6 @@ msgstr "" ...@@ -35787,9 +35793,6 @@ msgstr ""
msgid "You cannot impersonate an internal user" msgid "You cannot impersonate an internal user"
msgstr "" msgstr ""
msgid "You cannot make this a shared runner."
msgstr ""
msgid "You cannot play this scheduled pipeline at the moment. Please wait a minute." msgid "You cannot play this scheduled pipeline at the moment. Please wait a minute."
msgstr "" msgstr ""
...@@ -37735,9 +37738,6 @@ msgstr "" ...@@ -37735,9 +37738,6 @@ msgstr ""
msgid "revised" msgid "revised"
msgstr "" msgstr ""
msgid "runners"
msgstr ""
msgid "satisfied" msgid "satisfied"
msgstr "" msgstr ""
......
...@@ -34,19 +34,19 @@ RSpec.describe 'shared/runners/show.html.haml' do ...@@ -34,19 +34,19 @@ RSpec.describe 'shared/runners/show.html.haml' do
describe 'Runner id and type' do describe 'Runner id and type' do
context 'when runner is of type instance' do context 'when runner is of type instance' do
it { is_expected.to have_content("Runner ##{runner.id} Shared") } it { is_expected.to have_content("Runner ##{runner.id} shared") }
end end
context 'when runner is of type group' do context 'when runner is of type group' do
let(:runner) { create(:ci_runner, :group) } let(:runner) { create(:ci_runner, :group) }
it { is_expected.to have_content("Runner ##{runner.id} Group") } it { is_expected.to have_content("Runner ##{runner.id} group") }
end end
context 'when runner is of type project' do context 'when runner is of type project' do
let(:runner) { create(:ci_runner, :project) } let(:runner) { create(:ci_runner, :project) }
it { is_expected.to have_content("Runner ##{runner.id} Specific") } it { is_expected.to have_content("Runner ##{runner.id} specific") }
end end
end end
......
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