-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate Coordinate Maps to NP #64668
Merged
Merged
Changes from 11 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
8f9984e
Use NP format service
9848713
Use NP data query service
b66704f
Mostly file movement, a few updates. Some work towards using NP config
6a4c970
Import leaflet draw to avoid timing issue that prevents it from being…
151ddc9
Publish configs for maps_legacy and tile_maps using NP format
47aec38
Switch new maps over to using NP map config
a53a452
Consume mapsLegacy config on Maps server
5561154
Type fixes. Schema updates
d3bae1c
Add new plugin path to i18n
1855529
Mock configs for karma test service settings
bb3404c
Merge remote-tracking branch 'upstream/master' into np-migrate-coordi…
05b672b
Fix jest tests
c0154b3
Update test files to snake case
166b0c5
Use getIsEmsEnabled from kibana services
577b583
Review feedback
2368a9c
Review feedback. Set initializerContext as readonly
e24f4be
Type fix
d49a57f
Fix issue with heatlayer not getting loaded correctly
a391bb9
Update jest test
4c25a26
Change how popup is instantiated and bound to map
39c2231
Remove webpack shims and relocate to maps_legacy. Remove other leafle…
a384887
Clean up extra imports of leaflet resources
5a1cef4
Remove staggered loading. Clean up
7409be3
Merge remote-tracking branch 'upstream/master' into np-migrate-coordi…
b5785ef
Pull global L from local file
13bccc2
Forgot one leaflet reference
61b1c01
Remove one more unneeded leaflet ref in dashboard
3d7a38e
Uno mas
83e467d
Import leaflet for vega tests since it can't be initialized the norma…
8f861ce
Update browser tests service settings instantiation to include configs
9ef70a2
Merge remote-tracking branch 'upstream/master' into np-migrate-coordi…
098d419
Get rid of unused module.exports
f4af673
Merge branch 'master' into np-migrate-coordinate-maps
elasticmachine 46ad010
Merge remote-tracking branch 'upstream/master' into np-migrate-coordi…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { schema, TypeOf } from '@kbn/config-schema'; | ||
import { configSchema as tilemapSchema } from '../tile_map/config'; | ||
|
||
// TODO: Pull this portion from region_map | ||
export const regionmapSchema = schema.object({ | ||
includeElasticMapsService: schema.boolean({ defaultValue: true }), | ||
layers: schema.arrayOf( | ||
schema.object({ | ||
url: schema.string(), | ||
format: schema.object({ | ||
type: schema.string({ defaultValue: 'geojson' }), | ||
}), | ||
meta: schema.object({ | ||
feature_collection_path: schema.string({ defaultValue: 'data' }), | ||
}), | ||
attribution: schema.string(), | ||
name: schema.string(), | ||
fields: schema.arrayOf( | ||
schema.object({ | ||
name: schema.string(), | ||
description: schema.string(), | ||
}) | ||
), | ||
}), | ||
{ defaultValue: [] } | ||
), | ||
}); | ||
|
||
export const configSchema = schema.object({ | ||
includeElasticMapsService: schema.boolean({ defaultValue: true }), | ||
proxyElasticMapsServiceInMaps: schema.boolean({ defaultValue: false }), | ||
tilemap: tilemapSchema, | ||
regionmap: regionmapSchema, | ||
manifestServiceUrl: schema.string({ defaultValue: '' }), | ||
emsFileApiUrl: schema.string({ defaultValue: 'https://vector.maps.elastic.co' }), | ||
emsTileApiUrl: schema.string({ defaultValue: 'https://tiles.maps.elastic.co' }), | ||
emsLandingPageUrl: schema.string({ defaultValue: 'https://maps.elastic.co/v7.7' }), | ||
emsFontLibraryUrl: schema.string({ | ||
defaultValue: 'https://tiles.maps.elastic.co/fonts/{fontstack}/{range}.pbf', | ||
}), | ||
emsTileLayerId: schema.object({ | ||
bright: schema.string({ defaultValue: 'road_map' }), | ||
desaturated: schema.string({ defaultValue: 'road_map_desaturated' }), | ||
dark: schema.string({ defaultValue: 'dark_map' }), | ||
}), | ||
}); | ||
|
||
export type ConfigSchema = TypeOf<typeof configSchema>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { PluginConfigDescriptor } from 'kibana/server'; | ||
import { PluginInitializerContext } from 'kibana/public'; | ||
import { configSchema, ConfigSchema } from '../config'; | ||
|
||
export const config: PluginConfigDescriptor<ConfigSchema> = { | ||
exposeToBrowser: { | ||
includeElasticMapsService: true, | ||
proxyElasticMapsServiceInMaps: true, | ||
tilemap: true, | ||
regionmap: true, | ||
manifestServiceUrl: true, | ||
emsFileApiUrl: true, | ||
emsTileApiUrl: true, | ||
emsLandingPageUrl: true, | ||
emsFontLibraryUrl: true, | ||
emsTileLayerId: true, | ||
}, | ||
schema: configSchema, | ||
}; | ||
|
||
export const plugin = (initializerContext: PluginInitializerContext) => ({ | ||
setup() { | ||
// @ts-ignore | ||
const config$ = initializerContext.config.create(); | ||
return { | ||
config: config$, | ||
}; | ||
}, | ||
start() {}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { schema, TypeOf } from '@kbn/config-schema'; | ||
|
||
export const configSchema = schema.object({ | ||
url: schema.maybe(schema.string()), | ||
deprecated: schema.any({ | ||
defaultValue: { | ||
config: { | ||
options: { | ||
attribution: '', | ||
}, | ||
}, | ||
}, | ||
}), | ||
options: schema.object({ | ||
attribution: schema.string({ defaultValue: '' }), | ||
minZoom: schema.number({ defaultValue: 0, min: 0 }), | ||
maxZoom: schema.number({ defaultValue: 10 }), | ||
tileSize: schema.maybe(schema.number()), | ||
subdomains: schema.maybe(schema.arrayOf(schema.string())), | ||
errorTileUrl: schema.maybe(schema.string()), | ||
tms: schema.maybe(schema.boolean()), | ||
reuseTiles: schema.maybe(schema.boolean()), | ||
bounds: schema.maybe(schema.arrayOf(schema.number({ min: 2 }))), | ||
default: schema.maybe(schema.boolean()), | ||
}), | ||
}); | ||
|
||
export type ConfigSchema = TypeOf<typeof configSchema>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"id": "tileMap", | ||
"version": "8.0.0", | ||
"kibanaVersion": "kibana", | ||
"configPath": ["map", "tilemap"], | ||
"ui": true, | ||
"server": true, | ||
"requiredPlugins": [ | ||
"visualizations", | ||
"expressions", | ||
"mapsLegacy", | ||
"data" | ||
] | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)