Skip to content

Commit

Permalink
#609 Add responder menus to tasks list
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Jul 12, 2018
1 parent aa77164 commit 7c36185
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion ui/app/scripts/controllers/case/CaseMainCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@
return;
}

$scope.caseResponders = null;
CortexSrv.getResponders('case', $scope.caseId)
.then(function(responders) {
$scope.caseResponders = responders;
Expand All @@ -298,7 +299,7 @@
})
};

$scope.runResponder = function(responderId) {
$scope.runResponder = function(responderId) {
CortexSrv.runResponder(responderId, 'case', _.pick($scope.caze, 'id', 'tlp', 'pap'))
.then(function(response) {
console.log(response);
Expand Down
1 change: 1 addition & 0 deletions ui/app/scripts/controllers/case/CaseTasksCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
return;
}

$scope.taskResponders = null;
CortexSrv.getResponders('case_task', taskId)
.then(function(responders) {
$scope.taskResponders = responders;
Expand Down
1 change: 1 addition & 0 deletions ui/app/scripts/controllers/case/CaseTasksItemCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
return;
}

$scope.taskResponders = null;
CortexSrv.getResponders('case_task', $scope.task.id)
.then(function(responders) {
$scope.taskResponders = responders;
Expand Down
2 changes: 1 addition & 1 deletion ui/app/views/partials/case/case.panelinfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h3 class="box-title">
</a>
</span>
<span class="ml-xs pull-right" uib-dropdown ng-if="appConfig.connectors.cortex.enabled">
<a href class="text-primary noline" ng-click="getCaseResponders()" uib-dropdown-toggle>
<a href class="text-primary noline" ng-click="getCaseResponders(true)" uib-dropdown-toggle>
<i class="text-primary fa fa-cog"></i>
Responders
<i class="text-primary fa fa-angle-down"></i>
Expand Down
5 changes: 2 additions & 3 deletions ui/app/views/partials/case/case.tasks.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
</span>

<span class="ml-xs" uib-dropdown ng-if="appConfig.connectors.cortex.enabled">
<a href class="text-primary noline nowrap" ng-click="getTaskResponders(task.id)" uib-dropdown-toggle>
<a href class="text-primary noline nowrap" ng-click="getTaskResponders(task.id, true)" uib-dropdown-toggle>
<i class="text-primary fa fa-cog"></i>
<!-- Responders
<i class="text-primary fa fa-angle-down"></i> -->
Expand All @@ -116,7 +116,7 @@
</a>
</li>
<li ng-repeat="responder in taskResponders">
<a href ng-click="runResponder(responder.id)">
<a href ng-click="runResponder(responder.id, task)">
<strong>{{responder.name}}</strong>
<br>
<small>{{responder.description}}</small></a>
Expand All @@ -128,6 +128,5 @@
</tbody>
</table>
<psearch control="tasks"></psearch>
<pre>{{taskResponders | json}}</pre>
</div>
</div>

0 comments on commit 7c36185

Please sign in to comment.