Compare commits

...

2 Commits

Author SHA1 Message Date
ab9172f88d Fixed db client references in sessionLogger 2026-02-05 10:56:16 +00:00
c58830441b Fixed path to shim css file 2026-02-05 10:56:05 +00:00
2 changed files with 6 additions and 6 deletions

View File

@@ -103,9 +103,9 @@ FrameApplication <- R6::R6Class(
if (private$withBS4) { if (private$withBS4) {
# Attach boostrap 4 css shim # Attach boostrap 4 css shim
if (getOption("shiny.minified", TRUE)) { if (getOption("shiny.minified", TRUE)) {
css <- "bootstrap-4-shim.min.css" css <- "css/bootstrap-4-shim.min.css"
} else { } else {
css <- "bootstrap-4-shim.css" css <- "css/bootstrap-4-shim.css"
} }
uiDeps <- htmltools::htmlDependency( uiDeps <- htmltools::htmlDependency(
"AVSDevR.ShinyApplication", "AVSDevR.ShinyApplication",

View File

@@ -99,7 +99,7 @@ SessionLoggerDB <- R6::R6Class(
inherit = SessionLogger, inherit = SessionLogger,
public = list( public = list(
initialize = function(db_client) { initialize = function(db_client) {
if (is.null(conn) || !R6::is.R6(conn) || !inherits(conn, "DBClient")) { if (is.null(db_client) || !inherits(db_client, "DBClient")) {
stop("DBClient instance required!") stop("DBClient instance required!")
} }
private$db_client <- db_client private$db_client <- db_client
@@ -111,15 +111,15 @@ SessionLoggerDB <- R6::R6Class(
logSessionEvent = function( logSessionEvent = function(
event, session = shiny::getDefaultReactiveDomain() event, session = shiny::getDefaultReactiveDomain()
) { ) {
db_client$connect() private$db_client$getConnection()$connect()
on.exit({ on.exit({
db_client$disconnect() private$db_client$getConnection()$disconnect()
}) })
event_row <- tibble::tibble( event_row <- tibble::tibble(
app_name = basename(getwd()), app_name = basename(getwd()),
app_pid = Sys.getpid(), app_pid = Sys.getpid(),
client_ip = getClientIp(session), client_ip = private$getClientIp(session),
user_id = session$userData$user_id, user_id = session$userData$user_id,
session_token = session$token, session_token = session$token,
!!event := lubridate::now() !!event := lubridate::now()