From 10c9555d1e39a82022b23ad63cf6a05aaae84e2c Mon Sep 17 00:00:00 2001 From: Nabil Adouani Date: Wed, 28 Dec 2016 17:56:18 +0100 Subject: [PATCH] #53 Improve the observable details page --- .../controllers/case/CaseObservablesCtrl.js | 10 ++-- ui/app/scripts/directives/report.js | 10 ++-- ui/app/styles/main.css | 6 ++- .../partials/case/case.observables.item.html | 6 +-- .../details/artifact-details-analysers.html | 49 ++++++++++++------- ui/app/views/reports/long.html | 10 +++- 6 files changed, 56 insertions(+), 35 deletions(-) diff --git a/ui/app/scripts/controllers/case/CaseObservablesCtrl.js b/ui/app/scripts/controllers/case/CaseObservablesCtrl.js index fc46071fdd..526ceb2e21 100644 --- a/ui/app/scripts/controllers/case/CaseObservablesCtrl.js +++ b/ui/app/scripts/controllers/case/CaseObservablesCtrl.js @@ -530,15 +530,15 @@ cortexId: serverId, artifactId: item.artifact.id, analyzerId: item.analyzerId - }); + }); }) - ); + ); }) .then(function() { - AlertSrv.log('Analyzers has been successfully started for observable: ' + artifactName, 'success'); + AlertSrv.log('Analyzers have been successfully started for ' + $scope.selection.artifacts.length + ' observables', 'success'); }, function() { - - }) + + }); $scope.initAnalyzersList(); $scope.initSelection($scope.selection); diff --git a/ui/app/scripts/directives/report.js b/ui/app/scripts/directives/report.js index 9824b42ce1..5bd95d4482 100644 --- a/ui/app/scripts/directives/report.js +++ b/ui/app/scripts/directives/report.js @@ -14,22 +14,22 @@ $templateRequest(reportUrl, true) .then(function (tmpl) { scope.element.html($compile(tmpl)(scope)); - }, function (response) { + }, function (/*response*/) { $templateRequest('/views/reports/' + scope.flavor + '.html', true) .then(function (tmpl) { scope.element.html($compile(tmpl)(scope)); }); - }) + }); } return { - restrict: 'E', - replace: true, + restrict: 'E', scope: { 'name': '=', 'artifact': '=', 'flavor': '@', 'status': '=', - 'content': '=' + 'content': '=', + 'success': '=' }, link: function (scope, element) { scope.element = element; diff --git a/ui/app/styles/main.css b/ui/app/styles/main.css index d28d079b77..edbf8b2720 100644 --- a/ui/app/styles/main.css +++ b/ui/app/styles/main.css @@ -48,7 +48,9 @@ body { margin: 0 !important; } - +.short-report { + margin-right: 5px; +} .empty-message { background-color: #f5f5f5; color: #AAA; @@ -361,7 +363,7 @@ td.vmiddle { padding: 9.5px; margin: 0 0 10px; font-size: 13px; - line-height: 1.42857143; + line-height: 1.42857143; word-break: break-all; word-wrap: break-word; background-color: #f5f5f5; diff --git a/ui/app/views/partials/case/case.observables.item.html b/ui/app/views/partials/case/case.observables.item.html index f77e45ab0d..7feee28128 100644 --- a/ui/app/views/partials/case/case.observables.item.html +++ b/ui/app/views/partials/case/case.observables.item.html @@ -25,11 +25,7 @@

-
    -
  • - -
  • -
+
diff --git a/ui/app/views/partials/observables/details/artifact-details-analysers.html b/ui/app/views/partials/observables/details/artifact-details-analysers.html index 64a2125e59..98b95f4328 100644 --- a/ui/app/views/partials/observables/details/artifact-details-analysers.html +++ b/ui/app/views/partials/observables/details/artifact-details-analysers.html @@ -1,43 +1,43 @@

Observable Analyzers - Run all + Run all

- + - - - + + +
AnalyzerLast analysisLast analysis Action
- + - {{::analyzerId}}
+ {{::analyzerId}}
{{::analyzers[analyzerId] | getField: 'description'}}
+ + + - -
@@ -51,12 +51,27 @@

Report for {{report.template}} analysis of {{(report.endDate || report.startDate) | showDate}} + + {{showRaw ? 'Hide': 'Show'}} Raw Report +

- +
+
+
+ Raw report +
+
+
{{(report.content.full || report.content) | json}}
+
+
+
+
diff --git a/ui/app/views/reports/long.html b/ui/app/views/reports/long.html index ddabac7d41..030ed00fb6 100644 --- a/ui/app/views/reports/long.html +++ b/ui/app/views/reports/long.html @@ -1 +1,9 @@ -
{{content | json}}
\ No newline at end of file +
+
+ {{(artifact.data || artifact.attachment.name) | fang}} +
+
+
{{content.errorMessage}}
+
{{content | json}}
+
+