Skip to content

Commit a0e04a7

Browse files
committed
web: display WS/WSS as method
1 parent 628d620 commit a0e04a7

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

web/src/js/__tests__/components/FlowTable/__snapshots__/FlowColumnsSpec.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ exports[`should render columns: method 1`] = `
177177
<td
178178
class="col-method"
179179
>
180-
GET
180+
WSS
181181
</td>
182182
</tr>
183183
</tbody>

web/src/js/__tests__/components/FlowTable/__snapshots__/FlowRowSpec.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ exports[`FlowRow 1`] = `
3434
<td
3535
class="col-method"
3636
>
37-
GET
37+
WSS
3838
</td>
3939
<td
4040
class="col-status"

web/src/js/components/FlowTable/FlowColumns.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,18 @@ path.headerName = 'Path'
107107
path.sortKey = flow => mainPath(flow)
108108

109109
export const method: FlowColumn = ({flow}) => {
110+
let method;
111+
if(flow.type === "http") {
112+
if(flow.websocket) {
113+
method = flow.client_conn.tls_established ? "WSS" : "WS";
114+
} else {
115+
method = flow.request.method;
116+
}
117+
} else {
118+
method = flow.type.toUpperCase();
119+
}
110120
return (
111-
<td className="col-method">{flow.type === "http" ? flow.request.method : flow.type.toUpperCase()}</td>
121+
<td className="col-method">{method}</td>
112122
)
113123
};
114124
method.headerName = 'Method'

0 commit comments

Comments
 (0)