Skip to content

Commit

Permalink
fix(ui): Socket Panel > Socket.IO > "Disconnected from" message shows…
Browse files Browse the repository at this point in the history
… raw url instead of the env substituted one
  • Loading branch information
flawiddsouza committed May 23, 2024
1 parent 19388e0 commit a87ee68
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/ui/src/components/SocketPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ function handleMessageContainerRef(ref: any, clientId: string) {
const disconnectTriggered: { [key: string]: boolean } = reactive({})
const clientUrlsEnvSubstituted: { [key: string]: string } = reactive({})
// Computed
const store = useStore()
const activeWorkspace = computed(() => store.state.activeWorkspace)
Expand Down Expand Up @@ -338,6 +340,8 @@ async function connect(client: Client) {
clientUrlWithEnvironmentVariablesSubtituted = clientUrlWithEnvironmentVariablesSubtituted.replace(`{{${objectPath}}}`, objectPathValue)
})
clientUrlsEnvSubstituted[activeTab.value._id + '-' + client.id] = clientUrlWithEnvironmentVariablesSubtituted
try {
if (client.type === undefined) {
sockets[activeTab.value._id + '-' + client.id] = new WebSocket(clientUrlWithEnvironmentVariablesSubtituted)
Expand Down Expand Up @@ -546,7 +550,7 @@ function disconnect(client: Client) {
addClientMessage(client, {
timestamp: new Date().getTime(),
message: `Disconnected from ${client.url}`,
message: `Disconnected from ${clientUrlsEnvSubstituted[activeTab.value._id + '-' + client.id]}`,
type: 'INFO'
})
}
Expand Down

0 comments on commit a87ee68

Please sign in to comment.