Skip to content

Commit 6550c0b

Browse files
committed
update check
1 parent 796be37 commit 6550c0b

File tree

3 files changed

+32
-7
lines changed

3 files changed

+32
-7
lines changed

frontend/desktop/src/components/desktop_content/index.tsx

-4
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,6 @@ export default function Desktop(props: any) {
165165
globalNotification();
166166
}, []);
167167

168-
useEffect(() => {
169-
console.log('taskComponentState:', taskComponentState);
170-
}, [taskComponentState]);
171-
172168
return (
173169
<Box
174170
id="desktop"
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
export const GUIDE_DESKTOP_INDEX_KEY = 'frontend.guide.desktop.index';
22
export const LicenseFrontendKey = 'cloud.sealos.io/license-frontend';
3+
4+
export const templateDeployKey = 'cloud.sealos.io/deploy-on-sealos';

frontend/desktop/src/pages/api/account/checkTask.ts

+30-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { switchKubeconfigNamespace } from '@/utils/switchKubeconfigNamespace';
77
import type { NextApiRequest, NextApiResponse } from 'next';
88
import { TaskStatus, TaskType } from 'prisma/global/generated/client';
99
import * as k8s from '@kubernetes/client-node';
10+
import { templateDeployKey } from '@/constants/account';
1011

1112
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
1213
try {
@@ -31,8 +32,22 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
3132
});
3233

3334
const [deployments, statefulsets, instances, clusters] = await Promise.all([
34-
k8sApp.listNamespacedDeployment(namespace),
35-
k8sApp.listNamespacedStatefulSet(namespace),
35+
k8sApp.listNamespacedDeployment(
36+
namespace,
37+
undefined,
38+
undefined,
39+
undefined,
40+
undefined,
41+
`!${templateDeployKey}`
42+
),
43+
k8sApp.listNamespacedStatefulSet(
44+
namespace,
45+
undefined,
46+
undefined,
47+
undefined,
48+
undefined,
49+
`!${templateDeployKey}`
50+
),
3651
k8sCustomObjects.listNamespacedCustomObject(
3752
'app.sealos.io',
3853
'v1',
@@ -43,10 +58,22 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
4358
'apps.kubeblocks.io',
4459
'v1alpha1',
4560
namespace,
46-
'clusters'
61+
'clusters',
62+
undefined,
63+
undefined,
64+
undefined,
65+
undefined,
66+
`!${templateDeployKey}`
4767
) as any
4868
]);
4969

70+
console.log(
71+
deployments.body.items,
72+
statefulsets.body.items,
73+
instances.body.items,
74+
clusters.body.items
75+
);
76+
5077
const tasksToUpdate = userTasks.filter((userTask) => {
5178
switch (userTask.task.taskType) {
5279
case TaskType.LAUNCHPAD:

0 commit comments

Comments
 (0)