From 44c8b82ea317d27ecbb6157e358a62377a6f2adc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Todor=20Kondi=C4=87?= <todor.kondic@uni.lu> Date: Tue, 21 Sep 2021 09:11:34 +0200 Subject: [PATCH] app, shiny-ui-base: Remove save/restore buttons, observers --- R/shiny-ui-base.R | 30 ------------------------------ inst/rmd/app.Rmd | 18 ------------------ 2 files changed, 48 deletions(-) diff --git a/R/shiny-ui-base.R b/R/shiny-ui-base.R index 1c70b78..e119d43 100644 --- a/R/shiny-ui-base.R +++ b/R/shiny-ui-base.R @@ -1200,36 +1200,6 @@ mk_shinyscreen_server <- function(projects,init) { }) - observeEvent(input$state_file_load_b,{ - filters <- matrix(c("RDS files", ".rds", - "YAML config files", ".yaml", - "All files", "*"), - 3, 2, byrow = TRUE) - fn <- tcltk::tk_choose.files(filters=filters, - multi = F) - - message("(config) Loading state from: ", paste(fn,collapse = ",")) - shinymsg(paste("Loading state from: ", fn,"Please wait.",sep="\n")) - fn <- if (length(fn)>0 && nchar(fn[[1]])>0) fn else "" - - if (nchar(fn) > 0) { - if (grepl("yaml",fn)) { - state <- new_state_fn_conf(fn) - conf <- state$conf - update_gui(conf,session=session) - } else { - state <- readRDS(file=fn) - z <- shinyscreen::merge2rev(rvs$m,lst = state) - eval(z) - update_gui(rvs$m$conf, session=session) - } - - } - shinymsg("Loading state has been completed.") - }) - - - observeEvent(input$plot_ext, { rvs$m$conf$figures$ext <- input$plot_ext }) diff --git a/inst/rmd/app.Rmd b/inst/rmd/app.Rmd index 0547f16..3c7104d 100644 --- a/inst/rmd/app.Rmd +++ b/inst/rmd/app.Rmd @@ -456,24 +456,6 @@ DT::dataTableOutput("comp_table") DT::dataTableOutput("setid_table") ``` -# Save and Restore - -Shinyscreen can start from either a previously saved _state_ file (in -RDS format), or from a _YAML_ config file. States saved using GUI can -also be used from the script. - -```{r, echo=FALSE} -actionButton(inputId = "state_file_load_b", - label= "Restore project") - -``` - -```{r, echo=FALSE} -actionButton(inputId = "state_file_save_b", - label= "Save project") - -``` - # Extract Data and Prescreen Shinyscreen can perform spectral extraction based on the desired settings(_ppm_,_retention time window_) under the _Extraction_ tab. The extracted spectra can be subjected to prescreening based on the settings defined under the _prescreening_ tab. -- GitLab