Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discover] Filter out OpenSearch Serverless Collections #8758

Merged
merged 6 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
timeFieldName: indexMeta?.timeFieldName,
dataSource: dataSource
? {
id: dataSource.id,
title: dataSource.title,
type: dataSource.type,
}
id: dataSource.id,

Check failure on line 40 in src/plugins/data/public/query/query_string/dataset_service/lib/index_type.ts

View workflow job for this annotation

GitHub Actions / Lint and validate

Insert `··`
title: dataSource.title,

Check failure on line 41 in src/plugins/data/public/query/query_string/dataset_service/lib/index_type.ts

View workflow job for this annotation

GitHub Actions / Lint and validate

Insert `··`
type: dataSource.type,

Check failure on line 42 in src/plugins/data/public/query/query_string/dataset_service/lib/index_type.ts

View workflow job for this annotation

GitHub Actions / Lint and validate

Insert `··`
}

Check failure on line 43 in src/plugins/data/public/query/query_string/dataset_service/lib/index_type.ts

View workflow job for this annotation

GitHub Actions / Lint and validate

Insert `··`
: DEFAULT_DATA.STRUCTURES.LOCAL_DATASOURCE,
};
},
Expand Down Expand Up @@ -120,11 +120,11 @@
perPage: 10000,
});
const dataSources: DataStructure[] = [DEFAULT_DATA.STRUCTURES.LOCAL_DATASOURCE].concat(
response.savedObjects.map((savedObject) => ({
response.savedObjects.filter((savedObject) => savedObject.attributes.dataSourceEngineType !== 'OpenSearch Serverless').map((savedObject) => ({

Check failure on line 123 in src/plugins/data/public/query/query_string/dataset_service/lib/index_type.ts

View workflow job for this annotation

GitHub Actions / Lint and validate

Replace `.filter((savedObject)·=>·savedObject.attributes.dataSourceEngineType·!==·'OpenSearch·Serverless')` with `⏎······.filter(⏎········(savedObject)·=>·savedObject.attributes.dataSourceEngineType·!==·'OpenSearch·Serverless'⏎······)⏎······`

Check warning on line 123 in src/plugins/data/public/query/query_string/dataset_service/lib/index_type.ts

View check run for this annotation

Codecov / codecov/patch

src/plugins/data/public/query/query_string/dataset_service/lib/index_type.ts#L123

Added line #L123 was not covered by tests
id: savedObject.id,

Check failure on line 124 in src/plugins/data/public/query/query_string/dataset_service/lib/index_type.ts

View workflow job for this annotation

GitHub Actions / Lint and validate

Insert `··`
title: savedObject.attributes.title,

Check failure on line 125 in src/plugins/data/public/query/query_string/dataset_service/lib/index_type.ts

View workflow job for this annotation

GitHub Actions / Lint and validate

Insert `··`
type: 'DATA_SOURCE',

Check failure on line 126 in src/plugins/data/public/query/query_string/dataset_service/lib/index_type.ts

View workflow job for this annotation

GitHub Actions / Lint and validate

Insert `··`
}))

Check failure on line 127 in src/plugins/data/public/query/query_string/dataset_service/lib/index_type.ts

View workflow job for this annotation

GitHub Actions / Lint and validate

Insert `··`
);

return injectMetaToDataStructures(dataSources);
Expand Down
18 changes: 9 additions & 9 deletions src/plugins/query_enhancements/public/datasets/s3_type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
type: DATASET.S3,
dataSource: dataSource
? {
id: dataSource.id,
title: dataSource.title,
type: dataSource.type,
meta: {
...table.meta,
supportsTimeFilter: s3TypeConfig.meta.supportsTimeFilter,
} as DataSourceMeta,
}
id: dataSource.id,

Check failure on line 52 in src/plugins/query_enhancements/public/datasets/s3_type.ts

View workflow job for this annotation

GitHub Actions / Lint and validate

Insert `··`
title: dataSource.title,
type: dataSource.type,
meta: {
...table.meta,
supportsTimeFilter: s3TypeConfig.meta.supportsTimeFilter,
} as DataSourceMeta,
}
: DEFAULT_DATA.STRUCTURES.LOCAL_DATASOURCE,
};
},
Expand Down Expand Up @@ -198,7 +198,7 @@
});
const dataSources: DataStructure[] = [DEFAULT_DATA.STRUCTURES.LOCAL_DATASOURCE];
return dataSources.concat(
resp.savedObjects.map((savedObject) => ({
resp.savedObjects.filter((savedObject) => savedObject.attributes.dataSourceEngineType !== 'OpenSearch Serverless').map((savedObject) => ({
id: savedObject.id,
title: savedObject.attributes.title,
type: 'DATA_SOURCE',
Expand Down
Loading