Commit c3a57def authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch 'admin-kas-version' into 'master'

Show KAS version on admin dashboard

See merge request gitlab-org/gitlab!79720
parents eed60157 9a29e11f
......@@ -143,6 +143,11 @@
= _('GitLab Pages')
%span.float-right
= Gitlab::Pages::VERSION
- if Gitlab::Kas.enabled?
%p
= _('GitLab KAS')
%span.gl-float-right
= Gitlab::Kas.version
= render_if_exists 'admin/dashboard/geo'
......
......@@ -16274,6 +16274,9 @@ msgstr ""
msgid "GitLab Issue"
msgstr ""
msgid "GitLab KAS"
msgstr ""
msgid "GitLab Pages"
msgstr ""
......
......@@ -63,4 +63,33 @@ RSpec.describe 'admin/dashboard/index.html.haml' do
expect(rendered).to have_selector('.js-gitlab-version-check')
end
end
describe 'GitLab KAS' do
before do
allow(Gitlab::Kas).to receive(:enabled?).and_return(enabled)
allow(Gitlab::Kas).to receive(:version).and_return('kas-1.2.3')
end
context 'KAS enabled' do
let(:enabled) { true }
it 'includes KAS version' do
render
expect(rendered).to have_content('GitLab KAS')
expect(rendered).to have_content('kas-1.2.3')
end
end
context 'KAS disabled' do
let(:enabled) { false }
it 'does not include KAS version' do
render
expect(rendered).not_to have_content('GitLab KAS')
expect(rendered).not_to have_content('kas-1.2.3')
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