Skip to content

Commit

Permalink
use nginx likn for download button, because download funcrion of R ne…
Browse files Browse the repository at this point in the history
…eds to zip file take too long
  • Loading branch information
duocang committed Mar 3, 2024
1 parent dba52da commit 20c129f
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions R/server/tab_start.R
Original file line number Diff line number Diff line change
Expand Up @@ -186,25 +186,25 @@ observeEvent(input$run_pmet_btn, {
####################### 1. Download button for ngxin file ########################
# shinyjs::show("pmet_result_download_btn") # hide download button
shinyjs::show("pmet_result_download_btn_temp") # hide download button
# output$pmet_result_download_ui <- renderUI({
# actionButton(
# "pmet_result_download_btn",
# "Result",
# icon = icon("download"),
# class = "btn-success",
# onclick = paste0("location.href='", result_link, "'"),
# style = "width: 130px;margin-left: 30px;"
# )
# }) # end of rednderUI
output$pmet_result_download_ui <- renderUI({
actionButton(
"pmet_result_download_btn",
"Result",
icon = icon("download"),
class = "btn-success",
onclick = paste0("location.href='", result_link, "'"),
style = "width: 130px;margin-left: 30px;"
)
}) # end of rednderUI
# automatically scroll to the spot of download button
runjs('document.getElementById("run_pmet_div").scrollIntoView();')

# dynamically create a button after PMET done to download PMET result
output$pmet_result_download_ui_temp <- renderUI({
downloadButton("pmet_result_download_btn_temp",
"PMET result",
style = "width: 135px"
)
# # dynamically create a button after PMET done to download PMET result
# output$pmet_result_download_ui_temp <- renderUI({
# downloadButton("pmet_result_download_btn_temp",
# "PMET result",
# style = "width: 135px"
# )
})

################################ 2. Notitication ##################################
Expand Down

0 comments on commit 20c129f

Please sign in to comment.