From a1a575e26f9e85e365eebc1de9d272823c989787 Mon Sep 17 00:00:00 2001 From: Nabil Adouani Date: Fri, 24 Apr 2020 13:04:22 +0200 Subject: [PATCH] #962 Display responder job errors --- ui/app/scripts/directives/responder-actions.js | 8 +++++++- ui/app/styles/case.css | 10 ++++++++++ ui/app/views/directives/responder-actions.html | 11 +++++++++-- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/ui/app/scripts/directives/responder-actions.js b/ui/app/scripts/directives/responder-actions.js index 0904af5269..e288bd2e1c 100644 --- a/ui/app/scripts/directives/responder-actions.js +++ b/ui/app/scripts/directives/responder-actions.js @@ -8,8 +8,14 @@ actions: '=', header: '@' }, - templateUrl: 'views/directives/responder-actions.html', + templateUrl: 'views/directives/responder-actions.html', controller: function($scope, $uibModal) { + _.each($scope.actions.values, function(action) { + if(action.status === 'Failure') { + action.errorMessage = (JSON.parse(action.report) || {}).errorMessage; + } + }); + $scope.showResponderJob = function(action) { $uibModal.open({ scope: $scope, diff --git a/ui/app/styles/case.css b/ui/app/styles/case.css index 9caab9d482..3e708d3858 100644 --- a/ui/app/styles/case.css +++ b/ui/app/styles/case.css @@ -80,3 +80,13 @@ table.case-list .case-tags .label, font-size: 12px !important; font-weight: normal; } + +pre.error-trace { + color: #a94442; + border: none; + font-size: 10px; + word-wrap: break-word; + word-break: break-all; + white-space: pre-wrap; + background-color: #f9f1f1; +} diff --git a/ui/app/views/directives/responder-actions.html b/ui/app/views/directives/responder-actions.html index c2d7627c66..6394b5ab62 100644 --- a/ui/app/views/directives/responder-actions.html +++ b/ui/app/views/directives/responder-actions.html @@ -18,11 +18,18 @@

{{header}}

'InProgress': 'label-warning', 'Failure': 'label-danger'}[action.status]">{{action.status}} - {{action.responderName}} + +
{{action.responderName}}
+
+ {{action.showError ? 'Hide' : 'Show'}} error +
{{action.errorMessage}}
+
+ {{action.cortexId}} {{action.startDate | shortDate}} - +