From 2d64f768e580e9dc9686b839a2c72e7e756ae8ff Mon Sep 17 00:00:00 2001 From: fangxiang Date: Thu, 21 Jul 2022 16:36:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AB=98=E7=BA=A7=E7=BD=91=E7=BB=9C=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=A2=9E=E5=8A=A0=E8=AE=BE=E7=BD=AEhttp=E7=AB=AF?= =?UTF-8?q?=E5=8F=A3=E5=92=8Cwebsocket=E7=AB=AF=E5=8F=A3=E7=9A=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/ClientConnection.ts | 24 +++ .../SystenSettingAdvancedNetworkDialog.vue | 179 +++++++++++++++++- src/i18n/en-US/index.ts | 12 ++ src/i18n/zh-CN/index.ts | 9 + 4 files changed, 221 insertions(+), 3 deletions(-) diff --git a/src/common/ClientConnection.ts b/src/common/ClientConnection.ts index e5ade9b..4288d2d 100644 --- a/src/common/ClientConnection.ts +++ b/src/common/ClientConnection.ts @@ -656,6 +656,30 @@ export default class ClientConnection { ); } + public setWebsocketPort(port: number) { + this.ws?.send( + JSON.stringify( + new Protocol.SetApplicationConfigRequestEntity( + 0, + "websocket_port", + port.toString() + ) + ) + ); + } + + public setHttpPort(port: number) { + this.ws?.send( + JSON.stringify( + new Protocol.SetApplicationConfigRequestEntity( + 0, + "httpserver_port", + port.toString() + ) + ) + ); + } + public setPowerOnPlan(uuid: string) { this.ws?.send( JSON.stringify( diff --git a/src/components/SystenSettingAdvancedNetworkDialog.vue b/src/components/SystenSettingAdvancedNetworkDialog.vue index d18add6..52788d8 100644 --- a/src/components/SystenSettingAdvancedNetworkDialog.vue +++ b/src/components/SystenSettingAdvancedNetworkDialog.vue @@ -31,7 +31,7 @@ @@ -130,6 +130,54 @@ + + + + + + {{ $t("http") }}{{ $t(" ") }}{{ $t("port") }}: + + + + + + + + + + + {{ $t("control") }}{{ $t(" ") }}{{ $t("port") }}: + + + + + + + + + + + @@ -162,7 +210,7 @@