From e2b4931be3ddab6e07a618bae3a24c638d0fec7e Mon Sep 17 00:00:00 2001 From: Abhinav Pandey Date: Mon, 18 Mar 2024 16:38:17 +0530 Subject: [PATCH 1/6] Update server URLs in code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Suggestions added by Chris for the status-board to directly fetch our local server over docker instead of `141.142.216.168` which was a virtual machine at NCSA that’s apparently down --- R/fct_workflow_status.R | 2 +- inst/ed2-test.R | 2 +- inst/maespa-test.R | 2 +- inst/run-test-list.R | 2 +- inst/sipnet-test.R | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/R/fct_workflow_status.R b/R/fct_workflow_status.R index a760d0e..9547b80 100644 --- a/R/fct_workflow_status.R +++ b/R/fct_workflow_status.R @@ -11,7 +11,7 @@ workflow_status <- function(report){ - server <- rpecanapi::connect("http://141.142.217.168/", "carya", "illinois") + server <- rpecanapi::connect("http://pecan.localhost/", "carya", "illinois") id <- report$workflow_id result <- data.frame() for (i in id) { diff --git a/inst/ed2-test.R b/inst/ed2-test.R index 342e9e0..faaf508 100755 --- a/inst/ed2-test.R +++ b/inst/ed2-test.R @@ -7,7 +7,7 @@ library(httr) library(glue) # Modify for your target machine and authentication -server <- connect("http://141.142.217.168/", "ashiklom", "admin") +server <- connect("http://pecan.localhost/", "ashiklom", "admin") # List all available models models <- GET( diff --git a/inst/maespa-test.R b/inst/maespa-test.R index 654a4c4..0b1d6a2 100755 --- a/inst/maespa-test.R +++ b/inst/maespa-test.R @@ -7,7 +7,7 @@ library(httr) library(glue) # Modify for your target machine and authentication -server <- connect("http://141.142.217.168/", "ashiklom", "admin") +server <- connect("http://pecan.localhost/", "ashiklom", "admin") # List all available models models <- GET( diff --git a/inst/run-test-list.R b/inst/run-test-list.R index 4d8f9d1..1b696de 100755 --- a/inst/run-test-list.R +++ b/inst/run-test-list.R @@ -7,7 +7,7 @@ library(httr) library(glue) # Modify for your target machine and authentication -server <- connect("http://141.142.217.168/", "ashiklom", "admin") +server <- connect("http://pecan.localhost/", "ashiklom", "admin") # List all available models models <- GET( diff --git a/inst/sipnet-test.R b/inst/sipnet-test.R index 1326d38..e7ca14f 100755 --- a/inst/sipnet-test.R +++ b/inst/sipnet-test.R @@ -7,7 +7,7 @@ library(httr) library(glue) # Modify for your target machine and authentication -server <- connect("http://141.142.217.168/", "ashiklom", "admin") +server <- connect("http://pecan.localhost/", "ashiklom", "admin") # List all available models models <- GET( From 2ce6aaf73e565b3307319fc26f1680042f861a58 Mon Sep 17 00:00:00 2001 From: Abhinav Pandey Date: Tue, 19 Mar 2024 00:26:30 +0530 Subject: [PATCH 2/6] Add host_url variable to connect to Pecan service within a config file --- R/fct_workflow_status.R | 6 ++++-- config/config.R | 2 ++ inst/ed2-test.R | 4 +++- inst/maespa-test.R | 4 +++- inst/run-test-list.R | 4 +++- inst/sipnet-test.R | 4 +++- 6 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 config/config.R diff --git a/R/fct_workflow_status.R b/R/fct_workflow_status.R index 9547b80..57d70b2 100644 --- a/R/fct_workflow_status.R +++ b/R/fct_workflow_status.R @@ -8,10 +8,12 @@ #' @import tibble #' #' @noRd - +source("../config/config.R") +host_url <- host_url workflow_status <- function(report){ - server <- rpecanapi::connect("http://pecan.localhost/", "carya", "illinois") + library(rpecanapi) + server <- rpecanapi::connect(host_url, "carya", "illinois") id <- report$workflow_id result <- data.frame() for (i in id) { diff --git a/config/config.R b/config/config.R new file mode 100644 index 0000000..ec9a08e --- /dev/null +++ b/config/config.R @@ -0,0 +1,2 @@ +# This is the URL that the R package will use to connect to the Pecan service. +host_url <- "http://pecan.localhost/" \ No newline at end of file diff --git a/inst/ed2-test.R b/inst/ed2-test.R index faaf508..f247b08 100755 --- a/inst/ed2-test.R +++ b/inst/ed2-test.R @@ -5,9 +5,11 @@ library(tibble) library(purrr) library(httr) library(glue) +source("../config/config.R") +host_url <- host_url # Modify for your target machine and authentication -server <- connect("http://pecan.localhost/", "ashiklom", "admin") +server <- connect(host_url, "ashiklom", "admin") # List all available models models <- GET( diff --git a/inst/maespa-test.R b/inst/maespa-test.R index 0b1d6a2..92e7639 100755 --- a/inst/maespa-test.R +++ b/inst/maespa-test.R @@ -5,9 +5,11 @@ library(tibble) library(purrr) library(httr) library(glue) +source("../config/config.R") +host_url <- host_url # Modify for your target machine and authentication -server <- connect("http://pecan.localhost/", "ashiklom", "admin") +server <- connect(host_url, "ashiklom", "admin") # List all available models models <- GET( diff --git a/inst/run-test-list.R b/inst/run-test-list.R index 1b696de..c1c1be7 100755 --- a/inst/run-test-list.R +++ b/inst/run-test-list.R @@ -5,9 +5,11 @@ library(tibble) library(purrr) library(httr) library(glue) +source("../config/config.R") +host_url <- host_url # Modify for your target machine and authentication -server <- connect("http://pecan.localhost/", "ashiklom", "admin") +server <- connect(host_url, "ashiklom", "admin") # List all available models models <- GET( diff --git a/inst/sipnet-test.R b/inst/sipnet-test.R index e7ca14f..8361a92 100755 --- a/inst/sipnet-test.R +++ b/inst/sipnet-test.R @@ -5,9 +5,11 @@ library(tibble) library(purrr) library(httr) library(glue) +source("../config/config.R") +host_url <- host_url # Modify for your target machine and authentication -server <- connect("http://pecan.localhost/", "ashiklom", "admin") +server <- connect(host_url, "ashiklom", "admin") # List all available models models <- GET( From e056cb8d732399e45438d6b582cf2ce1403d8813 Mon Sep 17 00:00:00 2001 From: Abhinav Pandey Date: Tue, 19 Mar 2024 00:30:10 +0530 Subject: [PATCH 3/6] Update source paths in config files --- R/fct_workflow_status.R | 2 +- inst/ed2-test.R | 2 +- inst/maespa-test.R | 2 +- inst/run-test-list.R | 2 +- inst/sipnet-test.R | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/R/fct_workflow_status.R b/R/fct_workflow_status.R index 57d70b2..cbcf110 100644 --- a/R/fct_workflow_status.R +++ b/R/fct_workflow_status.R @@ -8,7 +8,7 @@ #' @import tibble #' #' @noRd -source("../config/config.R") +source("config/config.R") host_url <- host_url workflow_status <- function(report){ diff --git a/inst/ed2-test.R b/inst/ed2-test.R index f247b08..3a96205 100755 --- a/inst/ed2-test.R +++ b/inst/ed2-test.R @@ -5,7 +5,7 @@ library(tibble) library(purrr) library(httr) library(glue) -source("../config/config.R") +source("config/config.R") host_url <- host_url # Modify for your target machine and authentication diff --git a/inst/maespa-test.R b/inst/maespa-test.R index 92e7639..036b7de 100755 --- a/inst/maespa-test.R +++ b/inst/maespa-test.R @@ -5,7 +5,7 @@ library(tibble) library(purrr) library(httr) library(glue) -source("../config/config.R") +source("config/config.R") host_url <- host_url # Modify for your target machine and authentication diff --git a/inst/run-test-list.R b/inst/run-test-list.R index c1c1be7..4a39283 100755 --- a/inst/run-test-list.R +++ b/inst/run-test-list.R @@ -5,7 +5,7 @@ library(tibble) library(purrr) library(httr) library(glue) -source("../config/config.R") +source("config/config.R") host_url <- host_url # Modify for your target machine and authentication diff --git a/inst/sipnet-test.R b/inst/sipnet-test.R index 8361a92..76b7199 100755 --- a/inst/sipnet-test.R +++ b/inst/sipnet-test.R @@ -5,7 +5,7 @@ library(tibble) library(purrr) library(httr) library(glue) -source("../config/config.R") +source("config/config.R") host_url <- host_url # Modify for your target machine and authentication From 0900337fd11514e9da281692f554aa87da04fe13 Mon Sep 17 00:00:00 2001 From: Abhinav Pandey Date: Tue, 19 Mar 2024 00:50:40 +0530 Subject: [PATCH 4/6] Update README.md with instructions for config/config.R --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fd92737..e98df44 100644 --- a/README.md +++ b/README.md @@ -29,15 +29,20 @@ The PEcan Status Board can be installed locally from [GitHub](https://github.com # install.packages("devtools") devtools::install_github("PecanProject/pecan-status-board") ``` -``` r + +``` r library("statusboard") ``` + ### Running The Dashboard + +Now, within the `config/config.R` file, you can set the `host_url` to the PEcAn API server you want to monitor. By default, it is set to the PEcAn API server hosted at [http://pecan.localhost/](http://pecan.localhost/). + ``` r # Run this code to start the dashboard locally statusboard::run_app() - ``` + ## Visualization Data Visualization refers to the graphical representation of information and data in the form of a graph, or chart, or bar, or any other format. The purpose of Data Visualization is to convey information and results quickly and easily. From 39829f7edb6dafc78e71529f3947b2b8c746b9d7 Mon Sep 17 00:00:00 2001 From: Abhinav Pandey Date: Tue, 19 Mar 2024 00:52:16 +0530 Subject: [PATCH 5/6] Update documentation changes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e98df44..f5e6f6f 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ library("statusboard") ### Running The Dashboard -Now, within the `config/config.R` file, you can set the `host_url` to the PEcAn API server you want to monitor. By default, it is set to the PEcAn API server hosted at [http://pecan.localhost/](http://pecan.localhost/). +Now, within the `config/config.R` file, you can set the `host_url` to the PEcAn dockerised server you want to monitor. By default, it is set to the PEcAn API server hosted at [http://pecan.localhost/](http://pecan.localhost/). ``` r # Run this code to start the dashboard locally From a5391d61c3252a6f87fca0c9f4e06f2306db6067 Mon Sep 17 00:00:00 2001 From: Abhinav Pandey Date: Tue, 19 Mar 2024 09:53:14 +0530 Subject: [PATCH 6/6] Remove unused library imports and variables --- R/fct_workflow_status.R | 2 -- inst/ed2-test.R | 1 - inst/maespa-test.R | 1 - inst/run-test-list.R | 1 - inst/sipnet-test.R | 1 - 5 files changed, 6 deletions(-) diff --git a/R/fct_workflow_status.R b/R/fct_workflow_status.R index cbcf110..29e8628 100644 --- a/R/fct_workflow_status.R +++ b/R/fct_workflow_status.R @@ -9,10 +9,8 @@ #' #' @noRd source("config/config.R") -host_url <- host_url workflow_status <- function(report){ - library(rpecanapi) server <- rpecanapi::connect(host_url, "carya", "illinois") id <- report$workflow_id result <- data.frame() diff --git a/inst/ed2-test.R b/inst/ed2-test.R index 3a96205..0d9d619 100755 --- a/inst/ed2-test.R +++ b/inst/ed2-test.R @@ -6,7 +6,6 @@ library(purrr) library(httr) library(glue) source("config/config.R") -host_url <- host_url # Modify for your target machine and authentication server <- connect(host_url, "ashiklom", "admin") diff --git a/inst/maespa-test.R b/inst/maespa-test.R index 036b7de..bce6ac2 100755 --- a/inst/maespa-test.R +++ b/inst/maespa-test.R @@ -6,7 +6,6 @@ library(purrr) library(httr) library(glue) source("config/config.R") -host_url <- host_url # Modify for your target machine and authentication server <- connect(host_url, "ashiklom", "admin") diff --git a/inst/run-test-list.R b/inst/run-test-list.R index 4a39283..f9523c9 100755 --- a/inst/run-test-list.R +++ b/inst/run-test-list.R @@ -6,7 +6,6 @@ library(purrr) library(httr) library(glue) source("config/config.R") -host_url <- host_url # Modify for your target machine and authentication server <- connect(host_url, "ashiklom", "admin") diff --git a/inst/sipnet-test.R b/inst/sipnet-test.R index 76b7199..7eac595 100755 --- a/inst/sipnet-test.R +++ b/inst/sipnet-test.R @@ -6,7 +6,6 @@ library(purrr) library(httr) library(glue) source("config/config.R") -host_url <- host_url # Modify for your target machine and authentication server <- connect(host_url, "ashiklom", "admin")