Commit b1a33805 authored by Cyril Vazquez's avatar Cyril Vazquez

Merge branch 'release/2.6.10' into 'Support/2.6.X'

Release/2.6.10

See merge request !618
parents ef202f1d 4e5e9c39
Pipeline #10599 failed with stages
in 49 seconds
# CHANGELOG
## Version 2.6.10
- `Fixed` Affichage du compte de service défini en base lors de l'édition d'une tâche planifiée.
- `Changed` Conservation des tâches en statut "planifié" même si une erreur est survenue lors de l'exécution de celle-ci.
- `Fixed` Mise à jour des dates d'exécution de la tâche planifiée, même en cas d'erreur.
## Version 2.6.9
- `Changed` Amélioration des performances lors de l'accès en édition à un compte de service et sa mise à jour.
- `Changed` Amélioration des performances à l'accès aux tâches planfiées.
......
......@@ -196,15 +196,17 @@ class scheduling
$status = false;
\laabs::notify(LAABS_BUSINESS_EXCEPTION, $info);
}
}
$scheduling->lastExecution = \laabs::newDateTime();
$scheduling->lastExecution->setTimezone(new \DateTimeZone('UTC'));
$frequency = explode(";", $scheduling->frequency);
$scheduling->nextExecution = $this->nextExecution($frequency);
if ($status) {
$scheduling->lastExecution = \laabs::newDateTime();
$scheduling->lastExecution->setTimezone(new \DateTimeZone('UTC'));
$scheduling->status = "scheduled";
$frequency = explode(";", $scheduling->frequency);
$scheduling->nextExecution = $this->nextExecution($frequency);
} else {
$scheduling->status = "error";
}
......@@ -240,7 +242,7 @@ class scheduling
foreach ($schedulings as $scheduling) {
$executedTask = null;
if ($scheduling->status != "scheduled") {
if ($scheduling->status == "paused") {
continue;
}
......
......@@ -88,7 +88,7 @@
</p>
</span>
<span class="col-xs-2 text-right statusSpan">
<input type="checkbox" class="status" name="status" data-toggle="toggle" checked="[?merge .status.ifeq('scheduled').then('checked') ?]">
<input type="checkbox" class="status" name="status" data-toggle="toggle" checked="[?merge .status.ifne('paused').then('checked') ?]">
</span>
<span class="col-xs-1 text-right">
<div class="deleteTask" title="Remove"><i class="fa fa-times"></i></div>
......@@ -396,7 +396,7 @@
a.find('.statusSpan')
.append("<input type='checkbox' class='status' name='status' data-toggle='toggle'>");
if (task.status=='scheduled') {
if (task.status!='paused') {
a.find('.statusSpan').find('.status').bootstrapToggle('on');
} else {
a.find('.statusSpan').find('.status').bootstrapToggle('off');
......@@ -504,14 +504,13 @@
contentType : 'application/json',
success : function (response) {
gritter.show(response.message, response.status, response.errors);
a.find('.status').bootstrapToggle('on');
a.find('.nextExecution').text(response.object.nextExecution);
a.find('.lastExecution').text(response.object.lastExecution);
if (response.status == true) {
a.find('.nextExecution').text(response.object.nextExecution);
a.find('.lastExecution').text(response.object.lastExecution);
a.find("[name=displayError]").hide();
a.find('.status').bootstrapToggle('on');
} else {
a.find("[name=displayError]").show();
a.find('.status').bootstrapToggle('off');
}
},
error : function(response) {
......
......@@ -236,7 +236,7 @@
<input type="number" min="1" class="form-control" name="frequencyNumber" value="1">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span id="frequencyUnit" data-value="M">minute(s)</span>
<span id="frequencyUnit" data-value="M">minute(s)</span>
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
......@@ -393,7 +393,7 @@
} else {
$('#lastDayInfo').addClass('hide');
}
}
}
});
......@@ -427,7 +427,7 @@
$("#addParameters").on("click", function() {
TaskSchedulingForm.addParameters();
});
// Save task
$('#addTask, #modifyTask').on('click', function() {
TaskSchedulingForm.saveTask($(this));
......@@ -437,7 +437,7 @@
$("#schedulingForm").on('click', '.removeParameters', function() {
$(this).closest('li').remove();
});
// Cancel form
$('#cancelSchedule').on('click', function(event) {
event.preventDefault();
......@@ -545,7 +545,7 @@
let scheduling = this.serialize();
let type = 'POST';
let url = '/batchProcessing/scheduling';
if( !this.checkSchedulingValues(scheduling)) {
gritter.show($('#empty_text').html(),false);
return;
......@@ -571,7 +571,7 @@
} else {
TaskList.update(scheduling);
}
TaskSchedulingForm.clear();
}
},
......@@ -635,7 +635,7 @@
.addClass('fa fa-times fa-fw')
.html("&nbsp;")
.appendTo(a);
parameterInput.val('');
},
......@@ -649,15 +649,15 @@
scheduling.taskName = this.form.find('[name="taskId"] option:selected').text();
scheduling.startMinutes = this.form.find('[name="startMinutes"]').val();
scheduling.startHours = this.form.find('[name="startHours"]').val();
if (this.form.find('.parametersList').find('li').length != 0) {
scheduling.parameters = [];
this.form.find('.parametersList').find('li').each(function() {
scheduling.parameters.push($(this).attr('parameters'));
});
}
if ($(".active").find(".statusSpan").find(".toggle").hasClass("off")) {
scheduling.status = "paused";
} else {
......@@ -754,6 +754,7 @@
loadServiceAccounts: function(route) {
var serviceAccountSelect = $('#serviceAccountId');
var executedBy = $('#taskList a.active').data('json').executedBy;
serviceAccountSelect.empty();
if ($('#taskId').length == 0 || $('#taskId') == '') {
......@@ -769,10 +770,18 @@
contentType : 'application/json',
success : function (response) {
$.each(response.serviceAccounts, function() {
serviceAccountSelect.append($('<option/>', {
value : this.accountId,
text : this.displayName
}));
if (this.accountId == executedBy) {
serviceAccountSelect.append($('<option/>', {
value : this.accountId,
text : this.displayName,
selected :'selected'
}));
} else {
serviceAccountSelect.append($('<option/>', {
value : this.accountId,
text : this.displayName
}));
}
})
},
error : function(response) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment