Skip to content

Commit

Permalink
#1766 WIP: Add live stream procedure template
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Feb 22, 2021
1 parent cee4e3d commit 1c76cc2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/app/scripts/directives/flow/flow-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'use strict';

angular.module('theHiveDirectives')
.directive('flowItem', function($uibModal, $state, $window, HtmlSanitizer, UserSrv) {
.directive('flowItem', function($uibModal, $state, $window, HtmlSanitizer, UserSrv, AttackPatternSrv) {
return {
restrict: 'E',
replace: true,
Expand Down Expand Up @@ -58,6 +58,8 @@
return false;
};

scope.tactics = AttackPatternSrv.tactics.values;

scope.bulk = scope.isBulkOperation();
},
templateUrl: 'views/directives/flow/flow-item.html'
Expand Down
1 change: 1 addition & 0 deletions frontend/app/views/directives/flow/flow.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
<flow-item target="targetWindow" type="caseTemplate" data="value" ng-switch-when="casetemplate"></flow-item>
<flow-item target="targetWindow" type="organisation" data="value" ng-switch-when="organisation"></flow-item>
<flow-item target="targetWindow" type="dashboard" data="value" ng-switch-when="dashboard"></flow-item>
<flow-item target="targetWindow" type="procedure" data="value" ng-switch-when="procedure"></flow-item>
</div>
</div>
26 changes: 26 additions & 0 deletions frontend/app/views/directives/flow/procedure.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<div class="flow-task" ng-switch="base.operation">
<!-- <pre>{{base | json}}</pre> -->
<div class="flow-item-title">
<i class="glyphicon glyphicon-knight"></i>{{tactics[base.details.tactic].label}} - {{base.details.patternId}}
</div>
<div class="flow-item-updates" ng-switch-when="Creation">
<div>
occureDate: <span><em>{{base.details.occurDate | showDate}}</em></span>
</div>
<div>
description: <span><em>{{(base.details.procedure || '-')| limitTo: 250}}</em></span>
</div>
</div>
<div class="flow-item-updates" ng-switch-default>
<span ng-repeat="(k, v) in base.details" ng-switch="k">
<div ng-switch-when="occurDate">
{{k}}:
<em>{{v | showDate}}</em>
</div>
<div ng-switch-default>
{{k}}:
<em>{{v | limitTo: 250}}</em>
</div>
</span>
</div>
</div>

0 comments on commit 1c76cc2

Please sign in to comment.