[Maps] Remove maps-telemetry saved object as it is no longer in use (#69871)

This commit is contained in:
Aaron Caldwell 2020-06-25 10:38:53 -06:00 committed by GitHub
parent 68cf857193
commit 40c746e3fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 2 additions and 53 deletions

View file

@ -25,7 +25,6 @@ export const EMS_TILES_VECTOR_TILE_PATH = 'vector/tile';
export const MAP_SAVED_OBJECT_TYPE = 'map';
export const APP_ID = 'maps';
export const APP_ICON = 'gisApp';
export const TELEMETRY_TYPE = APP_ID;
export const MAP_APP_PATH = `app/${APP_ID}`;
export const GIS_API_PATH = `api/${APP_ID}`;

View file

@ -6,8 +6,6 @@
import { UsageCollectionSetup } from 'src/plugins/usage_collection/server';
import { getMapsTelemetry } from '../maps_telemetry';
// @ts-ignore
import { TELEMETRY_TYPE } from '../../../common/constants';
import { MapsConfigType } from '../../../config';
export function registerMapsUsageCollector(
@ -19,7 +17,7 @@ export function registerMapsUsageCollector(
}
const mapsUsageCollector = usageCollection.makeUsageCollector({
type: TELEMETRY_TYPE,
type: 'maps',
isReady: () => true,
fetch: async () => await getMapsTelemetry(config),
});

View file

@ -15,7 +15,7 @@ import { getFlightsSavedObjects } from './sample_data/flights_saved_objects.js';
import { getWebLogsSavedObjects } from './sample_data/web_logs_saved_objects.js';
import { registerMapsUsageCollector } from './maps_telemetry/collectors/register';
import { APP_ID, APP_ICON, MAP_SAVED_OBJECT_TYPE, createMapPath } from '../common/constants';
import { mapSavedObjects, mapsTelemetrySavedObjects } from './saved_objects';
import { mapSavedObjects } from './saved_objects';
import { MapsXPackConfig } from '../config';
// @ts-ignore
import { setInternalRepository } from './kibana_server_services';
@ -191,7 +191,6 @@ export class MapsPlugin implements Plugin {
},
});
core.savedObjects.registerType(mapsTelemetrySavedObjects);
core.savedObjects.registerType(mapSavedObjects);
registerMapsUsageCollector(usageCollection, currentConfig);

View file

@ -3,5 +3,4 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
export { mapsTelemetrySavedObjects } from './maps_telemetry';
export { mapSavedObjects } from './map';

View file

@ -1,46 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { SavedObjectsType } from 'src/core/server';
export const mapsTelemetrySavedObjects: SavedObjectsType = {
name: 'maps',
hidden: false,
namespaceType: 'agnostic',
mappings: {
properties: {
settings: {
properties: {
showMapVisualizationTypes: { type: 'boolean' },
},
},
indexPatternsWithGeoFieldCount: { type: 'long' },
indexPatternsWithGeoPointFieldCount: { type: 'long' },
indexPatternsWithGeoShapeFieldCount: { type: 'long' },
mapsTotalCount: { type: 'long' },
timeCaptured: { type: 'date' },
attributesPerMap: {
properties: {
dataSourcesCount: {
properties: {
min: { type: 'long' },
max: { type: 'long' },
avg: { type: 'long' },
},
},
layersCount: {
properties: {
min: { type: 'long' },
max: { type: 'long' },
avg: { type: 'long' },
},
},
layerTypesCount: { dynamic: 'true', properties: {} },
emsVectorLayersCount: { dynamic: 'true', properties: {} },
},
},
},
},
};