From bbe40f7e46b6a7d67c4076d64e3f91f291d59419 Mon Sep 17 00:00:00 2001 From: Toph Allen Date: Wed, 14 May 2025 18:38:02 -0400 Subject: [PATCH 1/9] update renv.lock to get things working --- extensions/usage-metrics-dashboard/renv.lock | 158 +++++------------- .../usage-metrics-dashboard/renv/activate.R | 97 ++++++----- 2 files changed, 101 insertions(+), 154 deletions(-) diff --git a/extensions/usage-metrics-dashboard/renv.lock b/extensions/usage-metrics-dashboard/renv.lock index a4145abb..192937d0 100644 --- a/extensions/usage-metrics-dashboard/renv.lock +++ b/extensions/usage-metrics-dashboard/renv.lock @@ -4,7 +4,7 @@ "Repositories": [ { "Name": "CRAN", - "URL": "https://cran.rstudio.com" + "URL": "https://cloud.r-project.org" } ] }, @@ -394,7 +394,7 @@ }, "cli": { "Package": "cli", - "Version": "3.6.4", + "Version": "3.6.5", "Source": "Repository", "Title": "Helpers for Developing Command Line Interfaces", "Authors@R": "c( person(\"Gábor\", \"Csárdi\", , \"gabor@posit.co\", role = c(\"aut\", \"cre\")), person(\"Hadley\", \"Wickham\", role = \"ctb\"), person(\"Kirill\", \"Müller\", role = \"ctb\"), person(\"Salim\", \"Brüggemann\", , \"salim-b@pm.me\", role = \"ctb\", comment = c(ORCID = \"0000-0002-5329-5987\")), person(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\")) )", @@ -439,60 +439,6 @@ "Maintainer": "Gábor Csárdi ", "Repository": "CRAN" }, - "colorspace": { - "Package": "colorspace", - "Version": "2.1-1", - "Source": "Repository", - "Date": "2024-07-26", - "Title": "A Toolbox for Manipulating and Assessing Colors and Palettes", - "Authors@R": "c(person(given = \"Ross\", family = \"Ihaka\", role = \"aut\", email = \"ihaka@stat.auckland.ac.nz\"), person(given = \"Paul\", family = \"Murrell\", role = \"aut\", email = \"paul@stat.auckland.ac.nz\", comment = c(ORCID = \"0000-0002-3224-8858\")), person(given = \"Kurt\", family = \"Hornik\", role = \"aut\", email = \"Kurt.Hornik@R-project.org\", comment = c(ORCID = \"0000-0003-4198-9911\")), person(given = c(\"Jason\", \"C.\"), family = \"Fisher\", role = \"aut\", email = \"jfisher@usgs.gov\", comment = c(ORCID = \"0000-0001-9032-8912\")), person(given = \"Reto\", family = \"Stauffer\", role = \"aut\", email = \"Reto.Stauffer@uibk.ac.at\", comment = c(ORCID = \"0000-0002-3798-5507\")), person(given = c(\"Claus\", \"O.\"), family = \"Wilke\", role = \"aut\", email = \"wilke@austin.utexas.edu\", comment = c(ORCID = \"0000-0002-7470-9261\")), person(given = c(\"Claire\", \"D.\"), family = \"McWhite\", role = \"aut\", email = \"claire.mcwhite@utmail.utexas.edu\", comment = c(ORCID = \"0000-0001-7346-3047\")), person(given = \"Achim\", family = \"Zeileis\", role = c(\"aut\", \"cre\"), email = \"Achim.Zeileis@R-project.org\", comment = c(ORCID = \"0000-0003-0918-3766\")))", - "Description": "Carries out mapping between assorted color spaces including RGB, HSV, HLS, CIEXYZ, CIELUV, HCL (polar CIELUV), CIELAB, and polar CIELAB. Qualitative, sequential, and diverging color palettes based on HCL colors are provided along with corresponding ggplot2 color scales. Color palette choice is aided by an interactive app (with either a Tcl/Tk or a shiny graphical user interface) and shiny apps with an HCL color picker and a color vision deficiency emulator. Plotting functions for displaying and assessing palettes include color swatches, visualizations of the HCL space, and trajectories in HCL and/or RGB spectrum. Color manipulation functions include: desaturation, lightening/darkening, mixing, and simulation of color vision deficiencies (deutanomaly, protanomaly, tritanomaly). Details can be found on the project web page at and in the accompanying scientific paper: Zeileis et al. (2020, Journal of Statistical Software, ).", - "Depends": [ - "R (>= 3.0.0)", - "methods" - ], - "Imports": [ - "graphics", - "grDevices", - "stats" - ], - "Suggests": [ - "datasets", - "utils", - "KernSmooth", - "MASS", - "kernlab", - "mvtnorm", - "vcd", - "tcltk", - "shiny", - "shinyjs", - "ggplot2", - "dplyr", - "scales", - "grid", - "png", - "jpeg", - "knitr", - "rmarkdown", - "RColorBrewer", - "rcartocolor", - "scico", - "viridis", - "wesanderson" - ], - "VignetteBuilder": "knitr", - "License": "BSD_3_clause + file LICENSE", - "URL": "https://colorspace.R-Forge.R-project.org/, https://hclwizard.org/", - "BugReports": "https://colorspace.R-Forge.R-project.org/contact.html", - "LazyData": "yes", - "Encoding": "UTF-8", - "RoxygenNote": "7.3.1", - "NeedsCompilation": "yes", - "Author": "Ross Ihaka [aut], Paul Murrell [aut] (), Kurt Hornik [aut] (), Jason C. Fisher [aut] (), Reto Stauffer [aut] (), Claus O. Wilke [aut] (), Claire D. McWhite [aut] (), Achim Zeileis [aut, cre] ()", - "Maintainer": "Achim Zeileis ", - "Repository": "CRAN" - }, "commonmark": { "Package": "commonmark", "Version": "1.9.5", @@ -519,7 +465,7 @@ }, "connectapi": { "Package": "connectapi", - "Version": "0.6.0", + "Version": "0.7.0", "Source": "Repository", "Type": "Package", "Title": "Utilities for Interacting with the 'Posit Connect' Server API", @@ -542,7 +488,8 @@ "rlang (>= 0.4.2)", "tibble", "uuid", - "vctrs (>= 0.3.0)" + "vctrs (>= 0.3.0)", + "base64enc" ], "Suggests": [ "covr", @@ -716,7 +663,7 @@ }, "data.table": { "Package": "data.table", - "Version": "1.17.0", + "Version": "1.17.2", "Source": "Repository", "Title": "Extension of `data.frame`", "Depends": [ @@ -744,7 +691,7 @@ "ByteCompile": "TRUE", "Authors@R": "c( person(\"Tyson\",\"Barrett\", role=c(\"aut\",\"cre\"), email=\"t.barrett88@gmail.com\", comment = c(ORCID=\"0000-0002-2137-1391\")), person(\"Matt\",\"Dowle\", role=\"aut\", email=\"mattjdowle@gmail.com\"), person(\"Arun\",\"Srinivasan\", role=\"aut\", email=\"asrini@pm.me\"), person(\"Jan\",\"Gorecki\", role=\"aut\"), person(\"Michael\",\"Chirico\", role=\"aut\", comment = c(ORCID=\"0000-0003-0787-087X\")), person(\"Toby\",\"Hocking\", role=\"aut\", comment = c(ORCID=\"0000-0002-3146-0865\")), person(\"Benjamin\",\"Schwendinger\",role=\"aut\", comment = c(ORCID=\"0000-0003-3315-8114\")), person(\"Ivan\", \"Krylov\", role=\"aut\", email=\"ikrylov@disroot.org\", comment = c(ORCID=\"0000-0002-0172-3812\")), person(\"Pasha\",\"Stetsenko\", role=\"ctb\"), person(\"Tom\",\"Short\", role=\"ctb\"), person(\"Steve\",\"Lianoglou\", role=\"ctb\"), person(\"Eduard\",\"Antonyan\", role=\"ctb\"), person(\"Markus\",\"Bonsch\", role=\"ctb\"), person(\"Hugh\",\"Parsonage\", role=\"ctb\"), person(\"Scott\",\"Ritchie\", role=\"ctb\"), person(\"Kun\",\"Ren\", role=\"ctb\"), person(\"Xianying\",\"Tan\", role=\"ctb\"), person(\"Rick\",\"Saporta\", role=\"ctb\"), person(\"Otto\",\"Seiskari\", role=\"ctb\"), person(\"Xianghui\",\"Dong\", role=\"ctb\"), person(\"Michel\",\"Lang\", role=\"ctb\"), person(\"Watal\",\"Iwasaki\", role=\"ctb\"), person(\"Seth\",\"Wenchel\", role=\"ctb\"), person(\"Karl\",\"Broman\", role=\"ctb\"), person(\"Tobias\",\"Schmidt\", role=\"ctb\"), person(\"David\",\"Arenburg\", role=\"ctb\"), person(\"Ethan\",\"Smith\", role=\"ctb\"), person(\"Francois\",\"Cocquemas\", role=\"ctb\"), person(\"Matthieu\",\"Gomez\", role=\"ctb\"), person(\"Philippe\",\"Chataignon\", role=\"ctb\"), person(\"Nello\",\"Blaser\", role=\"ctb\"), person(\"Dmitry\",\"Selivanov\", role=\"ctb\"), person(\"Andrey\",\"Riabushenko\", role=\"ctb\"), person(\"Cheng\",\"Lee\", role=\"ctb\"), person(\"Declan\",\"Groves\", role=\"ctb\"), person(\"Daniel\",\"Possenriede\", role=\"ctb\"), person(\"Felipe\",\"Parages\", role=\"ctb\"), person(\"Denes\",\"Toth\", role=\"ctb\"), person(\"Mus\",\"Yaramaz-David\", role=\"ctb\"), person(\"Ayappan\",\"Perumal\", role=\"ctb\"), person(\"James\",\"Sams\", role=\"ctb\"), person(\"Martin\",\"Morgan\", role=\"ctb\"), person(\"Michael\",\"Quinn\", role=\"ctb\"), person(\"@javrucebo\",\"\", role=\"ctb\"), person(\"@marc-outins\",\"\", role=\"ctb\"), person(\"Roy\",\"Storey\", role=\"ctb\"), person(\"Manish\",\"Saraswat\", role=\"ctb\"), person(\"Morgan\",\"Jacob\", role=\"ctb\"), person(\"Michael\",\"Schubmehl\", role=\"ctb\"), person(\"Davis\",\"Vaughan\", role=\"ctb\"), person(\"Leonardo\",\"Silvestri\", role=\"ctb\"), person(\"Jim\",\"Hester\", role=\"ctb\"), person(\"Anthony\",\"Damico\", role=\"ctb\"), person(\"Sebastian\",\"Freundt\", role=\"ctb\"), person(\"David\",\"Simons\", role=\"ctb\"), person(\"Elliott\",\"Sales de Andrade\", role=\"ctb\"), person(\"Cole\",\"Miller\", role=\"ctb\"), person(\"Jens Peder\",\"Meldgaard\", role=\"ctb\"), person(\"Vaclav\",\"Tlapak\", role=\"ctb\"), person(\"Kevin\",\"Ushey\", role=\"ctb\"), person(\"Dirk\",\"Eddelbuettel\", role=\"ctb\"), person(\"Tony\",\"Fischetti\", role=\"ctb\"), person(\"Ofek\",\"Shilon\", role=\"ctb\"), person(\"Vadim\",\"Khotilovich\", role=\"ctb\"), person(\"Hadley\",\"Wickham\", role=\"ctb\"), person(\"Bennet\",\"Becker\", role=\"ctb\"), person(\"Kyle\",\"Haynes\", role=\"ctb\"), person(\"Boniface Christian\",\"Kamgang\", role=\"ctb\"), person(\"Olivier\",\"Delmarcell\", role=\"ctb\"), person(\"Josh\",\"O'Brien\", role=\"ctb\"), person(\"Dereck\",\"de Mezquita\", role=\"ctb\"), person(\"Michael\",\"Czekanski\", role=\"ctb\"), person(\"Dmitry\", \"Shemetov\", role=\"ctb\"), person(\"Nitish\", \"Jha\", role=\"ctb\"), person(\"Joshua\", \"Wu\", role=\"ctb\"), person(\"Iago\", \"Giné-Vázquez\", role=\"ctb\"), person(\"Anirban\", \"Chetia\", role=\"ctb\"), person(\"Doris\", \"Amoakohene\", role=\"ctb\"), person(\"Angel\", \"Feliz\", role=\"ctb\"), person(\"Michael\",\"Young\", role=\"ctb\"), person(\"Mark\", \"Seeto\", role=\"ctb\"), person(\"Philippe\", \"Grosjean\", role=\"ctb\"), person(\"Vincent\", \"Runge\", role=\"ctb\"), person(\"Christian\", \"Wia\", role=\"ctb\"), person(\"Elise\", \"Maigné\", role=\"ctb\"), person(\"Vincent\", \"Rocher\", role=\"ctb\"), person(\"Vijay\", \"Lulla\", role=\"ctb\"), person(\"Aljaž\", \"Sluga\", role=\"ctb\"), person(\"Bill\", \"Evans\", role=\"ctb\") )", "NeedsCompilation": "yes", - "Author": "Tyson Barrett [aut, cre] (), Matt Dowle [aut], Arun Srinivasan [aut], Jan Gorecki [aut], Michael Chirico [aut] (), Toby Hocking [aut] (), Benjamin Schwendinger [aut] (), Ivan Krylov [aut] (), Pasha Stetsenko [ctb], Tom Short [ctb], Steve Lianoglou [ctb], Eduard Antonyan [ctb], Markus Bonsch [ctb], Hugh Parsonage [ctb], Scott Ritchie [ctb], Kun Ren [ctb], Xianying Tan [ctb], Rick Saporta [ctb], Otto Seiskari [ctb], Xianghui Dong [ctb], Michel Lang [ctb], Watal Iwasaki [ctb], Seth Wenchel [ctb], Karl Broman [ctb], Tobias Schmidt [ctb], David Arenburg [ctb], Ethan Smith [ctb], Francois Cocquemas [ctb], Matthieu Gomez [ctb], Philippe Chataignon [ctb], Nello Blaser [ctb], Dmitry Selivanov [ctb], Andrey Riabushenko [ctb], Cheng Lee [ctb], Declan Groves [ctb], Daniel Possenriede [ctb], Felipe Parages [ctb], Denes Toth [ctb], Mus Yaramaz-David [ctb], Ayappan Perumal [ctb], James Sams [ctb], Martin Morgan [ctb], Michael Quinn [ctb], @javrucebo [ctb], @marc-outins [ctb], Roy Storey [ctb], Manish Saraswat [ctb], Morgan Jacob [ctb], Michael Schubmehl [ctb], Davis Vaughan [ctb], Leonardo Silvestri [ctb], Jim Hester [ctb], Anthony Damico [ctb], Sebastian Freundt [ctb], David Simons [ctb], Elliott Sales de Andrade [ctb], Cole Miller [ctb], Jens Peder Meldgaard [ctb], Vaclav Tlapak [ctb], Kevin Ushey [ctb], Dirk Eddelbuettel [ctb], Tony Fischetti [ctb], Ofek Shilon [ctb], Vadim Khotilovich [ctb], Hadley Wickham [ctb], Bennet Becker [ctb], Kyle Haynes [ctb], Boniface Christian Kamgang [ctb], Olivier Delmarcell [ctb], Josh O'Brien [ctb], Dereck de Mezquita [ctb], Michael Czekanski [ctb], Dmitry Shemetov [ctb], Nitish Jha [ctb], Joshua Wu [ctb], Iago Giné-Vázquez [ctb], Anirban Chetia [ctb], Doris Amoakohene [ctb], Angel Feliz [ctb], Michael Young [ctb], Mark Seeto [ctb], Philippe Grosjean [ctb], Vincent Runge [ctb], Christian Wia [ctb], Elise Maigné [ctb], Vincent Rocher [ctb], Vijay Lulla [ctb], Aljaž Sluga [ctb], Bill Evans [ctb]", + "Author": "Tyson Barrett [aut, cre] (ORCID: ), Matt Dowle [aut], Arun Srinivasan [aut], Jan Gorecki [aut], Michael Chirico [aut] (ORCID: ), Toby Hocking [aut] (ORCID: ), Benjamin Schwendinger [aut] (ORCID: ), Ivan Krylov [aut] (ORCID: ), Pasha Stetsenko [ctb], Tom Short [ctb], Steve Lianoglou [ctb], Eduard Antonyan [ctb], Markus Bonsch [ctb], Hugh Parsonage [ctb], Scott Ritchie [ctb], Kun Ren [ctb], Xianying Tan [ctb], Rick Saporta [ctb], Otto Seiskari [ctb], Xianghui Dong [ctb], Michel Lang [ctb], Watal Iwasaki [ctb], Seth Wenchel [ctb], Karl Broman [ctb], Tobias Schmidt [ctb], David Arenburg [ctb], Ethan Smith [ctb], Francois Cocquemas [ctb], Matthieu Gomez [ctb], Philippe Chataignon [ctb], Nello Blaser [ctb], Dmitry Selivanov [ctb], Andrey Riabushenko [ctb], Cheng Lee [ctb], Declan Groves [ctb], Daniel Possenriede [ctb], Felipe Parages [ctb], Denes Toth [ctb], Mus Yaramaz-David [ctb], Ayappan Perumal [ctb], James Sams [ctb], Martin Morgan [ctb], Michael Quinn [ctb], @javrucebo [ctb], @marc-outins [ctb], Roy Storey [ctb], Manish Saraswat [ctb], Morgan Jacob [ctb], Michael Schubmehl [ctb], Davis Vaughan [ctb], Leonardo Silvestri [ctb], Jim Hester [ctb], Anthony Damico [ctb], Sebastian Freundt [ctb], David Simons [ctb], Elliott Sales de Andrade [ctb], Cole Miller [ctb], Jens Peder Meldgaard [ctb], Vaclav Tlapak [ctb], Kevin Ushey [ctb], Dirk Eddelbuettel [ctb], Tony Fischetti [ctb], Ofek Shilon [ctb], Vadim Khotilovich [ctb], Hadley Wickham [ctb], Bennet Becker [ctb], Kyle Haynes [ctb], Boniface Christian Kamgang [ctb], Olivier Delmarcell [ctb], Josh O'Brien [ctb], Dereck de Mezquita [ctb], Michael Czekanski [ctb], Dmitry Shemetov [ctb], Nitish Jha [ctb], Joshua Wu [ctb], Iago Giné-Vázquez [ctb], Anirban Chetia [ctb], Doris Amoakohene [ctb], Angel Feliz [ctb], Michael Young [ctb], Mark Seeto [ctb], Philippe Grosjean [ctb], Vincent Runge [ctb], Christian Wia [ctb], Elise Maigné [ctb], Vincent Rocher [ctb], Vijay Lulla [ctb], Aljaž Sluga [ctb], Bill Evans [ctb]", "Maintainer": "Tyson Barrett ", "Repository": "CRAN" }, @@ -985,7 +932,7 @@ }, "fs": { "Package": "fs", - "Version": "1.6.5", + "Version": "1.6.6", "Source": "Repository", "Title": "Cross-Platform File System Operations Based on 'libuv'", "Authors@R": "c( person(\"Jim\", \"Hester\", role = \"aut\"), person(\"Hadley\", \"Wickham\", , \"hadley@posit.co\", role = \"aut\"), person(\"Gábor\", \"Csárdi\", , \"csardi.gabor@gmail.com\", role = c(\"aut\", \"cre\")), person(\"libuv project contributors\", role = \"cph\", comment = \"libuv library\"), person(\"Joyent, Inc. and other Node contributors\", role = \"cph\", comment = \"libuv library\"), person(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\")) )", @@ -1027,16 +974,16 @@ }, "generics": { "Package": "generics", - "Version": "0.1.3", + "Version": "0.1.4", "Source": "Repository", "Title": "Common S3 Generics not Provided by Base R Methods Related to Model Fitting", - "Authors@R": "c( person(\"Hadley\", \"Wickham\", , \"hadley@rstudio.com\", role = c(\"aut\", \"cre\")), person(\"Max\", \"Kuhn\", , \"max@rstudio.com\", role = \"aut\"), person(\"Davis\", \"Vaughan\", , \"davis@rstudio.com\", role = \"aut\"), person(\"RStudio\", role = \"cph\") )", + "Authors@R": "c( person(\"Hadley\", \"Wickham\", , \"hadley@posit.co\", role = c(\"aut\", \"cre\"), comment = c(ORCID = \"0000-0003-4757-117X\")), person(\"Max\", \"Kuhn\", , \"max@posit.co\", role = \"aut\"), person(\"Davis\", \"Vaughan\", , \"davis@posit.co\", role = \"aut\"), person(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\"), comment = c(ROR = \"https://ror.org/03wc8by49\")) )", "Description": "In order to reduce potential package dependencies and conflicts, generics provides a number of commonly used S3 generics.", "License": "MIT + file LICENSE", "URL": "https://generics.r-lib.org, https://github.com/r-lib/generics", "BugReports": "https://github.com/r-lib/generics/issues", "Depends": [ - "R (>= 3.2)" + "R (>= 3.6)" ], "Imports": [ "methods" @@ -1051,15 +998,15 @@ "Config/Needs/website": "tidyverse/tidytemplate", "Config/testthat/edition": "3", "Encoding": "UTF-8", - "RoxygenNote": "7.2.0", + "RoxygenNote": "7.3.2", "NeedsCompilation": "no", - "Author": "Hadley Wickham [aut, cre], Max Kuhn [aut], Davis Vaughan [aut], RStudio [cph]", - "Maintainer": "Hadley Wickham ", + "Author": "Hadley Wickham [aut, cre] (ORCID: ), Max Kuhn [aut], Davis Vaughan [aut], Posit Software, PBC [cph, fnd] (ROR: )", + "Maintainer": "Hadley Wickham ", "Repository": "CRAN" }, "ggplot2": { "Package": "ggplot2", - "Version": "3.5.1", + "Version": "3.5.2", "Source": "Repository", "Title": "Create Elegant Data Visualisations Using the Grammar of Graphics", "Authors@R": "c( person(\"Hadley\", \"Wickham\", , \"hadley@posit.co\", role = \"aut\", comment = c(ORCID = \"0000-0003-4757-117X\")), person(\"Winston\", \"Chang\", role = \"aut\", comment = c(ORCID = \"0000-0002-1576-2126\")), person(\"Lionel\", \"Henry\", role = \"aut\"), person(\"Thomas Lin\", \"Pedersen\", , \"thomas.pedersen@posit.co\", role = c(\"aut\", \"cre\"), comment = c(ORCID = \"0000-0002-5147-4711\")), person(\"Kohske\", \"Takahashi\", role = \"aut\"), person(\"Claus\", \"Wilke\", role = \"aut\", comment = c(ORCID = \"0000-0002-7470-9261\")), person(\"Kara\", \"Woo\", role = \"aut\", comment = c(ORCID = \"0000-0002-5125-4188\")), person(\"Hiroaki\", \"Yutani\", role = \"aut\", comment = c(ORCID = \"0000-0002-3385-7233\")), person(\"Dewey\", \"Dunnington\", role = \"aut\", comment = c(ORCID = \"0000-0002-9415-4582\")), person(\"Teun\", \"van den Brand\", role = \"aut\", comment = c(ORCID = \"0000-0002-9335-7468\")), person(\"Posit, PBC\", role = c(\"cph\", \"fnd\")) )", @@ -1119,7 +1066,7 @@ "Config/testthat/edition": "3", "Encoding": "UTF-8", "LazyData": "true", - "RoxygenNote": "7.3.1", + "RoxygenNote": "7.3.2", "Collate": "'ggproto.R' 'ggplot-global.R' 'aaa-.R' 'aes-colour-fill-alpha.R' 'aes-evaluation.R' 'aes-group-order.R' 'aes-linetype-size-shape.R' 'aes-position.R' 'compat-plyr.R' 'utilities.R' 'aes.R' 'utilities-checks.R' 'legend-draw.R' 'geom-.R' 'annotation-custom.R' 'annotation-logticks.R' 'geom-polygon.R' 'geom-map.R' 'annotation-map.R' 'geom-raster.R' 'annotation-raster.R' 'annotation.R' 'autolayer.R' 'autoplot.R' 'axis-secondary.R' 'backports.R' 'bench.R' 'bin.R' 'coord-.R' 'coord-cartesian-.R' 'coord-fixed.R' 'coord-flip.R' 'coord-map.R' 'coord-munch.R' 'coord-polar.R' 'coord-quickmap.R' 'coord-radial.R' 'coord-sf.R' 'coord-transform.R' 'data.R' 'docs_layer.R' 'facet-.R' 'facet-grid-.R' 'facet-null.R' 'facet-wrap.R' 'fortify-lm.R' 'fortify-map.R' 'fortify-multcomp.R' 'fortify-spatial.R' 'fortify.R' 'stat-.R' 'geom-abline.R' 'geom-rect.R' 'geom-bar.R' 'geom-bin2d.R' 'geom-blank.R' 'geom-boxplot.R' 'geom-col.R' 'geom-path.R' 'geom-contour.R' 'geom-count.R' 'geom-crossbar.R' 'geom-segment.R' 'geom-curve.R' 'geom-defaults.R' 'geom-ribbon.R' 'geom-density.R' 'geom-density2d.R' 'geom-dotplot.R' 'geom-errorbar.R' 'geom-errorbarh.R' 'geom-freqpoly.R' 'geom-function.R' 'geom-hex.R' 'geom-histogram.R' 'geom-hline.R' 'geom-jitter.R' 'geom-label.R' 'geom-linerange.R' 'geom-point.R' 'geom-pointrange.R' 'geom-quantile.R' 'geom-rug.R' 'geom-sf.R' 'geom-smooth.R' 'geom-spoke.R' 'geom-text.R' 'geom-tile.R' 'geom-violin.R' 'geom-vline.R' 'ggplot2-package.R' 'grob-absolute.R' 'grob-dotstack.R' 'grob-null.R' 'grouping.R' 'theme-elements.R' 'guide-.R' 'guide-axis.R' 'guide-axis-logticks.R' 'guide-axis-stack.R' 'guide-axis-theta.R' 'guide-legend.R' 'guide-bins.R' 'guide-colorbar.R' 'guide-colorsteps.R' 'guide-custom.R' 'layer.R' 'guide-none.R' 'guide-old.R' 'guides-.R' 'guides-grid.R' 'hexbin.R' 'import-standalone-obj-type.R' 'import-standalone-types-check.R' 'labeller.R' 'labels.R' 'layer-sf.R' 'layout.R' 'limits.R' 'margins.R' 'performance.R' 'plot-build.R' 'plot-construction.R' 'plot-last.R' 'plot.R' 'position-.R' 'position-collide.R' 'position-dodge.R' 'position-dodge2.R' 'position-identity.R' 'position-jitter.R' 'position-jitterdodge.R' 'position-nudge.R' 'position-stack.R' 'quick-plot.R' 'reshape-add-margins.R' 'save.R' 'scale-.R' 'scale-alpha.R' 'scale-binned.R' 'scale-brewer.R' 'scale-colour.R' 'scale-continuous.R' 'scale-date.R' 'scale-discrete-.R' 'scale-expansion.R' 'scale-gradient.R' 'scale-grey.R' 'scale-hue.R' 'scale-identity.R' 'scale-linetype.R' 'scale-linewidth.R' 'scale-manual.R' 'scale-shape.R' 'scale-size.R' 'scale-steps.R' 'scale-type.R' 'scale-view.R' 'scale-viridis.R' 'scales-.R' 'stat-align.R' 'stat-bin.R' 'stat-bin2d.R' 'stat-bindot.R' 'stat-binhex.R' 'stat-boxplot.R' 'stat-contour.R' 'stat-count.R' 'stat-density-2d.R' 'stat-density.R' 'stat-ecdf.R' 'stat-ellipse.R' 'stat-function.R' 'stat-identity.R' 'stat-qq-line.R' 'stat-qq.R' 'stat-quantilemethods.R' 'stat-sf-coordinates.R' 'stat-sf.R' 'stat-smooth-methods.R' 'stat-smooth.R' 'stat-sum.R' 'stat-summary-2d.R' 'stat-summary-bin.R' 'stat-summary-hex.R' 'stat-summary.R' 'stat-unique.R' 'stat-ydensity.R' 'summarise-plot.R' 'summary.R' 'theme.R' 'theme-defaults.R' 'theme-current.R' 'utilities-break.R' 'utilities-grid.R' 'utilities-help.R' 'utilities-matrix.R' 'utilities-patterns.R' 'utilities-resolution.R' 'utilities-tidy-eval.R' 'zxx.R' 'zzz.R'", "NeedsCompilation": "no", "Author": "Hadley Wickham [aut] (), Winston Chang [aut] (), Lionel Henry [aut], Thomas Lin Pedersen [aut, cre] (), Kohske Takahashi [aut], Claus Wilke [aut] (), Kara Woo [aut] (), Hiroaki Yutani [aut] (), Dewey Dunnington [aut] (), Teun van den Brand [aut] (), Posit, PBC [cph, fnd]", @@ -1315,7 +1262,7 @@ }, "httpuv": { "Package": "httpuv", - "Version": "1.6.15", + "Version": "1.6.16", "Source": "Repository", "Type": "Package", "Title": "HTTP and WebSocket Server Library", @@ -1337,6 +1284,7 @@ "Suggests": [ "callr", "curl", + "jsonlite", "testthat", "websocket" ], @@ -1345,7 +1293,7 @@ "Rcpp" ], "Encoding": "UTF-8", - "RoxygenNote": "7.3.1", + "RoxygenNote": "7.3.2", "SystemRequirements": "GNU make, zlib", "Collate": "'RcppExports.R' 'httpuv.R' 'random_port.R' 'server.R' 'staticServer.R' 'static_paths.R' 'utils.R'", "NeedsCompilation": "yes", @@ -1862,31 +1810,6 @@ "Maintainer": "Yihui Xie ", "Repository": "CRAN" }, - "munsell": { - "Package": "munsell", - "Version": "0.5.1", - "Source": "Repository", - "Type": "Package", - "Title": "Utilities for Using Munsell Colours", - "Author": "Charlotte Wickham ", - "Maintainer": "Charlotte Wickham ", - "Description": "Provides easy access to, and manipulation of, the Munsell colours. Provides a mapping between Munsell's original notation (e.g. \"5R 5/10\") and hexadecimal strings suitable for use directly in R graphics. Also provides utilities to explore slices through the Munsell colour tree, to transform Munsell colours and display colour palettes.", - "Suggests": [ - "ggplot2", - "testthat" - ], - "Imports": [ - "colorspace", - "methods" - ], - "License": "MIT + file LICENSE", - "URL": "https://cran.r-project.org/package=munsell, https://github.com/cwickham/munsell/", - "RoxygenNote": "7.3.1", - "Encoding": "UTF-8", - "BugReports": "https://github.com/cwickham/munsell/issues", - "NeedsCompilation": "no", - "Repository": "CRAN" - }, "nlme": { "Package": "nlme", "Version": "3.1-164", @@ -1957,7 +1880,7 @@ }, "pillar": { "Package": "pillar", - "Version": "1.10.1", + "Version": "1.10.2", "Source": "Repository", "Title": "Coloured Formatting for Columns", "Authors@R": "c(person(given = \"Kirill\", family = \"M\\u00fcller\", role = c(\"aut\", \"cre\"), email = \"kirill@cynkra.com\", comment = c(ORCID = \"0000-0002-1416-3412\")), person(given = \"Hadley\", family = \"Wickham\", role = \"aut\"), person(given = \"RStudio\", role = \"cph\"))", @@ -2005,7 +1928,7 @@ "Config/testthat/start-first": "format_multi_fuzz, format_multi_fuzz_2, format_multi, ctl_colonnade, ctl_colonnade_1, ctl_colonnade_2", "Config/autostyle/scope": "line_breaks", "Config/autostyle/strict": "true", - "Config/gha/extra-packages": "DiagrammeR=?ignore-before-r=3.5.0", + "Config/gha/extra-packages": "units=?ignore-before-r=4.3.0", "Config/Needs/website": "tidyverse/tidytemplate", "NeedsCompilation": "no", "Author": "Kirill Müller [aut, cre] (), Hadley Wickham [aut], RStudio [cph]", @@ -2014,7 +1937,7 @@ }, "pins": { "Package": "pins", - "Version": "1.4.0", + "Version": "1.4.1", "Source": "Repository", "Type": "Package", "Title": "Pin, Discover, and Share Resources", @@ -2382,7 +2305,7 @@ }, "renv": { "Package": "renv", - "Version": "1.1.2", + "Version": "1.1.4", "Source": "Repository", "Type": "Package", "Title": "Project Environments", @@ -2435,11 +2358,11 @@ }, "rlang": { "Package": "rlang", - "Version": "1.1.5", + "Version": "1.1.6", "Source": "Repository", "Title": "Functions for Base Types and Core R and 'Tidyverse' Features", "Description": "A toolbox for working with base types, core R features like the condition system, and core 'Tidyverse' features like tidy evaluation.", - "Authors@R": "c( person(\"Lionel\", \"Henry\", ,\"lionel@posit.co\", c(\"aut\", \"cre\")), person(\"Hadley\", \"Wickham\", ,\"hadley@posit.co\", \"aut\"), person(given = \"mikefc\", email = \"mikefc@coolbutuseless.com\", role = \"cph\", comment = \"Hash implementation based on Mike's xxhashlite\"), person(given = \"Yann\", family = \"Collet\", role = \"cph\", comment = \"Author of the embedded xxHash library\"), person(given = \"Posit, PBC\", role = c(\"cph\", \"fnd\")) )", + "Authors@R": "c( person(\"Lionel\", \"Henry\", ,\"lionel@posit.co\", c(\"aut\", \"cre\")), person(\"Hadley\", \"Wickham\", ,\"hadley@posit.co\", \"aut\"), person(given = \"mikefc\", email = \"mikefc@coolbutuseless.com\", role = \"cph\", comment = \"Hash implementation based on Mike's xxhashlite\"), person(given = \"Yann\", family = \"Collet\", role = \"cph\", comment = \"Author of the embedded xxHash library\"), person(given = \"Posit, PBC\", role = c(\"cph\", \"fnd\")) )", "License": "MIT + file LICENSE", "ByteCompile": "true", "Biarch": "true", @@ -2453,15 +2376,17 @@ "cli (>= 3.1.0)", "covr", "crayon", + "desc", "fs", "glue", "knitr", "magrittr", "methods", "pillar", + "pkgload", "rmarkdown", "stats", - "testthat (>= 3.0.0)", + "testthat (>= 3.2.0)", "tibble", "usethis", "vctrs (>= 0.2.3)", @@ -2474,6 +2399,7 @@ "RoxygenNote": "7.3.2", "URL": "https://rlang.r-lib.org, https://github.com/r-lib/rlang", "BugReports": "https://github.com/r-lib/rlang/issues", + "Config/build/compilation-database": "true", "Config/testthat/edition": "3", "Config/Needs/website": "dplyr, tidyverse/tidytemplate", "NeedsCompilation": "yes", @@ -2539,7 +2465,7 @@ }, "sass": { "Package": "sass", - "Version": "0.4.9", + "Version": "0.4.10", "Source": "Repository", "Type": "Package", "Title": "Syntactically Awesome Style Sheets ('Sass')", @@ -2549,7 +2475,7 @@ "URL": "https://rstudio.github.io/sass/, https://github.com/rstudio/sass", "BugReports": "https://github.com/rstudio/sass/issues", "Encoding": "UTF-8", - "RoxygenNote": "7.3.1", + "RoxygenNote": "7.3.2", "SystemRequirements": "GNU make", "Imports": [ "fs (>= 1.2.4)", @@ -2575,16 +2501,16 @@ }, "scales": { "Package": "scales", - "Version": "1.3.0", + "Version": "1.4.0", "Source": "Repository", "Title": "Scale Functions for Visualization", - "Authors@R": "c( person(\"Hadley\", \"Wickham\", , \"hadley@posit.co\", role = c(\"aut\")), person(\"Thomas Lin\", \"Pedersen\", , \"thomas.pedersen@posit.co\", role = c(\"cre\", \"aut\"), comment = c(ORCID = \"0000-0002-5147-4711\")), person(\"Dana\", \"Seidel\", role = \"aut\"), person(\"Posit, PBC\", role = c(\"cph\", \"fnd\")) )", + "Authors@R": "c( person(\"Hadley\", \"Wickham\", , \"hadley@posit.co\", role = \"aut\"), person(\"Thomas Lin\", \"Pedersen\", , \"thomas.pedersen@posit.co\", role = c(\"cre\", \"aut\"), comment = c(ORCID = \"0000-0002-5147-4711\")), person(\"Dana\", \"Seidel\", role = \"aut\"), person(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\"), comment = c(ROR = \"03wc8by49\")) )", "Description": "Graphical scales map data to aesthetics, and provide methods for automatically determining breaks and labels for axes and legends.", "License": "MIT + file LICENSE", "URL": "https://scales.r-lib.org, https://github.com/r-lib/scales", "BugReports": "https://github.com/r-lib/scales/issues", "Depends": [ - "R (>= 3.6)" + "R (>= 4.1)" ], "Imports": [ "cli", @@ -2592,10 +2518,9 @@ "glue", "labeling", "lifecycle", - "munsell (>= 0.5)", "R6", "RColorBrewer", - "rlang (>= 1.0.0)", + "rlang (>= 1.1.0)", "viridisLite" ], "Suggests": [ @@ -2609,11 +2534,12 @@ ], "Config/Needs/website": "tidyverse/tidytemplate", "Config/testthat/edition": "3", + "Config/usethis/last-upkeep": "2025-04-23", "Encoding": "UTF-8", "LazyLoad": "yes", - "RoxygenNote": "7.2.3", - "NeedsCompilation": "yes", - "Author": "Hadley Wickham [aut], Thomas Lin Pedersen [cre, aut] (), Dana Seidel [aut], Posit, PBC [cph, fnd]", + "RoxygenNote": "7.3.2", + "NeedsCompilation": "no", + "Author": "Hadley Wickham [aut], Thomas Lin Pedersen [cre, aut] (), Dana Seidel [aut], Posit Software, PBC [cph, fnd] (03wc8by49)", "Maintainer": "Thomas Lin Pedersen ", "Repository": "CRAN" }, @@ -3059,7 +2985,7 @@ }, "tinytex": { "Package": "tinytex", - "Version": "0.56", + "Version": "0.57", "Source": "Repository", "Type": "Package", "Title": "Helper Functions to Install and Maintain TeX Live, and Compile LaTeX Documents", @@ -3084,7 +3010,7 @@ }, "utf8": { "Package": "utf8", - "Version": "1.2.4", + "Version": "1.2.5", "Source": "Repository", "Title": "Unicode Text Processing", "Authors@R": "c(person(given = c(\"Patrick\", \"O.\"), family = \"Perry\", role = c(\"aut\", \"cph\")), person(given = \"Kirill\", family = \"M\\u00fcller\", role = \"cre\", email = \"kirill@cynkra.com\"), person(given = \"Unicode, Inc.\", role = c(\"cph\", \"dtc\"), comment = \"Unicode Character Database\"))", @@ -3107,7 +3033,7 @@ "VignetteBuilder": "knitr, rmarkdown", "Config/testthat/edition": "3", "Encoding": "UTF-8", - "RoxygenNote": "7.2.3", + "RoxygenNote": "7.3.2.9000", "NeedsCompilation": "yes", "Author": "Patrick O. Perry [aut, cph], Kirill Müller [cre], Unicode, Inc. [cph, dtc] (Unicode Character Database)", "Maintainer": "Kirill Müller ", diff --git a/extensions/usage-metrics-dashboard/renv/activate.R b/extensions/usage-metrics-dashboard/renv/activate.R index c9f59425..90b251ca 100644 --- a/extensions/usage-metrics-dashboard/renv/activate.R +++ b/extensions/usage-metrics-dashboard/renv/activate.R @@ -2,7 +2,7 @@ local({ # the requested version of renv - version <- "1.1.2" + version <- "1.1.4" attr(version, "sha") <- NULL # the project directory @@ -695,11 +695,19 @@ local({ } - renv_bootstrap_platform_prefix <- function() { + renv_bootstrap_platform_prefix_default <- function() { - # construct version prefix - version <- paste(R.version$major, R.version$minor, sep = ".") - prefix <- paste("R", numeric_version(version)[1, 1:2], sep = "-") + # read version component + version <- Sys.getenv("RENV_PATHS_VERSION", unset = "R-%v") + + # expand placeholders + placeholders <- list( + list("%v", format(getRversion()[1, 1:2])), + list("%V", format(getRversion()[1, 1:3])) + ) + + for (placeholder in placeholders) + version <- gsub(placeholder[[1L]], placeholder[[2L]], version, fixed = TRUE) # include SVN revision for development versions of R # (to avoid sharing platform-specific artefacts with released versions of R) @@ -708,10 +716,19 @@ local({ identical(R.version[["nickname"]], "Unsuffered Consequences") if (devel) - prefix <- paste(prefix, R.version[["svn rev"]], sep = "-r") + version <- paste(version, R.version[["svn rev"]], sep = "-r") + + version + + } + + renv_bootstrap_platform_prefix <- function() { + + # construct version prefix + version <- renv_bootstrap_platform_prefix_default() # build list of path components - components <- c(prefix, R.version$platform) + components <- c(version, R.version$platform) # include prefix if provided by user prefix <- renv_bootstrap_platform_prefix_impl() @@ -950,14 +967,14 @@ local({ } renv_bootstrap_validate_version_dev <- function(version, description) { - + expected <- description[["RemoteSha"]] if (!is.character(expected)) return(FALSE) - + pattern <- sprintf("^\\Q%s\\E", version) grepl(pattern, expected, perl = TRUE) - + } renv_bootstrap_validate_version_release <- function(version, description) { @@ -1198,86 +1215,89 @@ local({ } renv_json_read_patterns <- function() { - + list( - + # objects - list("{", "\t\n\tobject(\t\n\t"), - list("}", "\t\n\t)\t\n\t"), - + list("{", "\t\n\tobject(\t\n\t", TRUE), + list("}", "\t\n\t)\t\n\t", TRUE), + # arrays - list("[", "\t\n\tarray(\t\n\t"), - list("]", "\n\t\n)\n\t\n"), - + list("[", "\t\n\tarray(\t\n\t", TRUE), + list("]", "\n\t\n)\n\t\n", TRUE), + # maps - list(":", "\t\n\t=\t\n\t") - + list(":", "\t\n\t=\t\n\t", TRUE), + + # newlines + list("\\u000a", "\n", FALSE) + ) - + } renv_json_read_envir <- function() { envir <- new.env(parent = emptyenv()) - + envir[["+"]] <- `+` envir[["-"]] <- `-` - + envir[["object"]] <- function(...) { result <- list(...) names(result) <- as.character(names(result)) result } - + envir[["array"]] <- list - + envir[["true"]] <- TRUE envir[["false"]] <- FALSE envir[["null"]] <- NULL - + envir - + } renv_json_read_remap <- function(object, patterns) { - + # repair names if necessary if (!is.null(names(object))) { - + nms <- names(object) for (pattern in patterns) nms <- gsub(pattern[[2L]], pattern[[1L]], nms, fixed = TRUE) names(object) <- nms - + } - + # repair strings if necessary if (is.character(object)) { for (pattern in patterns) object <- gsub(pattern[[2L]], pattern[[1L]], object, fixed = TRUE) } - + # recurse for other objects if (is.recursive(object)) for (i in seq_along(object)) object[i] <- list(renv_json_read_remap(object[[i]], patterns)) - + # return remapped object object - + } renv_json_read_default <- function(file = NULL, text = NULL) { # read json text text <- paste(text %||% readLines(file, warn = FALSE), collapse = "\n") - + # convert into something the R parser will understand patterns <- renv_json_read_patterns() transformed <- text for (pattern in patterns) transformed <- gsub(pattern[[1L]], pattern[[2L]], transformed, fixed = TRUE) - + # parse it rfile <- tempfile("renv-json-", fileext = ".R") on.exit(unlink(rfile), add = TRUE) @@ -1287,9 +1307,10 @@ local({ # evaluate in safe environment result <- eval(json, envir = renv_json_read_envir()) - # fix up strings if necessary + # fix up strings if necessary -- do so only with reversible patterns + patterns <- Filter(function(pattern) pattern[[3L]], patterns) renv_json_read_remap(result, patterns) - + } From 1523b018466b65804a3fa2213b0c683e387c0a3b Mon Sep 17 00:00:00 2001 From: Toph Allen Date: Wed, 14 May 2025 18:42:07 -0400 Subject: [PATCH 2/9] add first draft of an improved integration workflow --- extensions/usage-metrics-dashboard/app.R | 82 ++++++++++++++++--- .../usage-metrics-dashboard/integrations.R | 53 ++++++++++++ 2 files changed, 124 insertions(+), 11 deletions(-) create mode 100644 extensions/usage-metrics-dashboard/integrations.R diff --git a/extensions/usage-metrics-dashboard/app.R b/extensions/usage-metrics-dashboard/app.R index 0f2fb0ea..258ff917 100644 --- a/extensions/usage-metrics-dashboard/app.R +++ b/extensions/usage-metrics-dashboard/app.R @@ -15,6 +15,7 @@ shinyOptions( ) source("get_usage.R") +source("integrations.R") app_mode_groups <- list( "API" = c("api", "python-fastapi", "python-api", "tensorflow-saved-model"), @@ -274,25 +275,82 @@ ui <- function(request) { server <- function(input, output, session) { # Set up Connect client; handle error if Visitor API Key integration isn't # present. + + publisher_client <- connect() + + selected_integration_guid <- reactiveVal(NULL) + observeEvent(input$auto_add_integration, { + print("Clicked auto add integration button") + auto_add_integration(publisher_client, selected_integration_guid()) + # Hard refresh so that the sidebar gets the up to date info + runjs("window.top.location.reload(true);") + }) + client <- NULL tryCatch( client <- connect( token = session$request$HTTP_POSIT_CONNECT_USER_SESSION_TOKEN ), error = function(e) { - showModal(modalDialog( - title = "Additional Setup Required", - footer = NULL, - HTML(paste( - "In the Access panel to the right, click \"Add integration\",", - "then select a Visitor API Key integration.", - "If you don't see one in the list, an administrator must enable this feature on your Connect server.", - "See the Admin Guide for setup instructions.", + eligible_integrations <- get_eligible_integrations(publisher_client) + selected_integration <- slice_head(eligible_integrations, n = 1) + selected_integration_guid(selected_integration$guid) + + message <- paste0( + "This content requires a Visitor API Key ", + "integration to show users the content they have access to." + ) + if (nrow(selected_integration) == 1) { + message <- paste0( + message, "

", - "For guidance on using visitor-scoped permissions in your own Connect apps, see the", - "User Guide.", - sep = " " + "Click the button below to add the integration \"", + selected_integration$name, + "\" to this content." + ) + } else if (nrow(selected_integration) == 0) { + print("PLACE ONE") + integration_settings_url <- publisher_client$server_url(connectapi:::unversioned_url( + "connect", + "#", + "system", + "integrations" )) + print("PLACE TWO") + message <- paste0( + message, + "

", + "An Administrator must add a Connect API integration on the ", + "Integration Settings page. ", + "The 'Max Role' field must be set to 'Administrator' or 'Publisher'. ", + "See the Admin Guide for more setup instructions." + ) + print("PLACE THREE") + } + + footer <- if (nrow(selected_integration) == 1) { + actionButton( + "auto_add_integration", + "Add Required Integration", + icon = icon("plus") + ) + } else if (nrow(selected_integration) == 0) { + NULL + } + message <- paste0( + message, + "

", + "For more information, see ", + "documentation on Visitor API Key integrations." + ) + showModal(modalDialog( + title = "Additional Setup Required", + footer = footer, + HTML(message) )) } ) @@ -388,6 +446,8 @@ server <- function(input, output, session) { session$reload() }) + # Auto-add integration button ---- + # Visit Merge Window controls: sync slider and text input ---- observeEvent(input$visit_merge_window, { diff --git a/extensions/usage-metrics-dashboard/integrations.R b/extensions/usage-metrics-dashboard/integrations.R new file mode 100644 index 00000000..ed70f2d4 --- /dev/null +++ b/extensions/usage-metrics-dashboard/integrations.R @@ -0,0 +1,53 @@ +library(connectapi) +library(purrr) +library(dplyr) + +get_eligible_integrations <- function(client) { + tryCatch( + { + integrations <- client$GET("v1/oauth/integrations") + + integrations_df <- map_dfr(integrations, function(record) { + # Extract main fields + main_fields <- discard(record, is.list) # Discard list fields like 'config' + + # Extract and combine the config fields with field names and values + config <- paste( + imap_chr(record$config, ~ paste(.y, .x, sep = ": ")), + collapse = ", " + ) + + # Combine both into a single list + c(main_fields, config = config) + }) + + print(integrations_df) + + eligible_integrations <- integrations_df |> + filter( + template == "connect", + config %in% c("max_role: Admin", "max_role: Publisher") + ) |> + arrange(desc(config)) + }, + error = function(e) { + data.frame() + } + ) +} + +auto_add_integration <- function(client, integration_guid) { + print("About to PUT the integration!") + + client$PUT( + connectapi:::v1_url( + "content", + Sys.getenv("CONNECT_CONTENT_GUID"), + "oauth", + "integrations", + "associations" + ), + body = list(list(oauth_integration_guid = integration_guid)) + ) + print("Done adding the integration") +} From 695e6587833917328ed4eb7d37c232bf57ff4d2a Mon Sep 17 00:00:00 2001 From: Toph Allen Date: Thu, 15 May 2025 10:36:12 -0400 Subject: [PATCH 3/9] remove print statements --- extensions/usage-metrics-dashboard/app.R | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/extensions/usage-metrics-dashboard/app.R b/extensions/usage-metrics-dashboard/app.R index 258ff917..00c4c560 100644 --- a/extensions/usage-metrics-dashboard/app.R +++ b/extensions/usage-metrics-dashboard/app.R @@ -309,14 +309,12 @@ server <- function(input, output, session) { "\" to this content." ) } else if (nrow(selected_integration) == 0) { - print("PLACE ONE") integration_settings_url <- publisher_client$server_url(connectapi:::unversioned_url( "connect", "#", "system", "integrations" )) - print("PLACE TWO") message <- paste0( message, "

", @@ -324,11 +322,10 @@ server <- function(input, output, session) { "Integration Settings page. ", - "The 'Max Role' field must be set to 'Administrator' or 'Publisher'. ", + "The 'Max Role' field must be set to 'Administrator' or 'Publisher'; 'Viewer' will not work. ", "See the Admin Guide for more setup instructions." ) - print("PLACE THREE") } footer <- if (nrow(selected_integration) == 1) { From eb812bf7a9e2095421babd79e7346de913c0e564 Mon Sep 17 00:00:00 2001 From: Toph Allen Date: Thu, 15 May 2025 18:36:16 -0400 Subject: [PATCH 4/9] remove leftovers --- extensions/usage-metrics-dashboard/app.R | 3 --- 1 file changed, 3 deletions(-) diff --git a/extensions/usage-metrics-dashboard/app.R b/extensions/usage-metrics-dashboard/app.R index 00c4c560..3f8d64a5 100644 --- a/extensions/usage-metrics-dashboard/app.R +++ b/extensions/usage-metrics-dashboard/app.R @@ -280,7 +280,6 @@ server <- function(input, output, session) { selected_integration_guid <- reactiveVal(NULL) observeEvent(input$auto_add_integration, { - print("Clicked auto add integration button") auto_add_integration(publisher_client, selected_integration_guid()) # Hard refresh so that the sidebar gets the up to date info runjs("window.top.location.reload(true);") @@ -443,8 +442,6 @@ server <- function(input, output, session) { session$reload() }) - # Auto-add integration button ---- - # Visit Merge Window controls: sync slider and text input ---- observeEvent(input$visit_merge_window, { From 3eb63a67b95bb889eec2f27bbf0f44f584091532 Mon Sep 17 00:00:00 2001 From: Toph Allen Date: Thu, 15 May 2025 19:13:33 -0400 Subject: [PATCH 5/9] improve text --- extensions/usage-metrics-dashboard/app.R | 46 ++++++++++++------------ 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/extensions/usage-metrics-dashboard/app.R b/extensions/usage-metrics-dashboard/app.R index 3f8d64a5..a0b67c76 100644 --- a/extensions/usage-metrics-dashboard/app.R +++ b/extensions/usage-metrics-dashboard/app.R @@ -295,17 +295,18 @@ server <- function(input, output, session) { selected_integration <- slice_head(eligible_integrations, n = 1) selected_integration_guid(selected_integration$guid) - message <- paste0( - "This content requires a Visitor API Key ", - "integration to show users the content they have access to." - ) if (nrow(selected_integration) == 1) { message <- paste0( - message, + "This content uses a Visitor API Key ", + "integration to show users their own content's usage data.", "

", - "Click the button below to add the integration \"", + "Click the button below to allow this content to use the integration '", selected_integration$name, - "\" to this content." + "'.", + "

", + "For more information, see ", + "Visitor API Key section of the User Guide." ) } else if (nrow(selected_integration) == 0) { integration_settings_url <- publisher_client$server_url(connectapi:::unversioned_url( @@ -315,36 +316,37 @@ server <- function(input, output, session) { "integrations" )) message <- paste0( - message, + "This dashboard needs permission to ", + " show users their own content's usage data.", "

", - "An Administrator must add a Connect API integration on the ", - "Integration Settings page. ", - "The 'Max Role' field must be set to 'Administrator' or 'Publisher'; 'Viewer' will not work. ", + "' target='_blank'>Integration Settings page. ", + "

", + "On that page, select '+ Add Integration'. ", + "In the 'Select Integration' dropdown, choose 'Connect API'. ", + "The 'Max Role' field must be set to 'Administrator' ", + "or 'Publisher'; 'Viewer' will not work. ", + "

", "See the Admin Guide for more setup instructions." + "target='_blank'>Connect API section of the Admin Guide for more detailed setup instructions." ) } footer <- if (nrow(selected_integration) == 1) { actionButton( "auto_add_integration", - "Add Required Integration", + "Add Integration", icon = icon("plus") ) } else if (nrow(selected_integration) == 0) { NULL } - message <- paste0( - message, - "

", - "For more information, see ", - "documentation on Visitor API Key integrations." - ) + showModal(modalDialog( - title = "Additional Setup Required", + # title = "Additional Setup Required", footer = footer, HTML(message) )) From 6af7c02af9c62dd0507d20769984e0efd0b50271 Mon Sep 17 00:00:00 2001 From: Toph Allen Date: Thu, 15 May 2025 19:19:01 -0400 Subject: [PATCH 6/9] change one word --- extensions/usage-metrics-dashboard/app.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/usage-metrics-dashboard/app.R b/extensions/usage-metrics-dashboard/app.R index a0b67c76..2c374a5e 100644 --- a/extensions/usage-metrics-dashboard/app.R +++ b/extensions/usage-metrics-dashboard/app.R @@ -316,7 +316,7 @@ server <- function(input, output, session) { "integrations" )) message <- paste0( - "This dashboard needs permission to ", + "This content needs permission to ", " show users their own content's usage data.", "

", "To allow this, an Administrator must configure a ", From 39b3084535a27c4d23da4b5a3a3deeef215aec44 Mon Sep 17 00:00:00 2001 From: Toph Allen Date: Fri, 16 May 2025 11:39:43 -0400 Subject: [PATCH 7/9] more text improvements --- extensions/usage-metrics-dashboard/app.R | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/extensions/usage-metrics-dashboard/app.R b/extensions/usage-metrics-dashboard/app.R index 2c374a5e..10cc0b2d 100644 --- a/extensions/usage-metrics-dashboard/app.R +++ b/extensions/usage-metrics-dashboard/app.R @@ -298,15 +298,12 @@ server <- function(input, output, session) { if (nrow(selected_integration) == 1) { message <- paste0( "This content uses a Visitor API Key ", - "integration to show users their own content's usage data.", - "

", - "Click the button below to allow this content to use the integration '", - selected_integration$name, - "'.", + "integration to show users the content they have access to. ", + "A compatible integration is displayed below.", "

", "For more information, see ", "Visitor API Key section of the User Guide." + "target='_blank'>documentation on Visitor API Key integrations." ) } else if (nrow(selected_integration) == 0) { integration_settings_url <- publisher_client$server_url(connectapi:::unversioned_url( @@ -317,7 +314,7 @@ server <- function(input, output, session) { )) message <- paste0( "This content needs permission to ", - " show users their own content's usage data.", + " show users the content they have access to.", "

", "To allow this, an Administrator must configure a ", "Connect API integration on the ", @@ -336,9 +333,16 @@ server <- function(input, output, session) { } footer <- if (nrow(selected_integration) == 1) { + button_label <- HTML(paste0( + "Add the ", + "'", + selected_integration$name, + "' ", + "Integration" + )) actionButton( "auto_add_integration", - "Add Integration", + button_label, icon = icon("plus") ) } else if (nrow(selected_integration) == 0) { From e9ab8a1206a655e6df181fe982fb5b84da576283 Mon Sep 17 00:00:00 2001 From: Toph Allen Date: Fri, 16 May 2025 11:54:48 -0400 Subject: [PATCH 8/9] work around connectapi package manager weirdness --- extensions/usage-metrics-dashboard/renv.lock | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extensions/usage-metrics-dashboard/renv.lock b/extensions/usage-metrics-dashboard/renv.lock index 192937d0..fb59e7b1 100644 --- a/extensions/usage-metrics-dashboard/renv.lock +++ b/extensions/usage-metrics-dashboard/renv.lock @@ -465,7 +465,7 @@ }, "connectapi": { "Package": "connectapi", - "Version": "0.7.0", + "Version": "0.6.0", "Source": "Repository", "Type": "Package", "Title": "Utilities for Interacting with the 'Posit Connect' Server API", @@ -488,8 +488,7 @@ "rlang (>= 0.4.2)", "tibble", "uuid", - "vctrs (>= 0.3.0)", - "base64enc" + "vctrs (>= 0.3.0)" ], "Suggests": [ "covr", From 2df43c2b068cde61fa7d1260c9e257872bb6c0b2 Mon Sep 17 00:00:00 2001 From: Toph Allen Date: Fri, 16 May 2025 12:30:39 -0400 Subject: [PATCH 9/9] add comments for planned connectapi work --- extensions/usage-metrics-dashboard/integrations.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extensions/usage-metrics-dashboard/integrations.R b/extensions/usage-metrics-dashboard/integrations.R index ed70f2d4..7c02c0f8 100644 --- a/extensions/usage-metrics-dashboard/integrations.R +++ b/extensions/usage-metrics-dashboard/integrations.R @@ -5,6 +5,8 @@ library(dplyr) get_eligible_integrations <- function(client) { tryCatch( { + # TODO When https://github.com/posit-dev/connectapi/issues/413 is closed, + # remove this and use that functionality instead. integrations <- client$GET("v1/oauth/integrations") integrations_df <- map_dfr(integrations, function(record) { @@ -39,6 +41,8 @@ get_eligible_integrations <- function(client) { auto_add_integration <- function(client, integration_guid) { print("About to PUT the integration!") + # TODO When https://github.com/posit-dev/connectapi/issues/414 is implemented, + # delete this and use that instead. client$PUT( connectapi:::v1_url( "content",