diff --git a/R/fct_workflow_status.R b/R/fct_workflow_status.R index a760d0e..29e8628 100644 --- a/R/fct_workflow_status.R +++ b/R/fct_workflow_status.R @@ -8,10 +8,10 @@ #' @import tibble #' #' @noRd - +source("config/config.R") workflow_status <- function(report){ - server <- rpecanapi::connect("http://141.142.217.168/", "carya", "illinois") + server <- rpecanapi::connect(host_url, "carya", "illinois") id <- report$workflow_id result <- data.frame() for (i in id) { diff --git a/README.md b/README.md index fd92737..f5e6f6f 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 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 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. 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 342e9e0..0d9d619 100755 --- a/inst/ed2-test.R +++ b/inst/ed2-test.R @@ -5,9 +5,10 @@ library(tibble) library(purrr) library(httr) library(glue) +source("config/config.R") # Modify for your target machine and authentication -server <- connect("http://141.142.217.168/", "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 654a4c4..bce6ac2 100755 --- a/inst/maespa-test.R +++ b/inst/maespa-test.R @@ -5,9 +5,10 @@ library(tibble) library(purrr) library(httr) library(glue) +source("config/config.R") # Modify for your target machine and authentication -server <- connect("http://141.142.217.168/", "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 4d8f9d1..f9523c9 100755 --- a/inst/run-test-list.R +++ b/inst/run-test-list.R @@ -5,9 +5,10 @@ library(tibble) library(purrr) library(httr) library(glue) +source("config/config.R") # Modify for your target machine and authentication -server <- connect("http://141.142.217.168/", "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 1326d38..7eac595 100755 --- a/inst/sipnet-test.R +++ b/inst/sipnet-test.R @@ -5,9 +5,10 @@ library(tibble) library(purrr) library(httr) library(glue) +source("config/config.R") # Modify for your target machine and authentication -server <- connect("http://141.142.217.168/", "ashiklom", "admin") +server <- connect(host_url, "ashiklom", "admin") # List all available models models <- GET(