[Maps] Remove deprecated maps.manifestServiceUrl configuration (#111656)
* Remove deprecated maps.manifestServiceUrl * Remove unused catalogue route * Remove unused import Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
4d933c7d98
commit
4b60458c4b
|
@ -124,28 +124,6 @@ const cspRulesDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecati
|
|||
}
|
||||
};
|
||||
|
||||
const mapManifestServiceUrlDeprecation: ConfigDeprecation = (
|
||||
settings,
|
||||
fromPath,
|
||||
addDeprecation
|
||||
) => {
|
||||
if (settings.map?.manifestServiceUrl) {
|
||||
addDeprecation({
|
||||
message:
|
||||
'You should no longer use the map.manifestServiceUrl setting in kibana.yml to configure the location ' +
|
||||
'of the Elastic Maps Service settings. These settings have moved to the "map.emsTileApiUrl" and ' +
|
||||
'"map.emsFileApiUrl" settings instead. These settings are for development use only and should not be ' +
|
||||
'modified for use in production environments.',
|
||||
correctiveActions: {
|
||||
manualSteps: [
|
||||
`Use "map.emsTileApiUrl" and "map.emsFileApiUrl" config instead of "map.manifestServiceUrl".`,
|
||||
`These settings are for development use only and should not be modified for use in production environments.`,
|
||||
],
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const opsLoggingEventDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecation) => {
|
||||
if (settings.logging?.events?.ops) {
|
||||
addDeprecation({
|
||||
|
@ -388,7 +366,6 @@ const logFilterDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecat
|
|||
export const coreDeprecationProvider: ConfigDeprecationProvider = ({ rename, unusedFromRoot }) => [
|
||||
unusedFromRoot('savedObjects.indexCheckTimeout'),
|
||||
unusedFromRoot('server.xsrf.token'),
|
||||
unusedFromRoot('maps.manifestServiceUrl'),
|
||||
unusedFromRoot('optimize.lazy'),
|
||||
unusedFromRoot('optimize.lazyPort'),
|
||||
unusedFromRoot('optimize.lazyHost'),
|
||||
|
@ -418,7 +395,6 @@ export const coreDeprecationProvider: ConfigDeprecationProvider = ({ rename, unu
|
|||
dataPathDeprecation,
|
||||
rewriteBasePathDeprecation,
|
||||
cspRulesDeprecation,
|
||||
mapManifestServiceUrlDeprecation,
|
||||
opsLoggingEventDeprecation,
|
||||
requestLoggingEventDeprecation,
|
||||
timezoneLoggingDeprecation,
|
||||
|
|
|
@ -40,7 +40,6 @@ export const emsConfigSchema = schema.object({
|
|||
tilemap: tilemapConfigSchema,
|
||||
includeElasticMapsService: schema.boolean({ defaultValue: true }),
|
||||
proxyElasticMapsServiceInMaps: schema.boolean({ defaultValue: false }),
|
||||
manifestServiceUrl: schema.string({ defaultValue: '' }),
|
||||
emsUrl: schema.conditional(
|
||||
schema.siblingRef('proxyElasticMapsServiceInMaps'),
|
||||
true,
|
||||
|
|
|
@ -19,7 +19,6 @@ export const config: PluginConfigDescriptor<MapsEmsConfig> = {
|
|||
tilemap: true,
|
||||
includeElasticMapsService: true,
|
||||
proxyElasticMapsServiceInMaps: true,
|
||||
manifestServiceUrl: true,
|
||||
emsUrl: true,
|
||||
emsFileApiUrl: true,
|
||||
emsTileApiUrl: true,
|
||||
|
|
|
@ -9,7 +9,6 @@ import { i18n } from '@kbn/i18n';
|
|||
import { FeatureCollection } from 'geojson';
|
||||
|
||||
export const EMS_APP_NAME = 'kibana';
|
||||
export const EMS_CATALOGUE_PATH = 'ems/catalogue';
|
||||
|
||||
export const EMS_FILES_CATALOGUE_PATH = 'ems/files';
|
||||
export const EMS_FILES_API_PATH = 'ems/files';
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
import {
|
||||
EMS_APP_NAME,
|
||||
EMS_CATALOGUE_PATH,
|
||||
EMS_FILES_API_PATH,
|
||||
EMS_FILES_CATALOGUE_PATH,
|
||||
EMS_FILES_DEFAULT_JSON_PATH,
|
||||
|
@ -19,7 +18,6 @@ import {
|
|||
EMS_TILES_VECTOR_STYLE_PATH,
|
||||
EMS_TILES_VECTOR_SOURCE_PATH,
|
||||
EMS_TILES_VECTOR_TILE_PATH,
|
||||
GIS_API_PATH,
|
||||
EMS_SPRITES_PATH,
|
||||
INDEX_SETTINGS_API_PATH,
|
||||
FONTS_API_PATH,
|
||||
|
@ -42,9 +40,6 @@ const EMPTY_EMS_CLIENT = {
|
|||
async getTMSServices() {
|
||||
return [];
|
||||
},
|
||||
async getMainManifest() {
|
||||
return null;
|
||||
},
|
||||
async getDefaultFileManifest() {
|
||||
return null;
|
||||
},
|
||||
|
@ -163,42 +158,6 @@ export async function initRoutes(core, getLicenseId, emsSettings, kbnVersion, lo
|
|||
}
|
||||
);
|
||||
|
||||
router.get(
|
||||
{
|
||||
path: `${API_ROOT_PATH}/${EMS_CATALOGUE_PATH}`,
|
||||
validate: false,
|
||||
},
|
||||
async (context, request, { ok, badRequest }) => {
|
||||
if (!checkEMSProxyEnabled()) {
|
||||
return badRequest('map.proxyElasticMapsServiceInMaps disabled');
|
||||
}
|
||||
|
||||
const main = await getEMSClient().getMainManifest();
|
||||
const proxiedManifest = {
|
||||
services: [],
|
||||
};
|
||||
|
||||
//rewrite the urls to the submanifest
|
||||
const tileService = main.services.find((service) => service.type === 'tms');
|
||||
const fileService = main.services.find((service) => service.type === 'file');
|
||||
if (tileService) {
|
||||
proxiedManifest.services.push({
|
||||
...tileService,
|
||||
manifest: `${GIS_API_PATH}/${EMS_TILES_CATALOGUE_PATH}`,
|
||||
});
|
||||
}
|
||||
if (fileService) {
|
||||
proxiedManifest.services.push({
|
||||
...fileService,
|
||||
manifest: `${GIS_API_PATH}/${EMS_FILES_CATALOGUE_PATH}`,
|
||||
});
|
||||
}
|
||||
return ok({
|
||||
body: proxiedManifest,
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
router.get(
|
||||
{
|
||||
path: `${API_ROOT_PATH}/${EMS_FILES_CATALOGUE_PATH}/{emsVersion}/manifest`,
|
||||
|
|
Loading…
Reference in a new issue