From 76a3f6fb49a547107c88f94edc059e530ba3be87 Mon Sep 17 00:00:00 2001 From: afwillia Date: Tue, 7 Nov 2023 16:02:40 -0800 Subject: [PATCH] Hide info that has not been added to the config file --- server.R | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/server.R b/server.R index bf1b901f..fa8a717e 100644 --- a/server.R +++ b/server.R @@ -35,7 +35,7 @@ shinyServer(function(input, output, session) { ######## session global variables ######## # read config in if (grepl("dev", dcc_config_file)) { - def_config <- fromJSON("https://raw.githubusercontent.com/Sage-Bionetworks/data_curator_config/dev/demo/dca-template-config.json") + def_config <- fromJSON("https://raw.githubusercontent.com/Sage-Bionetworks/data_curator_config/dev-old/demo/dca-template-config.json") } else if (grepl("staging", dcc_config_file)) { def_config <- fromJSON("https://raw.githubusercontent.com/Sage-Bionetworks/data_curator_config/staging/demo/dca-template-config.json") } else def_config <- fromJSON("https://raw.githubusercontent.com/Sage-Bionetworks/data_curator_config/main/demo/dca-template-config.json") @@ -235,7 +235,7 @@ shinyServer(function(input, output, session) { if (!file.exists(conf_file())){ if (grepl("dev", dcc_config_file)) { conf_file( - file.path("https://raw.githubusercontent.com/Sage-Bionetworks/data_curator_config/dev", + file.path("https://raw.githubusercontent.com/Sage-Bionetworks/data_curator_config/dev-old", conf_file() ) ) @@ -324,12 +324,20 @@ shinyServer(function(input, output, session) { }) observeEvent(input$info_box, { + data_model_link <- ifelse(is.null(dcc_config_react()$data_model_info), + dcc_config_react()$data_model_url, + dcc_config_react()$data_model_info) + dca_help_link <- ifelse(is.null(dcc_config_react()$dca_help_link), "", dcc_config_react()$dca_help_link) + portal_help_link <- ifelse(is.null(dcc_config_react()$portal_help_link), "", dcc_config_react()$portal_help_link) + nx_report_info( - title = "App Info", + title = "About Data Curator", tags$ul( - tags$li("DCA Help Docs: ", "todo"), - tags$li("Portal Help Docs: ", "todo"), - tags$li("Data model: ", data_model()), + #tags$li(tags$a(href = "https://sagebionetworks.jira.com/wiki/spaces/SCHEM/pages/2732818485/Data+Curator+App+Setup+for+DCCs+and+Science+Teams+at+Sage", "DCA Help Docs", target = "_blank")), + if (dca_help_link != "") tags$li(tags$a(href = dca_help_link, "DCA Help Docs", target = "_blank")), + if (portal_help_link != "") tags$li(tags$a(href = portal_help_link, "Portal Help Docs", target = "_blank")), + if (data_model_link != "") tags$li(tags$a(href = data_model_link, "Data Model Info", target = "_blank")), + tags$li(tags$a(href = paste0("https://www.synapse.org/#!Synapse:", selected$master_asset_view()), paste("Asset View:", selected$master_asset_view()), target = "_blank")), tags$li("Asset view: ", selected$master_asset_view()), tags$li("DCA version: ", dca_version), tags$li("Schematic version: ", schematic_version),