Ensure disabling watcher does not break index management (#19137)

This commit is contained in:
Chris Roberson 2018-05-18 11:49:50 -04:00 committed by GitHub
parent 10c475150e
commit a9bfcaab6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,12 +10,12 @@ import { PLUGIN } from '../../../common/constants';
export function registerLicenseChecker(server) {
const xpackMainPlugin = server.plugins.xpack_main;
const watcherPlugin = server.plugins.watcher;
const indexManagementPlugin = server.plugins.index_management;
mirrorPluginStatus(xpackMainPlugin, watcherPlugin);
mirrorPluginStatus(xpackMainPlugin, indexManagementPlugin);
xpackMainPlugin.status.once('green', () => {
// Register a function that is called whenever the xpack info changes,
// to re-compute the license check results for this plugin
xpackMainPlugin.info.feature(PLUGIN.ID).registerLicenseCheckResultsGenerator(checkLicense);
});
}
}