From 869d39cf86c51c017c07dd124fe0e2183ff8c172 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Wed, 28 Apr 2021 16:33:10 +0200 Subject: [PATCH] timestamp in packetlogger --- .../internal_extensions/uilogger/UiLoggerController.java | 8 +++++++- .../services/internal_extensions/uilogger/UiLogger.fxml | 1 + .../services/internal_extensions/uilogger/logger.css | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/G-Earth/src/main/java/gearth/services/internal_extensions/uilogger/UiLoggerController.java b/G-Earth/src/main/java/gearth/services/internal_extensions/uilogger/UiLoggerController.java index 6321745..18afbfb 100644 --- a/G-Earth/src/main/java/gearth/services/internal_extensions/uilogger/UiLoggerController.java +++ b/G-Earth/src/main/java/gearth/services/internal_extensions/uilogger/UiLoggerController.java @@ -67,6 +67,7 @@ public class UiLoggerController implements Initializable { public RadioMenuItem chkAntiSpam_high; public RadioMenuItem chkAntiSpam_ultra; public Label lblFiltered; + public CheckMenuItem chkTimestamp; private Map> filterTimestamps = new HashMap<>(); @@ -127,7 +128,8 @@ public class UiLoggerController implements Initializable { chkViewIncoming, chkViewOutgoing, chkDisplayStructure, chkAutoscroll, chkSkipBigPackets, chkMessageName, chkMessageHash, chkUseNewStructures, chkOpenOnConnect, chkResetOnConnect, chkHideOnDisconnect, chkResetOnDisconnect, - chkAntiSpam_none, chkAntiSpam_low, chkAntiSpam_medium, chkAntiSpam_high, chkAntiSpam_ultra + chkAntiSpam_none, chkAntiSpam_low, chkAntiSpam_medium, chkAntiSpam_high, chkAntiSpam_ultra, + chkTimestamp )); loadAllMenuItems(); @@ -213,6 +215,10 @@ public class UiLoggerController implements Initializable { ArrayList elements = new ArrayList<>(); + if (chkTimestamp.isSelected()) { + elements.add(new Element(String.format("(timestamp: %d)\n", System.currentTimeMillis()), "timestamp")); + } + boolean packetInfoAvailable = packetInfoManager.getPacketInfoList().size() > 0; if ((chkMessageName.isSelected() || chkMessageHash.isSelected()) && packetInfoAvailable) { diff --git a/G-Earth/src/main/resources/gearth/services/internal_extensions/uilogger/UiLogger.fxml b/G-Earth/src/main/resources/gearth/services/internal_extensions/uilogger/UiLogger.fxml index a79e878..3785c88 100644 --- a/G-Earth/src/main/resources/gearth/services/internal_extensions/uilogger/UiLogger.fxml +++ b/G-Earth/src/main/resources/gearth/services/internal_extensions/uilogger/UiLogger.fxml @@ -51,6 +51,7 @@ + diff --git a/G-Earth/src/main/resources/gearth/services/internal_extensions/uilogger/logger.css b/G-Earth/src/main/resources/gearth/services/internal_extensions/uilogger/logger.css index e3554ad..506c571 100644 --- a/G-Earth/src/main/resources/gearth/services/internal_extensions/uilogger/logger.css +++ b/G-Earth/src/main/resources/gearth/services/internal_extensions/uilogger/logger.css @@ -11,6 +11,10 @@ -fx-fill: #ffff00; } +.timestamp { + -fx-fill: #ffffff; +} + .incoming { -fx-fill: #b22222; }