mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 13:09:00 +00:00
(control) Add better timestamps for the events and message queue views
Adjust display precision based on distance into the past, full ms-accurate timestamps available via hover-action.
This commit is contained in:
parent
2fefd0e4e3
commit
71e32c57d9
@ -12,8 +12,8 @@ public record MessageQueueEntry (
|
|||||||
String ownerInstanceFull,
|
String ownerInstanceFull,
|
||||||
long ownerTick,
|
long ownerTick,
|
||||||
String state,
|
String state,
|
||||||
|
String createdTimeFull,
|
||||||
String updatedTimeFull,
|
String updatedTimeFull,
|
||||||
String updatedTime,
|
|
||||||
int ttl
|
int ttl
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -36,10 +36,10 @@ public record MessageQueueEntry (
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getCreatedTime() {
|
public String getCreatedTime() {
|
||||||
String retDateBase = updatedTimeFull.replace('T', ' ');
|
String retDateBase = createdTimeFull.replace('T', ' ');
|
||||||
|
|
||||||
// if another day, return date, hour and minute
|
// if another day, return date, hour and minute
|
||||||
if (!updatedTimeFull.startsWith(LocalDate.now().toString())) {
|
if (!createdTimeFull.startsWith(LocalDate.now().toString())) {
|
||||||
// return hour minute and seconds
|
// return hour minute and seconds
|
||||||
return retDateBase.substring(0, "YYYY-MM-DDTHH:MM".length());
|
return retDateBase.substring(0, "YYYY-MM-DDTHH:MM".length());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user