File tree Expand file tree Collapse file tree 2 files changed +8
-13
lines changed
x-pack/plugins/infra/server/routes/inventory_metadata Expand file tree Collapse file tree 2 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -39,19 +39,6 @@ export const initInventoryMetaRoute = (libs: InfraBackendLibs) => {
3939 fold ( throwErrors ( Boom . badRequest ) , identity )
4040 ) ;
4141
42- const model = findInventoryModel ( nodeType ) ;
43-
44- // Only run this for AWS modules, eventually we might have more.
45- if ( model . requiredModule !== 'aws' ) {
46- return response . ok ( {
47- body : {
48- accounts : [ ] ,
49- projects : [ ] ,
50- regions : [ ] ,
51- } ,
52- } ) ;
53- }
54-
5542 const { configuration } = await libs . sources . getSourceConfiguration (
5643 requestContext . core . savedObjects . client ,
5744 sourceId
Original file line number Diff line number Diff line change @@ -29,6 +29,14 @@ export const getCloudMetadata = async (
2929 currentTime : number
3030) : Promise < CloudMetaData > => {
3131 const model = findInventoryModel ( nodeType ) ;
32+ // Only run this for AWS modules, eventually we might have more.
33+ if ( model . requiredModule !== 'aws' ) {
34+ return {
35+ accounts : [ ] ,
36+ projects : [ ] ,
37+ regions : [ ] ,
38+ } ;
39+ }
3240
3341 const metricQuery = {
3442 allowNoIndices : true ,
You can’t perform that action at this time.
0 commit comments