Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[telemetry] add spacesEnabled config back to xpack_main #43312

Merged
merged 4 commits into from
Aug 14, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions x-pack/legacy/plugins/telemetry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,9 @@ export const telemetry = (kibana: any) => {
injectDefaultVars(server: Server) {
const config = server.config();
return {
telemetryEnabled: getXpackConfigWithDeprecated(config, 'telemetry.enabled'),
telemetryUrl: getXpackConfigWithDeprecated(config, 'telemetry.url'),
spacesEnabled: config.get('xpack.spaces.enabled'),
telemetryBanner: config.get('xpack.telemetry.banner'),
telemetryOptedIn: null,
activeSpace: null,
};
},
hacks: ['plugins/telemetry/hacks/telemetry_init', 'plugins/telemetry/hacks/telemetry_opt_in'],
Expand Down
10 changes: 10 additions & 0 deletions x-pack/legacy/plugins/xpack_main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import dedent from 'dedent';
import {
XPACK_INFO_API_DEFAULT_POLL_FREQUENCY_IN_MILLIS
} from '../../server/lib/constants';
import { getXpackConfigWithDeprecated } from '../telemetry/common/get_xpack_config_with_deprecated.ts';
import { mirrorPluginStatus } from '../../server/lib/mirror_plugin_status';
import { replaceInjectedVars } from './server/lib/replace_injected_vars';
import { setupXPackMain } from './server/lib/setup_xpack_main';
Expand Down Expand Up @@ -59,6 +60,15 @@ export const xpackMain = (kibana) => {
'plugins/xpack_main/hacks/check_xpack_info_change',
],
replaceInjectedVars,
injectDefaultVars(server) {
const config = server.config();

return {
telemetryEnabled: getXpackConfigWithDeprecated(config, 'telemetry.enabled'),
activeSpace: null,
spacesEnabled: config.get('xpack.spaces.enabled'),
};
},
__webpackPluginProvider__(webpack) {
return new webpack.BannerPlugin({
banner: dedent`
Expand Down