
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.
36 lines
2.2 KiB
Plaintext
36 lines
2.2 KiB
Plaintext
h1.d-inline-block = ExecutionEnvironment.model_name.human(count: 2)
|
|
|
|
- if ExecutionEnvironment::RUNNER_MANAGEMENT_PRESENT
|
|
= button_to( { action: :synchronize_all_to_poseidon, method: :post }, { form_class: 'float-right mb-2', class: 'btn btn-success' })
|
|
i.fa.fa-upload
|
|
= t('execution_environments.index.synchronize_all.button')
|
|
|
|
.table-responsive
|
|
table.table
|
|
thead
|
|
tr
|
|
th = t('activerecord.attributes.execution_environment.name')
|
|
th = t('activerecord.attributes.execution_environment.user')
|
|
th = t('activerecord.attributes.execution_environment.pool_size')
|
|
th = t('activerecord.attributes.execution_environment.memory_limit')
|
|
th = t('activerecord.attributes.execution_environment.network_enabled')
|
|
th = t('activerecord.attributes.execution_environment.permitted_execution_time')
|
|
th colspan=5 = t('shared.actions')
|
|
tbody
|
|
- @execution_environments.each do |execution_environment|
|
|
tr
|
|
td = link_to_if(policy(execution_environment).show?, execution_environment.name, execution_environment)
|
|
td = link_to_if(policy(execution_environment.author).show?, execution_environment.author, execution_environment.author)
|
|
td = execution_environment.pool_size
|
|
td = execution_environment.memory_limit
|
|
td = symbol_for(execution_environment.network_enabled)
|
|
td = execution_environment.permitted_execution_time
|
|
td = link_to(t('shared.show'), execution_environment) if policy(execution_environment).show?
|
|
td = link_to(t('shared.edit'), edit_execution_environment_path(execution_environment)) if policy(execution_environment).edit?
|
|
td = link_to(t('shared.destroy'), execution_environment, data: {confirm: t('shared.confirm_destroy')}, method: :delete) if policy(execution_environment).destroy?
|
|
td = link_to(t('.shell'), shell_execution_environment_path(execution_environment)) if policy(execution_environment).shell?
|
|
td = link_to(t('shared.statistics'), statistics_execution_environment_path(execution_environment)) if policy(execution_environment).statistics?
|
|
|
|
= render('shared/pagination', collection: @execution_environments)
|
|
p = render('shared/new_button', model: ExecutionEnvironment)
|