mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
* [Maps] do not display mapbox style inspector view unless turned on by kibana.yml * use better name for config name
This commit is contained in:
parent
cf2ec5ed4c
commit
45ef0ae9f5
4 changed files with 10 additions and 3 deletions
|
@ -34,7 +34,8 @@ export function maps(kibana) {
|
|||
const serverConfig = server.config();
|
||||
const mapConfig = serverConfig.get('map');
|
||||
return {
|
||||
isEmsEnabled: mapConfig.includeElasticMapsService
|
||||
showMapsInspectorAdapter: serverConfig.get('xpack.maps.showMapsInspectorAdapter'),
|
||||
isEmsEnabled: mapConfig.includeElasticMapsService,
|
||||
};
|
||||
},
|
||||
inspectorViews: [
|
||||
|
@ -52,6 +53,7 @@ export function maps(kibana) {
|
|||
config(Joi) {
|
||||
return Joi.object({
|
||||
enabled: Joi.boolean().default(true),
|
||||
showMapsInspectorAdapter: Joi.boolean().default(false),
|
||||
}).default();
|
||||
},
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ export class MBMapContainer extends React.Component {
|
|||
};
|
||||
|
||||
_syncMbMapWithInspector = () => {
|
||||
if (!this.props.isMapReady) {
|
||||
if (!this.props.isMapReady || !inspectorAdapters.map) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import chrome from 'ui/chrome';
|
||||
import { uiModules } from 'ui/modules';
|
||||
import { SearchSourceProvider } from 'ui/courier';
|
||||
import { RequestAdapter } from 'ui/inspector/adapters';
|
||||
|
@ -15,10 +16,13 @@ export const timeService = timefilter;
|
|||
export let indexPatternService;
|
||||
export let SearchSource;
|
||||
export let emsServiceSettings;
|
||||
|
||||
export const inspectorAdapters = {
|
||||
requests: new RequestAdapter(),
|
||||
map: new MapAdapter(),
|
||||
};
|
||||
if (chrome.getInjected('showMapsInspectorAdapter', false)) {
|
||||
inspectorAdapters.map = new MapAdapter();
|
||||
}
|
||||
|
||||
export async function fetchSearchSourceAndRecordWithInspector({ searchSource, requestId, requestName, requestDesc }) {
|
||||
const inspectorRequest = inspectorAdapters.requests.start(
|
||||
|
|
|
@ -161,6 +161,7 @@ export default async function ({ readConfigFile }) {
|
|||
'--status.allowAnonymous=true',
|
||||
'--server.uuid=5b2de169-2785-441b-ae8c-186a1936b17d',
|
||||
'--xpack.xpack_main.telemetry.enabled=false',
|
||||
'--xpack.maps.showMapsInspectorAdapter=true',
|
||||
'--xpack.security.encryptionKey="wuGNaIhoMpk5sO4UBxgr3NyW1sFcLgIf"', // server restarts should not invalidate active sessions
|
||||
],
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue