@@ -113,18 +94,16 @@ function CostOverview() {
-
+
{t('Recent Transactions')}
-
-
- {(isInitialLoading || billingItems.length === 0) && (
-
-
-
- )}
-
+
+ {(isInitialLoading || billingItems.length === 0) && (
+
+
+
+ )}
diff --git a/frontend/providers/costcenter/src/pages/valuation/index.tsx b/frontend/providers/costcenter/src/pages/valuation/index.tsx
index ce8676506ed..255b45bee78 100644
--- a/frontend/providers/costcenter/src/pages/valuation/index.tsx
+++ b/frontend/providers/costcenter/src/pages/valuation/index.tsx
@@ -40,6 +40,7 @@ import CpuIcon from '@/components/icons/CpuIcon';
import { MemoryIcon } from '@/components/icons/MemoryIcon';
import { NetworkIcon } from '@/components/icons/NetworkIcon';
import { StorageIcon } from '@/components/icons/StorageIcon';
+import { PortIcon } from '@sealos/ui';
type CardItem = {
title: string;
price: number[];
@@ -143,14 +144,18 @@ function Valuation() {
const props = valuationMap.get(x.resourceType);
if (!props) return [];
let icon;
+ let title = x.resourceType;
if (x.resourceType === 'cpu') icon = CpuIcon;
else if (x.resourceType === 'memory') icon = MemoryIcon;
else if (x.resourceType === 'network') icon = NetworkIcon;
else if (x.resourceType === 'storage') icon = StorageIcon;
- else return [];
+ else if (x.resourceType === 'services.nodeports') {
+ icon = PortIcon;
+ title = 'Port';
+ } else return [];
return [
{
- title: x.resourceType,
+ title,
price: [1, 24, 168, 720, 8760].map(
(v) => Math.floor(v * x.price * (props.scale || 1)) / 1000000
),
@@ -221,7 +226,11 @@ function Valuation() {
{t(x.title)}
- {x.unit + (x.title !== 'network' ? `/${t(CYCLE[cycleIdx])}` : '')} |
+
+ {[x.unit, x.title !== 'network' ? `${t(CYCLE[cycleIdx])}` : '']
+ .filter((v) => v.trim() !== '')
+ .join('/')}
+ |
{x.title === 'network' ? x.price[0] : x.price[cycleIdx]} |
))}
diff --git a/frontend/providers/costcenter/src/types/billing.ts b/frontend/providers/costcenter/src/types/billing.ts
index a621873fd55..d9ac94fb74c 100644
--- a/frontend/providers/costcenter/src/types/billing.ts
+++ b/frontend/providers/costcenter/src/types/billing.ts
@@ -18,12 +18,16 @@ export type BillingSpec =
| {
orderID: string; //如果给定orderId,则查找该id的值,该值为唯一值,因此当orderId给定时忽略其他查找限定值
};
-export type RawCosts = Record<'network' | 'cpu' | 'memory' | 'storage' | `gpu-${string}`, number>;
+export type RawCosts = Record<
+ 'network' | 'cpu' | 'memory' | 'storage' | `gpu-${string}` | 'services.nodeports',
+ number
+>;
export type Costs = {
cpu: number;
memory: number;
storage: number;
network: number;
+ port: number;
gpu?: number;
};
export type BillingItem = {
@@ -47,7 +51,7 @@ export type BillingData = {
spec: BillingSpec;
status: {
deductionAmount: T;
- item: BillingItem[];
+ item: BillingItem[];
pageLength: number;
totalCount: number;
rechargeAmount: number;
diff --git a/frontend/providers/template/src/pages/deploy/index.tsx b/frontend/providers/template/src/pages/deploy/index.tsx
index 21f2389cff7..a9c994ac3db 100644
--- a/frontend/providers/template/src/pages/deploy/index.tsx
+++ b/frontend/providers/template/src/pages/deploy/index.tsx
@@ -256,7 +256,8 @@ export default function EditApp({ appName }: { appName?: string }) {
overflow={'auto'}
position={'relative'}
borderRadius={'12px'}
- background={'linear-gradient(180deg, #FFF 0%, rgba(255, 255, 255, 0.70) 100%)'}>
+ background={'linear-gradient(180deg, #FFF 0%, rgba(255, 255, 255, 0.70) 100%)'}
+ >
+ backdropBlur={'100px'}
+ >
+ cursor={'pointer'}
+ >
+ }}
+ >
router.push('/')}>
+ onClick={() => router.push('/')}
+ >
router.push('/')}>
@@ -303,7 +308,8 @@ export default function EditApp({ appName }: { appName?: string }) {
+ color={router.pathname === '/deploy' ? '#262A32' : '#7B838B'}
+ >
{data?.templateYaml?.metadata?.name}
@@ -314,7 +320,8 @@ export default function EditApp({ appName }: { appName?: string }) {
flexDirection={'column'}
width={'100%'}
flexGrow={1}
- backgroundColor={'rgba(255, 255, 255, 0.90)'}>
+ backgroundColor={'rgba(255, 255, 255, 0.90)'}
+ >