Show warning if all containers are depleted.
This commit is contained in:
@ -651,6 +651,11 @@ $(function() {
|
||||
})) {
|
||||
showTimeoutMessage();
|
||||
}
|
||||
if (_.some(response, function(result) {
|
||||
return result.status === 'container_depleted';
|
||||
})) {
|
||||
showContainerDepletedMessage();
|
||||
}
|
||||
if (qa_api) {
|
||||
// send test response to QA
|
||||
qa_api.executeCommand('syncOutput', [response]);
|
||||
@ -828,6 +833,13 @@ $(function() {
|
||||
}
|
||||
};
|
||||
|
||||
var showContainerDepletedMessage = function() {
|
||||
$.flash.danger({
|
||||
icon: ['fa', 'fa-clock-o'],
|
||||
text: $('#editor').data('message-depleted')
|
||||
});
|
||||
};
|
||||
|
||||
var showTab = function(index) {
|
||||
$('a[data-toggle="tab"]').eq(index || 0).tab('show');
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
#editor.row data-exercise-id=exercise.id data-message-timeout=t('exercises.editor.timeout', permitted_execution_time: @exercise.execution_environment.permitted_execution_time) data-errors-url=execution_environment_errors_path(exercise.execution_environment) data-submissions-url=submissions_path data-user-id=@current_user.id
|
||||
#editor.row data-exercise-id=exercise.id data-message-depleted=t('exercises.editor.depleted') data-message-timeout=t('exercises.editor.timeout', permitted_execution_time: @exercise.execution_environment.permitted_execution_time) data-errors-url=execution_environment_errors_path(exercise.execution_environment) data-submissions-url=submissions_path data-user-id=@current_user.id
|
||||
.col-sm-3 = render('editor_file_tree', files: @files)
|
||||
#frames.col-sm-9
|
||||
- @files.each do |file|
|
||||
|
@ -166,6 +166,7 @@ de:
|
||||
confirm_start_over: Wollen Sie wirklich von vorne anfangen?
|
||||
confirm_submit: Wollen Sie Ihren Code wirklich zur Bewertung abgeben?
|
||||
create_file: Neue Datei
|
||||
depleted: Alle Ausführungsausgebungen sind momentan in Benutzung. Probiere es später nochmal.
|
||||
destroy_file: Datei löschen
|
||||
download: Herunterladen
|
||||
dummy: Keine Aktion
|
||||
|
@ -166,6 +166,7 @@ en:
|
||||
confirm_start_over: Do you really want to start over?
|
||||
confirm_submit: Do you really want to submit your code for grading?
|
||||
create_file: New File
|
||||
depleted: All execution environments are busy. Please try again later.
|
||||
destroy_file: Delete File
|
||||
download: Download
|
||||
dummy: No Action
|
||||
|
@ -96,7 +96,7 @@ class DockerClient
|
||||
before_execution_block.try(:call)
|
||||
send_command(command, @container, &output_consuming_block)
|
||||
else
|
||||
raise('Alle Slots belegt. Versuche es nachher nochmal.')
|
||||
{status: :container_depleted}
|
||||
end
|
||||
rescue Excon::Errors::SocketError => error
|
||||
# socket errors seems to be normal when using exec
|
||||
|
Reference in New Issue
Block a user