Commit a56180a1 authored by Miguel Rincon's avatar Miguel Rincon

Improve the runner details title and breadcrumb

This change adds the ID of the runner to the title of the page
and breadcrumb, instead of the runner token.
parent 9db767b7
- add_page_specific_style 'page_bundles/ci_status' - add_page_specific_style 'page_bundles/ci_status'
= content_for :title do
%h3.project-title
Runner ##{@runner.id}
.float-right
- if @runner.instance_type?
%span.runner-state.runner-state-shared
Shared
- else
%span.runner-state.runner-state-specific
Specific
- page_title @runner.short_sha - page_title @runner.short_sha
- add_to_breadcrumbs _("Runners"), admin_runners_path - add_to_breadcrumbs _('Runners'), admin_runners_path
- breadcrumb_title "##{@runner.id}" - breadcrumb_title page_title
%h2.page-title
= sprintf(s_('Runners|Runner #%{runner_id}'), {runner_id: @runner.id})
- if @runner.instance_type? - if @runner.instance_type?
.bs-callout.bs-callout-success .bs-callout.bs-callout-success
......
---
title: Add Runner ID as title in Runner details page
merge_request: 57247
author:
type: changed
...@@ -26518,6 +26518,9 @@ msgstr "" ...@@ -26518,6 +26518,9 @@ msgstr ""
msgid "Runners|Revision" msgid "Runners|Revision"
msgstr "" msgstr ""
msgid "Runners|Runner #%{runner_id}"
msgstr ""
msgid "Runners|Shared" msgid "Runners|Shared"
msgstr "" msgstr ""
......
...@@ -285,8 +285,16 @@ RSpec.describe "Admin Runners" do ...@@ -285,8 +285,16 @@ RSpec.describe "Admin Runners" do
end end
describe 'runner page breadcrumbs' do describe 'runner page breadcrumbs' do
it 'contains the current runner’s short sha' do it 'contains the current runner token' do
expect(page.find('h2')).to have_content(runner.short_sha) page.within '[data-testid="breadcrumb-links"]' do
expect(page.find('h2')).to have_content(runner.short_sha)
end
end
end
describe 'runner page title' do
it 'contains the runner id' do
expect(find('.page-title')).to have_content("Runner ##{runner.id}")
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