Skip to content

Commit

Permalink
[MIRROR] Fix refresh button in log viewer [MDB IGNORE] (#24810)
Browse files Browse the repository at this point in the history
* Fix refresh button in log viewer (#79520)

## About The Pull Request

`re-render` is a typo?
https://github.com/tgstation/tgstation/blob/137aa7dc607de6e09bc890bddea15b544347f4d1/tgui/packages/tgui/interfaces/LogViewer.tsx#L66

## Changelog

:cl:
fix: Fix refresh button in log viewer
/:cl:

* Fix refresh button in log viewer

---------

Co-authored-by: vvvv-vvvv <[email protected]>
Co-authored-by: Bloop <[email protected]>
  • Loading branch information
3 people authored and FFMirrorBot committed Nov 22, 2023
1 parent 558abba commit a4c406a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion code/game/world.dm
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ GLOBAL_VAR(restart_counter)
data["tick_usage"] = world.tick_usage
data["tick_lag"] = world.tick_lag
data["time"] = world.time
data["timestamp"] = logger.unix_timestamp_string()
data["timestamp"] = rustg_unix_timestamp()
return data

/world/proc/SetupLogs()
Expand Down
9 changes: 3 additions & 6 deletions code/modules/logging/log_holder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ GENERAL_PROTECT_DATUM(/datum/log_holder)
return

switch(action)
if("re-render")
if("refresh")
cache_ui_data()
SStgui.update_uis(src)
return TRUE
Expand All @@ -121,7 +121,7 @@ GENERAL_PROTECT_DATUM(/datum/log_holder)
CRASH("Attempted to call init_logging twice!")

round_id = GLOB.round_id
logging_start_timestamp = unix_timestamp_string()
logging_start_timestamp = rustg_unix_timestamp()
log_categories = list()
disabled_categories = list()

Expand Down Expand Up @@ -243,13 +243,10 @@ GENERAL_PROTECT_DATUM(/datum/log_holder)
if(human_readable_enabled)
rustg_file_write("\[[human_readable_timestamp()]\] Starting up round ID [round_id].\n - -------------------------\n", category_instance.get_output_file(null, "log"))

/datum/log_holder/proc/unix_timestamp_string() // pending change to rust-g
return RUSTG_CALL(RUST_G, "unix_timestamp")()

/datum/log_holder/proc/human_readable_timestamp(precision = 3)
var/start = time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss")
// now we grab the millis from the rustg timestamp
var/rustg_stamp = unix_timestamp_string()
var/rustg_stamp = rustg_unix_timestamp()
var/list/timestamp = splittext(rustg_stamp, ".")
#ifdef UNIT_TESTS
if(length(timestamp) != 2)
Expand Down

0 comments on commit a4c406a

Please sign in to comment.