From 12224fca31847c22d0bb2f684f0516efdc9b38b2 Mon Sep 17 00:00:00 2001 From: tianweiweiliang <875658254@qq.com> Date: Tue, 9 Jul 2024 03:14:21 +0000 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tianweiweiliang <875658254@qq.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 24b4a698..4595d3b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tone-front", - "version": "1.18.0", + "version": "1.19.0", "private": true, "description": "Tone front", "scripts": { -- Gitee From 1fc74e17c88bf82cc4ef3674f53375ddc24608cd Mon Sep 17 00:00:00 2001 From: tianweiweiliang <875658254@qq.com> Date: Tue, 9 Jul 2024 13:47:16 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20=E5=86=85=E7=BD=91=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=B8=BB=E3=80=81=E8=A2=AB=E5=8A=A8=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DeviceManage/CloudManage/AddMachinePubilc/index.tsx | 6 ++++-- src/pages/WorkSpace/DeviceManage/locales/en-US.ts | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pages/WorkSpace/DeviceManage/CloudManage/AddMachinePubilc/index.tsx b/src/pages/WorkSpace/DeviceManage/CloudManage/AddMachinePubilc/index.tsx index d9d1a663..168ba723 100644 --- a/src/pages/WorkSpace/DeviceManage/CloudManage/AddMachinePubilc/index.tsx +++ b/src/pages/WorkSpace/DeviceManage/CloudManage/AddMachinePubilc/index.tsx @@ -1117,7 +1117,7 @@ const NewMachine: React.FC = (props) => { - {!is_instance && BUILD_APP_ENV === 'openanolis' && + {!is_instance && BUILD_APP_ENV !== 'opensource' && = (props) => { rules={[{ required: false, message: formatMessage({ id: 'please.select' }) }]} > - + {BUILD_APP_ENV === 'openanolis' && + + } diff --git a/src/pages/WorkSpace/DeviceManage/locales/en-US.ts b/src/pages/WorkSpace/DeviceManage/locales/en-US.ts index c2ddbdf8..31c912fa 100644 --- a/src/pages/WorkSpace/DeviceManage/locales/en-US.ts +++ b/src/pages/WorkSpace/DeviceManage/locales/en-US.ts @@ -155,8 +155,8 @@ export default { 'device.extended.fields': 'Extended Fields', 'device.aliyun.params': 'Alibaba Cloud openAPI parameters', 'device.toneagent.working.mode': 'Toneagent working mode', - 'device.active.mode': 'Active mode', - 'device.passive.mode': 'Passive mode', + 'device.active.mode': 'Active', + 'device.passive.mode': 'Passive', 'device.tips': 'Tips', 'device.delete.config': 'Are you sure you want to delete the configuration ({data})?', 'device.delete.instance': 'Are you sure you want to delete the instance({data})?', -- Gitee From c6cbae7c1f69d1bc1b00a2c37e9896117a557ea0 Mon Sep 17 00:00:00 2001 From: tianweiweiliang <875658254@qq.com> Date: Tue, 9 Jul 2024 14:17:22 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E8=A6=81=E4=BF=9D=E7=95=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Header/components/JobModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Header/components/JobModal.tsx b/src/components/Header/components/JobModal.tsx index a159523b..ac027f7c 100644 --- a/src/components/Header/components/JobModal.tsx +++ b/src/components/Header/components/JobModal.tsx @@ -15,7 +15,7 @@ const JobTemplateModal: React.FC> = (props) => { const dataSourceCopy = props.getData(jobTemplates) return ( - + Date: Fri, 2 Aug 2024 13:37:46 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- abc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abc.json b/abc.json index 06a1bce2..546a0fd3 100644 --- a/abc.json +++ b/abc.json @@ -4,7 +4,7 @@ "command": { "cmd": [ "pnpm install", - "pnpm build", + "pnpm build:tone", "mv ./dist $BUILD_DEST" ] } -- Gitee From d57dfcc49f39082062ee1cce0c0de69cfafa7de7 Mon Sep 17 00:00:00 2001 From: tianweiweiliang <875658254@qq.com> Date: Fri, 2 Aug 2024 17:36:37 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E5=AF=B9=E7=A9=BA?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.tsx | 2 +- src/components/Header/components/HeaderDropdown.tsx | 2 +- src/utils/hooks.tsx | 2 +- src/wrappers/WorkspaceAuth.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app.tsx b/src/app.tsx index 39700ab2..095287b8 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -101,7 +101,7 @@ export async function getInitialState(): Promise { redirectErrorPage(401) return baseAppState } - const ws: any = await enterWsAndGetList(ws_id) + const ws: any = await enterWsAndGetList(ws_id) || {} if (ws?.first_entry) { history.push(`/ws/${ws_id}/workspace/initSuccess`) } diff --git a/src/components/Header/components/HeaderDropdown.tsx b/src/components/Header/components/HeaderDropdown.tsx index 40e90da7..9bf4a31a 100644 --- a/src/components/Header/components/HeaderDropdown.tsx +++ b/src/components/Header/components/HeaderDropdown.tsx @@ -93,7 +93,7 @@ export const HearderDropdown: React.FC = (props) => { const current = React.useMemo(() => { if (!wsList) return {} - const [workspace] = wsList?.data?.filter(({ id }: any) => id === ws_id) + const [workspace] = (wsList?.data || [])?.filter(({ id }: any) => id === ws_id) // wsList?.data?.filter(({ id }: any) => id === ws_id) if (workspace) return workspace return {} }, [wsList, ws_id]) diff --git a/src/utils/hooks.tsx b/src/utils/hooks.tsx index 61198b72..d06795f8 100644 --- a/src/utils/hooks.tsx +++ b/src/utils/hooks.tsx @@ -10,7 +10,7 @@ const { document, location }: any = window export const enterWsAndGetList = async (ws_id: any) => { try { - const { data } = await enterWorkspaceHistroy({ ws_id }) + const { data } = await enterWorkspaceHistroy({ ws_id }) || {} const { code, ...historyWorkspaces } = await queryWorkspaceHistory({ page_num: 1, page_size: 20, diff --git a/src/wrappers/WorkspaceAuth.tsx b/src/wrappers/WorkspaceAuth.tsx index 32da761a..af06f33e 100644 --- a/src/wrappers/WorkspaceAuth.tsx +++ b/src/wrappers/WorkspaceAuth.tsx @@ -29,7 +29,7 @@ export default (props: any) => { /* 切换ws请求记录历史接口 */ /* getHistoryFetcher() */ - const ws = await enterWsAndGetList(ws_id) + const ws = await enterWsAndGetList(ws_id) || {} setInitialState((p: any) => ({ ...p, ...ws, -- Gitee