Skip to content

Commit

Permalink
ui fixes (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle authored Feb 7, 2023
1 parent f620c07 commit 89daadf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion R/client.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ get_service_name <- function(service_url) {
# Checks if there is internet and performs an HTTP GET request
perform_http_request <- function(service_url) {
cli_alert_danger("WFS client creation failed.")
cli_alert_info("Service: {.val {service_url}}")
cli_alert_info("Service: {.val {service_url}}", .envir = parent.frame(n = 2))

has_internet <- function() {
if (nzchar(Sys.getenv("NO_INTERNET_TEST_EMODNET"))) {
Expand Down
12 changes: 6 additions & 6 deletions R/ui.R
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
cli_alert_success <- function(...) {
cli_alert_success <- function(text, .envir = parent.frame()) {
if (!getOption("EMODnetWFS.quiet", FALSE)) {
cli::cli_alert_success(...)
cli::cli_alert_success(text, .envir = .envir)
}
}

cli_alert_info <- function(...) {
cli_alert_info <- function(text, .envir = parent.frame()) {
if (!getOption("EMODnetWFS.quiet", FALSE)) {
cli::cli_alert_info(...)
cli::cli_alert_info(text, .envir = .envir)
}
}

cli_alert_danger <- function(...) {
cli_alert_danger <- function(text, .envir = parent.frame()) {
if (!getOption("EMODnetWFS.quiet", FALSE)) {
cli::cli_alert_danger(...)
cli::cli_alert_danger(text, .envir = .envir)
}
}

0 comments on commit 89daadf

Please sign in to comment.