Skip to content

Commit ad0094a

Browse files
authored
Merge pull request #24 from The-Strategy-Unit/23-urls
Add bare URLs to download
2 parents bf91f86 + 4c921b6 commit ad0094a

File tree

4 files changed

+27
-14
lines changed

4 files changed

+27
-14
lines changed

R/utils.R

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ check_env_vars <- function(required_env_vars) {
88
}
99

1010
# Create a {DT} datatable with common settings
11-
create_dt <- function(dat, type = c("users", "content")) {
11+
create_dt <- function(
12+
dat,
13+
type = c("users", "content"),
14+
... # pass further options
15+
) {
1216
dat |>
1317
DT::datatable(
1418
filter = "top",
@@ -23,7 +27,8 @@ create_dt <- function(dat, type = c("users", "content")) {
2327
extend = "csv",
2428
title = glue::glue("{Sys.Date()}_su-posit-connect_{type}-lookup")
2529
)
26-
)
30+
),
31+
...
2732
)
2833
)
2934
}

index.qmd

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,17 @@ This table shows one row per content item. There are `r n_content` content items
7171
7272
content |>
7373
dplyr::mutate(
74-
content_url = glue::glue("<a href='{content_url}'>Link</a>"),
75-
dashboard_url = glue::glue("<a href='{dashboard_url}'>Link</a>"),
74+
content_link = glue::glue("<a href='{content_url}'>Link</a>"),
75+
dashboard_link = glue::glue("<a href='{dashboard_url}'>Link</a>"),
7676
dplyr::across(dplyr::where(is.character), as.factor)
7777
) |>
78-
create_dt("content")
78+
create_dt(
79+
"content",
80+
columnDefs = list(
81+
list(
82+
visible = FALSE,
83+
targets = c("content_url", "dashboard_url")
84+
)
85+
)
86+
)
7987
```

posit-connect-people.Rproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Version: 1.0
2+
ProjectId: d00e3496-481b-4ff5-a061-0492ffc1ae2d
23

34
RestoreWorkspace: Default
45
SaveWorkspace: Default

renv.lock

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@
3939
},
4040
"R6": {
4141
"Package": "R6",
42-
"Version": "2.5.1",
42+
"Version": "2.6.0",
4343
"Source": "Repository",
4444
"Repository": "CRAN",
4545
"Requirements": [
4646
"R"
4747
],
48-
"Hash": "470851b6d5d0ac559e9d01bb352b4021"
48+
"Hash": "245934b1f739076a00b61ee7d9cd5233"
4949
},
5050
"Rcpp": {
5151
"Package": "Rcpp",
@@ -203,14 +203,14 @@
203203
},
204204
"digest": {
205205
"Package": "digest",
206-
"Version": "0.6.37",
206+
"Version": "0.6.35",
207207
"Source": "Repository",
208208
"Repository": "CRAN",
209209
"Requirements": [
210210
"R",
211211
"utils"
212212
],
213-
"Hash": "33698c4b3127fc9f506654607fb73676"
213+
"Hash": "698ece7ba5a4fa4559e3d537e7ec3d31"
214214
},
215215
"dplyr": {
216216
"Package": "dplyr",
@@ -507,20 +507,19 @@
507507
},
508508
"pillar": {
509509
"Package": "pillar",
510-
"Version": "1.9.0",
510+
"Version": "1.10.1",
511511
"Source": "Repository",
512512
"Repository": "CRAN",
513513
"Requirements": [
514514
"cli",
515-
"fansi",
516515
"glue",
517516
"lifecycle",
518517
"rlang",
519518
"utf8",
520519
"utils",
521520
"vctrs"
522521
],
523-
"Hash": "15da5a8412f317beeee6175fbc76f4bb"
522+
"Hash": "8b16b6097daef84cd3c40a6a7c5c9d86"
524523
},
525524
"pkgconfig": {
526525
"Package": "pkgconfig",
@@ -619,7 +618,7 @@
619618
},
620619
"rsconnect": {
621620
"Package": "rsconnect",
622-
"Version": "1.2.2",
621+
"Version": "1.3.4",
623622
"Source": "Repository",
624623
"Repository": "CRAN",
625624
"Requirements": [
@@ -638,7 +637,7 @@
638637
"tools",
639638
"yaml"
640639
],
641-
"Hash": "77e9ed1307e84cd7ca1c7fb2cd7bbfe2"
640+
"Hash": "315454d2f50d117ef58691d0bf50fe63"
642641
},
643642
"rstudioapi": {
644643
"Package": "rstudioapi",

0 commit comments

Comments
 (0)