Skip to content

Commit

Permalink
wip start preparation of "server" part of the module
Browse files Browse the repository at this point in the history
  • Loading branch information
osalamon committed Oct 29, 2024
1 parent 0537ef7 commit d714b4b
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions app/view/honeybee/beekeeper_runsimulation.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,45 @@ beekeeper_runsimulation_ui <- function(id, i18n) {
)
),
)
}

#' @export
beekeeper_runsimulation_server <- function(
id,
coordinates,
lookup,
parameters,
landuse_map,
session_dir) {
moduleServer(id, function(input, output, session) {
# Define waiter ---- TO ADD later

# Prepare directory for results ----
# Non-persistent data solution
# Making a beekeeper dir in the shared folder
temp_dir <- session_dir |>
file.path("beekeeper")

experiment_list <- reactiveVal(
c(Example = "app/data/honeybee/output_example/Result_table_original.csv")
)
counter <- reactiveVal(0)

# Run workflow button ----
observeEvent(
coordinates(),
ignoreNULL = FALSE,
{
if (!is_empty(coordinates()) &
!is_empty(lookup()) &
!is_empty(parameters())) {
enable("run_simulation")
} else {
disable("run_simulation")
}
}
)


})
}

0 comments on commit d714b4b

Please sign in to comment.