Skip to content

Commit

Permalink
hud: Add maintoolbar button stats
Browse files Browse the repository at this point in the history
- Add stats counter to main toolbar button action.
- Add note to CHANGELOG.

Signed-off-by: kingthorin <[email protected]>
  • Loading branch information
kingthorin committed Oct 8, 2024
1 parent ab6caad commit 5adea52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- Stats counter to the main toolbar button (Issue 8375).

## [0.19.0] - 2024-05-07
### Changed
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/zaproxy/zap/extension/hud/ExtensionHUD.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
import org.zaproxy.zap.extension.websocket.ExtensionWebSocket;
import org.zaproxy.zap.utils.DesktopUtils;
import org.zaproxy.zap.utils.DisplayUtils;
import org.zaproxy.zap.utils.Stats;
import org.zaproxy.zap.view.OverlayIcon;
import org.zaproxy.zap.view.ZapMenuItem;
import org.zaproxy.zap.view.ZapToggleButton;
Expand Down Expand Up @@ -368,6 +369,7 @@ private ZapToggleButton getHudButton() {
hudEnabledForDesktop = hudButton.isSelected();
getHudParam().setEnabledForDesktop(hudEnabledForDesktop);
setZapCanGetFocus(!hudEnabledForDesktop);
Stats.incCounter("stats.ui.toolbar.button.hud");
});
}
return hudButton;
Expand Down

0 comments on commit 5adea52

Please sign in to comment.