From ed6c1ca14a7b7369f91210a24b3c75ba9f410473 Mon Sep 17 00:00:00 2001 From: Zacqary Xeper Date: Wed, 19 Aug 2020 13:54:41 -0500 Subject: [PATCH] [Logs UI] [Metrics UI] Remove saved object field mappings --- .../common/saved_objects/inventory_view.ts | 132 +----------------- .../saved_objects/metrics_explorer_view.ts | 72 +--------- .../server/lib/sources/saved_object_type.ts | 70 +--------- 3 files changed, 6 insertions(+), 268 deletions(-) diff --git a/x-pack/plugins/infra/common/saved_objects/inventory_view.ts b/x-pack/plugins/infra/common/saved_objects/inventory_view.ts index cca838e526e67..c81de3145ec43 100644 --- a/x-pack/plugins/infra/common/saved_objects/inventory_view.ts +++ b/x-pack/plugins/infra/common/saved_objects/inventory_view.ts @@ -17,135 +17,7 @@ export const inventoryViewSavedObjectType: SavedObjectsType = { importableAndExportable: true, }, mappings: { - properties: { - name: { - type: 'keyword', - }, - sort: { - properties: { - by: { - type: 'keyword', - }, - direction: { - type: 'keyword', - }, - }, - }, - metric: { - properties: { - type: { - type: 'keyword', - }, - field: { - type: 'keyword', - }, - aggregation: { - type: 'keyword', - }, - id: { - type: 'keyword', - }, - label: { - type: 'keyword', - }, - }, - }, - legend: { - properties: { - palette: { - type: 'keyword', - }, - steps: { - type: 'long', - }, - reverseColors: { - type: 'boolean', - }, - }, - }, - groupBy: { - type: 'nested', - properties: { - label: { - type: 'keyword', - }, - field: { - type: 'keyword', - }, - }, - }, - nodeType: { - type: 'keyword', - }, - view: { - type: 'keyword', - }, - customOptions: { - type: 'nested', - properties: { - text: { - type: 'keyword', - }, - field: { - type: 'keyword', - }, - }, - }, - customMetrics: { - type: 'nested', - properties: { - type: { - type: 'keyword', - }, - field: { - type: 'keyword', - }, - aggregation: { - type: 'keyword', - }, - id: { - type: 'keyword', - }, - label: { - type: 'keyword', - }, - }, - }, - boundsOverride: { - properties: { - max: { - type: 'integer', - }, - min: { - type: 'integer', - }, - }, - }, - autoBounds: { - type: 'boolean', - }, - time: { - type: 'long', - }, - autoReload: { - type: 'boolean', - }, - filterQuery: { - properties: { - kind: { - type: 'keyword', - }, - expression: { - type: 'keyword', - }, - }, - }, - accountId: { - type: 'keyword', - }, - region: { - type: 'keyword', - }, - }, + dynamic: false, + properties: {}, }, }; diff --git a/x-pack/plugins/infra/common/saved_objects/metrics_explorer_view.ts b/x-pack/plugins/infra/common/saved_objects/metrics_explorer_view.ts index a92809022c7e8..83441ac370a40 100644 --- a/x-pack/plugins/infra/common/saved_objects/metrics_explorer_view.ts +++ b/x-pack/plugins/infra/common/saved_objects/metrics_explorer_view.ts @@ -17,75 +17,7 @@ export const metricsExplorerViewSavedObjectType: SavedObjectsType = { importableAndExportable: true, }, mappings: { - properties: { - name: { - type: 'keyword', - }, - options: { - properties: { - forceInterval: { - type: 'boolean', - }, - metrics: { - type: 'nested', - properties: { - aggregation: { - type: 'keyword', - }, - field: { - type: 'keyword', - }, - color: { - type: 'keyword', - }, - label: { - type: 'keyword', - }, - }, - }, - limit: { - type: 'integer', - }, - groupBy: { - type: 'keyword', - }, - filterQuery: { - type: 'keyword', - }, - aggregation: { - type: 'keyword', - }, - source: { - type: 'keyword', - }, - }, - }, - chartOptions: { - properties: { - type: { - type: 'keyword', - }, - yAxisMode: { - type: 'keyword', - }, - stack: { - type: 'boolean', - }, - }, - }, - currentTimerange: { - properties: { - from: { - type: 'keyword', - }, - to: { - type: 'keyword', - }, - interval: { - type: 'keyword', - }, - }, - }, - }, + dynamic: false, + properties: {}, }, }; diff --git a/x-pack/plugins/infra/server/lib/sources/saved_object_type.ts b/x-pack/plugins/infra/server/lib/sources/saved_object_type.ts index 11db18d6bf799..19c866f8f331d 100644 --- a/x-pack/plugins/infra/server/lib/sources/saved_object_type.ts +++ b/x-pack/plugins/infra/server/lib/sources/saved_object_type.ts @@ -17,74 +17,8 @@ export const infraSourceConfigurationSavedObjectType: SavedObjectsType = { importableAndExportable: true, }, mappings: { - properties: { - name: { - type: 'text', - }, - description: { - type: 'text', - }, - metricAlias: { - type: 'keyword', - }, - logAlias: { - type: 'keyword', - }, - inventoryDefaultView: { - type: 'keyword', - }, - metricsExplorerDefaultView: { - type: 'keyword', - }, - fields: { - properties: { - container: { - type: 'keyword', - }, - host: { - type: 'keyword', - }, - pod: { - type: 'keyword', - }, - tiebreaker: { - type: 'keyword', - }, - timestamp: { - type: 'keyword', - }, - }, - }, - logColumns: { - type: 'nested', - properties: { - timestampColumn: { - properties: { - id: { - type: 'keyword', - }, - }, - }, - messageColumn: { - properties: { - id: { - type: 'keyword', - }, - }, - }, - fieldColumn: { - properties: { - id: { - type: 'keyword', - }, - field: { - type: 'keyword', - }, - }, - }, - }, - }, - }, + dynamic: false, + properties: {}, }, migrations: { '7.9.0': addNewIndexingStrategyIndexNames,