Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zjy365 committed Aug 30, 2024
1 parent 9305708 commit f27a9ee
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
getGpuNode({ k8sCore })
]);

const data = {
const data: userPriceType = {
cpu: countSourcePrice(priceResponse, 'cpu'),
memory: countSourcePrice(priceResponse, 'memory'),
storage: countSourcePrice(priceResponse, 'storage'),
gpu: countGpuSource(priceResponse, gpuNodes)
gpu: countGpuSource(priceResponse, gpuNodes),
nodeports: 0
};

jsonRes<userPriceType>(res, {
Expand Down Expand Up @@ -163,6 +164,7 @@ function countSourcePrice(rawData: PriceCrdType, type: ResourceType) {
const unitScale = sourceScale / PRICE_SCALE;
return unitScale;
}

function countGpuSource(rawData: PriceCrdType, gpuNodes: GpuNodeType[]) {
const gpuList: userPriceType['gpu'] = [];

Expand Down

0 comments on commit f27a9ee

Please sign in to comment.