Skip to content

Commit

Permalink
update check
Browse files Browse the repository at this point in the history
  • Loading branch information
zjy365 committed Sep 28, 2024
1 parent 796be37 commit 6b8b643
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 18 deletions.
4 changes: 0 additions & 4 deletions frontend/desktop/src/components/desktop_content/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,6 @@ export default function Desktop(props: any) {
globalNotification();
}, []);

useEffect(() => {
console.log('taskComponentState:', taskComponentState);
}, [taskComponentState]);

return (
<Box
id="desktop"
Expand Down
2 changes: 2 additions & 0 deletions frontend/desktop/src/constants/account.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
export const GUIDE_DESKTOP_INDEX_KEY = 'frontend.guide.desktop.index';
export const LicenseFrontendKey = 'cloud.sealos.io/license-frontend';

export const templateDeployKey = 'cloud.sealos.io/deploy-on-sealos';
26 changes: 23 additions & 3 deletions frontend/desktop/src/pages/api/account/checkTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { switchKubeconfigNamespace } from '@/utils/switchKubeconfigNamespace';
import type { NextApiRequest, NextApiResponse } from 'next';
import { TaskStatus, TaskType } from 'prisma/global/generated/client';
import * as k8s from '@kubernetes/client-node';
import { templateDeployKey } from '@/constants/account';

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

const [deployments, statefulsets, instances, clusters] = await Promise.all([
k8sApp.listNamespacedDeployment(namespace),
k8sApp.listNamespacedStatefulSet(namespace),
k8sApp.listNamespacedDeployment(
namespace,
undefined,
undefined,
undefined,
undefined,
`!${templateDeployKey}`
),
k8sApp.listNamespacedStatefulSet(
namespace,
undefined,
undefined,
undefined,
undefined,
`!${templateDeployKey}`
),
k8sCustomObjects.listNamespacedCustomObject(
'app.sealos.io',
'v1',
Expand All @@ -43,7 +58,12 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
'apps.kubeblocks.io',
'v1alpha1',
namespace,
'clusters'
'clusters',
undefined,
undefined,
undefined,
undefined,
`!${templateDeployKey}`
) as any
]);

Expand Down
11 changes: 0 additions & 11 deletions frontend/providers/applaunchpad/src/pages/app/edit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,6 @@ const EditApp = ({ appName, tabType }: { appName?: string; tabType: string }) =>

router.replace(`/app/detail?name=${formHook.getValues('appName')}`);

// if (!isGuided) {
// updateDesktopGuide({
// activityType: 'beginner-guide',
// phase: 'launchpad',
// phasePage: 'create',
// shouldSendGift: true
// }).catch((err) => {
// console.log(err);
// });
// }

toast({
title: t(applySuccess),
status: 'success'
Expand Down

0 comments on commit 6b8b643

Please sign in to comment.