Skip to content

Commit

Permalink
rerunning linter
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Li <lnse@amazon.com>
  • Loading branch information
sejli committed Oct 30, 2024
1 parent 4623841 commit ff7cad6
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ export const indexTypeConfig: DatasetTypeConfig = {
timeFieldName: indexMeta?.timeFieldName,
dataSource: dataSource
? {
id: dataSource.id,
title: dataSource.title,
type: dataSource.type,
}
id: dataSource.id,
title: dataSource.title,
type: dataSource.type,
}
: DEFAULT_DATA.STRUCTURES.LOCAL_DATASOURCE,
};
},
Expand Down Expand Up @@ -120,11 +120,15 @@ const fetchDataSources = async (client: SavedObjectsClientContract) => {
perPage: 10000,
});
const dataSources: DataStructure[] = [DEFAULT_DATA.STRUCTURES.LOCAL_DATASOURCE].concat(
response.savedObjects.filter((savedObject) => savedObject.attributes.dataSourceEngineType !== 'OpenSearch Serverless').map((savedObject) => ({
id: savedObject.id,
title: savedObject.attributes.title,
type: 'DATA_SOURCE',
}))
response.savedObjects
.filter(
(savedObject) => savedObject.attributes.dataSourceEngineType !== 'OpenSearch Serverless'

Check warning on line 125 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#L125

Added line #L125 was not covered by tests
)
.map((savedObject) => ({

Check warning on line 127 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#L127

Added line #L127 was not covered by tests
id: savedObject.id,
title: savedObject.attributes.title,
type: 'DATA_SOURCE',
}))
);

return injectMetaToDataStructures(dataSources);
Expand Down
42 changes: 23 additions & 19 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 @@ export const s3TypeConfig: DatasetTypeConfig = {
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,
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,17 +198,21 @@ const fetchDataSources = async (client: SavedObjectsClientContract): Promise<Dat
});
const dataSources: DataStructure[] = [DEFAULT_DATA.STRUCTURES.LOCAL_DATASOURCE];
return dataSources.concat(
resp.savedObjects.filter((savedObject) => savedObject.attributes.dataSourceEngineType !== 'OpenSearch Serverless').map((savedObject) => ({
id: savedObject.id,
title: savedObject.attributes.title,
type: 'DATA_SOURCE',
meta: {
query: {
id: savedObject.id,
},
type: DATA_STRUCTURE_META_TYPES.CUSTOM,
} as DataStructureCustomMeta,
}))
resp.savedObjects
.filter(
(savedObject) => savedObject.attributes.dataSourceEngineType !== 'OpenSearch Serverless'
)
.map((savedObject) => ({
id: savedObject.id,
title: savedObject.attributes.title,
type: 'DATA_SOURCE',
meta: {
query: {
id: savedObject.id,
},
type: DATA_STRUCTURE_META_TYPES.CUSTOM,
} as DataStructureCustomMeta,
}))
);
};

Expand Down

0 comments on commit ff7cad6

Please sign in to comment.