Skip to content

Commit

Permalink
Hide info that has not been added to the config file
Browse files Browse the repository at this point in the history
  • Loading branch information
afwillia committed Nov 8, 2023
1 parent 191b05f commit 76a3f6f
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions server.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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()
)
)
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 76a3f6f

Please sign in to comment.