Skip to content

Commit

Permalink
testing environment variable LOCAL for js
Browse files Browse the repository at this point in the history
  • Loading branch information
Konrad1991 committed Dec 18, 2024
1 parent 8339784 commit f5f7bec
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 28 deletions.
25 changes: 11 additions & 14 deletions app/MainApp.R
Original file line number Diff line number Diff line change
Expand Up @@ -354,25 +354,22 @@ app <- function() {
})

output$conditional_data_ui <- renderUI({
showNotification(Sys.getenv("RUN_MODE"), duration = 0)
showNotification(as.character(Sys.getenv("RUN_MODE") != "SERVER"), duration = 0)
res <- NULL
if (Sys.getenv("RUN_MODE") != "SERVER") {
showNotification("Test", duration = 0)
res <- conditionalPanel(
condition = "input.conditionedPanels == 'Data'",
fileInput("file", "Choose CSV File",
accept = c(
"text/csv",
"text/comma-separated-values,text/plain",
".csv"
res <- div(
class = "var-box-output",
conditionalPanel(
condition = "input.conditionedPanels == 'Data'",
fileInput("file", "Choose CSV File",
accept = c(
"text/csv",
"text/comma-separated-values,text/plain",
".csv"
)
)
)
)
# return(res)
return(res)
}
str(res)
return(res)
})

download_file <- reactive({
Expand Down
25 changes: 11 additions & 14 deletions bs/R/MainApp.R
Original file line number Diff line number Diff line change
Expand Up @@ -354,25 +354,22 @@ app <- function() {
})

output$conditional_data_ui <- renderUI({
showNotification(Sys.getenv("RUN_MODE"), duration = 0)
showNotification(as.character(Sys.getenv("RUN_MODE") != "SERVER"), duration = 0)
res <- NULL
if (Sys.getenv("RUN_MODE") != "SERVER") {
showNotification("Test", duration = 0)
res <- conditionalPanel(
condition = "input.conditionedPanels == 'Data'",
fileInput("file", "Choose CSV File",
accept = c(
"text/csv",
"text/comma-separated-values,text/plain",
".csv"
res <- div(
class = "var-box-output",
conditionalPanel(
condition = "input.conditionedPanels == 'Data'",
fileInput("file", "Choose CSV File",
accept = c(
"text/csv",
"text/comma-separated-values,text/plain",
".csv"
)
)
)
)
# return(res)
return(res)
}
str(res)
return(res)
})

download_file <- reactive({
Expand Down

0 comments on commit f5f7bec

Please sign in to comment.