Skip to content

Commit

Permalink
#1766 Update revoked pattern display
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Feb 11, 2021
1 parent b25f5c7 commit 0395890
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
6 changes: 3 additions & 3 deletions frontend/app/views/partials/admin/attack/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="col-md-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">List of ATT&CK patterns</h3>
<h3 class="box-title">List of ATT&CK patterns ({{$vm.list.values.length || 0}} of {{$vm.list.total}})</h3>
</div>
<div class="box-body">
<div ng-include="'views/partials/admin/attack/list/toolbar.html'"></div>
Expand Down Expand Up @@ -54,7 +54,7 @@ <h3 class="box-title">List of ATT&CK patterns</h3>
<td>
<a href ng-click="$vm.show(pattern.patternId)">{{::pattern.patternId}}</a>
</td>
<td>{{::pattern.name}}</td>
<td ng-class="{'text-danger': pattern.revoked}">{{::pattern.name}}</td>
<td>
<span ng-if="!pattern.extraData.parent">-</span>
<span ng-if="::pattern.extraData.parent">
Expand All @@ -80,7 +80,7 @@ <h3 class="box-title">List of ATT&CK patterns</h3>
<a class="btn btn-icon btn-clear" href ng-click="$vm.show(pattern.patternId)" uib-tooltip="Show pattern">
<i class="text-primary fa fa-search"></i>
</a>
<!--
<!--
<a class="btn btn-icon btn-clear" href ng-click="$vm.remove(pattern)" uib-tooltip="Delete pattern">
<i class="text-danger fa fa-trash"></i>
</a> -->
Expand Down
32 changes: 23 additions & 9 deletions frontend/app/views/partials/admin/attack/view.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<form class="form">
<div class="modal-header" ng-class="{'bg-primary': !!!modal.pattern.revoked, 'bg-danger': !!modal.pattern.revoked}">
<div class="modal-header" ng-class="{'bg-primary': !!!$modal.pattern.revoked, 'bg-danger': !!$modal.pattern.revoked}">
<h3 class="modal-title">{{$modal.pattern.isSubTechnique ? ($modal.pattern.parentName + ': ') : ''}}{{::$modal.pattern.name}}
<small class="text-white ml-xxxs">(Version: {{::$modal.pattern.version}})</small>
<span ng-if="$modal.pattern.revoked" class="label label-danger">Revoked</span>
</h3>
</div>

Expand Down Expand Up @@ -113,27 +113,40 @@ <h3 class="modal-title">{{$modal.pattern.isSubTechnique ? ($modal.pattern.parent
<div class="col-sm-4">
<div class="form-group">
<label>Capec ID</label>
<div>{{::$modal.pattern.capecId || '-'}}</div>
<div ng-if="$modal.pattern.capecId">
{{::$modal.pattern.capecId}}
</div>
<div ng-if="!$modal.pattern.capecId">
<em class="text-muted">None</em>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label>Capec URL</label>
<div>
<div ng-if="$modal.pattern.capecUrl">
<a href="{{::$modal.pattern.capecUrl}}" target="_blank">
{{::$modal.pattern.capecUrl}}<i class="fa fa-external-link ml-xxxs"></i>
{{::$modal.pattern.capecUrl}} <i class="fa fa-external-link ml-xxxs"></i>
</a>
</div>
<div ng-if="!$modal.pattern.capecUrl">
<em class="text-muted">None</em>
</div>
</div>
</div>
</div>

<div class="form-group">
<label>Description</label>
<div>{{::$modal.pattern.description}}</div>
<div ng-if="$modal.pattern.description">
{{::$modal.pattern.description}}
</div>
<div ng-if="!$modal.pattern.description">
<em class="text-muted">None</em>
</div>
</div>

<div class="row" ng-if="!$modal.pattern.isSubTechnique">
<div class="row" ng-if="$modal.pattern.extraData.children.length > 0">
<div class="col-sm-12">
<table class="table table-striped">
<thead>
Expand Down Expand Up @@ -162,7 +175,8 @@ <h3 class="modal-title">{{$modal.pattern.isSubTechnique ? ($modal.pattern.parent
</div>
</div>
<div class="modal-footer">
<button class="btn btn-default pull-left" type="button" ng-click="$modal.cancel()">Cancel</button>
<button class="btn btn-primary pull-right" type="button" ng-click="$modal.cancel()">Close</button>
<button class="btn btn-primary pull-right"
ng-class="{'btn-primary': !!!$modal.pattern.revoked, 'btn-danger': !!$modal.pattern.revoked}"
type="button" ng-click="$modal.cancel()">Close</button>
</div>
</form>

0 comments on commit 0395890

Please sign in to comment.