From 098dff8c2fb9d04dd447f7da4d0abd734ce5b525 Mon Sep 17 00:00:00 2001 From: afwillia Date: Wed, 13 Sep 2023 08:16:31 -0700 Subject: [PATCH 01/23] WIP: start moving auth to header --- R/schematic_rest_api.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/schematic_rest_api.R b/R/schematic_rest_api.R index c2db54ad..f016eee1 100644 --- a/R/schematic_rest_api.R +++ b/R/schematic_rest_api.R @@ -61,6 +61,7 @@ manifest_generate <- function(url="http://localhost:3001/v1/manifest/generate", strict_validation = FALSE) { req <- httr::GET(url, + httr::add_headers(Authorization = sprintf("Bearer %s", access_token)), query = list( schema_url=schema_url, title=title, @@ -69,7 +70,6 @@ manifest_generate <- function(url="http://localhost:3001/v1/manifest/generate", dataset_id=dataset_id, asset_view=asset_view, output_format=output_format, - access_token = access_token, strict_validation = strict_validation )) From cd879b52980e3cf1481f28f254c7dfa79de1a855 Mon Sep 17 00:00:00 2001 From: afwillia Date: Wed, 13 Sep 2023 08:17:10 -0700 Subject: [PATCH 02/23] WIP: start updating auth in tests --- tests/testthat/test_schematic_rest_api.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test_schematic_rest_api.R b/tests/testthat/test_schematic_rest_api.R index 0fa2a1a1..0155b740 100644 --- a/tests/testthat/test_schematic_rest_api.R +++ b/tests/testthat/test_schematic_rest_api.R @@ -4,7 +4,7 @@ context("test schematic rest api wrappers") ### schematic server URL https://github.com/Sage-Bionetworks/schematic/tree/develop/api ### If not available, skip these tests. -schematic_url <- "https://schematic.api.sagebionetworks.org" +schematic_url <- "https://schematic-dev.api.sagebionetworks.org" ping <- try(httr::GET(schematic_url), silent = TRUE) skip_it <- function(skip=ping) { if (inherits(ping, "try-error")) skip(sprintf("schematic server URL unavailable (%s). Is it running locally?", schematic_url)) #nolint @@ -20,7 +20,7 @@ test_that("manifest_generate returns a URL if sucessful", { skip_it() url <- manifest_generate(url=file.path(schematic_url, "v1/manifest/generate"), - schema_url = schema_url, input_token = Sys.getenv("SNYAPSE_PAT"), + schema_url = schema_url, access_token = Sys.getenv("SNYAPSE_PAT"), title="Test biospecimen", data_type="Biospecimen", use_annotations = FALSE, dataset_id="syn33715357", asset_view="syn33715412", From 2669e0d451ca872db157e04c7b97fc7ffc96b931 Mon Sep 17 00:00:00 2001 From: afwillia Date: Tue, 19 Sep 2023 12:50:43 -0700 Subject: [PATCH 03/23] Add auth to header --- R/schematic_rest_api.R | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/R/schematic_rest_api.R b/R/schematic_rest_api.R index f016eee1..b2e39e0e 100644 --- a/R/schematic_rest_api.R +++ b/R/schematic_rest_api.R @@ -21,8 +21,8 @@ check_success <- function(x){ manifest_download <- function(url = "http://localhost:3001/v1/manifest/download", access_token, asset_view, dataset_id, as_json=TRUE, new_manifest_name=NULL) { request <- httr::GET( url = url, + httr::add_headers(Authorization = sprintf("Bearer %s", access_token)), query = list( - access_token = access_token, asset_view = asset_view, dataset_id = dataset_id, as_json = as_json, @@ -161,12 +161,11 @@ model_submit <- function(url="http://localhost:3001/v1/model/submit", use_schema_label=TRUE, manifest_record_type="table_and_file", file_name, table_manipulation="replace", hide_blanks=FALSE) { req <- httr::POST(url, - #add_headers(Authorization=paste0("Bearer ", pat)), + httr::add_headers(Authorization = sprintf("Bearer %s", access_token)), query=list( schema_url=schema_url, data_type=data_type, dataset_id=dataset_id, - access_token=access_token, restrict_rules=restrict_rules, json_str=json_str, asset_view=asset_view, @@ -230,11 +229,10 @@ storage_project_datasets <- function(url="http://localhost:3001/v1/storage/proje access_token) { req <- httr::GET(url, - #add_headers(Authorization=paste0("Bearer ", pat)), + httr::add_headers(Authorization = sprintf("Bearer %s", access_token)), query=list( asset_view=asset_view, - project_id=project_id, - access_token=access_token) + project_id=project_id) ) check_success(req) @@ -254,9 +252,9 @@ storage_projects <- function(url="http://localhost:3001/v1/storage/projects", access_token) { req <- httr::GET(url, + httr::add_headers(Authorization = sprintf("Bearer %s", access_token)), query = list( - asset_view=asset_view, - access_token=access_token + asset_view=asset_view )) check_success(req) @@ -280,13 +278,12 @@ storage_dataset_files <- function(url="http://localhost:3001/v1/storage/dataset/ full_path=FALSE, access_token) { req <- httr::GET(url, - #add_headers(Authorization=paste0("Bearer ", pat)), + httr::add_headers(Authorization = sprintf("Bearer %s", access_token)), query=list( asset_view=asset_view, dataset_id=dataset_id, file_names=file_names, - full_path=full_path, - access_token=access_token)) + full_path=full_path)) check_success(req) httr::content(req) @@ -302,9 +299,9 @@ get_asset_view_table <- function(url="http://localhost:3001/v1/storage/assets/ta access_token, asset_view, return_type="json") { req <- httr::GET(url, + httr::add_headers(Authorization = sprintf("Bearer %s", access_token)), query=list( asset_view=asset_view, - access_token=access_token, return_type=return_type)) check_success(req) From 2b011487f39e7f0f33cc8be15b0893a0997d2eee Mon Sep 17 00:00:00 2001 From: afwillia Date: Tue, 24 Oct 2023 13:04:31 -0700 Subject: [PATCH 04/23] Add info box reactive --- server.R | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/server.R b/server.R index 39b8bebd..a177ae33 100644 --- a/server.R +++ b/server.R @@ -323,6 +323,17 @@ shinyServer(function(input, output, session) { shinyjs::enable("btn_template_select") }) + observeEvent(input$info_box, { + nx_report_info("App Info", + tags$ul( + tags$li("DCA version: ", dca_version), + tags$li("Schematic version: ", schematic_version), + tags$li("Data model: ", data_model()), + tags$li("Asset view: ", selected$master_asset_view()) + ) + ) + }) + # Goal of this observer is to get all of the folders within the selected # project. observeEvent(input$btn_project, { From 449d57cb9e0bcb1b3925455ce5158430100be266 Mon Sep 17 00:00:00 2001 From: afwillia Date: Tue, 24 Oct 2023 13:04:55 -0700 Subject: [PATCH 05/23] WIP: add info box to UI --- ui.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui.R b/ui.R index dd4a377f..b1e06304 100644 --- a/ui.R +++ b/ui.R @@ -106,8 +106,9 @@ ui <- shinydashboardPlus::dashboardPage( ), # add sidebar footer here tags$a( - id = "sidebar_footer", `data-toggle` = "tab", - tags$footer(HTML(' Powered by and Sage Bionetworks')) + id = "sidebar_footer", `data-toggle` = "tab", href = "#shiny-info_box", + tags$footer(actionButton("info_box", "Info", icon("circle-info")), + HTML('Powered by and Sage Bionetworks')) ) ) ) From b50bfc7f884159d74b8472a47fef4fdda89d39c7 Mon Sep 17 00:00:00 2001 From: afwillia Date: Tue, 24 Oct 2023 13:15:26 -0700 Subject: [PATCH 06/23] WIP: add placeholder for DCA and portal help links --- server.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server.R b/server.R index a177ae33..cbb12581 100644 --- a/server.R +++ b/server.R @@ -326,10 +326,12 @@ shinyServer(function(input, output, session) { observeEvent(input$info_box, { nx_report_info("App Info", tags$ul( + tags$li("DCA Help Docs: ", "todo"), + tags$li("Portal Help Docs: ", "todo"), + tags$li("Data model: ", data_model()), + tags$li("Asset view: ", selected$master_asset_view()), tags$li("DCA version: ", dca_version), tags$li("Schematic version: ", schematic_version), - tags$li("Data model: ", data_model()), - tags$li("Asset view: ", selected$master_asset_view()) ) ) }) From a01cc90bcceeb8858c584b4043afb303260523bb Mon Sep 17 00:00:00 2001 From: afwillia Date: Wed, 25 Oct 2023 11:18:17 -0700 Subject: [PATCH 07/23] Try a modal dialog instead of nx report --- server.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server.R b/server.R index cbb12581..1242b8c0 100644 --- a/server.R +++ b/server.R @@ -324,7 +324,9 @@ shinyServer(function(input, output, session) { }) observeEvent(input$info_box, { - nx_report_info("App Info", + showModal(modalDialog( + title = "App Info", + easyClose = TRUE, tags$ul( tags$li("DCA Help Docs: ", "todo"), tags$li("Portal Help Docs: ", "todo"), @@ -332,8 +334,8 @@ shinyServer(function(input, output, session) { tags$li("Asset view: ", selected$master_asset_view()), tags$li("DCA version: ", dca_version), tags$li("Schematic version: ", schematic_version), - ) ) + )) }) # Goal of this observer is to get all of the folders within the selected From 8b07e7fe6c706acc917352dbd37a1356cbda8808 Mon Sep 17 00:00:00 2001 From: afwillia Date: Wed, 25 Oct 2023 11:18:32 -0700 Subject: [PATCH 08/23] change button class to btn-info --- ui.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui.R b/ui.R index b1e06304..932ddba2 100644 --- a/ui.R +++ b/ui.R @@ -107,7 +107,7 @@ ui <- shinydashboardPlus::dashboardPage( # add sidebar footer here tags$a( id = "sidebar_footer", `data-toggle` = "tab", href = "#shiny-info_box", - tags$footer(actionButton("info_box", "Info", icon("circle-info")), + tags$footer(actionButton("info_box", "Info", icon("circle-info"), class="btn-info"), HTML('Powered by and Sage Bionetworks')) ) ) From bb3a01b2f49c4f43c7253c8d3c96341ac2eb4f86 Mon Sep 17 00:00:00 2001 From: afwillia Date: Wed, 25 Oct 2023 12:02:24 -0700 Subject: [PATCH 09/23] Switch back to nx report --- server.R | 5 ++--- ui.R | 8 +++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/server.R b/server.R index 1242b8c0..c05bd399 100644 --- a/server.R +++ b/server.R @@ -324,9 +324,8 @@ shinyServer(function(input, output, session) { }) observeEvent(input$info_box, { - showModal(modalDialog( + nx_report_info( title = "App Info", - easyClose = TRUE, tags$ul( tags$li("DCA Help Docs: ", "todo"), tags$li("Portal Help Docs: ", "todo"), @@ -335,7 +334,7 @@ shinyServer(function(input, output, session) { tags$li("DCA version: ", dca_version), tags$li("Schematic version: ", schematic_version), ) - )) + ) }) # Goal of this observer is to get all of the folders within the selected diff --git a/ui.R b/ui.R index 932ddba2..b5731e5c 100644 --- a/ui.R +++ b/ui.R @@ -107,10 +107,12 @@ ui <- shinydashboardPlus::dashboardPage( # add sidebar footer here tags$a( id = "sidebar_footer", `data-toggle` = "tab", href = "#shiny-info_box", - tags$footer(actionButton("info_box", "Info", icon("circle-info"), class="btn-info"), - HTML('Powered by and Sage Bionetworks')) + tags$footer( + actionButton("info_box", "Info", icon("circle-info"), class="btn-info"), + HTML('Powered by and Sage Bionetworks') + ) ) - ) + ) ) ), dashboardBody( From 7c6ddc55d632006d9fb3f87b3950e90385750ecd Mon Sep 17 00:00:00 2001 From: afwillia Date: Wed, 25 Oct 2023 13:25:39 -0700 Subject: [PATCH 10/23] Add an empty space to indent footer text --- ui.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui.R b/ui.R index b5731e5c..bcc3a80a 100644 --- a/ui.R +++ b/ui.R @@ -109,7 +109,7 @@ ui <- shinydashboardPlus::dashboardPage( id = "sidebar_footer", `data-toggle` = "tab", href = "#shiny-info_box", tags$footer( actionButton("info_box", "Info", icon("circle-info"), class="btn-info"), - HTML('Powered by and Sage Bionetworks') + HTML('  Powered by and Sage Bionetworks') ) ) ) From 8873bb1faec3005619c57891a24f53a6514795e7 Mon Sep 17 00:00:00 2001 From: afwillia Date: Thu, 2 Nov 2023 09:02:38 -0700 Subject: [PATCH 11/23] Change name of info box to about --- ui.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui.R b/ui.R index bcc3a80a..3294350a 100644 --- a/ui.R +++ b/ui.R @@ -108,7 +108,7 @@ ui <- shinydashboardPlus::dashboardPage( tags$a( id = "sidebar_footer", `data-toggle` = "tab", href = "#shiny-info_box", tags$footer( - actionButton("info_box", "Info", icon("circle-info"), class="btn-info"), + actionButton("info_box", "About Data Curator", icon("circle-info"), class="btn-info"), HTML('  Powered by and Sage Bionetworks') ) ) From f47ddf6ddf71fb64e21506208e0e6e233682476a Mon Sep 17 00:00:00 2001 From: afwillia Date: Thu, 2 Nov 2023 09:02:57 -0700 Subject: [PATCH 12/23] hide ok button on error boxes --- server.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server.R b/server.R index c05bd399..bf1b901f 100644 --- a/server.R +++ b/server.R @@ -645,6 +645,7 @@ shinyServer(function(input, output, session) { p("Try again or contact the DCC for help"), p("For debugging: ", manifest_data()) )) + hide(selector = "#NXReportButton") # hide OK button so users can't continue shinyjs::enable("btn_template_select") updateTabsetPanel(session, "tab_template_select") } else { @@ -994,6 +995,7 @@ shinyServer(function(input, output, session) { p("For debugging: ", manifest_id()) ) ) + hide(selector = "#NXReportButton") # hide OK button so users can't continue } else { manifest_path <- tags$a(href = paste0("https://www.synapse.org/#!Synapse:", manifest_id()), manifest_id(), target = "_blank") From 23371dacba5a2729c225f4e5625a5d20d78a5d04 Mon Sep 17 00:00:00 2001 From: afwillia Date: Thu, 2 Nov 2023 09:16:37 -0700 Subject: [PATCH 13/23] change background to match tab selections --- ui.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui.R b/ui.R index 3294350a..070e6130 100644 --- a/ui.R +++ b/ui.R @@ -106,9 +106,10 @@ ui <- shinydashboardPlus::dashboardPage( ), # add sidebar footer here tags$a( - id = "sidebar_footer", `data-toggle` = "tab", href = "#shiny-info_box", + id = "sidebar_footer", `data-toggle` = "tab", tags$footer( - actionButton("info_box", "About Data Curator", icon("circle-info"), class="btn-info"), + actionButton("info_box", "About Data Curator", icon("circle-info"), class="btn-info", + style="color: #fff; background-color: #265675; border-color: #265675"), HTML('  Powered by and Sage Bionetworks') ) ) From b2811c98359838d1d1dc3b24fe49809293956ceb Mon Sep 17 00:00:00 2001 From: afwillia Date: Tue, 7 Nov 2023 15:43:35 -0800 Subject: [PATCH 14/23] Remove dashboard footer --- ui.R | 3 --- 1 file changed, 3 deletions(-) diff --git a/ui.R b/ui.R index 070e6130..d57f739d 100644 --- a/ui.R +++ b/ui.R @@ -298,9 +298,6 @@ ui <- shinydashboardPlus::dashboardPage( ), # waiter loading screen dcWaiter("show", landing = TRUE) - ), - footer = dashboardFooter( - left = sprintf("DCA %s - Schematic %s", dca_version, schematic_version) ) ) From 191b05fb249229d98bf6da02bc61c426ff38b05e Mon Sep 17 00:00:00 2001 From: afwillia Date: Tue, 7 Nov 2023 16:02:10 -0800 Subject: [PATCH 15/23] expand messageMaxLength for notififlix report --- ui.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui.R b/ui.R index d57f739d..4ff2ab76 100644 --- a/ui.R +++ b/ui.R @@ -124,7 +124,7 @@ ui <- shinydashboardPlus::dashboardPage( ), uiOutput("sass"), # load dependencies - use_notiflix_report(width = "400px"), + use_notiflix_report(width = "500px", messageMaxLength = 10000), use_waiter(), tabItems( # second tab content From 76a3f6fb49a547107c88f94edc059e530ba3be87 Mon Sep 17 00:00:00 2001 From: afwillia Date: Tue, 7 Nov 2023 16:02:40 -0800 Subject: [PATCH 16/23] 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), From 7cab279dbb92666dfdeedd3500ae6ae0fd08665e Mon Sep 17 00:00:00 2001 From: afwillia Date: Wed, 8 Nov 2023 08:32:05 -0800 Subject: [PATCH 17/23] Remove extra asset view line in info box --- server.R | 1 - 1 file changed, 1 deletion(-) diff --git a/server.R b/server.R index fa8a717e..eeae6beb 100644 --- a/server.R +++ b/server.R @@ -338,7 +338,6 @@ shinyServer(function(input, output, session) { 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), ) From f3a86950c61e574acbed4bc2cd16bcf19811be2a Mon Sep 17 00:00:00 2001 From: afwillia Date: Wed, 8 Nov 2023 09:37:54 -0800 Subject: [PATCH 18/23] Check for NAs instead of NULL when reading config from csv file --- server.R | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/server.R b/server.R index eeae6beb..2dbd80e3 100644 --- a/server.R +++ b/server.R @@ -324,18 +324,15 @@ shinyServer(function(input, output, session) { }) observeEvent(input$info_box, { - data_model_link <- ifelse(is.null(dcc_config_react()$data_model_info), + data_model_link <- ifelse(is.na(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 = "About Data Curator", tags$ul( - #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 (!is.na(dcc_config_react()$dca_help_link)) tags$li(tags$a(href = dcc_config_react()$dca_help_link, "DCA Help Docs", target = "_blank")), + if (!is.na(dcc_config_react()$portal_help_link)) tags$li(tags$a(href = dcc_config_react()$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("DCA version: ", dca_version), From 9d147c0484515a7e9de4eaccdeff7f5cdca440cb Mon Sep 17 00:00:00 2001 From: afwillia Date: Thu, 9 Nov 2023 08:46:04 -0800 Subject: [PATCH 19/23] Add name of DCC to title of help box. --- server.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.R b/server.R index 2dbd80e3..3ac2ccbc 100644 --- a/server.R +++ b/server.R @@ -329,7 +329,7 @@ shinyServer(function(input, output, session) { dcc_config_react()$data_model_info) nx_report_info( - title = "About Data Curator", + title = sprintf("DCA for %s", dcc_config_react()$project_name), tags$ul( if (!is.na(dcc_config_react()$dca_help_link)) tags$li(tags$a(href = dcc_config_react()$dca_help_link, "DCA Help Docs", target = "_blank")), if (!is.na(dcc_config_react()$portal_help_link)) tags$li(tags$a(href = dcc_config_react()$portal_help_link, "Portal Help Docs", target = "_blank")), From 34735ef1b246f5b35306efb2342e068fcac5039d Mon Sep 17 00:00:00 2001 From: afwillia Date: Thu, 9 Nov 2023 08:52:51 -0800 Subject: [PATCH 20/23] change about button class to btn-primary-color so it matches primary_col in the config file. --- ui.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui.R b/ui.R index 4ff2ab76..55426669 100644 --- a/ui.R +++ b/ui.R @@ -108,8 +108,7 @@ ui <- shinydashboardPlus::dashboardPage( tags$a( id = "sidebar_footer", `data-toggle` = "tab", tags$footer( - actionButton("info_box", "About Data Curator", icon("circle-info"), class="btn-info", - style="color: #fff; background-color: #265675; border-color: #265675"), + actionButton("info_box", "About Data Curator", icon("circle-info"), class="btn-primary-color"), HTML('  Powered by and Sage Bionetworks') ) ) From 2cabcc840260ec8e9db09f70d9b736d1bad70cae Mon Sep 17 00:00:00 2001 From: afwillia Date: Thu, 9 Nov 2023 08:58:53 -0800 Subject: [PATCH 21/23] don't show link to data model, even if data_model_info is empty --- server.R | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/server.R b/server.R index 3ac2ccbc..a6a22874 100644 --- a/server.R +++ b/server.R @@ -324,16 +324,13 @@ shinyServer(function(input, output, session) { }) observeEvent(input$info_box, { - data_model_link <- ifelse(is.na(dcc_config_react()$data_model_info), - dcc_config_react()$data_model_url, - dcc_config_react()$data_model_info) nx_report_info( title = sprintf("DCA for %s", dcc_config_react()$project_name), tags$ul( if (!is.na(dcc_config_react()$dca_help_link)) tags$li(tags$a(href = dcc_config_react()$dca_help_link, "DCA Help Docs", target = "_blank")), if (!is.na(dcc_config_react()$portal_help_link)) tags$li(tags$a(href = dcc_config_react()$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")), + if (!is.na(dcc_config_react()$data_model_info)) tags$li(tags$a(href = dcc_config_react()$data_model_info, "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("DCA version: ", dca_version), tags$li("Schematic version: ", schematic_version), From 2a946c2ff0b98bb2553e97b1c814ae887699e85c Mon Sep 17 00:00:00 2001 From: afwillia Date: Tue, 14 Nov 2023 10:17:42 -0800 Subject: [PATCH 22/23] Increase upload size to 30mb --- global.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/global.R b/global.R index 585042df..1fdf1319 100644 --- a/global.R +++ b/global.R @@ -31,6 +31,8 @@ ncores <- availableCores() message(sprintf("Available cores: %s", ncores)) plan(multicore, workers = ncores) +options(shiny.maxRequestSize=32*1024^2) + # import R files source_files <- list.files(c("functions", "modules"), pattern = "*\\.R$", recursive = TRUE, full.names = TRUE) sapply(source_files, FUN = source) From 835cb4a0c994b08e372d4d3e863fa6adcc2dc692 Mon Sep 17 00:00:00 2001 From: afwillia Date: Tue, 14 Nov 2023 14:22:15 -0800 Subject: [PATCH 23/23] Increase titleMaxLength of info box --- ui.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui.R b/ui.R index 55426669..57bb2233 100644 --- a/ui.R +++ b/ui.R @@ -123,7 +123,8 @@ ui <- shinydashboardPlus::dashboardPage( ), uiOutput("sass"), # load dependencies - use_notiflix_report(width = "500px", messageMaxLength = 10000), + use_notiflix_report(width = "500px", messageMaxLength = 10000, + titleMaxLength = 100), use_waiter(), tabItems( # second tab content