Skip to content

Commit f9a41e9

Browse files
author
Aaron Caldwell
committed
Revise xpack license handling to use NP serviceSettings. Remove angular bindings
1 parent 4fc42ac commit f9a41e9

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

x-pack/legacy/plugins/tilemap/public/vis_type_enhancers/update_tilemap_settings.js

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

7-
import uiRoutes from 'ui/routes';
87
import { xpackInfo } from 'plugins/xpack_main/services/xpack_info';
8+
import { npSetup } from 'ui/new_platform';
99

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

13-
if (!tileMapPluginInfo) {
14-
return;
15-
}
16-
17-
if (!tileMapPluginInfo.license.active || !tileMapPluginInfo.license.valid) {
18-
return;
19-
}
12+
if (tileMapPluginInfo && (tileMapPluginInfo.license.active || tileMapPluginInfo.license.valid)) {
13+
const { serviceSettings } = npSetup.plugins.mapsLegacy;
2014
serviceSettings.addQueryParams({ license: tileMapPluginInfo.license.uid });
2115
serviceSettings.disableZoomMessage();
22-
});
16+
}

0 commit comments

Comments
 (0)