Commit 331979e9 authored by mmassaviol's avatar mmassaviol
Browse files

Update (add dowload config file)

parent 70f43c29
......@@ -752,20 +752,29 @@ generate_menu <- function() {
if("RULEGRAPH" %in% names(APP)){
name <- "RULEGRAPH"
icon <- "gear"
menu <- "Rule Graph"
menu <- "Draw workflow graph"
res <- res + '\tmenuItem("'+menu+'", tabName="'+name+'", icon=icon("'+icon+'", lib="font-awesome"), newtab=FALSE),\n\n'
}
if("download" %in% names(APP)){
res <- res + '\ttags$br(),\n\n'
res <- res + '\tdownloadButton("'+ APP$download$shiny_button$name +'", "'+ APP$download$shiny_button$label +'", class="'+ APP$download$shiny_button$class +'", style="color:black;margin: 6px 5px 6px 15px;"),\n\n'
res <- res + '\ttags$br(),\n\n'
}
res <- res + '\ttags$br(),\n\n'
res <- res + '\tnumericInput("cores", label = "Threads available", min = 1, max = 24, step = 1, width = "auto", value = 16),\n'
# select where to run again from
choices = "list('none'='none',"
choices = "list('No'='none'"
for(step in APP$pages[2:length(APP$pages)]){ # all steps but remove global_params page
choices <- choices + "'" + step$label + "'='" + step$name + "',"
choices <- choices + ",'" + step$label + "'='" + step$name + "'"
}
res <- res + 'selectInput("force_from", label = "Start again from a step : ", selected = "none", choices = '+choices+'"All"="all")),'
res <- res + 'selectInput("force_from", label = "Start again from a step : ", selected = "none", choices = '+choices+')),'
#
......@@ -789,14 +798,6 @@ generate_menu <- function() {
res <- res + '\ttags$br(),\n'
res <- res + '\tactionButton("close_session", "Close session", icon("times"), class="btn btn-primary"),\n'
if("download" %in% names(APP)){
res <- res + '\ttags$br(),\n\n'
res <- res + '\tdownloadButton("'+ APP$download$shiny_button$name +'", "'+ APP$download$shiny_button$label +'", class="'+ APP$download$shiny_button$class +'", style="color:black;margin: 6px 5px 6px 15px;"),\n\n'
}
res <- res + '\ttags$br(),tags$br(),\n\n'
res <- res + '\tmenuItem("Powered by mbb", href="http://mbb.univ-montp2.fr/MBB/index.php", newtab=TRUE, icon=icon("book", lib="font-awesome"), selected=NULL)\n\n'
......@@ -1139,6 +1140,14 @@ generate_app <- function() {
res <- res + '\t\ttoggle_inputs(input_list,T,F)\n'
res <- res + '\t})\n'
res <- res + 'output$DownloadParams <- downloadHandler(\n'
res <- res + '\tfilename = function() {\n'
res <- res + '\t\tpaste0("params", Sys.Date(), ".yaml", sep="")\n'
res <- res + '\t},\n'
res <- res + '\tcontent = function(file) {\n'
res <- res + '\t\tsave_params(file)\n'
res <- res + '\t})\n'
res <- res + 'source("./server/opt_global.R", local=T)\n'
#for(x in 1:length(APP$pages)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment