Skip to content

Commit

Permalink
#195 Display extracted artifacts from job reports
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Jun 4, 2019
1 parent f8bd8e7 commit 9072f3e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
5 changes: 5 additions & 0 deletions www/src/app/pages/jobs/components/job.details.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,31 @@
[{{$ctrl.job.dataType | uppercase}}]
{{(($ctrl.job.dataType === 'file') ? $ctrl.job.attachment.name : $ctrl.job.data) | fang}}
</p>
<hr>
</div>

<div>
<strong>Date</strong>
<p>
<span am-time-ago="$ctrl.job.date"></span>
</p>
<hr>
</div>

<div>
<strong>TLP</strong>
<p>
<tlp value="$ctrl.job.tlp"></tlp>
</p>
<hr>
</div>

<div>
<strong>PAP</strong>
<p>
<tlp value="$ctrl.job.pap" namespace="PAP"></tlp>
</p>
<hr>
</div>

<div>
Expand All @@ -47,6 +51,7 @@
<span class="label label-default"
ng-class="{'Success': 'label-success', 'InProgress': 'label-warning', 'Failure': 'label-danger'}[$ctrl.job.status]">{{$ctrl.job.status}}</span>
</p>
<hr>
</div>

<div ng-if="$ctrl.job.report.summary">
Expand Down
33 changes: 30 additions & 3 deletions www/src/app/pages/jobs/job.page.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<section class="content-header">
<h1>Job details
<h1>Job details
<a ui-sref="main.jobs" class="pull-right">
<small class="text-primary">
<i class="fa fa-chevron-left fa-lg"></i> Back to list</small>
Expand All @@ -22,8 +22,35 @@ <h3 class="box-title">Job report</h3>
<h5 class="text-primary">Input details</h5>
<pre>{{$ctrl.job.data | json}}</pre>
</div>
<h5 class="text-primary mt-xs">Report</h5>
<pre>{{$ctrl.job.report | json}}</pre>

<div>
<h5 class="text-primary mt-xs">Report</h5>
<pre>{{$ctrl.job.report | json}}</pre>
</div>

<div ng-if="$ctrl.job.report.artifacts.length > 0">
<h5 class="text-primary mt-xs">Artifacts</h5>
<table class="table table-striped">
<tr>
<th width="20">#</th>
<th width="100">Datatype</th>
<th>Value</th>
</tr>
<tr ng-repeat="artifact in $ctrl.job.report.artifacts track by $index">
<td>{{$index + 1}}</td>
<td>{{artifact.dataType}}</td>
<td>
<div class="wrap">
{{(artifact.attachment.name || artifact.data) | fang}}
</div>
<div ng-if="artifact.tags.length > 0">
<span class="label label-primary"
ng-repeat="tag in artifact.tags track by $index">{{tag.text}}</span>&nbsp;
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 9072f3e

Please sign in to comment.