mirror of
https://github.com/labring/sealos.git
synced 2026-09-24 15:46:19 +08:00
fix(costcenter): fix get price error (#4007)
This commit is contained in:
@@ -122,7 +122,10 @@ export function CommonBillingTable({ data }: { data: BillingItem[] }) {
|
||||
orderId={item.order_id}
|
||||
time={item.time}
|
||||
appType={item.appType}
|
||||
isDisabled={['TERMINAL', 'OTHER'].includes(item.appType)}
|
||||
isDisabled={
|
||||
['TERMINAL', 'OTHER'].includes(item.appType) ||
|
||||
item.type !== BillingType.CONSUME
|
||||
}
|
||||
/>
|
||||
</Td>
|
||||
</Tr>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { authSession } from '@/service/backend/auth';
|
||||
import { CRDMeta, GetCRD } from '@/service/backend/kubernetes';
|
||||
import { CRDMeta, GetCRD, GetUserDefaultNameSpace } from '@/service/backend/kubernetes';
|
||||
import { jsonRes } from '@/service/backend/response';
|
||||
import type { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { ApplyYaml } from '@/service/backend/kubernetes';
|
||||
@@ -11,7 +11,7 @@ export default async function handler(req: NextApiRequest, resp: NextApiResponse
|
||||
if (user === null) {
|
||||
return jsonRes(resp, { code: 403, message: 'user null' });
|
||||
}
|
||||
const namespace = kc.getContexts()[0].namespace || 'ns-' + user.name;
|
||||
const namespace = GetUserDefaultNameSpace(user.name);
|
||||
const name = new Date().getTime() + 'appquery';
|
||||
const crdSchema = {
|
||||
apiVersion: `account.sealos.io/v1`,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { authSession } from '@/service/backend/auth';
|
||||
import { CRDMeta, GetCRD } from '@/service/backend/kubernetes';
|
||||
import { CRDMeta, GetCRD, GetUserDefaultNameSpace } from '@/service/backend/kubernetes';
|
||||
import { jsonRes } from '@/service/backend/response';
|
||||
import type { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { ApplyYaml } from '@/service/backend/kubernetes';
|
||||
@@ -14,7 +14,7 @@ export default async function handler(req: NextApiRequest, resp: NextApiResponse
|
||||
if (user === null) {
|
||||
return jsonRes(resp, { code: 403, message: 'user null' });
|
||||
}
|
||||
const namespace = kc.getContexts()[0].namespace || 'ns-' + user.name;
|
||||
const namespace = GetUserDefaultNameSpace(user.name);
|
||||
const name = 'price';
|
||||
const crdSchema = {
|
||||
apiVersion: `account.sealos.io/v1`,
|
||||
|
||||
Reference in New Issue
Block a user