mirror of
https://github.com/labring/sealos.git
synced 2026-09-24 15:46:19 +08:00
fix:license add CUSTOM_BASE_PATH env (#4654)
Signed-off-by: jingyang <3161362058@qq.com>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
CUSTOM_BASE_PATH="https://raw.githubusercontent.com/labring/sealos/main/scripts/cloud/install.sh"
|
||||
@@ -1,6 +1,7 @@
|
||||
PUBLIC_URL=.
|
||||
NEXT_PUBLIC_SERVICE=/service/
|
||||
SEALOS_CLOUD_DOMAIN="cloud.sealos.io"
|
||||
CUSTOM_BASE_PATH=""
|
||||
|
||||
# GITHUB_CLIENT_ID=
|
||||
# GITHUB_CLIENT_SECRET=
|
||||
|
||||
@@ -47,7 +47,12 @@ import ConfigForm from './ConfigForm';
|
||||
const TAB_QUERY_PARAM = 'tab';
|
||||
const TAB_QUERY_ARR = ['tutorial', 'cluster', 'license'];
|
||||
|
||||
export default function Tutorial({ ossFileUrl }: { ossFileUrl: string }) {
|
||||
export type TutorialProps = {
|
||||
ossFileUrl: string;
|
||||
customBasePatch: string;
|
||||
};
|
||||
|
||||
export default function Tutorial({ ossFileUrl, customBasePatch }: TutorialProps) {
|
||||
const { t } = useTranslation();
|
||||
const { clusterDetail } = useClusterDetail();
|
||||
const { copyData } = useCopyData();
|
||||
@@ -241,7 +246,7 @@ export default function Tutorial({ ossFileUrl }: { ossFileUrl: string }) {
|
||||
</AccordionButton>
|
||||
<AccordionPanel py="20px" px="0px">
|
||||
<ConfigForm
|
||||
basePath={`curl -sfL https://mirror.ghproxy.com/https://raw.githubusercontent.com/labring/sealos/main/scripts/cloud/install.sh -o /tmp/install.sh && bash /tmp/install.sh --zh `}
|
||||
basePath={`curl -sfL ${customBasePatch} -o /tmp/install.sh && bash /tmp/install.sh --zh `}
|
||||
cloudVersion={ossVersion}
|
||||
/>
|
||||
</AccordionPanel>
|
||||
|
||||
@@ -29,11 +29,11 @@ import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useEffect, useState } from 'react';
|
||||
import ClusterList from './components/List';
|
||||
import Tutorial from './components/Tutorial';
|
||||
import Tutorial, { TutorialProps } from './components/Tutorial';
|
||||
|
||||
// Activation field systemId
|
||||
// Cluster recharge callback clusterId
|
||||
export default function MyCluster({ ossFileUrl }: { ossFileUrl: string }) {
|
||||
export default function MyCluster({ ossFileUrl, customBasePatch }: TutorialProps) {
|
||||
const { t } = useTranslation();
|
||||
const { clusterDetail, setClusterDetail, clearClusterDetail } = useClusterDetail();
|
||||
const [isLargerThanLG] = useMediaQuery(['(min-width: 992px)', '(display-mode: browser)']);
|
||||
@@ -152,7 +152,7 @@ export default function MyCluster({ ossFileUrl }: { ossFileUrl: string }) {
|
||||
<Layout>
|
||||
<Flex flex={1} h={0} bg="#fefefe" position={'relative'}>
|
||||
<ClusterList />
|
||||
<Tutorial ossFileUrl={ossFileUrl} />
|
||||
<Tutorial ossFileUrl={ossFileUrl} customBasePatch={customBasePatch} />
|
||||
</Flex>
|
||||
<Modal isOpen={isOpen} onClose={onClose} autoFocus={false}>
|
||||
<ModalOverlay />
|
||||
@@ -248,6 +248,7 @@ export async function getServerSideProps({ req, res, locales }: any) {
|
||||
return {
|
||||
props: {
|
||||
ossFileUrl: process.env.OSS_FILE_URL,
|
||||
customBasePatch: process.env.CUSTOM_BASE_PATH,
|
||||
...(await serverSideTranslations(local, undefined, null, locales || []))
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user