Compare commits
2 Commits
ee77807d6e
...
ab9172f88d
| Author | SHA1 | Date | |
|---|---|---|---|
| ab9172f88d | |||
| c58830441b |
@@ -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",
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user