diff --git a/tools/awps-tunnel/client/src/panels/sections/SubprotocolClientSection.tsx b/tools/awps-tunnel/client/src/panels/sections/SubprotocolClientSection.tsx index 8eae7889a..50c3de57b 100644 --- a/tools/awps-tunnel/client/src/panels/sections/SubprotocolClientSection.tsx +++ b/tools/awps-tunnel/client/src/panels/sections/SubprotocolClientSection.tsx @@ -208,10 +208,10 @@ function SendEvent(props: APIComponentProps) { } const supportedAPIs: SupportedAPI[] = [ - { key: "joinGroup", name: "Join Group", component: JoinGroup }, - { key: "leaveGroup", name: "Leave Group", component: LeaveGroup }, { key: "sendToGroup", name: "Send to Group", component: SendToGroup }, { key: "sendEvent", name: "Send Event", component: SendEvent }, + { key: "joinGroup", name: "Join Group", component: JoinGroup }, + { key: "leaveGroup", name: "Leave Group", component: LeaveGroup }, ]; function ConnectPane({ connected, onSendingMessage, sendError }: { connected: boolean; sendError: string; onSendingMessage: (message: APIParameters) => void }) { @@ -313,6 +313,10 @@ export const SubprotocolClientSection = ({ onStatusChange, url }: ClientPannelPr return true; }; const connect = async () => { + // clear the state before start + setError(""); + setSendError(""); + setTraffic([]); const connection = new WebPubSubClient( { getClientAccessUrl: async () => { diff --git a/tools/awps-tunnel/server/CHANGELOG.md b/tools/awps-tunnel/server/CHANGELOG.md index 7b8d6f25c..316d1ce34 100644 --- a/tools/awps-tunnel/server/CHANGELOG.md +++ b/tools/awps-tunnel/server/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [1.0.0-beta.6] - 2024-03-15 +### Fixed +- Fix test client URL generation when env is used + ## [1.0.0-beta.5] - 2024-03-11 ### Fixed - Fix test client bugs diff --git a/tools/awps-tunnel/server/dataHub.ts b/tools/awps-tunnel/server/dataHub.ts index 7dc76a42e..b2616a383 100644 --- a/tools/awps-tunnel/server/dataHub.ts +++ b/tools/awps-tunnel/server/dataHub.ts @@ -114,7 +114,7 @@ export class DataHub { async GetClientAccessUrl(userId?: string, roles?: string[], groups?: string[]): Promise { try { - const url = (this.clientUrl = await this.tunnel.getClientAccessUrl(userId, roles, groups)); + const url = (this.clientUrl = await this.tunnel.getClientAccessUrl(userId, roles || [], groups || [])); return url; } catch (err) { printer.error(`Unable to get client access URL: ${err}`); diff --git a/tools/awps-tunnel/server/package.json b/tools/awps-tunnel/server/package.json index acda8b347..c7480a21b 100644 --- a/tools/awps-tunnel/server/package.json +++ b/tools/awps-tunnel/server/package.json @@ -1,6 +1,6 @@ { "name": "@azure/web-pubsub-tunnel-tool", - "version": "1.0.0-beta.5", + "version": "1.0.0-beta.6", "description": "A local tool to help tunnel Azure Web PubSub traffic to local web app and provide a vivid view to the end to end workflow.", "keywords": [ "azure",