added the ability to prohibit network access for code submissions executed using Docker
This commit is contained in:
@@ -20,6 +20,10 @@
|
||||
.form-group
|
||||
= f.label(:memory_limit)
|
||||
= f.number_field(:memory_limit, class: 'form-control', min: DockerClient::MINIMUM_MEMORY_LIMIT, value: f.object.memory_limit || DockerClient::DEFAULT_MEMORY_LIMIT)
|
||||
.checkbox
|
||||
label
|
||||
= f.check_box(:network_enabled)
|
||||
= t('activerecord.attributes.execution_environment.network_enabled')
|
||||
.form-group
|
||||
= f.label(:permitted_execution_time)
|
||||
= f.number_field(:permitted_execution_time, class: 'form-control', min: 1)
|
||||
|
@@ -5,7 +5,7 @@ h1
|
||||
= row(label: 'execution_environment.name', value: @execution_environment.name)
|
||||
= row(label: 'execution_environment.user', value: link_to(@execution_environment.author, @execution_environment.author))
|
||||
= row(label: 'execution_environment.file_type', value: @execution_environment.file_type.present? ? link_to(@execution_environment.file_type, @execution_environment.file_type) : nil)
|
||||
- [:docker_image, :exposed_ports, :memory_limit, :permitted_execution_time, :pool_size, :run_command, :test_command].each do |attribute|
|
||||
- [:docker_image, :exposed_ports, :memory_limit, :network_enabled, :permitted_execution_time, :pool_size, :run_command, :test_command].each do |attribute|
|
||||
= row(label: "execution_environment.#{attribute}", value: @execution_environment.send(attribute))
|
||||
= row(label: 'execution_environment.testing_framework', value: @testing_framework_adapter.try(:framework_name))
|
||||
= row(label: 'execution_environment.help', value: render_markdown(@execution_environment.help))
|
||||
|
Reference in New Issue
Block a user