Skip to content
Snippets Groups Projects
Commit 7c95ebfb authored by Erik Reid's avatar Erik Reid
Browse files

Finished feature DBOARD3-242-debugging.

parents 3a59914f 4b2f7d6f
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,20 @@ ...@@ -57,6 +57,20 @@
</table> </table>
</div> </div>
<div class="container p-3 my-3 border" ng-show="failed.length">
<table class="table table-striped" summary="failed tasks">
<tr>
<th>
<button ng-click="show_failed=!show_failed">{{show_failed ? "hide" : "show"}}</button>
</th>
<th scope="col">failed tasks</th>
</tr>
<tr ng-if="show_failed" ng-repeat="description in failed">
<td colspan="2">{{ description }}</td>
</tr>
</table>
</div>
<div class="container p-3 my-3 border" ng-show="pending.length"> <div class="container p-3 my-3 border" ng-show="pending.length">
<table class="table table-striped" summary="pending tasks"> <table class="table table-striped" summary="pending tasks">
<tr> <tr>
......
...@@ -17,6 +17,7 @@ myApp.controller('update', function($scope, $http, $timeout) { ...@@ -17,6 +17,7 @@ myApp.controller('update', function($scope, $http, $timeout) {
$scope.show_warnings = true; $scope.show_warnings = true;
$scope.show_errors = true; $scope.show_errors = true;
$scope.show_pending = true; $scope.show_pending = true;
$scope.show_failed = true;
$scope.check_status = function() { $scope.check_status = function() {
...@@ -32,6 +33,8 @@ myApp.controller('update', function($scope, $http, $timeout) { ...@@ -32,6 +33,8 @@ myApp.controller('update', function($scope, $http, $timeout) {
$scope.latch_error = rsp.data.latch.failure; $scope.latch_error = rsp.data.latch.failure;
if (!$scope.latch_pending) { if (!$scope.latch_pending) {
$scope.update_request_status = ""; $scope.update_request_status = "";
} else {
$scope.update_request_status = "update is running";
} }
$timeout($scope.check_status, 5000); $timeout($scope.check_status, 5000);
}, },
......
...@@ -618,6 +618,8 @@ def _wait_for_tasks(task_ids, update_callback=lambda s: None): ...@@ -618,6 +618,8 @@ def _wait_for_tasks(task_ids, update_callback=lambda s: None):
@log_task_entry_and_exit @log_task_entry_and_exit
def refresh_finalizer(self, pending_task_ids_json): def refresh_finalizer(self, pending_task_ids_json):
# TODO: if more types of errors appear, use a finally block
input_schema = { input_schema = {
"$schema": "http://json-schema.org/draft-07/schema#", "$schema": "http://json-schema.org/draft-07/schema#",
"type": "array", "type": "array",
...@@ -635,7 +637,8 @@ def refresh_finalizer(self, pending_task_ids_json): ...@@ -635,7 +637,8 @@ def refresh_finalizer(self, pending_task_ids_json):
except (jsonschema.ValidationError, except (jsonschema.ValidationError,
json.JSONDecodeError, json.JSONDecodeError,
InventoryTaskError) as e: InventoryTaskError,
RedisError) as e:
update_latch_status(InventoryTask.config, failure=True) update_latch_status(InventoryTask.config, failure=True)
raise e raise e
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment