window.open('https://license.sealos.io/')}
+ onClick={() => window.open(`https://license.sealos.io/signin?bd_vid=${bd_vid}`)}
className="rounded-md cursor-pointer hover:no-underline text-[#FFFFFFCC] hover:text-[#FFFFFFCC] bg-[#B7D8FF26] flex justify-center items-center font-semibold text-lg gap-2 py-3 px-4 lg:text-sm"
>
diff --git a/service/license/src/api/system.ts b/service/license/src/api/system.ts
index 125b64fda38..5baaae3ba99 100644
--- a/service/license/src/api/system.ts
+++ b/service/license/src/api/system.ts
@@ -14,9 +14,9 @@ export const getPriceBonus = () =>
// handle baidu
export const uploadConvertData = (newType: number[], url?: string) => {
- const defaultUrl = 'https://sealos.run/';
+ const defaultUrl = 'https://sealos.run/self-hosting';
const main_url = url || defaultUrl;
- const bd_vid = sessionStorage.getItem('bd_vid');
+ const bd_vid = localStorage.getItem('bd_vid');
if (!bd_vid) {
return Promise.reject('upload convert data params error');
}
diff --git a/service/license/src/components/login/index.tsx b/service/license/src/components/login/index.tsx
index f8f350ada67..b7e2887dee9 100644
--- a/service/license/src/components/login/index.tsx
+++ b/service/license/src/components/login/index.tsx
@@ -15,7 +15,6 @@ import {
TabIndicator,
TabList,
Tabs,
- Image,
useDisclosure
} from '@chakra-ui/react';
import { useQuery } from '@tanstack/react-query';
@@ -106,22 +105,7 @@ export default function SigninComponent() {
}, 500);
return (
-
+
Sealos Cloud
diff --git a/service/license/src/pages/signin.tsx b/service/license/src/pages/signin.tsx
index c638eda3e69..a7bbc4f4234 100644
--- a/service/license/src/pages/signin.tsx
+++ b/service/license/src/pages/signin.tsx
@@ -22,9 +22,8 @@ export default function SigninPage() {
useEffect(() => {
const { bd_vid } = router.query;
if (bd_vid) {
- sessionStorage.setItem('bd_vid', bd_vid as string);
+ localStorage.setItem('bd_vid', bd_vid as string);
}
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
return ;
From 1e8b284f59a13afc0962b4609aea7345c0064262 Mon Sep 17 00:00:00 2001
From: jingyang <3161362058@qq.com>
Date: Wed, 7 Aug 2024 14:39:28 +0800
Subject: [PATCH 4/4] fix mock app
---
.../providers/applaunchpad/src/mock/apps.ts | 176 +-----------------
1 file changed, 4 insertions(+), 172 deletions(-)
diff --git a/frontend/providers/applaunchpad/src/mock/apps.ts b/frontend/providers/applaunchpad/src/mock/apps.ts
index d86a981a69b..9b77b73fa2d 100644
--- a/frontend/providers/applaunchpad/src/mock/apps.ts
+++ b/frontend/providers/applaunchpad/src/mock/apps.ts
@@ -196,7 +196,8 @@ export const MOCK_PODS: PodDetailType[] = [
yData: new Array(30).fill('0')
},
cpu: 0,
- memory: 0
+ memory: 0,
+ containerStatus: podStatusMap.running
},
{
podName: '2',
@@ -216,177 +217,8 @@ export const MOCK_PODS: PodDetailType[] = [
yData: new Array(30).fill('0')
},
cpu: 0,
- memory: 0
- },
- {
- podName: '3',
- nodeName: 'dafda-fasd-fas',
- ip: '311.241.41.41',
- restarts: 10,
- age: '22',
- status: podStatusMap.running,
- usedCpu: {
- name: '',
- xData: new Array(30).fill(0),
- yData: new Array(30).fill('0')
- },
- usedMemory: {
- name: '',
- xData: new Array(30).fill(0),
- yData: new Array(30).fill('0')
- },
- cpu: 0,
- memory: 0
- },
-
- {
- podName: '4',
- nodeName: 'dafda-fasd-fas',
- ip: '311.241.41.41',
- restarts: 10,
- age: '22',
- status: podStatusMap.running,
- usedCpu: {
- name: '',
- xData: new Array(30).fill(0),
- yData: new Array(30).fill('0')
- },
- usedMemory: {
- name: '',
- xData: new Array(30).fill(0),
- yData: new Array(30).fill('0')
- },
- cpu: 0,
- memory: 0
- },
-
- {
- podName: '5',
-
- nodeName: 'dafda-fasd-fas',
- ip: '311.241.41.41',
- restarts: 10,
- age: '22',
- status: podStatusMap.running,
- usedCpu: {
- name: '',
- xData: new Array(30).fill(0),
- yData: new Array(30).fill('0')
- },
- usedMemory: {
- name: '',
- xData: new Array(30).fill(0),
- yData: new Array(30).fill('0')
- },
- cpu: 0,
- memory: 0
- },
- {
- podName: '6',
-
- nodeName: 'dafda-fasd-fas',
- ip: '311.241.41.41',
- restarts: 10,
- age: '22',
- status: podStatusMap.running,
- usedCpu: {
- name: '',
- xData: new Array(30).fill(0),
- yData: new Array(30).fill('0')
- },
- usedMemory: {
- name: '',
- xData: new Array(30).fill(0),
- yData: new Array(30).fill('0')
- },
- cpu: 0,
- memory: 0
- },
- {
- podName: '7',
-
- nodeName: 'dafda-fasd-fas',
- ip: '311.241.41.41',
- restarts: 10,
- age: '22',
- status: podStatusMap.running,
- usedCpu: {
- name: '',
- xData: new Array(30).fill(0),
- yData: new Array(30).fill('0')
- },
- usedMemory: {
- name: '',
- xData: new Array(30).fill(0),
- yData: new Array(30).fill('0')
- },
- cpu: 0,
- memory: 0
- },
- {
- podName: '8',
-
- nodeName: 'dafda-fasd-fas',
- ip: '311.241.41.41',
- restarts: 10,
- age: '22',
- status: podStatusMap.running,
- usedCpu: {
- name: '',
- xData: new Array(30).fill(0),
- yData: new Array(30).fill('0')
- },
- usedMemory: {
- name: '',
- xData: new Array(30).fill(0),
- yData: new Array(30).fill('0')
- },
- cpu: 0,
- memory: 0
- },
-
- {
- podName: '9',
-
- nodeName: 'dafda-fasd-fas',
- ip: '311.241.41.41',
- restarts: 10,
- age: '22',
- status: podStatusMap.running,
- usedCpu: {
- name: '',
- xData: new Array(30).fill(0),
- yData: new Array(30).fill('0')
- },
- usedMemory: {
- name: '',
- xData: new Array(30).fill(0),
- yData: new Array(30).fill('0')
- },
- cpu: 0,
- memory: 0
- },
-
- {
- podName: 'dafsdd2sgsd6gsdg',
-
- nodeName: 'dafda-fasd-fas',
- ip: '311.241.41.41',
- restarts: 10,
- age: '22',
- status: podStatusMap.running,
- usedCpu: {
- name: '',
- xData: new Array(30).fill(0),
- yData: new Array(30).fill('0')
- },
- usedMemory: {
- name: '',
- xData: new Array(30).fill(0),
- yData: new Array(30).fill('0')
- },
- cpu: 0,
- memory: 0
+ memory: 0,
+ containerStatus: podStatusMap.running
}
];