Skip to content

Commit

Permalink
[Logs UI] [Metrics UI] Remove saved object field mappings (#75482)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
Zacqary and elasticmachine authored Sep 15, 2020
1 parent 6b03bb4 commit e167bbf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 268 deletions.
132 changes: 2 additions & 130 deletions x-pack/plugins/infra/common/saved_objects/inventory_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {},
},
};
72 changes: 2 additions & 70 deletions x-pack/plugins/infra/common/saved_objects/metrics_explorer_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {},
},
};
70 changes: 2 additions & 68 deletions x-pack/plugins/infra/server/lib/sources/saved_object_type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e167bbf

Please sign in to comment.