Skip to content

Commit

Permalink
#53 Update report header in observable details page
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Dec 20, 2016
1 parent da31ea5 commit 81ba663
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
6 changes: 4 additions & 2 deletions ui/app/scripts/controllers/case/CaseObservablesItemCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@
$scope.report = {
template: job.analyzerId,
content: job.report,
status: job.status
}
status: job.status,
startDate: job.startDate,
endDate: job.endDate
};
}

$scope.similarArtifacts = CaseArtifactSrv.api().similar({
Expand Down
10 changes: 5 additions & 5 deletions ui/app/scripts/directives/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
}
return {
restrict: 'E',
replace: true,
link: function (scope, element) {
scope.element = element;
scope.$watchGroup(['name', 'content', 'status'], updateReport);
},
replace: true,
scope: {
'name': '=',
'artifact': '=',
'flavor': '@',
'status': '=',
'content': '='
},
link: function (scope, element) {
scope.element = element;
scope.$watchGroup(['name', 'content', 'status'], updateReport);
}
};
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,22 @@ <h3 class="pad10 text-primary">
</tbody>
</table>

<div class="row vpad20">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<hr>
</div>
</div>

<div class="row" style="border-bottom:1px dotted">
<div class="row observable-report" ng-if="report">
<div class="col-md-12">
<p>
<strong>Report</strong>
</p>
</div>
</div>

<div class="row observable-report vpad10" ng-if="report">
<div class="col-md-12">
<report artifact="artifact" content="report.content.full || report.content" default="jsonhuman" flavor="long" name="report.template" status="report.status"></report>
<h3 class="pad10 text-primary">
Report <small>for {{report.template}} analysis of {{(report.endDate || report.startDate) | showDate}}</small>
</h3>
<report artifact="artifact"
content="report.content.full || report.content"
default="jsonhuman"
flavor="long"
name="report.template"
status="report.status"></report>
</div>
</div>

0 comments on commit 81ba663

Please sign in to comment.