Skip to content

Commit

Permalink
Remove enabled:false mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolf committed Jan 18, 2023
1 parent 19e63eb commit 46d8c13
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 60 deletions.
7 changes: 5 additions & 2 deletions src/plugins/data/server/saved_objects/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ export const querySavedObjectType: SavedObjectsType = {
query: {
properties: { language: { type: 'keyword' }, query: { type: 'keyword', index: false } },
},
filters: { type: 'object', enabled: false },
timefilter: { type: 'object', enabled: false },
filters: {
dynamic: false,
properties: {},
},
timefilter: { dynamic: false, properties: {} },
},
},
migrations: savedQueryMigrations,
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/data/server/search/saved_objects/search_session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ export const searchSessionSavedObjectType: SavedObjectsType = {
type: 'keyword',
},
initialState: {
type: 'object',
enabled: false,
dynamic: false,
properties: {},
},
restoreState: {
type: 'object',
enabled: false,
dynamic: false,
properties: {},
},
idMapping: {
type: 'object',
enabled: false,
dynamic: false,
properties: {},
},
realmType: {
type: 'keyword',
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/saved_search/server/saved_objects/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function getSavedSearchObjectType(
},
sort: { type: 'keyword', index: false, doc_values: false },
title: { type: 'text' },
grid: { type: 'object', enabled: false },
grid: { dynamic: false, properties: {} },
version: { type: 'integer' },
rowHeight: { type: 'text' },
timeRestore: { type: 'boolean', index: false, doc_values: false },
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/alerting/server/saved_objects/mappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export const alertMappings: SavedObjectsTypeMappingDefinition = {
type: 'keyword',
},
params: {
enabled: false,
type: 'object',
dynamic: false,
properties: {},
},
frequency: {
properties: {
Expand Down
6 changes: 2 additions & 4 deletions x-pack/plugins/cases/server/saved_object_types/comments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,14 @@ export const createCaseCommentSavedObjectType = ({
},
externalReferenceMetadata: {
dynamic: false,
type: 'object',
enabled: false,
properties: {},
},
persistableStateAttachmentTypeId: {
type: 'keyword',
},
persistableStateAttachmentState: {
dynamic: false,
type: 'object',
enabled: false,
properties: {},
},
pushed_at: {
type: 'date',
Expand Down
56 changes: 11 additions & 45 deletions x-pack/plugins/fleet/server/saved_objects/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,48 +177,14 @@ const getSavedObjectTypes = (
},
},
elasticsearch: {
enabled: false,
properties: {
privileges: {
properties: {
cluster: { type: 'keyword' },
},
},
},
dynamic: false,
properties: {},
},
vars: { type: 'flattened' },
inputs: {
type: 'nested',
enabled: false,
properties: {
type: { type: 'keyword' },
policy_template: { type: 'keyword' },
enabled: { type: 'boolean' },
vars: { type: 'flattened' },
config: { type: 'flattened' },
compiled_input: { type: 'flattened' },
streams: {
type: 'nested',
properties: {
id: { type: 'keyword' },
enabled: { type: 'boolean' },
data_stream: {
properties: {
dataset: { type: 'keyword' },
type: { type: 'keyword' },
elasticsearch: {
properties: {
privileges: { type: 'flattened' },
},
},
},
},
vars: { type: 'flattened' },
config: { type: 'flattened' },
compiled_stream: { type: 'flattened' },
},
},
},
type: 'nested', // TODO Review: If we're not searching `nested` isn't necessary but it's not possible to change the type later
dynamic: false,
properties: {},
},
revision: { type: 'integer' },
updated_at: { type: 'date' },
Expand Down Expand Up @@ -256,8 +222,8 @@ const getSavedObjectTypes = (
internal: { type: 'boolean' },
keep_policies_up_to_date: { type: 'boolean', index: false },
es_index_patterns: {
enabled: false,
type: 'object',
dynamic: false,
properties: {},
},
verification_status: { type: 'keyword' },
verification_key_id: { type: 'keyword' },
Expand All @@ -270,13 +236,13 @@ const getSavedObjectTypes = (
},
},
installed_kibana: {
type: 'object',
enabled: false,
dynamic: false,
properties: {},
},
installed_kibana_space_id: { type: 'keyword' },
package_assets: {
type: 'object',
enabled: false,
dynamic: false,
properties: {},
},
install_started_at: { type: 'date' },
install_version: { type: 'keyword' },
Expand Down

0 comments on commit 46d8c13

Please sign in to comment.