Skip to content

Commit

Permalink
Revise xpack license handling to use NP serviceSettings. Remove angul…
Browse files Browse the repository at this point in the history
…ar bindings
  • Loading branch information
Aaron Caldwell committed Apr 9, 2020
1 parent 4fc42ac commit f9a41e9
Showing 1 changed file with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,13 @@
* you may not use this file except in compliance with the Elastic License.
*/

import uiRoutes from 'ui/routes';
import { xpackInfo } from 'plugins/xpack_main/services/xpack_info';
import { npSetup } from 'ui/new_platform';

uiRoutes.addSetupWork(function($injector, serviceSettings) {
const tileMapPluginInfo = xpackInfo.get('features.tilemap');
const tileMapPluginInfo = xpackInfo.get('features.tilemap');

if (!tileMapPluginInfo) {
return;
}

if (!tileMapPluginInfo.license.active || !tileMapPluginInfo.license.valid) {
return;
}
if (tileMapPluginInfo && (tileMapPluginInfo.license.active || tileMapPluginInfo.license.valid)) {
const { serviceSettings } = npSetup.plugins.mapsLegacy;
serviceSettings.addQueryParams({ license: tileMapPluginInfo.license.uid });
serviceSettings.disableZoomMessage();
});
}

0 comments on commit f9a41e9

Please sign in to comment.