Update Bootstrap to v4.1, fix chosen.js and pagedown on multiple sites

This commit is contained in:
Sebastian Serth
2018-10-07 23:55:11 +02:00
parent 4d1cf972e4
commit 7bdb962616
99 changed files with 2758 additions and 472 deletions

View File

@@ -12,17 +12,17 @@
a.toggle-input data={text_initial: t('shared.new'), text_toggled: t('shared.back')} href='#' = t('shared.new')
.original-input = f.select(:docker_image, @docker_images, {}, class: 'form-control')
= f.text_field(:docker_image, class: 'alternative-input form-control', disabled: true)
.help-block == t('.hints.docker_image')
.help-block.form-text == t('.hints.docker_image')
.form-group
= f.label(:exposed_ports)
= f.text_field(:exposed_ports, class: 'form-control', placeholder: '3000, 4000')
.help-block == t('.hints.exposed_ports')
.help-block.form-text == t('.hints.exposed_ports')
.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)
.form-check.mb-3
label.form-check-label
= f.check_box(:network_enabled, class: 'form-check-input')
= t('activerecord.attributes.execution_environment.network_enabled')
.form-group
= f.label(:permitted_execution_time)
@@ -33,11 +33,11 @@
.form-group
= f.label(:run_command)
= f.text_field(:run_command, class: 'form-control', placeholder: 'command %{filename}', required: true)
.help-block == t('.hints.command')
.help-block.form-text == t('.hints.command')
.form-group
= f.label(:test_command)
= f.text_field(:test_command, class: 'form-control', placeholder: 'command %{filename}')
.help-block == t('.hints.command')
.help-block.form-text == t('.hints.command')
.form-group
= f.label(:testing_framework)
= f.select(:testing_framework, @testing_framework_adapters, {include_blank: true}, class: 'form-control')

View File

@@ -15,7 +15,7 @@ h1 = ExecutionEnvironment.model_name.human(count: 2)
tbody
- @execution_environments.each do |execution_environment|
tr
td = execution_environment.name
td = link_to(execution_environment.name, execution_environment)
td = link_to(execution_environment.author, execution_environment.author)
td = execution_environment.pool_size
td = execution_environment.memory_limit

View File

@@ -5,7 +5,10 @@ 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, :network_enabled, :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].each do |attribute|
= row(label: "execution_environment.#{attribute}", value: @execution_environment.send(attribute))
- [:run_command, :test_command].each do |attribute|
= row(label: "execution_environment.#{attribute}") do
code = @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))