transferred Code Ocean from original repository to GitHub

This commit is contained in:
Hauke Klement
2015-01-22 09:51:49 +01:00
commit 4cbf9970b1
683 changed files with 11979 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
= form_for(@execution_environment) do |f|
= render('shared/form_errors', object: @execution_environment)
.form-group
= f.label(:name)
= f.text_field(:name, class: 'form-control', required: true)
.form-group
= f.label(:docker_image)
|  
a.toggle-input href='#' = t('shared.new')
= 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')
.form-group
= f.label(:exposed_ports)
= f.text_field(:exposed_ports, class: 'form-control', placeholder: '3000, 4000')
.help-block == t('.hints.exposed_ports')
.form-group
= f.label(:permitted_execution_time)
= f.number_field(:permitted_execution_time, class: 'form-control', min: 1)
.form-group
= f.label(:run_command)
= f.text_field(:run_command, class: 'form-control', placeholder: 'command %{filename}', required: true)
.help-block == 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')
.form-group
= f.label(:testing_framework)
= f.select(:testing_framework, @testing_framework_adapters, {include_blank: true}, class: 'form-control')
.form-group
= f.label(:help)
= f.hidden_field(:help)
.form-control.markdown
.actions = render('shared/submit_button', f: f, object: @execution_environment)

View File

@@ -0,0 +1,3 @@
h1 = @execution_environment
= render('form')

View File

@@ -0,0 +1,23 @@
h1 = ExecutionEnvironment.model_name.human(count: 2)
.table-responsive
table.table
thead
tr
th = t('activerecord.attributes.execution_environment.name')
th = t('activerecord.attributes.execution_environment.user')
th colspan=4 = t('shared.actions')
th colspan=2 = t('shared.resources')
tbody
- @execution_environments.each do |execution_environment|
tr
td = execution_environment.name
td = link_to(execution_environment.author, execution_environment.author)
td = link_to(t('shared.show'), execution_environment)
td = link_to(t('shared.edit'), edit_execution_environment_path(execution_environment))
td = link_to(t('shared.destroy'), execution_environment, data: {confirm: t('shared.confirm_destroy')}, method: :delete)
td = link_to(t('.shell'), shell_execution_environment_path(execution_environment))
td = link_to(t('activerecord.models.error.other'), execution_environment_errors_path(execution_environment.id))
td = link_to(t('activerecord.models.hint.other'), execution_environment_hints_path(execution_environment.id))
p = render('shared/new_button', model: ExecutionEnvironment)

View File

@@ -0,0 +1,3 @@
h1 = t('shared.new_model', model: ExecutionEnvironment.model_name.human)
= render('form')

View File

@@ -0,0 +1,8 @@
h1 = @execution_environment
#shell data-message-timeout=t('exercises.editor.timeout', permitted_execution_time: @execution_environment.permitted_execution_time) data-url=execute_command_execution_environment_path(@execution_environment)
.form-group
label for='command' = t('.command')
input#command.form-control type='text'
pre#output data-message-no-output=t('exercises.implement.no_output')
p = t('exercises.implement.no_output_yet')

View File

@@ -0,0 +1,10 @@
h1
= @execution_environment
= render('shared/edit_button', object: @execution_environment)
= row(label: 'execution_environment.name', value: @execution_environment.name)
= row(label: 'execution_environment.user', value: link_to(@execution_environment.author, @execution_environment.author))
- [:docker_image, :exposed_ports, :permitted_execution_time, :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))