-
Notifications
You must be signed in to change notification settings - Fork 640
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#52 Add a share button on case details page to export to misp
- Loading branch information
Showing
10 changed files
with
120 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
ui/app/scripts/controllers/misc/ServerInstanceDialogCtrl.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
(function() { | ||
'use strict'; | ||
angular.module('theHiveControllers') | ||
.controller('ServerInstanceDialogCtrl', ServerInstanceDialogCtrl); | ||
|
||
function ServerInstanceDialogCtrl($uibModalInstance, servers) { | ||
var self = this; | ||
|
||
this.servers = servers; | ||
this.selected = null; | ||
|
||
this.ok = function() { | ||
$uibModalInstance.close(this.selected); | ||
}; | ||
|
||
this.cancel = function() { | ||
$uibModalInstance.dismiss(); | ||
}; | ||
} | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<form class="form-horizontal" name="form" ng-submit="vm.ok()" novalidate> | ||
<div class="modal-header bg-primary"> | ||
<h3 class="modal-title">Select MISP server</h3> | ||
</div> | ||
<div class="modal-body"> | ||
<div class="form-group"> | ||
<label class="col-sm-4 control-label"> | ||
MISP Server | ||
<i class="fa fa-asterisk text-danger"></i> | ||
</label> | ||
<div class="col-sm-8"> | ||
<select class="form-control" ng-model="vm.selected" ng-options="s for s in vm.servers" required> | ||
<option value="">-- choose server --</option> | ||
</select> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="modal-footer text-left"> | ||
<button class="btn btn-default" ng-click="vm.cancel()">Cancel</button> | ||
<button class="btn btn-primary pull-right" type="submit" ng-disabled="form.$invalid">Yes, select this server</button> | ||
</div> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<div class="modal-header bg-primary"> | ||
<h3 class="modal-title">Export case to MISP</h3> | ||
</div> | ||
|
||
<div class="modal-body"> | ||
<div class="alert alert-danger"> | ||
Failed to export the following observables | ||
</div> | ||
<table class="table table-striped"> | ||
<thead> | ||
<th>Observable</th> | ||
<th>Reason</th> | ||
</thead> | ||
<tbody> | ||
<tr ng-repeat="o in failures"> | ||
<td class="wrap">{{o.data | fang}}</td> | ||
<td class="nowrap">{{o.message}}</td> | ||
</tr> | ||
</tbody> | ||
|
||
</table> | ||
|
||
</div> | ||
|
||
<div class="modal-footer text-left"> | ||
<button class="btn btn-default" ng-click="cancel()" type="button">Cancel</button> | ||
<button class="btn btn-primary pull-right" ng-click="copyToClipboard()" type="button"><i class="fa fa-copy"></i> Copy to clipboard</button> | ||
</div> |