timestamp in packetlogger

This commit is contained in:
sirjonasxx 2021-04-28 16:33:10 +02:00
parent 303685726d
commit 869d39cf86
3 changed files with 12 additions and 1 deletions

View File

@ -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<Integer, LinkedList<Long>> 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<Element> 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) {

View File

@ -51,6 +51,7 @@
<CheckMenuItem fx:id="chkMessageName" mnemonicParsing="false" selected="true" text="Message Name" />
<CheckMenuItem fx:id="chkMessageHash" mnemonicParsing="false" text="Message Hash" />
<CheckMenuItem fx:id="chkUseNewStructures" mnemonicParsing="false" selected="true" text="New structures" />
<CheckMenuItem fx:id="chkTimestamp" mnemonicParsing="false" text="Timestamp" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Anti-spam filter">

View File

@ -11,6 +11,10 @@
-fx-fill: #ffff00;
}
.timestamp {
-fx-fill: #ffffff;
}
.incoming {
-fx-fill: #b22222;
}