Skip to content

Commit f67a063

Browse files
author
spalger
committed
Revert "Licensing plugin and XPackInfo uses the same license data (#52507)"
This reverts commit 2b88256.
1 parent dbec0b1 commit f67a063

33 files changed

+764
-701
lines changed

x-pack/legacy/common/poller.d.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,4 @@ export declare class Poller {
88
constructor(options: any);
99

1010
public start(): void;
11-
public stop(): void;
12-
public isRunning(): boolean;
13-
public getPollFrequency(): number;
1411
}

x-pack/legacy/plugins/xpack_main/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
import { resolve } from 'path';
88
import dedent from 'dedent';
9+
import {
10+
XPACK_INFO_API_DEFAULT_POLL_FREQUENCY_IN_MILLIS
11+
} from '../../server/lib/constants';
912
import { mirrorPluginStatus } from '../../server/lib/mirror_plugin_status';
1013
import { replaceInjectedVars } from './server/lib/replace_injected_vars';
1114
import { setupXPackMain } from './server/lib/setup_xpack_main';
@@ -31,6 +34,7 @@ export const xpackMain = (kibana) => {
3134
enabled: Joi.boolean().default(),
3235
url: Joi.string().default(),
3336
}).default(), // deprecated
37+
xpack_api_polling_frequency_millis: Joi.number().default(XPACK_INFO_API_DEFAULT_POLL_FREQUENCY_IN_MILLIS),
3438
}).default();
3539
},
3640

@@ -43,9 +47,6 @@ export const xpackMain = (kibana) => {
4347
},
4448

4549
uiExports: {
46-
hacks: [
47-
'plugins/xpack_main/hacks/check_xpack_info_change',
48-
],
4950
replaceInjectedVars,
5051
injectDefaultVars(server) {
5152
const config = server.config();

x-pack/legacy/plugins/xpack_main/public/hacks/check_xpack_info_change.js

Lines changed: 0 additions & 53 deletions
This file was deleted.

x-pack/legacy/plugins/xpack_main/server/lib/__tests__/setup_xpack_main.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
import { BehaviorSubject } from 'rxjs';
87
import sinon from 'sinon';
98
import { XPackInfo } from '../xpack_info';
109
import { setupXPackMain } from '../setup_xpack_main';
1110
import * as InjectXPackInfoSignatureNS from '../inject_xpack_info_signature';
1211

13-
1412
describe('setupXPackMain()', () => {
1513
const sandbox = sinon.createSandbox();
1614

@@ -41,16 +39,17 @@ describe('setupXPackMain()', () => {
4139
elasticsearch: mockElasticsearchPlugin,
4240
xpack_main: mockXPackMainPlugin
4341
},
44-
newPlatform: { setup: { plugins: { features: {}, licensing: { license$: new BehaviorSubject() } } } },
42+
newPlatform: { setup: { plugins: { features: {} } } },
4543
events: { on() {} },
4644
log() {},
4745
config() {},
4846
expose() {},
4947
ext() {}
5048
});
5149

52-
// Make sure plugins doesn't consume config
50+
// Make sure we don't misspell config key.
5351
const configGetStub = sinon.stub().throws(new Error('`config.get` is called with unexpected key.'));
52+
configGetStub.withArgs('xpack.xpack_main.xpack_api_polling_frequency_millis').returns(1234);
5453
mockServer.config.returns({ get: configGetStub });
5554
});
5655

0 commit comments

Comments
 (0)