From 7146c040158d77bd8e530ac76631dd65d29c7c3b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A4=9C=E9=B9=B0?= <17kungfuboy@gmail.com>
Date: Fri, 9 Sep 2022 17:17:54 +0800
Subject: [PATCH] fix: render status
---
.../src/app/pages/api/websocket/websocket.component.html | 4 ++--
.../src/app/pages/api/websocket/websocket.component.ts | 5 ++++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/workbench/browser/src/app/pages/api/websocket/websocket.component.html b/src/workbench/browser/src/app/pages/api/websocket/websocket.component.html
index 592ba8b08..2676b113c 100644
--- a/src/workbench/browser/src/app/pages/api/websocket/websocket.component.html
+++ b/src/workbench/browser/src/app/pages/api/websocket/websocket.component.html
@@ -66,7 +66,7 @@
Headers
@@ -79,7 +79,7 @@
- Query Params
diff --git a/src/workbench/browser/src/app/pages/api/websocket/websocket.component.ts b/src/workbench/browser/src/app/pages/api/websocket/websocket.component.ts
index d0b67728e..1caea5348 100644
--- a/src/workbench/browser/src/app/pages/api/websocket/websocket.component.ts
+++ b/src/workbench/browser/src/app/pages/api/websocket/websocket.component.ts
@@ -93,7 +93,10 @@ export class WebsocketComponent implements OnInit, OnDestroy {
this.model.response.responseBody[index].isExpand = status == null ? true : !status;
}
renderStatus(status) {
- const hash = new Map().set(true, 'Connected').set(false, 'Disconnect').set(null, 'Connecting');
+ const hash = new Map()
+ .set('connected', 'Connected')
+ .set('disconnect', 'Disconnect')
+ .set('connecting', 'Connecting');
return hash.get(status);
}
rawDataChange(e) {