Give option to display last 10 cert renewal task logs

This commit is contained in:
Johannes Zellner
2023-05-02 16:55:57 +02:00
parent cf3fc940d2
commit ac602dc2a9
3 changed files with 30 additions and 5 deletions
+9 -4
View File
@@ -490,15 +490,17 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
message: '',
errorMessage: '',
taskId: '',
tasks: [],
checkStatus: function () {
Client.getLatestTaskByType(TASK_TYPES.TASK_CHECK_CERTS, function (error, task) {
Client.getTasksByType(TASK_TYPES.TASK_CHECK_CERTS, function (error, tasks) {
if (error) return console.error(error);
if (!task) return;
if (!tasks.length) return;
$scope.renewCerts.taskId = task.id;
$scope.renewCerts.updateStatus();
$scope.renewCerts.tasks = tasks.slice(0, 10);
$scope.renewCerts.taskId = tasks[0].id;
});
},
@@ -512,6 +514,8 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
$scope.renewCerts.percent = 100; // indicates that 'result' is valid
$scope.renewCerts.errorMessage = data.success ? '' : data.error.message;
$scope.renewCerts.checkStatus();
return;
}
@@ -538,6 +542,7 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
} else {
$scope.renewCerts.taskId = taskId;
$scope.renewCerts.updateStatus();
$scope.renewCerts.checkStatus();
}
});
}