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 3a59b9e commit ab1a996
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 60 deletions.
60 changes: 30 additions & 30 deletions app/MainApp.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ js_scripts <- function() {
}

upload_fct <- function() {
if (Sys.getenv("RUN_MODE") != "SERVER") {
res <- conditionalPanel(
condition = "input.conditionedPanels == 'Data'",
fileInput("file", "Choose CSV File",
accept = c(
"text/csv",
"text/comma-separated-values,text/plain",
".csv"
output$conditional_data_ui <- renderUI({
if (Sys.getenv("RUN_MODE") != "SERVER") {
res <- conditionalPanel(
condition = "input.conditionedPanels == 'Data'",
fileInput("file", "Choose CSV File",
accept = c(
"text/csv",
"text/comma-separated-values,text/plain",
".csv"
)
)
)
)
return(res)
}
return(NULL)
return(res)
}
})
}
uf <- upload_fct()

app <- function() {
js <- js_scripts()
Expand Down Expand Up @@ -372,23 +372,23 @@ app <- function() {
})

output$conditional_data_ui <- renderUI({
uf
# if (Sys.getenv("RUN_MODE") != "SERVER") {
# 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)
# }
if (Sys.getenv("RUN_MODE") != "SERVER") {
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"
)
)
)
)
showNotification(as.character(res))
return(res)
}
})

download_file <- reactive({
Expand Down
60 changes: 30 additions & 30 deletions bs/R/MainApp.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ js_scripts <- function() {
}

upload_fct <- function() {
if (Sys.getenv("RUN_MODE") != "SERVER") {
res <- conditionalPanel(
condition = "input.conditionedPanels == 'Data'",
fileInput("file", "Choose CSV File",
accept = c(
"text/csv",
"text/comma-separated-values,text/plain",
".csv"
output$conditional_data_ui <- renderUI({
if (Sys.getenv("RUN_MODE") != "SERVER") {
res <- conditionalPanel(
condition = "input.conditionedPanels == 'Data'",
fileInput("file", "Choose CSV File",
accept = c(
"text/csv",
"text/comma-separated-values,text/plain",
".csv"
)
)
)
)
return(res)
}
return(NULL)
return(res)
}
})
}
uf <- upload_fct()

app <- function() {
js <- js_scripts()
Expand Down Expand Up @@ -372,23 +372,23 @@ app <- function() {
})

output$conditional_data_ui <- renderUI({
uf
# if (Sys.getenv("RUN_MODE") != "SERVER") {
# 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)
# }
if (Sys.getenv("RUN_MODE") != "SERVER") {
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"
)
)
)
)
showNotification(as.character(res))
return(res)
}
})

download_file <- reactive({
Expand Down

0 comments on commit ab1a996

Please sign in to comment.