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) {
# Attach boostrap 4 css shim
if (getOption("shiny.minified", TRUE)) {
css <- "bootstrap-4-shim.min.css"
css <- "css/bootstrap-4-shim.min.css"
} else {
css <- "bootstrap-4-shim.css"
css <- "css/bootstrap-4-shim.css"
}
uiDeps <- htmltools::htmlDependency(
"AVSDevR.ShinyApplication",

View File

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