Skip to content

Commit

Permalink
Fix issue with resource path
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwindsor committed Jul 30, 2020
1 parent a80f83a commit 969026c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
14 changes: 11 additions & 3 deletions R/app_server.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
app_server <- function( input, output, session ) {
# Temporary data storage per session
# ===================================
base_tmp <- "tmp_data"
resource_path <- paste0("inst/app/www/", base_tmp, "/")
base_tmp <- "tmp"
resource_path <- paste0("inst/app/www/", base_tmp)
golem::add_resource_path(base_tmp, resource_path)
session_hard_tmp <- paste0(resource_path, session$token, "/") # Where tmp data is actually stored on disk
session_hard_tmp <- paste0(resource_path, "/", session$token, "/") # Where tmp data is actually stored on disk
session_public_tmp <- paste0(base_tmp, "/", session$token, "/") # The public URL to the tmp data

if(!dir.exists(resource_path)) {
Expand Down Expand Up @@ -64,6 +64,14 @@ app_server <- function( input, output, session ) {

classifications <- reactiveVal()

observeEvent(input$show_help, {
showModal(modalDialog(
size="l",
includeMarkdown("README.md")
))
})


observeEvent(input$addClassification, {
req(input$classification_file, input$gtf_file, input$name)

Expand Down
2 changes: 1 addition & 1 deletion R/app_ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ app_ui <- function(request) {
# List the first level UI elements here
dashboardPage(skin="red",
# Application title
dashboardHeader(title="SQANTI Explorer"),
dashboardHeader(title="SQANTI Explorer", tags$li(class = "dropdown", actionButton("show_help", "", icon=icon("question"), style="margin: .6rem .6em 0 0"))),

# Sidebar with a slider input for number of bins
dashboardSidebar(width=350,
Expand Down
1 change: 1 addition & 0 deletions R/run_app.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#' @export
#' @importFrom shiny shinyApp
#' @importFrom golem with_golem_options
#' @importFrom golem add_resource_path
#'
run_app <- function(
...
Expand Down

0 comments on commit 969026c

Please sign in to comment.