Disable download

This commit is contained in:
2019-04-16 15:48:04 +01:00
parent f5a4f9d155
commit d4d604e3ee

26
app.R
View File

@@ -81,7 +81,7 @@ ui <- dashboardPage(
#menuItem("Habitats", tabName = "3", icon = icon("atlas")), #menuItem("Habitats", tabName = "3", icon = icon("atlas")),
#menuItem("Ingestion", tabName = "3", icon = icon("utensils")), #menuItem("Ingestion", tabName = "3", icon = icon("utensils")),
selectInput("modelSelect", "Select MESO model", choices = c(""), selected = NULL, multiple = FALSE), selectInput("modelSelect", "Select MESO model", choices = c(""), selected = NULL, multiple = FALSE),
downloadButton("download", "", icon = icon("download")), #downloadButton("download", "", icon = icon("download")),
uiOutput("pressureList") uiOutput("pressureList")
) )
), ),
@@ -231,7 +231,7 @@ server <- function(input, output, session) {
lr = -0.95, lr = -0.95,
nr = -0.99, nr = -0.99,
ssgr = 0, ssgr = 0,
pressSD = 0.5 pressSD = 1.0
) )
.selections <- reactiveValues( .selections <- reactiveValues(
@@ -422,8 +422,8 @@ server <- function(input, output, session) {
sliderInput("l1M", "Medium Sensitivity/Med resistance", 0.5, 0.75, abs(.resistanceScores[3]), step = 0.01), sliderInput("l1M", "Medium Sensitivity/Med resistance", 0.5, 0.75, abs(.resistanceScores[3]), step = 0.01),
sliderInput("l1H", "High Sensitivity/Low resistance", 0.75, 1.0, abs(.resistanceScores[4]), step = 0.01), sliderInput("l1H", "High Sensitivity/Low resistance", 0.75, 1.0, abs(.resistanceScores[4]), step = 0.01),
sliderInput("l1VH", "Very High Sensitivity/No resistance", 0.9, 1.0, abs(.resistanceScores[5]), step = 0.01), sliderInput("l1VH", "Very High Sensitivity/No resistance", 0.9, 1.0, abs(.resistanceScores[5]), step = 0.01),
sliderInput("ssgr", "Steady state growth rate", -0.1, 0.1,.resistanceScores[6], step = 0.01), sliderInput("ssgr", "Zero intercept", -0.1, 0.1,.resistanceScores[6], step = 0.01),
sliderInput("l1PressSD", "Pressure Std Dev", 0.1, 1.0, .resistanceScores[7], step = 0.01) sliderInput("l1PressSD", "Std Dev", 0.1, 1.0, .resistanceScores[7], step = 0.01)
) )
}, },
title = "Layer 1 controls", title = "Layer 1 controls",
@@ -662,17 +662,17 @@ server <- function(input, output, session) {
output$download <- downloadHandler( output$download <- downloadHandler(
filename = paste0("MESO-", format(Sys.time(), "%m%d_%H%M"), ".zip"), filename = paste0("MESO-", format(Sys.time(), "%m%d_%H%M"), ".zip"),
content = function(file) { content = function(file) {
showModal( #showModal(
modalDialog( # modalDialog(
fluidRow( # fluidRow(
column(width = 12) %>% withSpinner(type = 5, proxy.height = "200px") # column(width = 12) %>% withSpinner(type = 5, proxy.height = "200px")
), # ),
footer=div() # footer=div()
) # )
) #)
fName <- export(modelList[[.selections$model]]) fName <- export(modelList[[.selections$model]])
file.copy(fName, file) file.copy(fName, file)
removeModal() #removeModal()
}, },
contentType = "application/zip" contentType = "application/zip"
) )