From ca5dfca93119f80c765d0a02fdffb0f857435591 Mon Sep 17 00:00:00 2001 From: yy <56745951+lingdie@users.noreply.github.com> Date: Fri, 3 Nov 2023 15:07:19 +0800 Subject: [PATCH] Release ci (#25) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add license app to cloud. (#4196) Signed-off-by: yy * feature(main): skip sealos.run rule (#4198) * Update README (#4197) Signed-off-by: Carson Yang * add cronjob app to cloud. (#4201) Signed-off-by: yy * fix run init job. (#4202) Signed-off-by: yy * feat service license (#4195) * feat: license service Signed-off-by: jingyang <3161362058@qq.com> * done * tempalte Signed-off-by: jingyang <3161362058@qq.com> * done Signed-off-by: jingyang <3161362058@qq.com> * done Signed-off-by: jingyang <3161362058@qq.com> * docker build Signed-off-by: jingyang <3161362058@qq.com> * done Signed-off-by: jingyang <3161362058@qq.com> * license yaml Signed-off-by: jingyang <3161362058@qq.com> * image * fix type bg * env * add oss Signed-off-by: jingyang <3161362058@qq.com> * done Signed-off-by: jingyang <3161362058@qq.com> cluster done Signed-off-by: jingyang <3161362058@qq.com> done Signed-off-by: jingyang <3161362058@qq.com> cluster done Signed-off-by: jingyang <3161362058@qq.com> done cluster Signed-off-by: jingyang <3161362058@qq.com> done Signed-off-by: jingyang <3161362058@qq.com> * fix build Signed-off-by: jingyang <3161362058@qq.com> * fix oss && only zh Signed-off-by: jingyang <3161362058@qq.com> * feat checkout wechat Signed-off-by: jingyang <3161362058@qq.com> * fix ci Signed-off-by: jingyang <3161362058@qq.com> --------- Signed-off-by: jingyang <3161362058@qq.com> * Docs: update "What is Sealos?" (#4200) Signed-off-by: Carson Yang * refactor(main): unmount override container (#4161) Signed-off-by: cuisongliu * feat: Create a demo plugin Monitor (#4184) * feat: lens demo of web version * chore: add & remove some packages * fix: connect to desktop bug and change icon * init: plugin Monitor init * style: restore frontend/pnpm-workspace.yaml & pnpm-lock.yaml and create new ones in plugins/monitor * restore: frontend/Makefile * restore: frontend/pnpm-workspace.yaml * restore * feat:frontend license app (#4203) * feat:frontend license app Signed-off-by: jingyang <3161362058@qq.com> * fix Signed-off-by: jingyang <3161362058@qq.com> * fix * fix detail Signed-off-by: jingyang <3161362058@qq.com> --------- Signed-off-by: jingyang <3161362058@qq.com> * Docs: update introduction (#4207) Signed-off-by: Carson Yang * fix license db uri (#4211) Signed-off-by: yy * update price (#4212) * docs: Automated Changelog Update for v4.3.7 (#4210) * 🤖 add release changelog using robot. Signed-off-by: sealos-release-robot * Update CHANGELOG.md --------- Signed-off-by: sealos-release-robot Co-authored-by: cuisongliu * 🤖 add release changelog using rebot. (#4213) * add alt names. (#4214) Signed-off-by: yy * Update the workflow to automatically update the website image after the image is built (#4209) Signed-off-by: Carson Yang * fix(costcenter): fix unit & invoice amount (#4194) * feat:docs add private cloud page (#4215) * fix scripts (#4217) * Fix database provider i18n. (#4216) Signed-off-by: zzjin * fix user avator && url (#4218) * fix user avator && url Signed-off-by: jingyang <3161362058@qq.com> * modify purchase page Signed-off-by: jingyang <3161362058@qq.com> * fix height Signed-off-by: jingyang <3161362058@qq.com> * fix docs Signed-off-by: jingyang <3161362058@qq.com> * fix params * copy code * license time --------- Signed-off-by: jingyang <3161362058@qq.com> * fix oss file name && docs footer (#4220) * feat(frontend/desktop):support modify team limit (#4221) * add acme resolver monitoring (#4223) * feat:docs language-differentiated domain names (#4226) * feat:standard cluster purchase process (#4225) * feat:standard cluster purchase process Signed-off-by: jingyang <3161362058@qq.com> * fix cronjob Signed-off-by: jingyang <3161362058@qq.com> --------- Signed-off-by: jingyang <3161362058@qq.com> * add cloud release ci. Signed-off-by: yy --------- Signed-off-by: yy Signed-off-by: Carson Yang Signed-off-by: jingyang <3161362058@qq.com> Signed-off-by: cuisongliu Signed-off-by: sealos-release-robot Signed-off-by: zzjin Co-authored-by: cuisongliu Co-authored-by: Carson Yang Co-authored-by: zhujingyang <72259332+zjy365@users.noreply.github.com> Co-authored-by: Wishrem <97738578+Wishrem@users.noreply.github.com> Co-authored-by: Jiahui <4543bxy@gmail.com> Co-authored-by: sealos-release-robot Co-authored-by: xudaotutou <13435638964@163.com> Co-authored-by: zzjin --- .github/workflows/cloud-release.yml | 53 + .github/workflows/cloud.yml | 2 - .github/workflows/deploy-docs-preview.yml | 11 +- .github/workflows/deploy-docs-site.yml | 26 +- .github/workflows/docs-site-image.yml | 17 +- CHANGELOG/CHANGELOG-4.3.7.md | 19 + CHANGELOG/CHANGELOG-5.0.0-beta1.md | 42 + CHANGELOG/CHANGELOG.md | 2 + README.md | 8 +- README_zh.md | 32 +- controllers/pkg/resources/named.go | 29 + controllers/pkg/resources/resources.go | 2 +- deploy/cloud/init.sh | 4 + deploy/cloud/manifests/admin-user.yaml | 10 - deploy/cloud/manifests/mongodb.yaml.tmpl | 2 +- deploy/cloud/scripts/init.sh | 65 +- docs/4.0/code.json | 45 +- docs/4.0/docs/Intro.md | 14 +- docs/4.0/i18n/zh-Hans/Intro.md | 14 +- docs/website/.prettierrc.js | 20 + docs/website/docusaurus.config.js | 18 +- .../docusaurus-theme-classic/footer.json | 20 +- .../docusaurus-theme-classic/navbar.json | 6 +- docs/website/package.json | 6 +- docs/website/src/constants/platform.ts | 2 +- docs/website/src/css/custom.scss | 8 +- docs/website/src/hooks/useWindow.ts | 51 +- .../src/pages/components/Banner/index.scss | 5 +- .../src/pages/components/Banner/index.tsx | 26 +- .../components/Capability/index.phone.scss | 2 +- .../pages/components/Capability/index.scss | 1 - .../src/pages/components/Capability/index.tsx | 107 +- .../components/Community/index.phone.scss | 7 +- .../pages/components/Footer/index.phone.scss | 2 +- .../src/pages/components/Footer/index.tsx | 70 +- .../pages/components/Header/index.phone.scss | 2 +- .../src/pages/components/Header/index.scss | 9 +- .../src/pages/components/Header/index.tsx | 139 +- .../components/Introduce/index.phone.scss | 6 +- .../src/pages/components/Introduce/index.scss | 4 +- .../src/pages/components/Introduce/index.tsx | 58 +- .../pages/components/UserBy/index.phone.scss | 2 +- .../pages/components/VideoPlayer/index.scss | 5 +- docs/website/src/pages/index.scss | 6 +- docs/website/src/pages/index.tsx | 33 +- .../src/pages/pricing/advantage/index.tsx | 202 + .../src/pages/pricing/header/index.scss | 277 + .../src/pages/pricing/header/index.tsx | 148 + docs/website/src/pages/pricing/index.scss | 111 + docs/website/src/pages/pricing/index.tsx | 36 + .../src/pages/pricing/overview/index.scss | 55 + .../src/pages/pricing/overview/index.tsx | 232 + docs/website/src/pages/pricing/plan/index.tsx | 177 + .../src/pages/pricing/product/index.tsx | 149 + docs/website/static/img/favicon.ico | Bin 0 -> 15086 bytes docs/website/static/img/sealos.ico | Bin 4286 -> 0 bytes docs/website/static/price/bulb.svg | 3 + docs/website/static/price/check.svg | 3 + docs/website/static/price/chevronUp.svg | 3 + docs/website/static/price/clarityCluster.svg | 14 + docs/website/static/price/cloudServer.svg | 5 + docs/website/static/price/cpu.svg | 3 + docs/website/static/price/dashed.svg | 14 + docs/website/static/price/database.svg | 5 + docs/website/static/price/disk.svg | 5 + docs/website/static/price/dottedLine.svg | 27 + docs/website/static/price/flow.svg | 3 + .../static/price/functionBackground.svg | 14 + docs/website/static/price/groups.svg | 3 + docs/website/static/price/launchpad.svg | 3 + docs/website/static/price/lightning.svg | 3 + docs/website/static/price/memory.svg | 4 + docs/website/static/price/money.svg | 4 + docs/website/static/price/publicCloud.svg | 5 + docs/website/static/price/queue.svg | 7 + docs/website/static/price/star.svg | 3 + docs/website/static/price/wideApps.svg | 3 + docs/website/tailwind.config.js | 29 + docs/website/yarn.lock | 293 +- frontend/Makefile | 2 +- frontend/desktop/README.md | 6 + .../api/e2e/namespace/create.test.ts | 12 +- .../src/pages/api/auth/namespace/create.ts | 3 +- frontend/desktop/src/services/enable.ts | 1 + frontend/plugins/monitor/.eslintrc.json | 9 + frontend/plugins/monitor/.gitignore | 42 + frontend/plugins/monitor/.prettierignore | 4 + frontend/plugins/monitor/.prettierrc.js | 20 + frontend/plugins/monitor/dockerfile | 58 + frontend/plugins/monitor/next.config.js | 23 + frontend/plugins/monitor/package.json | 65 + frontend/plugins/monitor/pnpm-lock.yaml | 8073 +++++++++++++++++ frontend/plugins/monitor/pnpm-workspace.yaml | 2 + frontend/plugins/monitor/postcss.config.js | 6 + frontend/plugins/monitor/public/favicon.ico | Bin 0 -> 2497 bytes frontend/plugins/monitor/src/api/list.ts | 75 + frontend/plugins/monitor/src/api/platform.ts | 4 + .../src/components/chart/pie-chart.tsx | 55 + .../src/components/kube/kube-accordion.tsx | 37 + .../src/components/kube/kube-badge.tsx | 48 + .../src/components/kube/kube-drawer.tsx | 45 + .../src/components/kube/kube-record.tsx | 34 + .../src/components/kube/kube-table.tsx | 42 + .../monitor/src/components/kube/loading.tsx | 10 + .../src/components/kube/local-date.tsx | 11 + .../detail/kube-object-detail-info-list.tsx | 100 + .../kube/object/kube-object-age.tsx | 21 + .../kube/object/kube-object-tolerations.tsx | 39 + .../src/components/kube/reactive-duration.tsx | 121 + .../plugins/monitor/src/constants/kube-api.ts | 45 + .../monitor/src/constants/kube-object.ts | 26 + frontend/plugins/monitor/src/constants/pod.ts | 10 + .../plugins/monitor/src/hooks/useConfirm.tsx | 83 + .../plugins/monitor/src/hooks/useLoading.tsx | 34 + .../plugins/monitor/src/hooks/useToast.ts | 13 + .../plugins/monitor/src/k8slens/README.md | 4 + .../monitor/src/k8slens/kube-object/index.ts | 6 + .../src/k8slens/kube-object/src/api-types.ts | 400 + .../k8slens/kube-object/src/kube-object.ts | 258 + .../k8slens/kube-object/src/kube-status.ts | 59 + .../src/specifics/cluster-role-binding.ts | 48 + .../kube-object/src/specifics/cluster-role.ts | 42 + .../kube-object/src/specifics/cluster.ts | 71 + .../src/specifics/component-status.ts | 28 + .../kube-object/src/specifics/config-map.ts | 47 + .../kube-object/src/specifics/cron-job.ts | 69 + .../kube-object/src/specifics/daemon-set.ts | 77 + .../kube-object/src/specifics/deployment.ts | 93 + .../kube-object/src/specifics/endpoint.ts | 105 + .../kube-object/src/specifics/events.ts | 153 + .../specifics/horizontal-pod-autoscaler.ts | 348 + .../kube-object/src/specifics/index.ts | 46 + .../src/specifics/ingress-class.ts | 65 + .../kube-object/src/specifics/ingress.ts | 210 + .../k8slens/kube-object/src/specifics/job.ts | 91 + .../kube-object/src/specifics/lease.ts | 43 + .../kube-object/src/specifics/limit-range.ts | 57 + .../mutating-webhook-configuration.ts | 193 + .../kube-object/src/specifics/namespace.ts | 46 + .../src/specifics/network-policy.ts | 117 + .../k8slens/kube-object/src/specifics/node.ts | 253 + .../src/specifics/persistent-volume-claim.ts | 69 + .../src/specifics/persistent-volume.ts | 110 + .../src/specifics/pod-disruption-budget.ts | 75 + .../kube-object/src/specifics/pod-metrics.ts | 50 + .../src/specifics/pod-security-policy.ts | 111 + .../k8slens/kube-object/src/specifics/pod.ts | 854 ++ .../src/specifics/priority-class.ts | 61 + .../kube-object/src/specifics/replica-set.ts | 77 + .../src/specifics/replication-controller.ts | 108 + .../src/specifics/resource-quota.ts | 65 + .../kube-object/src/specifics/role-binding.ts | 48 + .../k8slens/kube-object/src/specifics/role.ts | 37 + .../src/specifics/runtime-class.ts | 66 + .../kube-object/src/specifics/secret.ts | 74 + .../specifics/self-subject-rules-reviews.ts | 72 + .../src/specifics/service-account.ts | 55 + .../kube-object/src/specifics/service.ts | 143 + .../kube-object/src/specifics/stateful-set.ts | 73 + .../src/specifics/storage-class.ts | 93 + .../validating-webhook-configuration.ts | 41 + .../src/specifics/vertical-pod-autoscaler.ts | 142 + .../kube-object/src/types/aggregation-rule.ts | 10 + .../kube-object/src/types/capabilities.ts | 19 + .../kube-object/src/types/condition.ts | 13 + .../kube-object/src/types/container-port.ts | 12 + .../kube-object/src/types/container.ts | 176 + .../types/cross-version-object-reference.ts | 10 + .../kube-object/src/types/env-from-source.ts | 14 + .../kube-object/src/types/env-source.ts | 13 + .../src/types/env-var-key-selector.ts | 10 + .../kube-object/src/types/env-var-source.ts | 15 + .../k8slens/kube-object/src/types/env-var.ts | 12 + .../kube-object/src/types/exec-action.ts | 19 + .../src/types/external-documentation.ts | 9 + .../k8slens/kube-object/src/types/handler.ts | 17 + .../kube-object/src/types/http-get-action.ts | 38 + .../kube-object/src/types/http-header.ts | 19 + .../k8slens/kube-object/src/types/index.ts | 38 + .../src/types/job-template-spec.ts | 12 + .../src/types/json-schema-props.ts | 120 + .../kube-object/src/types/lifecycle.ts | 17 + .../src/types/object-field-selector.ts | 9 + .../persistent-volume-claim-template-spec.ts | 12 + .../src/types/pod-security-context.ts | 21 + .../src/types/pod-template-spec.ts | 12 + .../kube-object/src/types/policy-rule.ts | 12 + .../src/types/preemption-policy.ts | 6 + .../k8slens/kube-object/src/types/probe.ts | 81 + .../src/types/resource-field-selector.ts | 10 + .../src/types/resource-requirements.ts | 25 + .../k8slens/kube-object/src/types/role-ref.ts | 10 + .../k8slens/kube-object/src/types/scale.ts | 27 + .../kube-object/src/types/se-linux-options.ts | 29 + .../kube-object/src/types/seccomp-profile.ts | 29 + .../kube-object/src/types/security-context.ts | 78 + .../k8slens/kube-object/src/types/subject.ts | 13 + .../src/types/tcp-socket-action.ts | 19 + .../kube-object/src/types/volume-device.ts | 19 + .../kube-object/src/types/volume-mount.ts | 13 + .../types/windows-security-context-options.ts | 43 + .../src/k8slens/kube-object/src/utils.ts | 115 + .../monitor/src/k8slens/utilities/index.ts | 7 + .../src/k8slens/utilities/src/convertCpu.ts | 41 + .../k8slens/utilities/src/convertMemory.ts | 64 + .../k8slens/utilities/src/formatDuration.ts | 94 + .../monitor/src/k8slens/utilities/src/iter.ts | 325 + .../src/k8slens/utilities/src/object.ts | 40 + .../k8slens/utilities/src/type-narrowing.ts | 288 + .../src/k8slens/utilities/src/types.ts | 36 + frontend/plugins/monitor/src/pages/404.tsx | 13 + frontend/plugins/monitor/src/pages/_app.tsx | 109 + .../plugins/monitor/src/pages/_document.tsx | 21 + .../plugins/monitor/src/pages/api/list.ts | 49 + .../src/pages/api/platform/init-data.ts | 14 + .../config/config-map/config-map-detail.tsx | 52 + .../config/config-map/config-map.tsx | 82 + .../components/drawer/drawer-collapse.tsx | 39 + .../components/drawer/drawer-title.tsx | 9 + .../monitor/components/drawer/drawer.tsx | 22 + .../src/pages/monitor/components/layout.tsx | 24 + .../src/pages/monitor/components/overview.tsx | 40 + .../monitor/components/sidebar/sidebar.tsx | 63 + .../volume-claim/volume-claim-detail.tsx | 67 + .../storage/volume-claim/volume-claim.tsx | 121 + .../workload/deployment/deployment-detail.tsx | 92 + .../workload/deployment/deployment.tsx | 98 + .../components/workload/overview/overview.tsx | 48 + .../workload/overview/status-chart.tsx | 54 + .../workload/overview/status-overview.tsx | 25 + .../workload/pod/container-detail.tsx | 144 + .../workload/pod/container-status-brick.tsx | 20 + .../workload/pod/container-status.tsx | 89 + .../workload/pod/pod-detail-affinities.tsx | 24 + .../workload/pod/pod-detail-statuses.tsx | 25 + .../workload/pod/pod-detail-tolerations.tsx | 25 + .../components/workload/pod/pod-detail.tsx | 128 + .../components/workload/pod/pod-status.tsx | 8 + .../monitor/components/workload/pod/pod.tsx | 145 + .../statefulset/statefulset-detail.tsx | 55 + .../workload/statefulset/statefulset.tsx | 100 + .../monitor/src/pages/monitor/index.tsx | 55 + .../monitor/src/services/backend/api.ts | 10 + .../monitor/src/services/backend/auth.ts | 14 + .../src/services/backend/kubernetes.ts | 68 + .../monitor/src/services/backend/response.ts | 39 + .../plugins/monitor/src/services/error.ts | 34 + .../plugins/monitor/src/services/kubernet.ts | 9 + .../plugins/monitor/src/services/request.ts | 94 + frontend/plugins/monitor/src/store/global.ts | 37 + .../monitor/src/store/k8s/configmap.store.ts | 9 + .../monitor/src/store/k8s/data.store.ts | 52 + .../monitor/src/store/k8s/deployment.store.ts | 34 + .../monitor/src/store/k8s/pod.store.ts | 23 + .../monitor/src/store/k8s/pvc.store.ts | 9 + .../src/store/k8s/statefulset.store.ts | 28 + frontend/plugins/monitor/src/store/static.ts | 31 + .../plugins/monitor/src/styles/globals.css | 3 + .../monitor/src/utils/condtion-color.ts | 11 + .../monitor/src/utils/kube-object-info.ts | 38 + .../plugins/monitor/src/utils/pie-chart.ts | 14 + .../monitor/src/utils/request-controller.ts | 59 + frontend/plugins/monitor/src/utils/request.ts | 27 + .../plugins/monitor/src/utils/status-color.ts | 20 + frontend/plugins/monitor/src/utils/user.ts | 14 + frontend/plugins/monitor/tailwind.config.js | 26 + frontend/plugins/monitor/tsconfig.json | 25 + frontend/providers/cronjob/Makefile | 4 +- frontend/providers/cronjob/deploy/Kubefile | 1 + .../deploy/manifests/ingress.yaml.tmpl | 22 +- .../providers/cronjob/src/utils/json2Yaml.ts | 2 + .../deploy/manifests/appcr.yaml.tmpl | 5 + frontend/providers/license/.env.template | 3 +- frontend/providers/license/deploy/Kubefile | 6 +- .../license/deploy/manifests/appcr.yaml.tmpl | 3 +- .../license/deploy/manifests/deploy.yaml.tmpl | 14 +- .../license/deploy/manifests/env.yaml.tmpl | 3 +- .../deploy/manifests/ingress.yaml.tmpl | 24 +- .../license/public/locales/en/common.json | 12 +- .../license/public/locales/zh/common.json | 14 +- frontend/providers/license/src/api/license.ts | 4 +- .../src/components/FileSelect/index.tsx | 8 +- .../src/pages/api/license/getLicense.tsx | 12 +- .../license/src/pages/api/platform/getEnv.ts | 2 - .../providers/license/src/pages/index.tsx | 92 +- .../providers/license/src/services/request.ts | 2 +- .../providers/license/src/types/license.d.ts | 50 +- .../providers/license/src/utils/json2Yaml.ts | 24 +- frontend/providers/license/src/utils/tools.ts | 9 + lychee.toml | 2 +- pkg/apply/processor/install.go | 28 +- pkg/types/v1beta1/utils.go | 24 +- scripts/cloud/install.sh | 11 +- service/license/.dockerignore | 12 + service/license/.env.template | 27 + service/license/.eslintrc.json | 3 + service/license/.gitignore | 35 + service/license/.prettierignore | 18 + service/license/.prettierrc.js | 20 + service/license/Dockerfile | 90 + service/license/README.md | 40 + service/license/deploy/Kubefile | 16 + service/license/deploy/README.md | 53 + .../license/deploy/manifests/deploy.yaml.tmpl | 185 + .../deploy/manifests/ingress.yaml.tmpl | 27 + service/license/deploy/manifests/rbac.yaml | 41 + service/license/deploy/manifests/secret.yaml | 37 + service/license/deploy/scripts/init.sh | 13 + service/license/next-i18next.config.js | 11 + service/license/next.config.js | 13 + service/license/package.json | 61 + service/license/pnpm-lock.yaml | 6653 ++++++++++++++ service/license/public/favicon.ico | Bin 0 -> 15086 bytes service/license/public/images/avatar.svg | 4 + service/license/public/images/bg-bottom.svg | 67 + service/license/public/images/bg.svg | 33 + service/license/public/images/logo.svg | 21 + service/license/public/images/moon.svg | 37 + service/license/public/images/pay_wechat.svg | 1 + .../license/public/images/sealos-title.png | Bin 0 -> 54072 bytes service/license/public/images/sealos.svg | 1 + service/license/public/locales/en/common.json | 103 + service/license/public/locales/zh/common.json | 103 + service/license/public/logo.svg | 1 + service/license/src/api/cluster.ts | 17 + service/license/src/api/license.ts | 10 + service/license/src/api/oos.ts | 4 + service/license/src/api/payment.ts | 17 + service/license/src/api/system.ts | 13 + service/license/src/api/user.ts | 30 + .../license/src/components/Account/index.tsx | 93 + .../src/components/CodeBlock/index.tsx | 47 + .../src/components/Icon/CancelIcon.tsx | 14 + .../license/src/components/Icon/CheckIcon.tsx | 22 + .../src/components/Icon/CheckListIcon.tsx | 21 + .../license/src/components/Icon/CloseIcon.tsx | 8 + .../src/components/Icon/ClusterIcon.tsx | 32 + .../src/components/Icon/CodeDoneIcon.tsx | 18 + .../license/src/components/Icon/CopyIcon.tsx | 21 + .../license/src/components/Icon/CopyLink.tsx | 7 + .../src/components/Icon/DeleteIcon.tsx | 8 + .../src/components/Icon/DownloadIcon.tsx | 15 + .../license/src/components/Icon/EmptyIcon.tsx | 30 + .../src/components/Icon/ExchangeIcon.tsx | 21 + .../src/components/Icon/GithubIcon.tsx | 19 + .../src/components/Icon/GoogleIcon.tsx | 30 + .../license/src/components/Icon/GroupAdd.tsx | 20 + .../license/src/components/Icon/HomePage.tsx | 11 + .../license/src/components/Icon/HtmlIcon.tsx | 7 + .../src/components/Icon/LicenseIcon.tsx | 15 + .../license/src/components/Icon/LockIcon.tsx | 8 + .../license/src/components/Icon/MdIcon.tsx | 7 + .../src/components/Icon/OfflineIcon.tsx | 19 + .../components/Icon/OnlineComputerIcon.tsx | 19 + .../src/components/Icon/PersonIcon.tsx | 8 + .../license/src/components/Icon/RightIcon.tsx | 16 + .../src/components/Icon/SafetyIcon.tsx | 9 + service/license/src/components/Icon/Share.tsx | 8 + .../src/components/Icon/SignOutIcon.tsx | 15 + .../license/src/components/Icon/StarIcon.tsx | 18 + .../src/components/Icon/StripeIcon.tsx | 15 + .../src/components/Icon/SuccessIcon.tsx | 16 + .../license/src/components/Icon/TokenIcon.tsx | 25 + .../src/components/Icon/VectorIcon.tsx | 15 + .../src/components/Icon/WarningIcon.tsx | 15 + .../src/components/Icon/WechatIcon.tsx | 22 + service/license/src/components/Icon/index.ts | 35 + .../src/components/LangSelect/index.tsx | 34 + .../license/src/components/Layout/index.tsx | 87 + .../src/components/Pagination/index.tsx | 122 + .../components/Signin/auth/useAuthList.tsx | 98 + .../components/Signin/auth/useCustomError.tsx | 61 + .../components/Signin/auth/useLanguage.tsx | 27 + .../components/Signin/auth/usePassword.tsx | 208 + .../components/Signin/auth/useProtocol.tsx | 70 + .../src/components/Signin/auth/useSms.tsx | 188 + .../src/components/Signin/background.tsx | 44 + .../license/src/components/Signin/index.tsx | 200 + .../src/components/WechatPayment/index.tsx | 60 + .../license/src/components/account/index.tsx | 93 + .../components/signin/auth/useAuthList.tsx | 98 + .../components/signin/auth/useCustomError.tsx | 61 + .../components/signin/auth/useLanguage.tsx | 27 + .../components/signin/auth/usePassword.tsx | 208 + .../components/signin/auth/useProtocol.tsx | 70 + .../src/components/signin/auth/useSms.tsx | 188 + .../src/components/signin/background.tsx | 44 + .../license/src/components/signin/index.tsx | 200 + service/license/src/constant/product.ts | 57 + service/license/src/hooks/useBonusBox.tsx | 93 + service/license/src/hooks/useConfirm.tsx | 91 + service/license/src/hooks/useCopyData.ts | 32 + service/license/src/hooks/useScreen.ts | 12 + service/license/src/pages/404.tsx | 14 + service/license/src/pages/_app.tsx | 45 + service/license/src/pages/_document.tsx | 13 + .../src/pages/api/auth/oauth/github/index.ts | 53 + .../src/pages/api/auth/oauth/google/index.ts | 63 + .../src/pages/api/auth/oauth/wechat/index.ts | 50 + .../src/pages/api/auth/password/exist.ts | 41 + .../src/pages/api/auth/password/index.ts | 40 + .../license/src/pages/api/auth/phone/sms.ts | 85 + .../src/pages/api/auth/phone/verify.ts | 39 + .../pages/api/cluster/clusterAndLicense.ts | 55 + .../license/src/pages/api/cluster/create.ts | 27 + .../license/src/pages/api/cluster/findById.ts | 28 + .../src/pages/api/cluster/getRecord.ts | 28 + .../license/src/pages/api/license/create.ts | 54 + .../src/pages/api/license/getRecord.ts | 28 + service/license/src/pages/api/oss/get.ts | 23 + .../src/pages/api/payment/checkWechat.ts | 93 + .../license/src/pages/api/payment/create.ts | 58 + .../license/src/pages/api/payment/result.ts | 57 + .../license/src/pages/api/platform/getEnv.ts | 49 + service/license/src/pages/api/price/bonus.ts | 23 + service/license/src/pages/callback.tsx | 42 + .../src/pages/cluster/components/Record.tsx | 118 + .../src/pages/cluster/components/Tutorial.tsx | 292 + service/license/src/pages/cluster/index.tsx | 86 + .../license/components/CurrencySymbol.tsx | 22 + .../pages/license/components/OuterLink.tsx | 35 + .../src/pages/license/components/Recharge.tsx | 317 + .../src/pages/license/components/Record.tsx | 109 + service/license/src/pages/license/index.tsx | 48 + .../src/pages/pricing/components/Product.tsx | 475 + .../pricing/components/ServicePackage.tsx | 40 + service/license/src/pages/pricing/index.tsx | 24 + service/license/src/pages/signin.tsx | 41 + service/license/src/services/backend/auth.ts | 44 + .../src/services/backend/db/cluster.ts | 127 + .../src/services/backend/db/license.ts | 132 + .../src/services/backend/db/mongodb.ts | 24 + .../license/src/services/backend/db/oss.ts | 27 + .../src/services/backend/db/payment.ts | 145 + .../license/src/services/backend/db/user.ts | 76 + .../src/services/backend/db/verifyCode.ts | 61 + service/license/src/services/backend/oauth.ts | 94 + .../license/src/services/backend/response.ts | 30 + service/license/src/services/enable.ts | 31 + service/license/src/services/pay.ts | 11 + service/license/src/services/request.ts | 148 + service/license/src/stores/payment.ts | 45 + service/license/src/stores/routeParams.ts | 45 + service/license/src/stores/session.ts | 58 + service/license/src/styles/chakraTheme.ts | 52 + service/license/src/styles/globals.css | 69 + service/license/src/styles/prism.css | 13 + service/license/src/types/api.ts | 8 + service/license/src/types/cluster.ts | 48 + service/license/src/types/index.ts | 12 + service/license/src/types/license.ts | 43 + service/license/src/types/login.ts | 5 + service/license/src/types/payment.ts | 60 + service/license/src/types/session.ts | 24 + service/license/src/types/system.ts | 29 + service/license/src/types/user.ts | 89 + service/license/src/utils/cookieUtils.ts | 13 + service/license/src/utils/crypto.ts | 15 + service/license/src/utils/downloadFIle.ts | 25 + service/license/src/utils/json2Yaml.ts | 19 + service/license/src/utils/tools.ts | 123 + service/license/tsconfig.json | 34 + 462 files changed, 37279 insertions(+), 561 deletions(-) create mode 100644 .github/workflows/cloud-release.yml create mode 100644 CHANGELOG/CHANGELOG-4.3.7.md create mode 100644 CHANGELOG/CHANGELOG-5.0.0-beta1.md delete mode 100644 deploy/cloud/manifests/admin-user.yaml create mode 100644 docs/website/.prettierrc.js create mode 100644 docs/website/src/pages/pricing/advantage/index.tsx create mode 100644 docs/website/src/pages/pricing/header/index.scss create mode 100644 docs/website/src/pages/pricing/header/index.tsx create mode 100644 docs/website/src/pages/pricing/index.scss create mode 100644 docs/website/src/pages/pricing/index.tsx create mode 100644 docs/website/src/pages/pricing/overview/index.scss create mode 100644 docs/website/src/pages/pricing/overview/index.tsx create mode 100644 docs/website/src/pages/pricing/plan/index.tsx create mode 100644 docs/website/src/pages/pricing/product/index.tsx create mode 100644 docs/website/static/img/favicon.ico delete mode 100644 docs/website/static/img/sealos.ico create mode 100644 docs/website/static/price/bulb.svg create mode 100644 docs/website/static/price/check.svg create mode 100644 docs/website/static/price/chevronUp.svg create mode 100644 docs/website/static/price/clarityCluster.svg create mode 100644 docs/website/static/price/cloudServer.svg create mode 100644 docs/website/static/price/cpu.svg create mode 100644 docs/website/static/price/dashed.svg create mode 100644 docs/website/static/price/database.svg create mode 100644 docs/website/static/price/disk.svg create mode 100644 docs/website/static/price/dottedLine.svg create mode 100644 docs/website/static/price/flow.svg create mode 100644 docs/website/static/price/functionBackground.svg create mode 100644 docs/website/static/price/groups.svg create mode 100644 docs/website/static/price/launchpad.svg create mode 100644 docs/website/static/price/lightning.svg create mode 100644 docs/website/static/price/memory.svg create mode 100644 docs/website/static/price/money.svg create mode 100644 docs/website/static/price/publicCloud.svg create mode 100644 docs/website/static/price/queue.svg create mode 100644 docs/website/static/price/star.svg create mode 100644 docs/website/static/price/wideApps.svg create mode 100644 docs/website/tailwind.config.js create mode 100644 frontend/plugins/monitor/.eslintrc.json create mode 100644 frontend/plugins/monitor/.gitignore create mode 100644 frontend/plugins/monitor/.prettierignore create mode 100644 frontend/plugins/monitor/.prettierrc.js create mode 100644 frontend/plugins/monitor/dockerfile create mode 100644 frontend/plugins/monitor/next.config.js create mode 100644 frontend/plugins/monitor/package.json create mode 100644 frontend/plugins/monitor/pnpm-lock.yaml create mode 100644 frontend/plugins/monitor/pnpm-workspace.yaml create mode 100644 frontend/plugins/monitor/postcss.config.js create mode 100644 frontend/plugins/monitor/public/favicon.ico create mode 100644 frontend/plugins/monitor/src/api/list.ts create mode 100644 frontend/plugins/monitor/src/api/platform.ts create mode 100644 frontend/plugins/monitor/src/components/chart/pie-chart.tsx create mode 100644 frontend/plugins/monitor/src/components/kube/kube-accordion.tsx create mode 100644 frontend/plugins/monitor/src/components/kube/kube-badge.tsx create mode 100644 frontend/plugins/monitor/src/components/kube/kube-drawer.tsx create mode 100644 frontend/plugins/monitor/src/components/kube/kube-record.tsx create mode 100644 frontend/plugins/monitor/src/components/kube/kube-table.tsx create mode 100644 frontend/plugins/monitor/src/components/kube/loading.tsx create mode 100644 frontend/plugins/monitor/src/components/kube/local-date.tsx create mode 100644 frontend/plugins/monitor/src/components/kube/object/detail/kube-object-detail-info-list.tsx create mode 100644 frontend/plugins/monitor/src/components/kube/object/kube-object-age.tsx create mode 100644 frontend/plugins/monitor/src/components/kube/object/kube-object-tolerations.tsx create mode 100644 frontend/plugins/monitor/src/components/kube/reactive-duration.tsx create mode 100644 frontend/plugins/monitor/src/constants/kube-api.ts create mode 100644 frontend/plugins/monitor/src/constants/kube-object.ts create mode 100644 frontend/plugins/monitor/src/constants/pod.ts create mode 100644 frontend/plugins/monitor/src/hooks/useConfirm.tsx create mode 100644 frontend/plugins/monitor/src/hooks/useLoading.tsx create mode 100644 frontend/plugins/monitor/src/hooks/useToast.ts create mode 100644 frontend/plugins/monitor/src/k8slens/README.md create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/index.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/api-types.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/kube-object.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/kube-status.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/cluster-role-binding.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/cluster-role.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/cluster.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/component-status.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/config-map.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/cron-job.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/daemon-set.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/deployment.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/endpoint.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/events.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/horizontal-pod-autoscaler.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/index.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/ingress-class.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/ingress.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/job.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/lease.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/limit-range.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/mutating-webhook-configuration.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/namespace.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/network-policy.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/node.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/persistent-volume-claim.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/persistent-volume.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/pod-disruption-budget.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/pod-metrics.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/pod-security-policy.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/pod.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/priority-class.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/replica-set.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/replication-controller.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/resource-quota.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/role-binding.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/role.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/runtime-class.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/secret.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/self-subject-rules-reviews.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/service-account.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/service.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/stateful-set.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/storage-class.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/validating-webhook-configuration.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/specifics/vertical-pod-autoscaler.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/aggregation-rule.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/capabilities.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/condition.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/container-port.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/container.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/cross-version-object-reference.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/env-from-source.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/env-source.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/env-var-key-selector.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/env-var-source.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/env-var.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/exec-action.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/external-documentation.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/handler.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/http-get-action.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/http-header.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/index.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/job-template-spec.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/json-schema-props.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/lifecycle.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/object-field-selector.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/persistent-volume-claim-template-spec.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/pod-security-context.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/pod-template-spec.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/policy-rule.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/preemption-policy.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/probe.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/resource-field-selector.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/resource-requirements.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/role-ref.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/scale.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/se-linux-options.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/seccomp-profile.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/security-context.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/subject.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/tcp-socket-action.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/volume-device.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/volume-mount.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/types/windows-security-context-options.ts create mode 100644 frontend/plugins/monitor/src/k8slens/kube-object/src/utils.ts create mode 100644 frontend/plugins/monitor/src/k8slens/utilities/index.ts create mode 100644 frontend/plugins/monitor/src/k8slens/utilities/src/convertCpu.ts create mode 100644 frontend/plugins/monitor/src/k8slens/utilities/src/convertMemory.ts create mode 100644 frontend/plugins/monitor/src/k8slens/utilities/src/formatDuration.ts create mode 100644 frontend/plugins/monitor/src/k8slens/utilities/src/iter.ts create mode 100644 frontend/plugins/monitor/src/k8slens/utilities/src/object.ts create mode 100644 frontend/plugins/monitor/src/k8slens/utilities/src/type-narrowing.ts create mode 100644 frontend/plugins/monitor/src/k8slens/utilities/src/types.ts create mode 100644 frontend/plugins/monitor/src/pages/404.tsx create mode 100644 frontend/plugins/monitor/src/pages/_app.tsx create mode 100644 frontend/plugins/monitor/src/pages/_document.tsx create mode 100644 frontend/plugins/monitor/src/pages/api/list.ts create mode 100644 frontend/plugins/monitor/src/pages/api/platform/init-data.ts create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/config/config-map/config-map-detail.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/config/config-map/config-map.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/drawer/drawer-collapse.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/drawer/drawer-title.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/drawer/drawer.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/layout.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/overview.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/sidebar/sidebar.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/storage/volume-claim/volume-claim-detail.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/storage/volume-claim/volume-claim.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/workload/deployment/deployment-detail.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/workload/deployment/deployment.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/workload/overview/overview.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/workload/overview/status-chart.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/workload/overview/status-overview.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/workload/pod/container-detail.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/workload/pod/container-status-brick.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/workload/pod/container-status.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/workload/pod/pod-detail-affinities.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/workload/pod/pod-detail-statuses.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/workload/pod/pod-detail-tolerations.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/workload/pod/pod-detail.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/workload/pod/pod-status.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/workload/pod/pod.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/workload/statefulset/statefulset-detail.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/components/workload/statefulset/statefulset.tsx create mode 100644 frontend/plugins/monitor/src/pages/monitor/index.tsx create mode 100644 frontend/plugins/monitor/src/services/backend/api.ts create mode 100644 frontend/plugins/monitor/src/services/backend/auth.ts create mode 100644 frontend/plugins/monitor/src/services/backend/kubernetes.ts create mode 100644 frontend/plugins/monitor/src/services/backend/response.ts create mode 100644 frontend/plugins/monitor/src/services/error.ts create mode 100644 frontend/plugins/monitor/src/services/kubernet.ts create mode 100644 frontend/plugins/monitor/src/services/request.ts create mode 100644 frontend/plugins/monitor/src/store/global.ts create mode 100644 frontend/plugins/monitor/src/store/k8s/configmap.store.ts create mode 100644 frontend/plugins/monitor/src/store/k8s/data.store.ts create mode 100644 frontend/plugins/monitor/src/store/k8s/deployment.store.ts create mode 100644 frontend/plugins/monitor/src/store/k8s/pod.store.ts create mode 100644 frontend/plugins/monitor/src/store/k8s/pvc.store.ts create mode 100644 frontend/plugins/monitor/src/store/k8s/statefulset.store.ts create mode 100644 frontend/plugins/monitor/src/store/static.ts create mode 100644 frontend/plugins/monitor/src/styles/globals.css create mode 100644 frontend/plugins/monitor/src/utils/condtion-color.ts create mode 100644 frontend/plugins/monitor/src/utils/kube-object-info.ts create mode 100644 frontend/plugins/monitor/src/utils/pie-chart.ts create mode 100644 frontend/plugins/monitor/src/utils/request-controller.ts create mode 100644 frontend/plugins/monitor/src/utils/request.ts create mode 100644 frontend/plugins/monitor/src/utils/status-color.ts create mode 100644 frontend/plugins/monitor/src/utils/user.ts create mode 100644 frontend/plugins/monitor/tailwind.config.js create mode 100644 frontend/plugins/monitor/tsconfig.json create mode 100644 service/license/.dockerignore create mode 100644 service/license/.env.template create mode 100644 service/license/.eslintrc.json create mode 100644 service/license/.gitignore create mode 100644 service/license/.prettierignore create mode 100644 service/license/.prettierrc.js create mode 100644 service/license/Dockerfile create mode 100644 service/license/README.md create mode 100644 service/license/deploy/Kubefile create mode 100644 service/license/deploy/README.md create mode 100644 service/license/deploy/manifests/deploy.yaml.tmpl create mode 100644 service/license/deploy/manifests/ingress.yaml.tmpl create mode 100644 service/license/deploy/manifests/rbac.yaml create mode 100644 service/license/deploy/manifests/secret.yaml create mode 100644 service/license/deploy/scripts/init.sh create mode 100644 service/license/next-i18next.config.js create mode 100644 service/license/next.config.js create mode 100644 service/license/package.json create mode 100644 service/license/pnpm-lock.yaml create mode 100644 service/license/public/favicon.ico create mode 100644 service/license/public/images/avatar.svg create mode 100644 service/license/public/images/bg-bottom.svg create mode 100644 service/license/public/images/bg.svg create mode 100644 service/license/public/images/logo.svg create mode 100644 service/license/public/images/moon.svg create mode 100644 service/license/public/images/pay_wechat.svg create mode 100644 service/license/public/images/sealos-title.png create mode 100644 service/license/public/images/sealos.svg create mode 100644 service/license/public/locales/en/common.json create mode 100644 service/license/public/locales/zh/common.json create mode 100644 service/license/public/logo.svg create mode 100644 service/license/src/api/cluster.ts create mode 100644 service/license/src/api/license.ts create mode 100644 service/license/src/api/oos.ts create mode 100644 service/license/src/api/payment.ts create mode 100644 service/license/src/api/system.ts create mode 100644 service/license/src/api/user.ts create mode 100644 service/license/src/components/Account/index.tsx create mode 100644 service/license/src/components/CodeBlock/index.tsx create mode 100644 service/license/src/components/Icon/CancelIcon.tsx create mode 100644 service/license/src/components/Icon/CheckIcon.tsx create mode 100644 service/license/src/components/Icon/CheckListIcon.tsx create mode 100644 service/license/src/components/Icon/CloseIcon.tsx create mode 100644 service/license/src/components/Icon/ClusterIcon.tsx create mode 100644 service/license/src/components/Icon/CodeDoneIcon.tsx create mode 100644 service/license/src/components/Icon/CopyIcon.tsx create mode 100644 service/license/src/components/Icon/CopyLink.tsx create mode 100644 service/license/src/components/Icon/DeleteIcon.tsx create mode 100644 service/license/src/components/Icon/DownloadIcon.tsx create mode 100644 service/license/src/components/Icon/EmptyIcon.tsx create mode 100644 service/license/src/components/Icon/ExchangeIcon.tsx create mode 100644 service/license/src/components/Icon/GithubIcon.tsx create mode 100644 service/license/src/components/Icon/GoogleIcon.tsx create mode 100644 service/license/src/components/Icon/GroupAdd.tsx create mode 100644 service/license/src/components/Icon/HomePage.tsx create mode 100644 service/license/src/components/Icon/HtmlIcon.tsx create mode 100644 service/license/src/components/Icon/LicenseIcon.tsx create mode 100644 service/license/src/components/Icon/LockIcon.tsx create mode 100644 service/license/src/components/Icon/MdIcon.tsx create mode 100644 service/license/src/components/Icon/OfflineIcon.tsx create mode 100644 service/license/src/components/Icon/OnlineComputerIcon.tsx create mode 100644 service/license/src/components/Icon/PersonIcon.tsx create mode 100644 service/license/src/components/Icon/RightIcon.tsx create mode 100644 service/license/src/components/Icon/SafetyIcon.tsx create mode 100644 service/license/src/components/Icon/Share.tsx create mode 100644 service/license/src/components/Icon/SignOutIcon.tsx create mode 100644 service/license/src/components/Icon/StarIcon.tsx create mode 100644 service/license/src/components/Icon/StripeIcon.tsx create mode 100644 service/license/src/components/Icon/SuccessIcon.tsx create mode 100644 service/license/src/components/Icon/TokenIcon.tsx create mode 100644 service/license/src/components/Icon/VectorIcon.tsx create mode 100644 service/license/src/components/Icon/WarningIcon.tsx create mode 100644 service/license/src/components/Icon/WechatIcon.tsx create mode 100644 service/license/src/components/Icon/index.ts create mode 100644 service/license/src/components/LangSelect/index.tsx create mode 100644 service/license/src/components/Layout/index.tsx create mode 100644 service/license/src/components/Pagination/index.tsx create mode 100644 service/license/src/components/Signin/auth/useAuthList.tsx create mode 100644 service/license/src/components/Signin/auth/useCustomError.tsx create mode 100644 service/license/src/components/Signin/auth/useLanguage.tsx create mode 100644 service/license/src/components/Signin/auth/usePassword.tsx create mode 100644 service/license/src/components/Signin/auth/useProtocol.tsx create mode 100644 service/license/src/components/Signin/auth/useSms.tsx create mode 100644 service/license/src/components/Signin/background.tsx create mode 100644 service/license/src/components/Signin/index.tsx create mode 100644 service/license/src/components/WechatPayment/index.tsx create mode 100644 service/license/src/components/account/index.tsx create mode 100644 service/license/src/components/signin/auth/useAuthList.tsx create mode 100644 service/license/src/components/signin/auth/useCustomError.tsx create mode 100644 service/license/src/components/signin/auth/useLanguage.tsx create mode 100644 service/license/src/components/signin/auth/usePassword.tsx create mode 100644 service/license/src/components/signin/auth/useProtocol.tsx create mode 100644 service/license/src/components/signin/auth/useSms.tsx create mode 100644 service/license/src/components/signin/background.tsx create mode 100644 service/license/src/components/signin/index.tsx create mode 100644 service/license/src/constant/product.ts create mode 100644 service/license/src/hooks/useBonusBox.tsx create mode 100644 service/license/src/hooks/useConfirm.tsx create mode 100644 service/license/src/hooks/useCopyData.ts create mode 100644 service/license/src/hooks/useScreen.ts create mode 100644 service/license/src/pages/404.tsx create mode 100644 service/license/src/pages/_app.tsx create mode 100644 service/license/src/pages/_document.tsx create mode 100644 service/license/src/pages/api/auth/oauth/github/index.ts create mode 100644 service/license/src/pages/api/auth/oauth/google/index.ts create mode 100644 service/license/src/pages/api/auth/oauth/wechat/index.ts create mode 100644 service/license/src/pages/api/auth/password/exist.ts create mode 100644 service/license/src/pages/api/auth/password/index.ts create mode 100644 service/license/src/pages/api/auth/phone/sms.ts create mode 100644 service/license/src/pages/api/auth/phone/verify.ts create mode 100644 service/license/src/pages/api/cluster/clusterAndLicense.ts create mode 100644 service/license/src/pages/api/cluster/create.ts create mode 100644 service/license/src/pages/api/cluster/findById.ts create mode 100644 service/license/src/pages/api/cluster/getRecord.ts create mode 100644 service/license/src/pages/api/license/create.ts create mode 100644 service/license/src/pages/api/license/getRecord.ts create mode 100644 service/license/src/pages/api/oss/get.ts create mode 100644 service/license/src/pages/api/payment/checkWechat.ts create mode 100644 service/license/src/pages/api/payment/create.ts create mode 100644 service/license/src/pages/api/payment/result.ts create mode 100644 service/license/src/pages/api/platform/getEnv.ts create mode 100644 service/license/src/pages/api/price/bonus.ts create mode 100644 service/license/src/pages/callback.tsx create mode 100644 service/license/src/pages/cluster/components/Record.tsx create mode 100644 service/license/src/pages/cluster/components/Tutorial.tsx create mode 100644 service/license/src/pages/cluster/index.tsx create mode 100644 service/license/src/pages/license/components/CurrencySymbol.tsx create mode 100644 service/license/src/pages/license/components/OuterLink.tsx create mode 100644 service/license/src/pages/license/components/Recharge.tsx create mode 100644 service/license/src/pages/license/components/Record.tsx create mode 100644 service/license/src/pages/license/index.tsx create mode 100644 service/license/src/pages/pricing/components/Product.tsx create mode 100644 service/license/src/pages/pricing/components/ServicePackage.tsx create mode 100644 service/license/src/pages/pricing/index.tsx create mode 100644 service/license/src/pages/signin.tsx create mode 100644 service/license/src/services/backend/auth.ts create mode 100644 service/license/src/services/backend/db/cluster.ts create mode 100644 service/license/src/services/backend/db/license.ts create mode 100644 service/license/src/services/backend/db/mongodb.ts create mode 100644 service/license/src/services/backend/db/oss.ts create mode 100644 service/license/src/services/backend/db/payment.ts create mode 100644 service/license/src/services/backend/db/user.ts create mode 100644 service/license/src/services/backend/db/verifyCode.ts create mode 100644 service/license/src/services/backend/oauth.ts create mode 100644 service/license/src/services/backend/response.ts create mode 100644 service/license/src/services/enable.ts create mode 100644 service/license/src/services/pay.ts create mode 100644 service/license/src/services/request.ts create mode 100644 service/license/src/stores/payment.ts create mode 100644 service/license/src/stores/routeParams.ts create mode 100644 service/license/src/stores/session.ts create mode 100644 service/license/src/styles/chakraTheme.ts create mode 100644 service/license/src/styles/globals.css create mode 100644 service/license/src/styles/prism.css create mode 100644 service/license/src/types/api.ts create mode 100644 service/license/src/types/cluster.ts create mode 100644 service/license/src/types/index.ts create mode 100644 service/license/src/types/license.ts create mode 100644 service/license/src/types/login.ts create mode 100644 service/license/src/types/payment.ts create mode 100644 service/license/src/types/session.ts create mode 100644 service/license/src/types/system.ts create mode 100644 service/license/src/types/user.ts create mode 100644 service/license/src/utils/cookieUtils.ts create mode 100644 service/license/src/utils/crypto.ts create mode 100644 service/license/src/utils/downloadFIle.ts create mode 100644 service/license/src/utils/json2Yaml.ts create mode 100644 service/license/src/utils/tools.ts create mode 100644 service/license/tsconfig.json diff --git a/.github/workflows/cloud-release.yml b/.github/workflows/cloud-release.yml new file mode 100644 index 000000000000..f4f02676136a --- /dev/null +++ b/.github/workflows/cloud-release.yml @@ -0,0 +1,53 @@ +name: Release Cloud + +on: + release: + types: [ published ] + +env: + # Common versions + GO_VERSION: "1.20" + DEFAULT_OWNER: "labring" + TAG: ${{ github.event.release.tag_name }} + +jobs: + save-sealos: + uses: ./.github/workflows/import-save-sealos.yml + + release-controllers: + needs: + - save-sealos + uses: ./.github/workflows/controllers.yml + with: + push_image: true + push_image_tag: ${{ env.TAG }} + + release-frontends: + needs: + - save-sealos + uses: ./.github/workflows/controllers.yml + with: + push_image: true + push_image_tag: ${{ env.TAG }} + uses: ./.github/workflows/frontend.yml + + release-service: + needs: + - save-sealos + uses: ./.github/workflows/controllers.yml + with: + push_image: true + push_image_tag: ${{ env.TAG }} + uses: ./.github/workflows/services.yml + + release-cloud: + needs: + - save-sealos + - release-controllers + - release-frontends + - release-service + uses: ./.github/workflows/cloud.yml + with: + push_image: true + push_image_tag: ${{ env.TAG }} + build_from: ${{ env.TAG }} \ No newline at end of file diff --git a/.github/workflows/cloud.yml b/.github/workflows/cloud.yml index abef9bb5ebfe..84e4e7918838 100644 --- a/.github/workflows/cloud.yml +++ b/.github/workflows/cloud.yml @@ -1,8 +1,6 @@ name: Build Cloud Cluster image on: - release: - types: [ published ] workflow_run: workflows: [ "Build Controllers image", "Build Frontend Image" ] types: diff --git a/.github/workflows/deploy-docs-preview.yml b/.github/workflows/deploy-docs-preview.yml index e71462fcf905..c10cfd746daa 100644 --- a/.github/workflows/deploy-docs-preview.yml +++ b/.github/workflows/deploy-docs-preview.yml @@ -2,7 +2,7 @@ name: Preview Sealos Docs Site on: workflow_dispatch: - push: + pull_request_target: branches: ["main"] paths: - "docs/**" @@ -25,11 +25,18 @@ env: jobs: build: name: Build + # The environment this job references environment: name: Preview url: ${{ steps.vercel-action.outputs.preview-url }} + runs-on: ubuntu-latest + + # Job outputs + outputs: + url: ${{ steps.vercel-action.outputs.preview-url }} + steps: - name: Checkout uses: actions/checkout@v3 @@ -97,7 +104,7 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Write md run: | - echo "# 🤖 Generated by deploy action" > report.md + echo "# 📘 Preview documentation website" > report.md echo "[👀 Visit Preview](${{ needs.build.outputs.url }})" >> report.md cat report.md - name: Gh Rebot for Sealos diff --git a/.github/workflows/deploy-docs-site.yml b/.github/workflows/deploy-docs-site.yml index 4f49789ff34a..86007d079477 100644 --- a/.github/workflows/deploy-docs-site.yml +++ b/.github/workflows/deploy-docs-site.yml @@ -1,6 +1,7 @@ name: Deploy Sealos Docs Site on: + workflow_dispatch: push: branches: ["main"] paths: @@ -64,19 +65,14 @@ jobs: - name: Build with Docusaurus run: ${{ steps.detect-package-manager.outputs.runner }} run build working-directory: ${{ env.BUILD_PATH }} - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 + # Push our generated site to Vercel + - name: Deploy to Vercel + uses: amondnet/vercel-action@v25 + id: vercel-action with: - path: ${{ env.BUILD_PATH }}/build - - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - needs: build - runs-on: ubuntu-latest - name: Deploy - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 + vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required + vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} #Required + vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} #Required + github-comment: false + vercel-args: '--prod' + working-directory: ${{ env.BUILD_PATH }}/build diff --git a/.github/workflows/docs-site-image.yml b/.github/workflows/docs-site-image.yml index 1fbf0e695289..c1db702aa252 100644 --- a/.github/workflows/docs-site-image.yml +++ b/.github/workflows/docs-site-image.yml @@ -8,7 +8,7 @@ on: - "docs/**" jobs: - deploy: + build-docs-image: runs-on: ubuntu-latest steps: - name: Checkout @@ -59,4 +59,17 @@ jobs: file: ./docs/website/Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} + + update-docs-image: + needs: build-docs-image + runs-on: ubuntu-latest + if: github.repository == 'labring/sealos' + steps: + - name: Checkout code + uses: actions/checkout@v3 + - uses: actions-hub/kubectl@master + env: + KUBE_CONFIG: ${{ secrets.SEALOS_TOP_KUBE_CONF }} + with: + args: rollout restart deployment sealos-site \ No newline at end of file diff --git a/CHANGELOG/CHANGELOG-4.3.7.md b/CHANGELOG/CHANGELOG-4.3.7.md new file mode 100644 index 000000000000..fdfae3fb3aa9 --- /dev/null +++ b/CHANGELOG/CHANGELOG-4.3.7.md @@ -0,0 +1,19 @@ +Welcome to the v4.3.7 release of Sealos!🎉🎉! + + + +## Changelog +### Other work +* 311213aa175c71120f6f91ce616c74e8ab05661d: :bug: fix env merge for sealos run (#4144) (@cuisongliu) +* 5cd471632c42fd1535dcfe542c9faa148a7b4ec3: feature(main): support crun youki gvisor kata (#4189) (#4191) (#4192) (@sealos-ci-robot) +* 4057aacb494206704dcf23441bd0ec9d4e653235: refactor(main): fixed golang lint version (#4141) (#4142) (#4143) (@sealos-ci-robot) +* 579a0163baae48f4547b394530e8bc31196da8ef: refactor(main): skip success exec (#4162) (#4170) (#4175) (@sealos-ci-robot) +* f39b23394b9d06774cf096de7d342201d4b264ca: refactor(main): unmount override container (#4161) (#4208) (@cuisongliu) + +**Full Changelog**: https://github.com/labring/sealos/compare/v4.3.7-rc1...v4.3.7 + +See [the CHANGELOG](https://github.com/labring/sealos/blob/main/CHANGELOG/CHANGELOG.md) for more details. + +Your patronage towards Sealos is greatly appreciated 🎉🎉. + +If you encounter any problems during its usage, please create an issue in the [GitHub repository](https://github.com/labring/sealos), we're committed to resolving your problem as soon as possible. diff --git a/CHANGELOG/CHANGELOG-5.0.0-beta1.md b/CHANGELOG/CHANGELOG-5.0.0-beta1.md new file mode 100644 index 000000000000..5192ddba2a92 --- /dev/null +++ b/CHANGELOG/CHANGELOG-5.0.0-beta1.md @@ -0,0 +1,42 @@ +Welcome to the v5.0.0-beta1 release of Sealos!🎉🎉! + + + +## Changelog +### New Features +* c35222490838e9aeb22118ff9f3fd2b0961fdffc: feat: Create a demo plugin Monitor (#4184) (@Wishrem) +* 3bc6c3cb49bfcbb5706fe1afea71eb149dc2399c: feat: imporve sealos cloud install script (#4181) (@lingdie) +* fb52ae20aa9e82295d43a526a612e69df222503e: feat:frontend license app (#4203) (@zjy365) +### Bug fixes +* a3d7b2bd66db557a2e6f8bd4e09457f64e86453b: fix(costcenter): fix unit & invoice amount (#4185) (@xudaotutou) +### Other work +* 52a396ab6a83eaa652c3e8a1c26320a7bb96bbee: Docs: Update the company's information (#4193) (@yangchuansheng) +* 58058204c00f8adbc00cf30932e02ece934375c4: Docs: add ci workflow for building Sealos Docs Site Docker image (#4177) (@yangchuansheng) +* b6be5be640ae406639ccf2e3423923eb03a05069: Docs: add workflow for previwing docs site (#4186) (@yangchuansheng) +* 8f246bf2dca837760dfc741b33b0a8998352be53: Docs: auto copy i18n files to website folder (#4176) (@yangchuansheng) +* f37b27cd5cb6b2f94b2130480dc77d64fc9c331d: Docs: update "What is Sealos?" (#4200) (@yangchuansheng) +* 384bd8dd36c0c1171b575dfd39d4c17db222efb0: Docs: update introduction (#4207) (@yangchuansheng) +* 74b95f1a8fe063ec4a659beccd68a51affa36c9e: Fix typo for "Preview Sealos Docs Site" workflow (#4190) (@yangchuansheng) +* 961d01a364918bf603b5e99fdabee6aa0391a630: Update README (#4197) (@yangchuansheng) +* 2015389e3f5eb2c28d2eea132c0abec5f7cbb442: Update README.md (#4180) (@fanux) +* b868c75d7d12cb89798c6bc5b37e8702f05689c6: Update/pricing (#4182) (@bxy4543) +* 97bd6727a20d678389558d93c55735184a97b9df: add cronjob app to cloud. (#4201) (@lingdie) +* 5cee7fdd982054d140b89fae875430625405fb01: add license app to cloud. (#4196) (@lingdie) +* bd118edbe4bde0fd2f72e4123078048cd87c1b9b: change _ to - (#4183) (@lingdie) +* 2d55ae311c009377f966ff78115a2537a2a4e3d1: docs: Automated Changelog Update for v4.3.7 (#4210) (@sealos-release-robot) +* c726742f53c98aa38296585e3890eeb5816f54d8: feat service license (#4195) (@zjy365) +* 69ee7b309df8caaff6fbde59b7b5ad0440051ce9: feature(main): skip sealos.run rule (#4198) (@cuisongliu) +* 8476d8190de75fe13a46c34b5f4ca403b1a59b6e: feature(main): support crun youki gvisor kata (#4189) (@cuisongliu) +* 5c71c5498d3576cf5c2a64dc3c1e72ce92a32031: fix license db uri (#4211) (@lingdie) +* 1c91ef0b6f676522b60c4441b0c8d1dfecf76884: fix run init job. (#4202) (@lingdie) +* 4fed20a298b95f89782d84ad9349f456efdd0646: refactor(main): unmount override container (#4161) (@cuisongliu) +* 5878953036c4516e833c7016c42caeff25fb3905: update price (#4212) (@bxy4543) +* 8e7207f80872a47f2ea921d63b9737eff80c1118: 🤖 add release changelog using rebot. (#4171) (@sealos-release-robot) + +**Full Changelog**: https://github.com/labring/sealos/compare/v5.0.0-alpha2...v5.0.0-beta1 + +See [the CHANGELOG](https://github.com/labring/sealos/blob/main/CHANGELOG/CHANGELOG.md) for more details. + +Your patronage towards Sealos is greatly appreciated 🎉🎉. + +If you encounter any problems during its usage, please create an issue in the [GitHub repository](https://github.com/labring/sealos), we're committed to resolving your problem as soon as possible. diff --git a/CHANGELOG/CHANGELOG.md b/CHANGELOG/CHANGELOG.md index 8bc3689c34ad..18eda342aae6 100644 --- a/CHANGELOG/CHANGELOG.md +++ b/CHANGELOG/CHANGELOG.md @@ -2,6 +2,7 @@ All notable changes to this project will be documented in this file. +- [CHANGELOG-5.0.0-beta1.md](./CHANGELOG-5.0.0-beta1.md) - [CHANGELOG-5.0.0-alpha2.md](./CHANGELOG-5.0.0-alpha2.md) - [CHANGELOG-5.0.0-alpha1.md](./CHANGELOG-5.0.0-alpha1.md) - [CHANGELOG-4.4.0-beta2.md](./CHANGELOG-4.4.0-beta2.md) @@ -9,6 +10,7 @@ All notable changes to this project will be documented in this file. - [CHANGELOG-4.4.0-alpha3.md](./CHANGELOG-4.4.0-alpha3.md) - [CHANGELOG-4.4.0-alpha1.md](./CHANGELOG-4.4.0-alpha1.md) - [CHANGELOG-4.3.7-rc1.md](./CHANGELOG-4.3.7-rc1.md) +- [CHANGELOG-4.3.7.md](./CHANGELOG-4.3.7.md) - [CHANGELOG-4.3.6.md](./CHANGELOG-4.3.6.md) - [CHANGELOG-4.3.5.md](./CHANGELOG-4.3.5.md) - [CHANGELOG-4.3.4.md](./CHANGELOG-4.3.4.md) diff --git a/README.md b/README.md index 0181e73816da..86c116090b24 100644 --- a/README.md +++ b/README.md @@ -62,14 +62,14 @@ Sealos['siːləs] is a cloud operating system distribution based on the Kubernet ## 💡 Core features -- 🚀 **Application Management**: Efficient deployment of any distributed applications with public internet accessibility. +- 🚀 **Application Management**: Easy management and quick release of publicly accessible distributed applications in the app store. - 🗄️ **Database Management**: Create high-availability databases in seconds, offering support for MySQL, PostgreSQL, MongoDB, and Redis. -- 📬 **Support for Message Queues**: Catering to a variety of message queues such as Kafka, RocketMQ, and RabbitMQ. +- 🌥️ **Cloud Universality**: Equally effective in both public and private cloud, enabling a seamless transition of traditional applications to the cloud. ## 🌟 Advantages -- 💰 **Resource Efficiency & Cost Reduction**: Pay exclusively for the containers. The automatic scaling feature fundamentally tackles resource wastage, thus offering substantial cost benefits. -- 🌐 **High Universality & Ease of Use**: Users can concentrate solely on their operations without the distraction of external complexities. Regardless of one's knowledge level of Kubernetes, Sealos remains user-friendly. +- 💰 **Efficient & Economical**: Pay solely for the containers you utilize; automatic scaling prevents resource squandering and substantially reduces costs. +- 🌐 **High Universality & Ease of Use**: Concentrate on your core business activities without worrying about system complexities; negligible learning costs involved. - 🛡️ **Agility & Security**: The distinctive multi-tenancy sharing model ensures both effective resource segmentation and collaboration, all under a secure framework. diff --git a/README_zh.md b/README_zh.md index 5e86fe86c2d3..f0d13c01968a 100644 --- a/README_zh.md +++ b/README_zh.md @@ -17,7 +17,7 @@ [![](https://img.shields.io/docker/pulls/labring/kubernetes)](https://hub.docker.com/r/labring/kubernetes) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Flabring%2Fsealos.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Flabring%2Fsealos?ref=badge_shield) [![codecov](https://codecov.io/gh/labring/sealos/branch/main/graph/badge.svg?token=e41ZDcj06N)](https://codecov.io/gh/labring/sealos) -[![Website](https://img.shields.io/website?url=https%3A%2F%2Fpostwoman.io&logo=Postwoman)](https://sealos.io) +[![Website](https://img.shields.io/website?url=https%3A%2F%2Fpostwoman.io&logo=Postwoman)](https://sealos.run) [![OSCS Status](https://www.oscs1024.com/platform/badge/labring/sealos.svg?size=small)](https://www.oscs1024.com/project/labring/sealos?ref=badge_small)
@@ -29,7 +29,7 @@ https://github.com/labring/sealos/assets/82700206/b1f8a25a-55cf-4d15-a47b-38cf7d507134

- 文档 | + 文档 | English | 发展规划

@@ -41,16 +41,16 @@ Sealos 是一款以 Kubernetes 为内核的**云操作系统发行版**。它以 [在线使用](https://cloud.sealos.io) -* [在 Sealos 上 30 秒内轻松部署 Nginx](https://sealos.io/docs/quick-start/app-deployments/use-app-launchpad) -* [在 Sealos 上 30 秒启动 mysql/pgsql/mongo 高可用数据库](https://sealos.io/docs/quick-start/app-deployments/install-db-with-database) -* [在 Sealos 上 运行 WordPress](https://sealos.io/docs/examples/blog-platform/install-wordpress) -* [在 Sealos 上 运行 Uptime Kuma 拨测系统](https://sealos.io/docs/examples/dial-testing-system/install-uptime-kuma) -* [在 Sealos 上 运行低代码平台](https://sealos.io/docs/category/low-code-platform) -* [在 Sealos 上 运行搭建聊天应用](https://sealos.io/docs/examples/social-communication/install-tailchat) +* [在 Sealos 上 30 秒内轻松部署 Nginx](https://sealos.run/zh-Hans/docs/quick-start/app-deployments/use-app-launchpad) +* [在 Sealos 上 30 秒启动 mysql/pgsql/mongo 高可用数据库](https://sealos.run/zh-Hans/docs/quick-start/app-deployments/install-db-with-database) +* [在 Sealos 上 运行 WordPress](https://sealos.run/zh-Hans/docs/examples/blog-platform/install-wordpress) +* [在 Sealos 上 运行 Uptime Kuma 拨测系统](https://sealos.run/zh-Hans/docs/examples/dial-testing-system/install-uptime-kuma) +* [在 Sealos 上 运行低代码平台](https://sealos.run/zh-Hans/docs/category/low-code-platform) +* [在 Sealos 上 运行搭建聊天应用](https://sealos.run/zh-Hans/docs/examples/social-communication/install-tailchat) ![](/docs/4.0/img/app-launchpad-zh.png) -🔍 您可以通过以下的屏幕截图进一步了解 Sealos,关于 Sealos 更为详细的介绍与说明,请参阅 [什么是 Sealos](https://sealos.io/docs/Intro)。 +🔍 您可以通过以下的屏幕截图进一步了解 Sealos,关于 Sealos 更为详细的介绍与说明,请参阅 [什么是 Sealos](https://sealos.run/zh-Hans/docs/Intro)。
@@ -64,20 +64,20 @@ Sealos 是一款以 Kubernetes 为内核的**云操作系统发行版**。它以 ## 💡 核心功能 -- **应用管理**:快速部署具有公网访问能力的任意分布式应用。 -- **数据库管理**:秒级创建高可用数据库,支持 MySQL、PostgreSQL、MongoDB 和 Redis。 -- **消息队列支持**:支持多种消息队列,包含 Kafka、RocketMQ 和 RabbitMQ 等。 +- 🚀 **应用管理**:在应用商店中轻松管理并快速发布可公网访问的分布式应用。 +- 🗄️ **数据库管理**:秒级创建高可用数据库,支持 MySQL、PostgreSQL、MongoDB 和 Redis。 +- 🌥️ **公私一致**:即是公有云也是私有云,支持传统应用无缝迁移到云环境。 ## 🌟 优势 -- **节省资源,降低开销**:只需为容器付费,自动伸缩功能从根本上解决了资源浪费的问题,可以节省大量的成本。 -- **通用性强,无心智负担**:用户只需专注于自己的业务,无需被其他无关的复杂性所困扰。无论用户对 Kubernetes 的掌握程度如何,都可以轻松使用 Sealos。 -- **灵活 & 安全**:其独特的多租户共享机制,能在保障安全的前提下实现资源的有效隔离和协作。 +- 💰 **高效 & 经济**:仅需为容器付费,自动伸缩杜绝资源浪费,大幅度节省成本。 +- 🌐 **通用性强,无心智负担**:专注于业务本身,无需担心复杂性,几乎没有学习成本。 +- 🛡️ **灵活 & 安全**:多租户共享机制在确保安全的同时,实现资源隔离与高效协作。 ## 🏘️ 社区与支持 -- 🌐 访问 [Sealos官网](https://sealos.io/) 获取完整的文档和实用链接。 +- 🌐 访问 [Sealos官网](https://sealos.run/) 获取完整的文档和实用链接。 - 📱 扫码加入社区微信交流群👇 diff --git a/controllers/pkg/resources/named.go b/controllers/pkg/resources/named.go index 6b652dac14dc..ec86903911dd 100644 --- a/controllers/pkg/resources/named.go +++ b/controllers/pkg/resources/named.go @@ -3,6 +3,8 @@ package resources import ( "strings" + corev1 "k8s.io/api/core/v1" + sealos_networkmanager "github.com/dinoallo/sealos-networkmanager-protoapi" "sigs.k8s.io/controller-runtime/pkg/client" @@ -30,6 +32,7 @@ const ( TerminalIDLabelKey = "TerminalID" AppLabelKey = "app" JobNameLabelKey = "job-name" + ACMEChallengeKey = "acme.cert-manager.io/http01-solver" KubeBlocksBackUpName = "kubeblocks-backup-data" ) @@ -59,6 +62,9 @@ func NewResourceNamed(cr client.Object) *ResourceNamed { case cr.GetName() == KubeBlocksBackUpName: p._type = JOB p._name = KubeBlocksBackUpName + case labels[ACMEChallengeKey] != "": + p._type = APP + p._name = getACMEResolverName(cr) default: p._type = OTHER p._name = "" @@ -66,6 +72,29 @@ func NewResourceNamed(cr client.Object) *ResourceNamed { return p } +const ( + acmesolver = "acmesolver" + acmesolverContainerArgsDomainPrefix = "--domain=" +) + +func getACMEResolverName(obj client.Object) string { + pod, ok := obj.(*corev1.Pod) + if !ok { + return "" + } + for _, container := range pod.Spec.Containers { + if container.Name != acmesolver { + continue + } + for _, arg := range container.Args { + if strings.HasPrefix(arg, acmesolverContainerArgsDomainPrefix) { + return acmesolver + "-" + strings.TrimPrefix(arg, acmesolverContainerArgsDomainPrefix) + } + } + } + return pod.Name +} + func (p *ResourceNamed) Type() uint8 { return AppType[p._type] } diff --git a/controllers/pkg/resources/resources.go b/controllers/pkg/resources/resources.go index 228a5990fb9e..23040e32757d 100644 --- a/controllers/pkg/resources/resources.go +++ b/controllers/pkg/resources/resources.go @@ -233,7 +233,7 @@ var DefaultPropertyTypeList = []PropertyType{ Enum: 0, PriceType: AVG, // raw price: 67 - UnitPrice: 2.185002854, + UnitPrice: 2.237442922, UnitString: "1m", }, { diff --git a/deploy/cloud/init.sh b/deploy/cloud/init.sh index d2cfdf5bc078..05a20d00879c 100644 --- a/deploy/cloud/init.sh +++ b/deploy/cloud/init.sh @@ -37,6 +37,8 @@ retryPullImage ghcr.io/labring/sealos-cloud-applaunchpad-frontend:latest retryPullImage ghcr.io/labring/sealos-cloud-dbprovider-frontend:latest retryPullImage ghcr.io/labring/sealos-cloud-costcenter-frontend:latest retryPullImage ghcr.io/labring/sealos-cloud-template-frontend:latest +retryPullImage ghcr.io/labring/sealos-cloud-license-frontend:latest +retryPullImage ghcr.io/labring/sealos-cloud-cronjob-frontend:latest retryPullImage ghcr.io/labring/sealos-cloud-database-service:latest retryPullImage ghcr.io/labring/sealos-cloud-job-init-controller:latest @@ -54,6 +56,8 @@ sealos save -o tars/frontend-dbprovider.tar ghcr.io/labring/sealos-cloud-dbprovi sealos save -o tars/frontend-costcenter.tar ghcr.io/labring/sealos-cloud-costcenter-frontend:latest sealos save -o tars/frontend-applaunchpad.tar ghcr.io/labring/sealos-cloud-applaunchpad-frontend:latest sealos save -o tars/frontend-template.tar ghcr.io/labring/sealos-cloud-template-frontend:latest +sealos save -o tars/frontend-license.tar ghcr.io/labring/sealos-cloud-license-frontend:latest +sealos save -o tars/frontend-cronjob.tar ghcr.io/labring/sealos-cloud-cronjob-frontend:latest sealos save -o tars/database-service.tar ghcr.io/labring/sealos-cloud-database-service:latest sealos save -o tars/job-init.tar ghcr.io/labring/sealos-cloud-job-init-controller:latest diff --git a/deploy/cloud/manifests/admin-user.yaml b/deploy/cloud/manifests/admin-user.yaml deleted file mode 100644 index ec13b046d363..000000000000 --- a/deploy/cloud/manifests/admin-user.yaml +++ /dev/null @@ -1,10 +0,0 @@ -# TODO delete this after job-init finished. -apiVersion: user.sealos.io/v1 -kind: User -metadata: - name: admin - labels: - uid: "e03cf80b-3d7b-4b69-8b3c-c2e42f11ee4f" - updateTime: "20230101T000000Z" -spec: - csrExpirationSeconds: 7200 \ No newline at end of file diff --git a/deploy/cloud/manifests/mongodb.yaml.tmpl b/deploy/cloud/manifests/mongodb.yaml.tmpl index 04e6cbdba620..5d2a308622c5 100644 --- a/deploy/cloud/manifests/mongodb.yaml.tmpl +++ b/deploy/cloud/manifests/mongodb.yaml.tmpl @@ -32,7 +32,7 @@ spec: - ReadWriteOnce resources: requests: - storage: 30Gi + storage: 10Gi terminationPolicy: Delete --- apiVersion: v1 diff --git a/deploy/cloud/scripts/init.sh b/deploy/cloud/scripts/init.sh index ccb838827a8c..b212d92b6473 100644 --- a/deploy/cloud/scripts/init.sh +++ b/deploy/cloud/scripts/init.sh @@ -116,37 +116,54 @@ function sealos_run_controller { --env MONGO_URI="$mongodbUri" } + +function sealos_authorize { + sealos run tars/job-init.tar + + # wait for admin user create + echo "Waiting for admin user create" + + while [ -z "$(kubectl get ns ns-admin 2>/dev/null)" ]; do + sleep 1 + done + + kubectl apply -f manifests/free-license.yaml +} + function sealos_run_frontend { echo "run desktop frontend" sealos run tars/frontend-desktop.tar \ --env cloudDomain=$cloudDomain \ - --env cloudPort=$cloudPort \ + --env cloudPort="$cloudPort" \ --env certSecretName="wildcard-cert" \ --env passwordEnabled="true" \ --config-file etc/sealos/desktop-config.yaml + # sealos authorize !!must run after sealos_run_controller frontend-desktop.tar and before sealos_run_frontend + sealos_authorize + echo "run applaunchpad frontend" sealos run tars/frontend-applaunchpad.tar \ --env cloudDomain=$cloudDomain \ - --env cloudPort=$cloudPort \ + --env cloudPort="$cloudPort" \ --env certSecretName="wildcard-cert" echo "run terminal frontend" sealos run tars/frontend-terminal.tar \ --env cloudDomain=$cloudDomain \ - --env cloudPort=$cloudPort \ + --env cloudPort="$cloudPort" \ --env certSecretName="wildcard-cert" echo "run dbprovider frontend" sealos run tars/frontend-dbprovider.tar \ --env cloudDomain=$cloudDomain \ - --env cloudPort=$cloudPort \ + --env cloudPort="$cloudPort" \ --env certSecretName="wildcard-cert" echo "run cost center frontend" sealos run tars/frontend-costcenter.tar \ --env cloudDomain=$cloudDomain \ - --env cloudPort=$cloudPort \ + --env cloudPort="$cloudPort" \ --env certSecretName="wildcard-cert" \ --env transferEnabled="true" \ --env rechargeEnabled="false" @@ -154,29 +171,30 @@ function sealos_run_frontend { echo "run template frontend" sealos run tars/frontend-template.tar \ --env cloudDomain=$cloudDomain \ - --env cloudPort=$cloudPort \ + --env cloudPort="$cloudPort" \ --env certSecretName="wildcard-cert" + echo "run license frontend" + sealos run tars/frontend-license.tar \ + --env cloudDomain=$cloudDomain \ + --env cloudPort="$cloudPort" \ + --env certSecretName="wildcard-cert" \ + --env MONGODB_URI="${mongodbUri}/sealos-license?authSource=admin" \ + --env licensePurchaseDomain="license.sealos.io" + + echo "run cronjob frontend" + sealos run tars/frontend-cronjob.tar \ + --env cloudDomain=$cloudDomain \ + --env cloudPort="$cloudPort" \ + --env certSecretName="wildcard-cert" + + echo "run db monitoring" sealos run tars/database-service.tar } function resource_exists { - kubectl get $1 >/dev/null 2>&1 -} - - -function sealos_authorize { - sealos run tars/job-init.tar - - # wait for admin user create - echo "Waiting for admin user create" - - while [ -z "$(kubectl get ns ns-admin 2>/dev/null)" ]; do - sleep 1 - done - - kubectl apply -f manifests/free-license.yaml + kubectl get "$1" >/dev/null 2>&1 } @@ -186,12 +204,9 @@ function install { # sealos run controllers sealos_run_controller - + # sealos run frontends sealos_run_frontend - - # sealos authorize - sealos_authorize } install diff --git a/docs/4.0/code.json b/docs/4.0/code.json index 5b64909b7b3a..942ced854783 100644 --- a/docs/4.0/code.json +++ b/docs/4.0/code.json @@ -577,41 +577,41 @@ "Application Management": { "message": "应用管理" }, - "Rapidly deploy any distributed application with the ability to access the public network.": { - "message": "快速部署具有公网访问能力的分布式应用,极大地简化了部署流程。" + "Easy management and quick release of publicly accessible distributed applications in the app store.": { + "message": "在应用商店中轻松管理并快速发布可公网访问的分布式应用。" }, "Database": { "message": "数据库管理" }, - "Create highly available databases in seconds that support MySQL, PostgreSQL, MongoDB, and Redis.": { - "message": "秒级创建高可用数据库,支持 MySQL、PostgreSQL、MongoDB 和 Redis" + "Create high-availability databases in seconds, offering support for MySQL, PostgreSQL, MongoDB, and Redis.": { + "message": "秒级创建高可用数据库,支持 MySQL、PostgreSQL、MongoDB 和 Redis。" }, - "Serverless": { - "message": "函数计算" + "Cloud Universality": { + "message": "公私一致" }, - "Serverless computing makes writing code as easy as blogging, allowing you to launch and deploy your business code anytime, anywhere.": { - "message": "函数计算能力让你写代码像写博客一样简单,随时随地发布上线您的业务代码" + "Equally effective in both public and private cloud, enabling a seamless transition of traditional applications to the cloud.": { + "message": "即是公有云也是私有云,支持传统应用无缝迁移到云环境。" }, "Why Sealos": { "message": "为什么选择 Sealos" }, - "Lower Costs": { - "message": "节省资源,降低开销" + "Efficient & Economical": { + "message": "高效 & 经济" }, "User Friendly": { "message": "通用性强,无心智负担" }, - "Flexibility and Security": { - "message": "灵活性与安全性并重" + "Agility & Security": { + "message": "灵活 & 安全" }, - "Save resources and reduce expenses by paying only for containers, with automatic scaling to prevent waste.": { - "message": "只需为容器付费,自动伸缩功能从根本上解决了资源浪费的问题,可以节省大量的成本。" + "Pay solely for the containers you utilize; automatic scaling prevents resource squandering and substantially reduces costs.": { + "message": "仅需为容器付费,自动伸缩杜绝资源浪费,大幅度节省成本。" }, - "Focus on your business without being bogged down by unnecessary complexity, regardless of your level of Kubernetes expertise.": { - "message": "用户只需专注于自己的业务,无需被其他无关的复杂性所困扰。无论用户对 Kubernetes 的掌握程度如何,都可以轻松使用 Sealos。" + "Concentrate on your core business activities without worrying about system complexities; negligible learning costs involved.": { + "message": "专注于业务本身,无需担心复杂性,几乎没有学习成本。" }, - "Its unique multi-tenant sharing mechanism can achieve effective resource isolation and collaboration while ensuring safety.": { - "message": "其独特的多租户共享机制,能在保障安全的前提下实现资源的有效隔离和协作。用户不必担心数据泄露和安全问题,能够轻松在安全环境下管理企业数据。" + "The distinctive multi-tenancy sharing model ensures both effective resource segmentation and collaboration, all under a secure framework.": { + "message": "多租户共享机制在确保安全的同时,实现资源隔离与高效协作。" }, "Join Sealos Community, Experience the latest version of Sealos for the first time and communicate with developers and users in Discord!": { "message": "加入 Sealos 社区,在这里您可以在第一时间体验 Sealos 的最新版本,以及在 Discord 或微信群与开发者和用户保持沟通" @@ -630,5 +630,14 @@ }, "Cloud Operating System": { "message": "云操作系统: Sealos" + }, + "Pricing": { + "message": "价格" + }, + "A cloud operating system based on the Kubernetes kernel": { + "message": "以 Kubernetes 为内核的云操作系统" + }, + "Explore": { + "message": "了解更多" } } \ No newline at end of file diff --git a/docs/4.0/docs/Intro.md b/docs/4.0/docs/Intro.md index 37900032b956..3713b3f2d209 100644 --- a/docs/4.0/docs/Intro.md +++ b/docs/4.0/docs/Intro.md @@ -28,19 +28,19 @@ If your business requires operation within a public cloud environment, you can d #### Capabilities of Sealos -- **Application Management**: Rapid deployment of any distributed application with public network access capabilities. -- **Database Management**: Instant creation of highly available databases, supporting MySQL, PostgreSQL, MongoDB, and Redis. -- **Easy Public Network Access**: Businesses are automatically allocated secondary domain names, making public network access easy, and custom domain binding is also supported. +- 🚀 **Application Management**: Easy management and quick release of publicly accessible distributed applications in the app store. +- 🗄️ **Database Management**: Create high-availability databases in seconds, offering support for MySQL, PostgreSQL, MongoDB, and Redis. +- 🌥️ **Cloud Universality**: Equally effective in both public and private cloud, enabling a seamless transition of traditional applications to the cloud. #### Advantages of Sealos -- **Resource Saving, Cost Reduction**: You only pay for containers. The automatic scaling fundamentally solves the problem of resource wastage, saving substantial costs. -- **High Universality, No Cognitive Load**: Users can focus exclusively on their business, without being troubled by irrelevant complexities. Regardless of the user's proficiency with Kubernetes, Sealos can be used with ease. -- **Balance of Flexibility and Security**: Its unique multi-tenant sharing mechanism can achieve effective isolation and collaboration of resources while ensuring security. +- 💰 **Efficient & Economical**: Pay solely for the containers you utilize; automatic scaling prevents resource squandering and substantially reduces costs. +- 🌐 **High Universality & Ease of Use**: Concentrate on your core business activities without worrying about system complexities; negligible learning costs involved. +- 🛡️ **Agility & Security**: The distinctive multi-tenancy sharing model ensures both effective resource segmentation and collaboration, all under a secure framework. ### Private Cloud -The Sealos cloud operating system is **100% open source and free**. You can find all source code on [GitHub](https://github.com/labring/sealos), which means all features of the **Sealos Public Cloud** can also be deployed in a private cloud environment to meet more diversified business needs. +The Sealos cloud operating system is **100% open source**. You can find all source code on [GitHub](https://github.com/labring/sealos), which means all features of the **Sealos Public Cloud** can also be deployed in a private cloud environment to meet more diversified business needs. ### Strong Application Delivery Capability diff --git a/docs/4.0/i18n/zh-Hans/Intro.md b/docs/4.0/i18n/zh-Hans/Intro.md index 0fdaf97485dc..62cc03cebaef 100644 --- a/docs/4.0/i18n/zh-Hans/Intro.md +++ b/docs/4.0/i18n/zh-Hans/Intro.md @@ -28,19 +28,19 @@ Sealos 是一款强大的业务运行平台,它能完美支持 Java、Go、Pyt #### Sealos 的能力 -+ **应用管理**:快速部署具有公网访问能力的任意分布式应用。 -+ **数据库管理**:秒级创建高可用数据库,支持 MySQL、PostgreSQL、MongoDB 和 Redis。 -+ **轻松实现公网访问**:业务自动分配二级域名,轻松实现公网访问,同时还支持自定义域名绑定。 +- 🚀 **应用管理**:在应用商店中轻松管理并快速发布可公网访问的分布式应用。 +- 🗄️ **数据库管理**:秒级创建高可用数据库,支持 MySQL、PostgreSQL、MongoDB 和 Redis。 +- 🌥️ **公私一致**:即是公有云也是私有云,支持传统应用无缝迁移到云环境。 #### Sealos 的优势 -+ **节省资源,降低开销**:只需为容器付费,自动伸缩功能从根本上解决了资源浪费的问题,可以节省大量的成本。 -+ **通用性强,无心智负担**:用户只需专注于自己的业务,无需被其他无关的复杂性所困扰。无论用户对 Kubernetes 的掌握程度如何,都可以轻松使用 Sealos。 -+ **灵活性与安全性并重**:其独特的多租户共享机制,能在保障安全的前提下实现资源的有效隔离和协作。 +- 💰 **高效 & 经济**:仅需为容器付费,自动伸缩杜绝资源浪费,大幅度节省成本。 +- 🌐 **通用性强,无心智负担**:专注于业务本身,无需担心复杂性,几乎没有学习成本。 +- 🛡️ **灵活 & 安全**:多租户共享机制在确保安全的同时,实现资源隔离与高效协作。 ### 私有云 -Sealos 云操作系统 **100% 开源免费**,您可在 [GitHub](https://github.com/labring/sealos) 上找到所有源代码,因此 **Sealos 公有云**的全部功能也可以部署在私有云环境中,以满足您更多样化的业务需求。 +Sealos 云操作系统 **100% 开源**,您可在 [GitHub](https://github.com/labring/sealos) 上找到所有源代码,因此 **Sealos 公有云**的全部功能也可以部署在私有云环境中,以满足您更多样化的业务需求。 ### 强大的应用交付能力 diff --git a/docs/website/.prettierrc.js b/docs/website/.prettierrc.js new file mode 100644 index 000000000000..b48f2c3caefb --- /dev/null +++ b/docs/website/.prettierrc.js @@ -0,0 +1,20 @@ +module.exports = { + printWidth: 100, + tabWidth: 2, + useTabs: false, + semi: true, + singleQuote: true, + quoteProps: 'as-needed', + jsxSingleQuote: false, + trailingComma: 'none', + bracketSpacing: true, + jsxBracketSameLine: false, + arrowParens: 'always', + rangeStart: 0, + rangeEnd: Infinity, + requirePragma: false, + insertPragma: false, + proseWrap: 'preserve', + htmlWhitespaceSensitivity: 'css', + endOfLine: 'lf' +} diff --git a/docs/website/docusaurus.config.js b/docs/website/docusaurus.config.js index 6fee4e9e1d83..cfb7b1936822 100644 --- a/docs/website/docusaurus.config.js +++ b/docs/website/docusaurus.config.js @@ -9,7 +9,7 @@ const config = { baseUrl: "/", onBrokenLinks: "warn", onBrokenMarkdownLinks: "warn", - favicon: "img/sealos.ico", + favicon: "img/favicon.ico", // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. @@ -102,6 +102,11 @@ const config = { to: "https://cloud.sealos.io", label: "Start Now" }, + { + position: "left", + to: "/pricing", + label: "Pricing" + }, { position: "left", to: "https://fael3z0zfze.feishu.cn/share/base/form/shrcnesSfEK65JZaAf2W6Fwz6Ad", @@ -195,6 +200,17 @@ const config = { ], plugins: [ 'docusaurus-plugin-sass', + async function myPlugin (context, options) { + return { + name: "docusaurus-tailwindcss", + configurePostCss (postcssOptions) { + // Appends TailwindCSS and AutoPrefixer. + postcssOptions.plugins.push(require("tailwindcss")) + postcssOptions.plugins.push(require("autoprefixer")) + return postcssOptions + }, + } + }, ] } diff --git a/docs/website/i18n/zh-Hans/docusaurus-theme-classic/footer.json b/docs/website/i18n/zh-Hans/docusaurus-theme-classic/footer.json index d1f6bdba8b04..1e0899935422 100644 --- a/docs/website/i18n/zh-Hans/docusaurus-theme-classic/footer.json +++ b/docs/website/i18n/zh-Hans/docusaurus-theme-classic/footer.json @@ -24,7 +24,7 @@ "description": "The title of the footer links column with title=Labring in the footer" }, "link.item.label.Company": { - "message": "Company", + "message": "关于我们", "description": "The label of footer link with label=Company linking to /company" }, "link.item.label.Laf FaaS": { @@ -52,15 +52,15 @@ "description": "The label of footer link with label=Blog linking to /blog" }, "link.title.Product": { - "message": "Product", + "message": "产品", "description": "The title of the footer links column with title=Product in the footer" }, "link.title.Developer": { - "message": "Developer", + "message": "开发者", "description": "The title of the footer links column with title=Developer in the footer" }, "link.title.Support": { - "message": "Support", + "message": "支持", "description": "The title of the footer links column with title=Support in the footer" }, "link.item.label.Laf": { @@ -76,23 +76,23 @@ "description": "The label of footer link with label=FastGPT linking to https://github.com/labring/FastGPT" }, "link.item.label.Contribute": { - "message": "Contribute", + "message": "参与贡献", "description": "The label of footer link with label=Contribute linking to https://github.com/labring/sealos/blob/main/CONTRIBUTING.md" }, "link.item.label.Documentation": { - "message": "Documentation", + "message": "文档中心", "description": "The label of footer link with label=Documentation linking to /docs/Intro" }, "link.item.label.Forum": { - "message": "Forum", + "message": "中文论坛", "description": "The label of footer link with label=Forum linking to https://forum.laf.run/" }, "link.item.label.Feedback": { - "message": "Feedback", + "message": "问题反馈", "description": "The label of footer link with label=Feedback linking to https://github.com/labring/sealos/issues" }, "link.item.label.Contact US": { - "message": "Contact US", + "message": "咨询合作", "description": "The label of footer link with label=Contact US linking to https://fael3z0zfze.feishu.cn/share/base/form/shrcnesSfEK65JZaAf2W6Fwz6Ad" } -} +} \ No newline at end of file diff --git a/docs/website/i18n/zh-Hans/docusaurus-theme-classic/navbar.json b/docs/website/i18n/zh-Hans/docusaurus-theme-classic/navbar.json index fd6cb70f27de..a7bb7fd772fa 100644 --- a/docs/website/i18n/zh-Hans/docusaurus-theme-classic/navbar.json +++ b/docs/website/i18n/zh-Hans/docusaurus-theme-classic/navbar.json @@ -7,6 +7,10 @@ "message": "商务合作", "description": "Navbar item with label Contact" }, + "item.label.Pricing": { + "message": "价格", + "description": "Navbar item with label Contact" + }, "logo.alt": { "message": "sealos", "description": "The alt text of navbar logo" @@ -15,4 +19,4 @@ "message": "在线使用", "description": "Navbar item with label Start Now" } -} +} \ No newline at end of file diff --git a/docs/website/package.json b/docs/website/package.json index 4ca3974b1cd2..0d9caa7a1b20 100644 --- a/docs/website/package.json +++ b/docs/website/package.json @@ -28,6 +28,10 @@ "react-dom": "^17.0.2", "react-helmet": "^6.1.0", "sass": "^1.62.1", + "@headlessui/react": "^1.7.17", + "autoprefixer": "^10.4.16", + "tailwindcss": "^3.3.3", + "postcss": "^8.4.31", "wowjs": "^1.1.3" }, "devDependencies": { @@ -48,4 +52,4 @@ "last 1 safari version" ] } -} +} \ No newline at end of file diff --git a/docs/website/src/constants/platform.ts b/docs/website/src/constants/platform.ts index dfc886c793e9..e7fdc9c3c48f 100644 --- a/docs/website/src/constants/platform.ts +++ b/docs/website/src/constants/platform.ts @@ -1 +1 @@ -export const PC_MIN_WIDTH = 996 +export const PC_MIN_WIDTH = 1000; diff --git a/docs/website/src/css/custom.scss b/docs/website/src/css/custom.scss index f020ad9af1c2..3be0b9662e72 100644 --- a/docs/website/src/css/custom.scss +++ b/docs/website/src/css/custom.scss @@ -30,9 +30,9 @@ border-radius: 10px; } -::-webkit-scrollbar-thumb:hover { - // background-color: rgba(64, 158, 255, 0.8); -} +// ::-webkit-scrollbar-thumb:hover { +// background-color: rgba(64, 158, 255, 0.8); +// } :root { --ifm-color-primary: #4caaf4; @@ -109,7 +109,7 @@ div.kernel-arch h3::before { transform: translateX(-10px); } -@media screen and (max-width: 996px) { +@media screen and (max-width: 1000px) { html { font-size: 14px; } diff --git a/docs/website/src/hooks/useWindow.ts b/docs/website/src/hooks/useWindow.ts index 250dc148c6f7..a96a7c5d05b9 100644 --- a/docs/website/src/hooks/useWindow.ts +++ b/docs/website/src/hooks/useWindow.ts @@ -1,24 +1,37 @@ -import { useEffect, useState } from "react"; +import { useEffect, useState } from 'react'; import useIsBrowser from '@docusaurus/useIsBrowser'; -export default function() { - const isBrowser = useIsBrowser(); - const [screenWidth, setScreenWidth] = useState(isBrowser ? document.body.clientWidth : 1440) +export default function () { + const isBrowser = useIsBrowser(); + const [screenWidth, setScreenWidth] = useState(isBrowser ? document.body.clientWidth : 1440); + const [currentLanguage, setCurrentLanguage] = useState( + isBrowser ? document.documentElement.lang : 'en' + ); + const [cloudUrl, setCloudUrl] = useState('https://cloud.sealos.io'); - useEffect(() => { - if(!isBrowser) return - setScreenWidth(document.body.clientWidth) - const updateScreenWidth = () => { - requestAnimationFrame(() => setScreenWidth(document?.body.clientWidth)) - } - window.addEventListener('resize', updateScreenWidth) + useEffect(() => { + if (!isBrowser) return; + setScreenWidth(document.body.clientWidth); + const updateScreenWidth = () => { + requestAnimationFrame(() => setScreenWidth(document?.body.clientWidth)); + }; + window.addEventListener('resize', updateScreenWidth); + // handle + setCurrentLanguage(document.documentElement.lang); + setCloudUrl( + document.documentElement.lang === 'en' + ? 'https://cloud.sealos.io' + : 'https://cloud.sealos.top' + ); - return () => { - window.removeEventListener('resize', updateScreenWidth) - } - },[isBrowser]) + return () => { + window.removeEventListener('resize', updateScreenWidth); + }; + }, [isBrowser]); - return { - screenWidth - } -} \ No newline at end of file + return { + screenWidth, + currentLanguage, + cloudUrl + }; +} diff --git a/docs/website/src/pages/components/Banner/index.scss b/docs/website/src/pages/components/Banner/index.scss index b6b2a13adc05..612a82eae96d 100644 --- a/docs/website/src/pages/components/Banner/index.scss +++ b/docs/website/src/pages/components/Banner/index.scss @@ -21,6 +21,7 @@ line-height: 140%; letter-spacing: 0.16px; z-index: 99; + flex-shrink: 0; } .sealos-banner-btn { @@ -70,8 +71,8 @@ line-height: 140%; margin-left: 8px; } - - .sealos-banner-btn-close{ + + .sealos-banner-btn-close { cursor: pointer; fill: #fff; width: 32px; diff --git a/docs/website/src/pages/components/Banner/index.tsx b/docs/website/src/pages/components/Banner/index.tsx index 713b7b8f417b..85656a6f64dd 100644 --- a/docs/website/src/pages/components/Banner/index.tsx +++ b/docs/website/src/pages/components/Banner/index.tsx @@ -3,11 +3,12 @@ import DrawIcon from '@site/static/icons/draw.svg'; import LogoIcon from '@site/static/icons/sealos.svg'; import React, { useEffect, useState } from 'react'; import './index.scss'; +import useWindow from '@site/src/hooks/useWindow'; export default function Banner() { const [isBannerVisible, setIsBannerVisible] = useState(false); - const [doMain,setDoMain] = useState('') - + const { screenWidth, currentLanguage, cloudUrl } = useWindow(); + const closeBanner = () => { setIsBannerVisible(false); }; @@ -17,8 +18,6 @@ export default function Banner() { }; useEffect(() => { - let url = window?.location?.hostname || 'cloud.sealos.io' - setDoMain(url.indexOf('top') !== -1 ?'cloud.sealos.top':'cloud.sealos.io') // Get the last display timestamp from localStorage const lastDisplayTimestamp = localStorage.getItem('bannerLastDisplay'); const today = new Date().toLocaleDateString(); @@ -46,12 +45,16 @@ export default function Banner() {
Sealos - - + xmlns="http://www.w3.org/2000/svg" + width="32" + height="33" + viewBox="0 0 32 33" + > +
@@ -61,10 +64,7 @@ export default function Banner() {
{ - window.open( - `https://${doMain}/?openapp=system-costcenter?openRecharge=true`, - '_blank' - ); + window.open(`${cloudUrl}/?openapp=system-costcenter?openRecharge=true`, '_blank'); closeBanner(); }} > diff --git a/docs/website/src/pages/components/Capability/index.phone.scss b/docs/website/src/pages/components/Capability/index.phone.scss index 9dc16f197ad4..a0aa96d68627 100644 --- a/docs/website/src/pages/components/Capability/index.phone.scss +++ b/docs/website/src/pages/components/Capability/index.phone.scss @@ -1,4 +1,4 @@ -@media screen and (max-width: 996px) { +@media screen and (max-width: 1000px) { .capability { padding: 0 16px; .comet-icon { diff --git a/docs/website/src/pages/components/Capability/index.scss b/docs/website/src/pages/components/Capability/index.scss index 11430b4b58af..cc9ae8cde73a 100644 --- a/docs/website/src/pages/components/Capability/index.scss +++ b/docs/website/src/pages/components/Capability/index.scss @@ -92,7 +92,6 @@ margin-left: 50px; margin-top: 50px; text-align: left; - h4{ height: 112px; } diff --git a/docs/website/src/pages/components/Capability/index.tsx b/docs/website/src/pages/components/Capability/index.tsx index 22d9a8e1ec79..14c54f71c72b 100644 --- a/docs/website/src/pages/components/Capability/index.tsx +++ b/docs/website/src/pages/components/Capability/index.tsx @@ -1,39 +1,42 @@ -import React, { useLayoutEffect } from 'react' -import CometIcon from '../Comet' -import ApplaunchpadIcon from '@site/static/icons/applaunchpad.svg' -import ServerlessIcon from '@site/static/icons/serverless.svg' -import DataBaseIcon from '@site/static/icons/database.svg' -import useIsBrowser from '@docusaurus/useIsBrowser' -import './index.scss' -import Translate from '@docusaurus/Translate' +import Translate from '@docusaurus/Translate'; +import useIsBrowser from '@docusaurus/useIsBrowser'; +import useWindow from '@site/src/hooks/useWindow'; +import ApplaunchpadIcon from '@site/static/icons/applaunchpad.svg'; +import DataBaseIcon from '@site/static/icons/database.svg'; +import ServerlessIcon from '@site/static/icons/serverless.svg'; +import React, { useLayoutEffect } from 'react'; +import CometIcon from '../Comet'; +import './index.scss'; const i18nObj = { capability: The Capabilities of Sealos, appMan: Application Management, appManagement_introduce: ( - Rapidly deploy any distributed application with the ability to access the - public network. + Easy management and quick release of publicly accessible distributed applications in the app + store. ), database: Database, database_introduce: ( - Create highly available databases in seconds that support MySQL, - PostgreSQL, MongoDB, and Redis. + Create high-availability databases in seconds, offering support for MySQL, PostgreSQL, + MongoDB, and Redis. ), - serverless: Serverless, + serverless: Cloud Universality, serverless_introduce: ( - Serverless computing makes writing code as easy as blogging, allowing you - to launch and deploy your business code anytime, anywhere. + Equally effective in both public and private cloud, enabling a seamless transition of + traditional applications to the cloud. ), -} + Explore: Explore +}; const Capability = ({ isPc }: { isPc: boolean }) => { - const isBrowser = useIsBrowser() + const isBrowser = useIsBrowser(); + const { screenWidth, currentLanguage, cloudUrl } = useWindow(); useLayoutEffect(() => { // @ts-ignore nextline @@ -44,10 +47,10 @@ const Capability = ({ isPc }: { isPc: boolean }) => { animateClass: 'animate__fadeIn', offset: 0, mobile: false, - live: false, - }).init() + live: false + }).init(); } - }, [isBrowser]) + }, [isBrowser]); if (!isPc) { return ( @@ -63,19 +66,14 @@ const Capability = ({ isPc }: { isPc: boolean }) => {

{i18nObj.appMan}

{i18nObj.appManagement_introduce}

- - Explore {'>'} + + {i18nObj.Explore} {'>'}
app-management
@@ -86,18 +84,13 @@ const Capability = ({ isPc }: { isPc: boolean }) => {
{i18nObj.database}
{i18nObj.database_introduce}
- - Explore {'>'} + + {i18nObj.Explore} {'>'} app-management @@ -110,13 +103,13 @@ const Capability = ({ isPc }: { isPc: boolean }) => {
{i18nObj.serverless_introduce}
- Explore {'>'} + href={currentLanguage === 'en' ? '/pricing' : '/zh-Hans/pricing'} + > + {i18nObj.Explore} {'>'} - ) + ); } return ( @@ -132,19 +125,14 @@ const Capability = ({ isPc }: { isPc: boolean }) => {

{i18nObj.appMan}

{i18nObj.appManagement_introduce}

- - Explore {'>'} + + {i18nObj.Explore} {'>'} app-management @@ -155,18 +143,13 @@ const Capability = ({ isPc }: { isPc: boolean }) => {
{i18nObj.database}
{i18nObj.database_introduce}
- - Explore {'>'} + + {i18nObj.Explore} {'>'} app-management @@ -178,14 +161,14 @@ const Capability = ({ isPc }: { isPc: boolean }) => {
{i18nObj.serverless_introduce}
- Explore {'>'} + href={currentLanguage === 'en' ? '/pricing' : '/zh-Hans/pricing'} + > + {i18nObj.Explore} {'>'} - ) -} + ); +}; -export default React.memo(Capability) +export default React.memo(Capability); diff --git a/docs/website/src/pages/components/Community/index.phone.scss b/docs/website/src/pages/components/Community/index.phone.scss index c3dc0fdca3c1..feb923c7be30 100644 --- a/docs/website/src/pages/components/Community/index.phone.scss +++ b/docs/website/src/pages/components/Community/index.phone.scss @@ -1,4 +1,4 @@ -@media screen and (max-width: 996px) { +@media screen and (max-width: 1000px) { .community { display: flex; justify-content: center; @@ -32,10 +32,7 @@ position: relative; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.1); - background: var( - --30, - linear-gradient(90deg, #182941 0%, #0d3037 42.19%, #352644 97.92%) - ); + background: var(--30, linear-gradient(90deg, #182941 0%, #0d3037 42.19%, #352644 97.92%)); display: flex; align-items: center; flex-direction: column; diff --git a/docs/website/src/pages/components/Footer/index.phone.scss b/docs/website/src/pages/components/Footer/index.phone.scss index 78fc7fa7cb51..a28d819dc859 100644 --- a/docs/website/src/pages/components/Footer/index.phone.scss +++ b/docs/website/src/pages/components/Footer/index.phone.scss @@ -1,4 +1,4 @@ -@media screen and (max-width: 996px) { +@media screen and (max-width: 1000px) { .home-footer { position: relative; display: flex; diff --git a/docs/website/src/pages/components/Footer/index.tsx b/docs/website/src/pages/components/Footer/index.tsx index 5203bb63369e..40facb0b23a5 100644 --- a/docs/website/src/pages/components/Footer/index.tsx +++ b/docs/website/src/pages/components/Footer/index.tsx @@ -1,14 +1,15 @@ -import Link from '@docusaurus/Link' -import useDocusaurusContext from '@docusaurus/useDocusaurusContext' -import DeveloperIcon from '@site/static/icons/developer.svg' -import DiscordIcon from '@site/static/icons/discord.svg' -import GithubIcon from '@site/static/icons/github.svg' -import LogoIcon from '@site/static/icons/logo.svg' -import React, { useMemo } from 'react' -import './index.scss' +import Link from '@docusaurus/Link'; +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import DeveloperIcon from '@site/static/icons/developer.svg'; +import DiscordIcon from '@site/static/icons/discord.svg'; +import GithubIcon from '@site/static/icons/github.svg'; +import LogoIcon from '@site/static/icons/logo.svg'; +import React, { useMemo } from 'react'; +import './index.scss'; +import Translate from '@docusaurus/Translate'; interface ItemType { - title: string - items: { label: string; to: string }[] + title: string; + items: { label: string; to: string }[]; } const Footer = ({ isPc }: { isPc: boolean }) => { @@ -16,30 +17,30 @@ const Footer = ({ isPc }: { isPc: boolean }) => { siteConfig: { themeConfig: { // @ts-ignore nextline - footer: { links }, - }, - }, - } = useDocusaurusContext() + footer: { links } + } + } + } = useDocusaurusContext(); - const listData = useMemo(() => links, []) + const listData = useMemo(() => links, []); const FooterLinks = [ { key: 'github', label: , - to: 'https://github.com/labring/sealos', + to: 'https://github.com/labring/sealos' }, { key: 'discord', label: , - to: 'https://discord.com/invite/qzBmGGZGk7', + to: 'https://discord.com/invite/qzBmGGZGk7' }, { key: 'commit', label: , - to: 'https://forum.laf.run/', - }, - ] + to: 'https://forum.laf.run/' + } + ]; if (!isPc) { return ( @@ -57,7 +58,7 @@ const Footer = ({ isPc }: { isPc: boolean }) => { Sealos
- a cloud operating system based on the Kubernetes kernel + A cloud operating system based on the Kubernetes kernel
@@ -75,23 +76,24 @@ const Footer = ({ isPc }: { isPc: boolean }) => {
-
- Made by Sealos Team. 粤ICP备2023048773号  - 珠海环界云计算有限公司版权所有 -
+
+ Made by Sealos Team.{' '} + 粤ICP备2023048773号  + 珠海环界云计算有限公司版权所有 +
{FooterLinks.map((item) => { return ( {item.label} - ) + ); })}
- ) + ); } return ( @@ -109,7 +111,7 @@ const Footer = ({ isPc }: { isPc: boolean }) => { Sealos
- A cloud operating system based on the Kubernetes kernel + A cloud operating system based on the Kubernetes kernel
@@ -128,8 +130,8 @@ const Footer = ({ isPc }: { isPc: boolean }) => {
- Made by Sealos Team. 粤ICP备2023048773号  - 珠海环界云计算有限公司版权所有 + Made by Sealos Team. 粤ICP备2023048773号 +   珠海环界云计算有限公司版权所有
{FooterLinks.map((item) => { @@ -137,13 +139,13 @@ const Footer = ({ isPc }: { isPc: boolean }) => { {item.label} - ) + ); })}
- ) -} + ); +}; -export default React.memo(Footer) +export default React.memo(Footer); diff --git a/docs/website/src/pages/components/Header/index.phone.scss b/docs/website/src/pages/components/Header/index.phone.scss index 804d9d82e61d..5efb90939a48 100644 --- a/docs/website/src/pages/components/Header/index.phone.scss +++ b/docs/website/src/pages/components/Header/index.phone.scss @@ -1,4 +1,4 @@ -@media screen and (max-width: 996px) { +@media screen and (max-width: 1000px) { .home-header { position: relative; overflow: hidden; diff --git a/docs/website/src/pages/components/Header/index.scss b/docs/website/src/pages/components/Header/index.scss index 1562d086ce3e..ff85ddc2b10f 100644 --- a/docs/website/src/pages/components/Header/index.scss +++ b/docs/website/src/pages/components/Header/index.scss @@ -165,7 +165,7 @@ .txt-title { color: #379fff; } - @media screen and (min-width: 450px) and (max-width: 996px) { + @media screen and (min-width: 450px) and (max-width: 1000px) { padding: 0 60px; } } @@ -180,6 +180,13 @@ } } +.sealos_home_header_title { + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; +} + @media screen and (max-width: 1220px) { .home-header { main { diff --git a/docs/website/src/pages/components/Header/index.tsx b/docs/website/src/pages/components/Header/index.tsx index 9237d6ec5e4c..1d4bf4d8f780 100644 --- a/docs/website/src/pages/components/Header/index.tsx +++ b/docs/website/src/pages/components/Header/index.tsx @@ -1,79 +1,85 @@ -import Link from '@docusaurus/Link' -import Translate from '@docusaurus/Translate' -import GithubIcon from '@site/static/icons/github.svg' -import MeunIcon from '@site/static/icons/meun.svg' -import LogoIcon from '@site/static/icons/sealos.svg' -import React, { useEffect, useState } from 'react' -import VideoPlayer from '../VideoPlayer' -import './index.scss' -import useDocusaurusContext from '@docusaurus/useDocusaurusContext' -import useIsBrowser from '@docusaurus/useIsBrowser' +import Link from '@docusaurus/Link'; +import Translate from '@docusaurus/Translate'; +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import useIsBrowser from '@docusaurus/useIsBrowser'; +import useWindow from '@site/src/hooks/useWindow'; +import GithubIcon from '@site/static/icons/github.svg'; +import MeunIcon from '@site/static/icons/meun.svg'; +import LogoIcon from '@site/static/icons/sealos.svg'; import HeaderSvg from '@site/static/illustrations/bg-header.svg'; +import React, { useEffect, useState } from 'react'; +import VideoPlayer from '../VideoPlayer'; +import './index.scss'; const navbar = [ { key: 'docs', label: Documentation, - to: '/docs/Intro', + to: '/docs/Intro' }, { key: 'community', label: Community, - to: 'https://forum.laf.run/', + to: 'https://forum.laf.run/' + }, + { + key: 'pricing', + label: Pricing, + to: '/pricing' }, { key: 'contact', label: Contact, - to: 'https://fael3z0zfze.feishu.cn/share/base/form/shrcnesSfEK65JZaAf2W6Fwz6Ad', - }, -] + to: 'https://fael3z0zfze.feishu.cn/share/base/form/shrcnesSfEK65JZaAf2W6Fwz6Ad' + } +]; const i18nObj = { startNow: Start Now, - cloudOS: Cloud Operating System, -} + cloudOS: Cloud Operating System +}; const HomeHeader = ({ isPc }: { isPc: boolean }) => { - const [stars, setStars] = useState(10000) - const isBrowser = useIsBrowser() + const [stars, setStars] = useState(10000); + const isBrowser = useIsBrowser(); + const { cloudUrl } = useWindow(); const i18nMap: { [key: string]: { label: string; link: string } } = { en: { label: '中', link: '/zh-Hans/' }, - ['zh-Hans']: { label: 'En', link: '/' }, - } + ['zh-Hans']: { label: 'En', link: '/' } + }; const { i18n: { currentLocale }, siteConfig: { themeConfig: { // @ts-ignore nextLine - navbar: { items: navbarData }, - }, - }, - } = useDocusaurusContext() + // navbar: { items: navbarData } + } + } + } = useDocusaurusContext(); useEffect(() => { const getStars = async () => { try { const { stargazers_count } = await ( await fetch('https://api.github.com/repos/labring/sealos') - ).json() - setStars(isNaN(stargazers_count) ? 11 * 1000 : stargazers_count) + ).json(); + setStars(isNaN(stargazers_count) ? 11 * 1000 : stargazers_count); } catch (error) {} - } - getStars() - }, []) + }; + getStars(); + }, []); const openSideBar = () => { - const NavbarButton: HTMLBaseElement = - document.querySelector('.navbar__toggle') + const NavbarButton: HTMLBaseElement = document.querySelector('.navbar__toggle'); const event = new MouseEvent('click', { view: window, bubbles: true, - cancelable: true, - }) - NavbarButton.dispatchEvent(event) - } + cancelable: true + }); + NavbarButton.dispatchEvent(event); + }; if (!isPc) { return ( @@ -81,11 +87,7 @@ const HomeHeader = ({ isPc }: { isPc: boolean }) => {