Skip to content
Snippets Groups Projects
Unverified Commit fd0d7544 authored by Todor Kondic's avatar Todor Kondic
Browse files

Use load_inputs for restoring configuration

* R/shiny-ui-config.R(input$restoreConfB):

Use load_inputs from the command line way of doing things to read all
the inputs. This way, we have the batteries included.
parent 7de763ca
No related branches found
No related tags found
No related merge requests found
......@@ -184,14 +184,13 @@ server_conf <- function(input,output,session,rv,rf) {
obsrv_e(input$restoreConfB,{
fn <- shinyFiles::parseFilePaths(roots=volumes,input$restoreConfB)[["datapath"]]
assert(file.exists(fn), msg="The file is unreadable.")
conf <- read_conf(fn)
rv$conf <- lst2rv_lst(conf)
for (nm in names(conf$compounds)) {
rv$conf <- lst2rv_lst(read_conf(fn))
rv <- load_inputs(rv)
for (nm in names(rv$conf$compounds)) {
shiny::updateTextInput(session=session,
inputId=nm,
value=conf$compounds[[nm]])
value=rv$conf$compounds[[nm]])
}
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment