Skip to content

Commit

Permalink
Revert "Licensing plugin and XPackInfo uses the same license data (#5…
Browse files Browse the repository at this point in the history
…2507)"

This reverts commit 2b88256.
  • Loading branch information
spalger committed Dec 13, 2019
1 parent dbec0b1 commit f67a063
Show file tree
Hide file tree
Showing 33 changed files with 764 additions and 701 deletions.
3 changes: 0 additions & 3 deletions x-pack/legacy/common/poller.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@ export declare class Poller {
constructor(options: any);

public start(): void;
public stop(): void;
public isRunning(): boolean;
public getPollFrequency(): number;
}
7 changes: 4 additions & 3 deletions x-pack/legacy/plugins/xpack_main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

import { resolve } from 'path';
import dedent from 'dedent';
import {
XPACK_INFO_API_DEFAULT_POLL_FREQUENCY_IN_MILLIS
} from '../../server/lib/constants';
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 All @@ -31,6 +34,7 @@ export const xpackMain = (kibana) => {
enabled: Joi.boolean().default(),
url: Joi.string().default(),
}).default(), // deprecated
xpack_api_polling_frequency_millis: Joi.number().default(XPACK_INFO_API_DEFAULT_POLL_FREQUENCY_IN_MILLIS),
}).default();
},

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

uiExports: {
hacks: [
'plugins/xpack_main/hacks/check_xpack_info_change',
],
replaceInjectedVars,
injectDefaultVars(server) {
const config = server.config();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { BehaviorSubject } from 'rxjs';
import sinon from 'sinon';
import { XPackInfo } from '../xpack_info';
import { setupXPackMain } from '../setup_xpack_main';
import * as InjectXPackInfoSignatureNS from '../inject_xpack_info_signature';


describe('setupXPackMain()', () => {
const sandbox = sinon.createSandbox();

Expand Down Expand Up @@ -41,16 +39,17 @@ describe('setupXPackMain()', () => {
elasticsearch: mockElasticsearchPlugin,
xpack_main: mockXPackMainPlugin
},
newPlatform: { setup: { plugins: { features: {}, licensing: { license$: new BehaviorSubject() } } } },
newPlatform: { setup: { plugins: { features: {} } } },
events: { on() {} },
log() {},
config() {},
expose() {},
ext() {}
});

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

Expand Down
Loading

0 comments on commit f67a063

Please sign in to comment.