Skip to content

Commit

Permalink
Merge pull request #132 from inrae/userguide
Browse files Browse the repository at this point in the history
Add dbversion and app version in footer
  • Loading branch information
statnmap authored Jun 8, 2022
2 parents 56c8708 + c2d281d commit c5590d5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Update instructions for the translation of the application
* Update Dockerfile for new R version
* Give instructions on how to use the package out of Shiny
* Add dbversion and package version in the footer (#112)

# diades.atlas 0.2.1

Expand Down
6 changes: 5 additions & 1 deletion R/app_ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ app_ui <- function(request) {
)
),
footer = htmlTemplate(
app_sys("app/www/footer.html")
app_sys("app/www/footer.html"),
db_version = dplyr::tbl(get_con(sess), "dbversion") %>% dplyr::pull(dbversion_number),
# db_version = 1,
app_version = try(as.character(desc::desc_get_version()), silent = TRUE)
# app_version = 2
)
)
)
Expand Down
6 changes: 6 additions & 0 deletions data-raw/aa-a-exploration_data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ get_data_tbl_query_collect(conn_eurodiad,
geom_line(aes(y = hsi))
```

## Get version

```{r}
tbl(conn_eurodiad, "dbversion") %>% pull(dbversion_number)
```


## Disconnect from the database

Expand Down
3 changes: 2 additions & 1 deletion inst/app/www/footer.html
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
<img src="www/DiadES.jpg" height="30px" />
<img src="www/DiadES.jpg" height="30px" />
<div style="right:0;"><span>DB version: {{db_version}}</span> - <span>App version: {{app_version}}</span> - <span>by <a href="https://rtask.thinkr.fr">ThinkR</a></span></div>

0 comments on commit c5590d5

Please sign in to comment.