mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-27 08:39:49 +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}
|
flipped={false}
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
title="Timestamp"
|
title="Timestamp (UTC)"
|
||||||
>
|
>
|
||||||
{Moment(+entry.timestamp)?.utc().format('MM/DD/YYYY, h:mm:ss.SSS A')}
|
{Moment(+entry.timestamp)?.utc().format('MM/DD/YYYY, h:mm:ss.SSS A')}
|
||||||
</span>
|
</span>
|
||||||
|
@ -225,13 +225,12 @@ export const TrafficPage: React.FC<TrafficPageProps> = ({setAnalyzeStatus, onTLS
|
|||||||
}, [focusedEntryId]);
|
}, [focusedEntryId]);
|
||||||
|
|
||||||
const toggleConnection = () => {
|
const toggleConnection = () => {
|
||||||
if (connection === ConnectionStatus.Connected) {
|
ws.current.close();
|
||||||
ws.current.close();
|
if (connection !== ConnectionStatus.Connected) {
|
||||||
} else {
|
|
||||||
if (query) {
|
if (query) {
|
||||||
openWebSocket(`(${query}) and leftOff(${leftOffBottom})`, false);
|
openWebSocket(`(${query}) and leftOff(-1)`, true);
|
||||||
} else {
|
} else {
|
||||||
openWebSocket(`leftOff(${leftOffBottom})`, false);
|
openWebSocket(`leftOff(-1)`, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -249,9 +248,9 @@ export const TrafficPage: React.FC<TrafficPageProps> = ({setAnalyzeStatus, onTLS
|
|||||||
const getConnectionTitle = () => {
|
const getConnectionTitle = () => {
|
||||||
switch (connection) {
|
switch (connection) {
|
||||||
case ConnectionStatus.Connected:
|
case ConnectionStatus.Connected:
|
||||||
return "connected, waiting for traffic"
|
return "streaming live traffic"
|
||||||
default:
|
default:
|
||||||
return "not connected";
|
return "streaming paused";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user