Commit 66f19537 authored by Jan Provaznik's avatar Jan Provaznik

Merge branch 'add-grafana-usage-data' into 'master'

Add usage data to see if shortcut to Grafana is enabled

See merge request gitlab-org/gitlab!31214
parents a75e82d5 6587a92f
......@@ -180,7 +180,8 @@ module Gitlab
reply_by_email_enabled: alt_usage_data { Gitlab::IncomingEmail.enabled? },
signup_enabled: alt_usage_data { Gitlab::CurrentSettings.allow_signup? },
web_ide_clientside_preview_enabled: alt_usage_data { Gitlab::CurrentSettings.web_ide_clientside_preview_enabled? },
ingress_modsecurity_enabled: Feature.enabled?(:ingress_modsecurity)
ingress_modsecurity_enabled: Feature.enabled?(:ingress_modsecurity),
grafana_link_enabled: alt_usage_data { Gitlab::CurrentSettings.grafana_enabled? }
}.merge(features_usage_data_container_expiration_policies)
end
......
......@@ -174,6 +174,21 @@ describe Gitlab::UsageData, :aggregate_failures do
expect(subject[:dependency_proxy_enabled]).to eq(Gitlab.config.dependency_proxy.enabled)
expect(subject[:gitlab_shared_runners_enabled]).to eq(Gitlab.config.gitlab_ci.shared_runners_enabled)
expect(subject[:web_ide_clientside_preview_enabled]).to eq(Gitlab::CurrentSettings.web_ide_clientside_preview_enabled?)
expect(subject[:grafana_link_enabled]).to eq(Gitlab::CurrentSettings.grafana_enabled?)
end
context 'with embedded grafana' do
it 'returns true when embedded grafana is enabled' do
stub_application_setting(grafana_enabled: true)
expect(subject[:grafana_link_enabled]).to eq(true)
end
it 'returns false when embedded grafana is disabled' do
stub_application_setting(grafana_enabled: false)
expect(subject[:grafana_link_enabled]).to eq(false)
end
end
context 'with existing container expiration policies' do
......
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