-
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.
#53 Prompt for cortex server to be used for an analysis if TheHive de…
…fines more than one Cortex server
- Loading branch information
Showing
10 changed files
with
197 additions
and
100 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
Large diffs are not rendered by default.
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/cortex/CortexInstanceDialogCtrl.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('CortexInstanceDialogCtrl', CortexInstanceDialogCtrl); | ||
|
||
function CortexInstanceDialogCtrl($modalInstance, servers) { | ||
var self = this; | ||
|
||
this.servers = servers; | ||
this.selected = null; | ||
|
||
this.ok = function() { | ||
$modalInstance.close(this.selected); | ||
}; | ||
|
||
this.cancel = function() { | ||
$modalInstance.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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,8 @@ | |
ret.pop(); | ||
} | ||
messageAdded += 1; | ||
} else { | ||
console.log('message already in the flow: ', message); | ||
} | ||
|
||
} | ||
|
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 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 Cortex server</h3> | ||
</div> | ||
<div class="modal-body"> | ||
<div class="form-group"> | ||
<label class="col-sm-4 control-label"> | ||
Cortex 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> |