Add button to synchronize all execution environments

This adds a button to the execution environment index page that, when
clicked, causes all execution environments to be synchronized to the
runner management (Poseidon) by creating or replacing them.

CodeOcean does not synchronize it's execution environments on startup or
when a new runner management configuration is used for the first time.
The administrator has to manually start this process by pressing this
button.

The equivalent for syncing just one execution environment is updating
it.
This commit is contained in:
Konrad Hanff
2021-06-07 16:31:15 +02:00
committed by Sebastian Serth
parent 0978a3be83
commit 598de3bcff
6 changed files with 33 additions and 1 deletions

View File

@ -287,6 +287,10 @@ de:
not_synced_to_poseidon: Die Ausführungsumgebung wurde erstellt, aber aufgrund eines Fehlers nicht zu Poseidon synchronisiert.
index:
shell: Shell
synchronize_all:
button: Alle synchronisieren
success: Alle Ausführungsumgebungen wurden erfolgreich synchronisiert.
failure: Beim Synchronisieren mindestens einer Ausführungsumgebung ist ein Fehler aufgetreten.
shell:
command: Befehl
headline: Shell

View File

@ -287,6 +287,10 @@ en:
not_synced_to_poseidon: The ExecutionEnvironment was created but not synced to Poseidon due to an error.
index:
shell: Shell
synchronize_all:
button: Synchronize all
success: All execution environemnts were synchronized successfully.
failure: At least one execution environment could not be synchronised due to an error.
shell:
command: Command
headline: Shell

View File

@ -66,6 +66,8 @@ Rails.application.routes.draw do
post 'shell', as: :execute_command, action: :execute_command
get :statistics
end
post :synchronize_all_to_poseidon, on: :collection
end
post '/import_exercise' => 'exercises#import_exercise'