Commit 84a5106c authored by Tiger's avatar Tiger

Show KAS version on admin dashboard

Changelog: added
parent 8fc00aea
...@@ -143,6 +143,11 @@ ...@@ -143,6 +143,11 @@
= _('GitLab Pages') = _('GitLab Pages')
%span.float-right %span.float-right
= Gitlab::Pages::VERSION = Gitlab::Pages::VERSION
- if Gitlab::Kas.enabled?
%p
= _('GitLab KAS')
%span.float-right
= Gitlab::Kas.version
= render_if_exists 'admin/dashboard/geo' = render_if_exists 'admin/dashboard/geo'
......
...@@ -16271,6 +16271,9 @@ msgstr "" ...@@ -16271,6 +16271,9 @@ msgstr ""
msgid "GitLab Issue" msgid "GitLab Issue"
msgstr "" msgstr ""
msgid "GitLab KAS"
msgstr ""
msgid "GitLab Pages" msgid "GitLab Pages"
msgstr "" msgstr ""
......
...@@ -63,4 +63,33 @@ RSpec.describe 'admin/dashboard/index.html.haml' do ...@@ -63,4 +63,33 @@ RSpec.describe 'admin/dashboard/index.html.haml' do
expect(rendered).to have_selector('.js-gitlab-version-check') expect(rendered).to have_selector('.js-gitlab-version-check')
end end
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 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