Skip to content
代码片段 群组 项目
未验证 提交 b6170354 编辑于 作者: Miguel Rincon's avatar Miguel Rincon 提交者: GitLab
浏览文件

Replace references to deprecated runner fields

This change removes references when displaying a
runner in the project area, so it shows runner
manager fields.

It places the runner manager fields at the bottom
of the view.

Changelog: changed
上级 a43bcc50
No related branches found
No related tags found
无相关合并请求
......@@ -447,7 +447,6 @@ RSpec/ExpectInHook:
- 'spec/uploaders/file_mover_spec.rb'
- 'spec/uploaders/gitlab_uploader_spec.rb'
- 'spec/uploaders/object_storage_spec.rb'
- 'spec/views/shared/runners/_runner_details.html.haml_spec.rb'
- 'spec/workers/bulk_imports/pipeline_worker_spec.rb'
- 'spec/workers/ci/build_finished_worker_spec.rb'
- 'spec/workers/concerns/gitlab/github_import/object_importer_spec.rb'
......
......@@ -2,6 +2,9 @@
= s_('Runners|Runner #%{runner_id}') % { runner_id: runner.id }
= render 'shared/runners/runner_type_badge', runner: runner
-# Only shows details for one manager
- runner_manager = runner.runner_managers.order_id_desc.first
.table-holder
%table.table
%thead
......@@ -9,8 +12,11 @@
%th= s_('Runners|Property Name')
%th= s_('Runners|Value')
%tr
%td= s_('Runners|Active')
%td= runner.active? ? _('Yes') : _('No')
%td= s_('Runners|Description')
%td= runner.description
%tr
%td= s_('Runners|Paused')
%td= runner.active? ? _('No') : _('Yes')
%tr
%td= s_('Runners|Protected')
%td= runner.ref_protected? ? _('Yes') : _('No')
......@@ -27,33 +33,27 @@
- runner.tag_list.sort.each do |tag|
= gl_badge_tag tag, variant: :info
%tr
%td= s_('Runners|Name')
%td= runner.name
%td= s_('Runners|Maximum job timeout')
%td= runner.maximum_timeout_human_readable
%tr
%td= s_('Runners|Last contact')
%td
- if runner.contacted_at
= time_ago_with_tooltip runner.contacted_at
- else
= _('Never')
%tr
%td= s_('Runners|Version')
%td= runner.version
%td= runner_manager&.version
%tr
%td= s_('Runners|IP Address')
%td= runner.ip_address
%td= runner_manager&.ip_address
%tr
%td= s_('Runners|Revision')
%td= runner.revision
%td= runner_manager&.revision
%tr
%td= s_('Runners|Platform')
%td= runner.platform
%td= runner_manager&.platform
%tr
%td= s_('Runners|Architecture')
%td= runner.architecture
%tr
%td= s_('Runners|Description')
%td= runner.description
%tr
%td= s_('Runners|Maximum job timeout')
%td= runner.maximum_timeout_human_readable
%tr
%td= s_('Runners|Last contact')
%td
- if runner.contacted_at
= time_ago_with_tooltip runner.contacted_at
- else
= _('Never')
%td= runner_manager&.architecture
......@@ -43785,9 +43785,6 @@ msgstr ""
msgid "Runners|A runner configuration is where you configure runners based on your requirements. Each runner in this table represents a %{linkStart}single runner entry%{linkEnd} in the %{codeStart}config.toml%{codeEnd}. Multiple runners can be linked to the same configuration. When there are multiple runners in a configuration, the one that contacted GitLab most recently displays here."
msgstr ""
 
msgid "Runners|Active"
msgstr ""
msgid "Runners|Active runners"
msgstr ""
 
......@@ -44183,9 +44180,6 @@ msgstr ""
msgid "Runners|Most used instance runners"
msgstr ""
 
msgid "Runners|Name"
msgstr ""
msgid "Runners|Never contacted"
msgstr ""
 
......@@ -54,6 +54,10 @@
context 'when a project_type runner is activated on the project' do
let_it_be(:project_runner) { create(:ci_runner, :project, projects: [project]) }
let_it_be(:project_runner_manager) do
create(:ci_runner_machine, runner: project_runner, platform: 'darwin')
end
it 'user sees the project runner' do
visit project_runners_path(project)
......
......@@ -6,13 +6,18 @@
include PageLayoutHelper
let_it_be(:runner) do
build_stubbed(
:ci_runner,
name: 'test runner',
create(:ci_runner, description: 'Test runner') # rubocop:disable RSpec/FactoryBot/AvoidCreate -- must be linked to a manager
end
let_it_be(:runner_manager) do
create( # rubocop:disable RSpec/FactoryBot/AvoidCreate -- must be linked to a runner
:ci_runner_machine,
runner: runner,
version: '11.4.0',
ip_address: '127.1.2.3',
revision: 'abcd1234',
architecture: 'amd64'
architecture: 'amd64',
contacted_at: 1.second.ago
)
end
......@@ -25,6 +30,10 @@
rendered
end
describe 'Runner description' do
it { is_expected.to have_content("Description #{runner.description}") }
end
describe 'Runner id and type' do
context 'when runner is of type instance' do
it { is_expected.to have_content("Runner ##{runner.id} shared") }
......@@ -43,15 +52,15 @@
end
end
describe 'Active value' do
describe 'Paused value' do
context 'when runner is active' do
it { is_expected.to have_content('Active Yes') }
it { is_expected.to have_content('Paused No') }
end
context 'when runner is inactive' do
let(:runner) { build_stubbed(:ci_runner, :inactive) }
it { is_expected.to have_content('Active No') }
it { is_expected.to have_content('Paused Yes') }
end
end
......@@ -117,16 +126,6 @@
end
end
describe 'Metadata values' do
it { is_expected.to have_content("Name #{runner.name}") }
it { is_expected.to have_content("Version #{runner.version}") }
it { is_expected.to have_content("IP Address #{runner.ip_address}") }
it { is_expected.to have_content("Revision #{runner.revision}") }
it { is_expected.to have_content("Platform #{runner.platform}") }
it { is_expected.to have_content("Architecture #{runner.architecture}") }
it { is_expected.to have_content("Description #{runner.description}") }
end
describe 'Maximum job timeout value' do
let(:runner) { build_stubbed(:ci_runner, maximum_timeout: 5400) }
......@@ -145,4 +144,12 @@
it { is_expected.to have_content("Last contact #{expected_contacted_at}") }
end
end
describe 'Runner manager values' do
it { is_expected.to have_content("Version #{runner_manager.version}") }
it { is_expected.to have_content("IP Address #{runner_manager.ip_address}") }
it { is_expected.to have_content("Revision #{runner_manager.revision}") }
it { is_expected.to have_content("Platform #{runner_manager.platform}") }
it { is_expected.to have_content("Architecture #{runner_manager.architecture}") }
end
end
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册