|
@ -528,9 +528,12 @@ async function getMetadataResourceApplications(ctx) { |
|
|
try { |
|
|
try { |
|
|
const models = ctx.fs.dc.models; |
|
|
const models = ctx.fs.dc.models; |
|
|
const { resourceNames, type } = ctx.query; |
|
|
const { resourceNames, type } = ctx.query; |
|
|
const rslt = await models.ResourceConsumption.findAll({ |
|
|
let rslt = []; |
|
|
|
|
|
if (resourceNames && type) { |
|
|
|
|
|
rslt = await models.ResourceConsumption.findAll({ |
|
|
where: { resourceName: { $in: resourceNames.split(',') }, resourceType: type } |
|
|
where: { resourceName: { $in: resourceNames.split(',') }, resourceType: type } |
|
|
}); |
|
|
}); |
|
|
|
|
|
} |
|
|
ctx.status = 200; |
|
|
ctx.status = 200; |
|
|
ctx.body = rslt; |
|
|
ctx.body = rslt; |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|