mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-21 22:08:59 +00:00
UI performance fix
This commit is contained in:
parent
b47718e094
commit
9d08dbdd5d
@ -105,7 +105,7 @@ export const EntriesList: React.FC<EntriesListProps> = ({listEntryREF, onSnapBro
|
|||||||
const scrollbarVisible = scrollableRef.current?.childWrapperRef.current.clientHeight > scrollableRef.current?.wrapperRef.current.clientHeight;
|
const scrollbarVisible = scrollableRef.current?.childWrapperRef.current.clientHeight > scrollableRef.current?.wrapperRef.current.clientHeight;
|
||||||
|
|
||||||
if (ws.current) {
|
if (ws.current) {
|
||||||
ws.current.onmessage = (e) => {
|
ws.current.addEventListener("message", (e) => {
|
||||||
if (!e?.data) return;
|
if (!e?.data) return;
|
||||||
const message = JSON.parse(e.data);
|
const message = JSON.parse(e.data);
|
||||||
switch (message.messageType) {
|
switch (message.messageType) {
|
||||||
@ -124,7 +124,7 @@ export const EntriesList: React.FC<EntriesListProps> = ({listEntryREF, onSnapBro
|
|||||||
setQueriedTotal(message.data.total);
|
setQueriedTotal(message.data.total);
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return <React.Fragment>
|
return <React.Fragment>
|
||||||
|
@ -175,7 +175,7 @@ export const TrafficViewer: React.FC<TrafficViewerProps> = ({ setAnalyzeStatus,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ws.current) {
|
if (ws.current) {
|
||||||
ws.current.onmessage = (e) => {
|
ws.current.addEventListener("message", (e) => {
|
||||||
if (!e?.data) return;
|
if (!e?.data) return;
|
||||||
const message = JSON.parse(e.data);
|
const message = JSON.parse(e.data);
|
||||||
switch (message.messageType) {
|
switch (message.messageType) {
|
||||||
@ -209,7 +209,7 @@ export const TrafficViewer: React.FC<TrafficViewerProps> = ({ setAnalyzeStatus,
|
|||||||
setStartTime(message.data);
|
setStartTime(message.data);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user