Commit e8ef2480 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

fix(GUI): display the fact sheets in the GUI again

Refs: #79
2 merge requests!61fix(GUI): display the fact sheets in the GUI again,!59Resolve "Update the 'Summary sheet" tab to display the fact sheets in the GUI"
Pipeline #62556 passed with stage
in 13 minutes and 36 seconds
Showing with 12 additions and 12 deletions
+12 -12
......@@ -516,7 +516,7 @@ shinyServer(function(input, output, session) {
}, priority = +10)
## Time window slider and dataset choosen on the Summary sheet panel
## Time window slider and dataset choosen on the Fact sheet panel
observeEvent({input$Dataset}, {
timeFormat <- ifelse(input$HydroModel == "GR2M", "%Y-%m", "%F")
updateSliderInput(session, inputId = "Period",
......@@ -1122,12 +1122,12 @@ shinyServer(function(input, output, session) {
## --------------- Summary sheet
## --------------- Fact sheet
output$Sheet <- renderUI({
codeRegex <- "\\D{1}\\d{7}"
codeRegex <- "\\D{1}\\d{9}"
codeBH <- gsub(sprintf("(.*)(%s)(.*)", codeRegex), "\\2", input$DatasetSheet)
urlRegex <- "https://webgr.inrae.fr/wp-content/uploads/fiches/%s_fiche.png"
urlRegex <- "https://hydrogr.github.io/BDD-HydroClim/images/fr/%s_INRAE_BDD-HydroClim_fact_sheet_FR.png"
urlSheet <- sprintf(urlRegex, codeBH)
if (airGRteaching:::.CheckUrl(urlSheet)) {
tags$p(tags$h6("Click on the image to open it in a new window and to enlarge it."),
......@@ -1136,15 +1136,15 @@ shinyServer(function(input, output, session) {
alt = "If the image does not appear, click on this link.",
title = "Click to open in a new window")))
} else {
urlSheet <- "fig/sheet_W1110010_thumbnail.png"
urlWebGR <- "https://webgr.inrae.fr"
urlSheet <- "fig/sheet_W111001001_thumbnail.png"
urlWebGR <- "https://webgr.inrae.fr/eng"
txtWebGR <- "webgr.inrae.fr"
urlFraDb <- file.path(urlWebGR, "activites/base-de-donnees/")
txtFraDb <- "All the summary sheets are available on"
tags$p(tags$h1("Sorry, the summary sheet is not available for this dataset."),
urlFraDb <- file.path(urlWebGR, "tools/databases/bdd-hydroclim/")
txtFraDb <- "All the fact sheets are available on"
tags$p(tags$h1("Sorry, the fact sheet is not available for this dataset."),
tags$br(),
tags$h5("Only sheets of stations of the Banque Hydro French database are available."),
tags$h5("To display a summary sheet, the name of the chosen dataset has to contain the Banque Hydro station code (8 characters : 1 letter and 7 numbers)."),
tags$h5("Only sheets of stations of theHydroportail French database are available."),
tags$h5("To display a fact sheet, the name of the chosen dataset has to contain the Hydroportail station code (10 characters : 1 letter and 9 digits)."),
txtFraDb, tags$a(href = urlFraDb, target = "_blank", rel = "noopener noreferrer", txtWebGR), ".",
tags$br(),
tags$br(),
......
......@@ -218,7 +218,7 @@ navbarPage(title = div("airGRteaching",
)
)
),
tabPanel(title = "Summary sheet",
tabPanel(title = "Fact sheet",
icon = icon("table-cells"),
sidebarLayout(position = "left",
sidebarPanel(width = 3,
......
inst/ShinyGR/www/fig/sheet_W111001001_thumbnail.png

83.2 KB

inst/ShinyGR/www/fig/sheet_W1110010_thumbnail.png

232 KB

Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment