diff --git a/frontend/providers/adminer/deploy/manifests/appcr.yaml.tmpl b/frontend/providers/adminer/deploy/manifests/appcr.yaml.tmpl index 9bcaed23c2a..dc19ae5b0a8 100644 --- a/frontend/providers/adminer/deploy/manifests/appcr.yaml.tmpl +++ b/frontend/providers/adminer/deploy/manifests/appcr.yaml.tmpl @@ -9,7 +9,6 @@ spec: url: "https://adminer.{{ .cloudDomain }}" icon: "https://adminer.{{ .cloudDomain }}/logo.svg" menuData: - helpDocs: https://www.sealos.io/docs/cloud/apps/adminer/ helpDropDown: false nameColor: text-black name: Adminer diff --git a/frontend/providers/costcenter/deploy/manifests/appcr.yaml.tmpl b/frontend/providers/costcenter/deploy/manifests/appcr.yaml.tmpl index 5b816bd45c3..1991fbb698a 100644 --- a/frontend/providers/costcenter/deploy/manifests/appcr.yaml.tmpl +++ b/frontend/providers/costcenter/deploy/manifests/appcr.yaml.tmpl @@ -14,7 +14,6 @@ spec: zh-Hans: name: 费用中心 menuData: - helpDocs: https://www.sealos.io/docs/cloud/apps/costcenter/ helpDropDown: false nameColor: text-black name: Cost Center diff --git a/frontend/providers/dbprovider/deploy/Kubefile b/frontend/providers/dbprovider/deploy/Kubefile index d7e06cb05b8..955b99c04aa 100644 --- a/frontend/providers/dbprovider/deploy/Kubefile +++ b/frontend/providers/dbprovider/deploy/Kubefile @@ -15,5 +15,6 @@ ENV minioSecretKey="" ENV minioPort="" ENV migrateFileImage="" ENV minioBucketName="" +ENV BACKUP_ENABLED="false" CMD ["kubectl apply -f manifests"] diff --git a/frontend/providers/dbprovider/deploy/manifests/appcr.yaml.tmpl b/frontend/providers/dbprovider/deploy/manifests/appcr.yaml.tmpl index 0180fa51770..e5da49bf4c7 100644 --- a/frontend/providers/dbprovider/deploy/manifests/appcr.yaml.tmpl +++ b/frontend/providers/dbprovider/deploy/manifests/appcr.yaml.tmpl @@ -14,6 +14,7 @@ spec: zh-Hans: name: 数据库 menuData: + helpDocs: https://sealos.run/docs/guides/dbprovider/config-docs/ helpDropDown: false nameColor: text-black name: Database diff --git a/frontend/providers/dbprovider/public/locales/en/common.json b/frontend/providers/dbprovider/public/locales/en/common.json index a603e313c70..28fdec83fc2 100644 --- a/frontend/providers/dbprovider/public/locales/en/common.json +++ b/frontend/providers/dbprovider/public/locales/en/common.json @@ -144,8 +144,8 @@ "Migrate": "Migrate", "Advanced Configuration": "Advanced Configuration", "Option": "Option", - "Internet Migration": "Internet Migration", - "File Migration": "File Migration", + "Online Import": "Online Import", + "Import Through File": "Import Through File", "Source Database": "Source Database", "Database Host": "Database Host", "DB Name": "DataBase Name", @@ -259,4 +259,4 @@ "Failed to turn off automatic backup": "Failed to turn off automatic backup", "Automatic backup is turned off": "Automatic backup is turned off", "Are you sure you want to turn off automatic backup": "Are you sure you want to turn off automatic backup?" -} +} \ No newline at end of file diff --git a/frontend/providers/dbprovider/public/locales/zh/common.json b/frontend/providers/dbprovider/public/locales/zh/common.json index 5e1bab23175..8f835058ea3 100644 --- a/frontend/providers/dbprovider/public/locales/zh/common.json +++ b/frontend/providers/dbprovider/public/locales/zh/common.json @@ -190,8 +190,8 @@ "Migrate": "迁移", "Advanced Configuration": "高级配置", "Option": "选填", - "Internet Migration": "公网迁移", - "File Migration": "文件迁移", + "Online Import": "在线导入", + "Import Through File": "文件导入", "Source Database": "源数据库", "Database Host": "数据库 Host", "DB Name": "数据库名字", @@ -261,4 +261,4 @@ "Failed to turn off automatic backup": "关闭自动备份失败", "Automatic backup is turned off": "已关闭自动备份", "Are you sure you want to turn off automatic backup": "确定关闭自动备份吗" -} +} \ No newline at end of file diff --git a/frontend/providers/dbprovider/src/pages/api/getEnv.ts b/frontend/providers/dbprovider/src/pages/api/getEnv.ts index cf80b6c7d56..26cad5df994 100644 --- a/frontend/providers/dbprovider/src/pages/api/getEnv.ts +++ b/frontend/providers/dbprovider/src/pages/api/getEnv.ts @@ -7,6 +7,7 @@ export type SystemEnvResponse = { env_storage_className: string; migrate_file_image: string; minio_url: string; + BACKUP_ENABLED: boolean; }; export default async function handler(req: NextApiRequest, res: NextApiResponse) { @@ -15,7 +16,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse< domain: process.env.SEALOS_DOMAIN || 'cloud.sealos.io', env_storage_className: process.env.STORAGE_CLASSNAME || 'openebs-backup', migrate_file_image: process.env.MIGRATE_FILE_IMAGE || 'ghcr.io/wallyxjh/test:7.1', - minio_url: process.env.MINIO_URL || '' + minio_url: process.env.MINIO_URL || '', + BACKUP_ENABLED: process.env.BACKUP_ENABLED === 'true' } }); } diff --git a/frontend/providers/dbprovider/src/pages/db/detail/components/Monitor/ChartTemplate.tsx b/frontend/providers/dbprovider/src/pages/db/detail/components/Monitor/ChartTemplate.tsx index cb559efae71..b7e92fbdf8e 100644 --- a/frontend/providers/dbprovider/src/pages/db/detail/components/Monitor/ChartTemplate.tsx +++ b/frontend/providers/dbprovider/src/pages/db/detail/components/Monitor/ChartTemplate.tsx @@ -85,15 +85,15 @@ const ChartTemplate = ({ ) : ( - - - {t('No Data Available')} + + + {t(chartTitle)} + {unit ? `(${unit})` : ''} + + + + {t('No Data Available')} + )} diff --git a/frontend/providers/dbprovider/src/pages/db/detail/index.tsx b/frontend/providers/dbprovider/src/pages/db/detail/index.tsx index 371f609ecda..54c33d0fe09 100644 --- a/frontend/providers/dbprovider/src/pages/db/detail/index.tsx +++ b/frontend/providers/dbprovider/src/pages/db/detail/index.tsx @@ -44,17 +44,17 @@ const AppDetail = ({ const { listNav } = useMemo(() => { const PublicNetMigration = ['postgresql', 'apecloud-mysql', 'mongodb'].includes(dbType); const MigrateSupported = ['postgresql', 'mongodb', 'apecloud-mysql'].includes(dbType); - const BackupSupported = ['postgresql', 'mongodb', 'apecloud-mysql', 'redis'].includes(dbType); + const BackupSupported = + ['postgresql', 'mongodb', 'apecloud-mysql', 'redis'].includes(dbType) && + SystemEnv.BACKUP_ENABLED; const listNavValue = [ { label: 'Monitor List', value: TabEnum.monitor }, { label: 'Replicas List', value: TabEnum.pod }, ...(BackupSupported ? [{ label: 'Backup List', value: TabEnum.backup }] : []), - ...(PublicNetMigration - ? [{ label: 'Internet Migration', value: TabEnum.InternetMigration }] - : []), + ...(PublicNetMigration ? [{ label: 'Online Import', value: TabEnum.InternetMigration }] : []), ...(PublicNetMigration && !!SystemEnv.minio_url - ? [{ label: 'File Migration', value: TabEnum.DumpImport }] + ? [{ label: 'Import Through File', value: TabEnum.DumpImport }] : []) ]; @@ -64,7 +64,7 @@ const AppDetail = ({ isBackupSupported: BackupSupported, listNav: listNavValue }; - }, [SystemEnv.minio_url, dbType]); + }, [SystemEnv, dbType]); const theme = useTheme(); const { toast } = useToast(); diff --git a/frontend/providers/dbprovider/src/store/env.ts b/frontend/providers/dbprovider/src/store/env.ts index 026f74cb5f7..eeffd3e03f3 100644 --- a/frontend/providers/dbprovider/src/store/env.ts +++ b/frontend/providers/dbprovider/src/store/env.ts @@ -17,7 +17,8 @@ const useEnvStore = create()( domain: '', env_storage_className: '', migrate_file_image: '', - minio_url: '' + minio_url: '', + BACKUP_ENABLED: false }, initSystemEnv: async () => { try { diff --git a/frontend/providers/license/src/pages/api/platform/getClusterId.ts b/frontend/providers/license/src/pages/api/platform/getClusterId.ts index 6c5c54886fd..098d66b05bb 100644 --- a/frontend/providers/license/src/pages/api/platform/getClusterId.ts +++ b/frontend/providers/license/src/pages/api/platform/getClusterId.ts @@ -7,10 +7,6 @@ import type { NextApiRequest, NextApiResponse } from 'next'; export default async function handler(req: NextApiRequest, res: NextApiResponse) { try { - const { namespace } = await getK8s({ - kubeconfig: await authSession(req) - }); - const defaultKc = K8sApiDefault(); const result = await defaultKc.makeApiClient(k8s.CoreV1Api).readNamespace('kube-system'); diff --git a/frontend/providers/objectstorage/deploy/manifests/appcr.yaml.tmpl b/frontend/providers/objectstorage/deploy/manifests/appcr.yaml.tmpl index 12e6cf7358d..9db827b0308 100644 --- a/frontend/providers/objectstorage/deploy/manifests/appcr.yaml.tmpl +++ b/frontend/providers/objectstorage/deploy/manifests/appcr.yaml.tmpl @@ -14,7 +14,6 @@ spec: zh-Hans: name: 对象存储 menuData: - helpDocs: https://www.sealos.io/docs/cloud/apps/objectstorage/ helpDropDown: false nameColor: text-black name: Object Storage diff --git a/frontend/providers/terminal/deploy/manifests/appcr.yaml.tmpl b/frontend/providers/terminal/deploy/manifests/appcr.yaml.tmpl index 0c9d553c4bd..3385bcc5713 100644 --- a/frontend/providers/terminal/deploy/manifests/appcr.yaml.tmpl +++ b/frontend/providers/terminal/deploy/manifests/appcr.yaml.tmpl @@ -14,7 +14,6 @@ spec: zh-Hans: name: 终端 menuData: - helpDocs: https://www.sealos.io/docs/cloud/apps/terminal/ helpDropDown: false nameColor: text-black name: Terminal