mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-26 08:14:42 +00:00
Change the connection status text and the toggle connection behavior (#534)
This commit is contained in:
parent
f266f32fea
commit
b565492eba
@ -298,7 +298,7 @@ export const EntryItem: React.FC<EntryProps> = ({entry, focusedEntryId, setFocus
|
||||
flipped={false}
|
||||
>
|
||||
<span
|
||||
title="Timestamp"
|
||||
title="Timestamp (UTC)"
|
||||
>
|
||||
{Moment(+entry.timestamp)?.utc().format('MM/DD/YYYY, h:mm:ss.SSS A')}
|
||||
</span>
|
||||
|
@ -225,13 +225,12 @@ export const TrafficPage: React.FC<TrafficPageProps> = ({setAnalyzeStatus, onTLS
|
||||
}, [focusedEntryId]);
|
||||
|
||||
const toggleConnection = () => {
|
||||
if (connection === ConnectionStatus.Connected) {
|
||||
ws.current.close();
|
||||
} else {
|
||||
ws.current.close();
|
||||
if (connection !== ConnectionStatus.Connected) {
|
||||
if (query) {
|
||||
openWebSocket(`(${query}) and leftOff(${leftOffBottom})`, false);
|
||||
openWebSocket(`(${query}) and leftOff(-1)`, true);
|
||||
} else {
|
||||
openWebSocket(`leftOff(${leftOffBottom})`, false);
|
||||
openWebSocket(`leftOff(-1)`, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -249,9 +248,9 @@ export const TrafficPage: React.FC<TrafficPageProps> = ({setAnalyzeStatus, onTLS
|
||||
const getConnectionTitle = () => {
|
||||
switch (connection) {
|
||||
case ConnectionStatus.Connected:
|
||||
return "connected, waiting for traffic"
|
||||
return "streaming live traffic"
|
||||
default:
|
||||
return "not connected";
|
||||
return "streaming paused";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user