Merge pull request #1905 from guardicore/1850-telemetry-overview-line-num-logic

Fix line number in telemetry overview window
This commit is contained in:
VakarisZ 2022-04-21 14:35:25 +03:00 committed by GitHub
commit 20ee887886
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -80,6 +80,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/).
- Unnecessary collection of kerberos credentials. #1771
- A bug where bogus users were collected by Mimikatz and added to the config. #1860
- A bug where windows executable was not self deleting. #1763
- Incorrect line number in the telemetry overview window on the Map page. #1905
### Security
- Change SSH exploiter so that it does not set the permissions of the agent

View File

@ -59,7 +59,8 @@ const TelemetryLog = (props: { onStatusChange: Function }) => {
let telemetryLineHeight = parseInt((telemetryStyle.lineHeight).replace('px', ''));
setIsScrolledUp((element.scrollTop < scrollTop));
setTelemetryCurrentLine(Math.trunc(element.scrollTop / telemetryLineHeight) + 1);
// Zooming in or out doesn't change the number of lines that are visible at once i.e. 5.
setTelemetryCurrentLine(Math.trunc(element.scrollTop / telemetryLineHeight) + 5);
setTelemetryLines(Math.trunc(element.scrollHeight / telemetryLineHeight));
}