Give option to display last 10 cert renewal task logs
This commit is contained in:
@@ -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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user