Skip to content

Commit 931390f

Browse files
authored
Merge pull request #17 from Sweetdevil144/main
Configure `/config/config.R`
2 parents 048f416 + a5391d6 commit 931390f

File tree

7 files changed

+19
-8
lines changed

7 files changed

+19
-8
lines changed

R/fct_workflow_status.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
#' @import tibble
99
#'
1010
#' @noRd
11-
11+
source("config/config.R")
1212

1313
workflow_status <- function(report){
14-
server <- rpecanapi::connect("http://141.142.217.168/", "carya", "illinois")
14+
server <- rpecanapi::connect(host_url, "carya", "illinois")
1515
id <- report$workflow_id
1616
result <- data.frame()
1717
for (i in id) {

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,20 @@ The PEcan Status Board can be installed locally from [GitHub](https://github.com
2929
# install.packages("devtools")
3030
devtools::install_github("PecanProject/pecan-status-board")
3131
```
32-
``` r
32+
33+
``` r
3334
library("statusboard")
3435
```
36+
3537
### Running The Dashboard
38+
39+
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/).
40+
3641
``` r
3742
# Run this code to start the dashboard locally
3843
statusboard::run_app()
39-
4044
```
45+
4146
## Visualization
4247

4348
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.

config/config.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This is the URL that the R package will use to connect to the Pecan service.
2+
host_url <- "http://pecan.localhost/"

inst/ed2-test.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ library(tibble)
55
library(purrr)
66
library(httr)
77
library(glue)
8+
source("config/config.R")
89

910
# Modify for your target machine and authentication
10-
server <- connect("http://141.142.217.168/", "ashiklom", "admin")
11+
server <- connect(host_url, "ashiklom", "admin")
1112

1213
# List all available models
1314
models <- GET(

inst/maespa-test.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ library(tibble)
55
library(purrr)
66
library(httr)
77
library(glue)
8+
source("config/config.R")
89

910
# Modify for your target machine and authentication
10-
server <- connect("http://141.142.217.168/", "ashiklom", "admin")
11+
server <- connect(host_url, "ashiklom", "admin")
1112

1213
# List all available models
1314
models <- GET(

inst/run-test-list.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ library(tibble)
55
library(purrr)
66
library(httr)
77
library(glue)
8+
source("config/config.R")
89

910
# Modify for your target machine and authentication
10-
server <- connect("http://141.142.217.168/", "ashiklom", "admin")
11+
server <- connect(host_url, "ashiklom", "admin")
1112

1213
# List all available models
1314
models <- GET(

inst/sipnet-test.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ library(tibble)
55
library(purrr)
66
library(httr)
77
library(glue)
8+
source("config/config.R")
89

910
# Modify for your target machine and authentication
10-
server <- connect("http://141.142.217.168/", "ashiklom", "admin")
11+
server <- connect(host_url, "ashiklom", "admin")
1112

1213
# List all available models
1314
models <- GET(

0 commit comments

Comments
 (0)