Skip to content

Commit

Permalink
Merge pull request #3 from TheHive-Project/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
zpriddy authored Feb 25, 2019
2 parents dde22c5 + 632b339 commit 8af9700
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 34 deletions.
27 changes: 25 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,30 @@
# Change Log

## [3.3.0-RC3](https://github.com/TheHive-Project/TheHive/tree/3.3.0-RC3) (2019-02-21)
## [3.3.0-RC5](https://github.com/TheHive-Project/TheHive/tree/HEAD) (2019-02-24)
[Full Changelog](https://github.com/TheHive-Project/TheHive/compare/3.3.0-RC4...3.3.0-RC5)

**Implemented enhancements:**

- Mouseover text for alert preview [\#897](https://github.com/TheHive-Project/TheHive/issues/897)

**Fixed bugs:**

- dashboard clicks are not correctly translated to tag filters [\#896](https://github.com/TheHive-Project/TheHive/issues/896)
- Search results not visible [\#895](https://github.com/TheHive-Project/TheHive/issues/895)

## [3.3.0-RC4](https://github.com/TheHive-Project/TheHive/tree/3.3.0-RC4) (2019-02-22)
[Full Changelog](https://github.com/TheHive-Project/TheHive/compare/3.3.0-RC3...3.3.0-RC4)

**Implemented enhancements:**

- Use empty case modal when merging alerts and no templates are defined [\#893](https://github.com/TheHive-Project/TheHive/issues/893)

**Fixed bugs:**

- Issue with navigation from dashboard clickable donuts to search page [\#894](https://github.com/TheHive-Project/TheHive/issues/894)
- Hide Empty Case Button Broken [\#890](https://github.com/TheHive-Project/TheHive/issues/890)

## [3.3.0-RC3](https://github.com/TheHive-Project/TheHive/tree/3.3.0-RC3) (2019-02-21)
[Full Changelog](https://github.com/TheHive-Project/TheHive/compare/3.3.0-RC2...3.3.0-RC3)

**Implemented enhancements:**
Expand Down Expand Up @@ -809,4 +832,4 @@



\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
4 changes: 2 additions & 2 deletions ui/app/scripts/controllers/RootCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ angular.module('theHiveControllers').controller('RootCtrl',
templates: function(){
return $scope.templates;
},
uiSettings: function(UiSettingsSrv) {
uiSettings: ['UiSettingsSrv', function(UiSettingsSrv) {
return UiSettingsSrv.all();
}
}]
}
});

Expand Down
2 changes: 1 addition & 1 deletion ui/app/scripts/controllers/SearchCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
_not: {
'_in': {
'_field': '_type',
'_values': ['dashboard', 'data', 'user', 'analyzer', 'caseTemplate']
'_values': ['dashboard', 'data', 'user', 'analyzer', 'caseTemplate', 'reportTemplate', 'action']
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion ui/app/scripts/controllers/alert/AlertEventCtrl.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function() {
'use strict';
angular.module('theHiveControllers')
.controller('AlertEventCtrl', function($scope, $rootScope, $state, $uibModal, $uibModalInstance, CustomFieldsCacheSrv, CaseResolutionStatus, AlertingSrv, NotificationSrv, clipboard, event, templates) {
.controller('AlertEventCtrl', function($scope, $rootScope, $state, $uibModal, $uibModalInstance, CustomFieldsCacheSrv, CaseResolutionStatus, AlertingSrv, NotificationSrv, UiSettingsSrv, clipboard, event, templates) {
var self = this;
var eventId = event.id;

Expand All @@ -25,6 +25,8 @@
self.similarCasesStats = [];
self.customFieldsCache = CustomFieldsCacheSrv;

self.hideEmptyCaseButton = UiSettingsSrv.hideEmptyCaseButton();

var getTemplateCustomFields = function(customFields) {
var result = [];

Expand Down
10 changes: 7 additions & 3 deletions ui/app/scripts/controllers/alert/AlertListCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@
CaseTemplateSrv.list()
.then(function(templates) {

if(!templates || templates.length === 0) {
return $q.resolve(undefined);
}

// Open template selection dialog
var modal = $uibModal.open({
templateUrl: 'views/partials/case/case.templates.selector.html',
Expand All @@ -324,10 +328,10 @@
resolve: {
templates: function(){
return templates;
},
uiSettings: function(UiSettingsSrv) {
},
uiSettings: ['UiSettingsSrv', function(UiSettingsSrv) {
return UiSettingsSrv.all();
}
}]
}
});

Expand Down
22 changes: 12 additions & 10 deletions ui/app/scripts/directives/dashboard/counter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function() {
'use strict';
angular.module('theHiveDirectives').directive('dashboardCounter', function($http, $state, DashboardSrv, NotificationSrv, GlobalSearchSrv) {
angular.module('theHiveDirectives').directive('dashboardCounter', function($q, $http, $state, DashboardSrv, NotificationSrv, GlobalSearchSrv) {
return {
restrict: 'E',
scope: {
Expand Down Expand Up @@ -66,17 +66,19 @@
};

scope.openSearch = function(item) {
if(scope.mode === 'edit') {
return;
}
if(scope.mode === 'edit') {
return;
}

var filters = (scope.options.filters || []).concat(item.serie.filters || []);
var filters = (scope.options.filters || []).concat(item.serie.filters || []);

$q.resolve(GlobalSearchSrv.saveSection(scope.options.entity, {
search: filters.length === 0 ? '*' : null,
filters: filters
})).then(function() {
$state.go('app.search');
});

GlobalSearchSrv.saveSection(scope.options.entity, {
search: filters.length === 0 ? '*' : null,
filters: filters
});
$state.go('app.search');
};

if (scope.autoload === true) {
Expand Down
11 changes: 7 additions & 4 deletions ui/app/scripts/directives/dashboard/donut.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function() {
'use strict';
angular.module('theHiveDirectives').directive('dashboardDonut', function(StatSrv, $state, DashboardSrv, NotificationSrv, GlobalSearchSrv) {
angular.module('theHiveDirectives').directive('dashboardDonut', function($q, StatSrv, $state, DashboardSrv, NotificationSrv, GlobalSearchSrv) {
return {
restrict: 'E',
scope: {
Expand Down Expand Up @@ -93,11 +93,14 @@
value: GlobalSearchSrv.buildDefaultFilterValue(fieldDef, d)
};

GlobalSearchSrv.saveSection(scope.options.entity, {
var filters = (scope.options.filters || []).concat([data]);

$q.resolve(GlobalSearchSrv.saveSection(scope.options.entity, {
search: null,
filters: scope.options.filters.concat([data])
filters: filters
})).then(function() {
$state.go('app.search');
});
$state.go('app.search');
}
},
donut: {
Expand Down
6 changes: 3 additions & 3 deletions ui/app/scripts/services/GlobalSearchSrv.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
var cfg = this.restore();

return cfg[entity] || {};
}
};

this.restore = function() {
return localStorageService.get('search-section') || {
Expand Down Expand Up @@ -51,11 +51,11 @@
};

this.buildDefaultFilterValue = function(fieldDef, value) {
if(fieldDef.type === 'user' || fieldDef.values.length > 0) {
if(fieldDef.name === 'tags' || fieldDef.type === 'user' || fieldDef.values.length > 0) {
return {
operator: 'any',
list: [{text: value.id, label:value.name}]
}
};
} else {
switch(fieldDef.type) {
case 'number':
Expand Down
10 changes: 5 additions & 5 deletions ui/app/views/partials/alert/event.dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,19 @@ <h4 class="vpad10 text-primary">
</tr>
</thead>
<tbody>
<tr ng-repeat="attribute in dialog.pagination.data">
<tr ng-repeat="attribute in dialog.pagination.data" class="clickable">
<td>
<span uib-tooltip="Seen on {{attribute.seen}} existing case(s)" tooltip-popup-delay="500" tooltip-placement="bottom" ng-if="attribute.seen > 0" class="glyphicon glyphicon-eye-open"></span>
</td>
<td>{{attribute.dataType}}</td>
<td class="wrap">
<div class="wrap" ng-if="attribute.dataType !== 'file'">
<div class="wrap" ng-if="attribute.dataType !== 'file'" uib-tooltip="{{attribute.message}}" tooltip-placement="top-left">
{{attribute.data | fang | ellipsis:250}}
</div>
<div class="wrap" ng-if="attribute.dataType === 'file' && attribute.attachment">
<div class="wrap" ng-if="attribute.dataType === 'file' && attribute.attachment" uib-tooltip="{{attribute.message}}" tooltip-placement="top-left">
{{attribute.attachment.name}} ({{attribute.attachment.size}} bytes)
</div>
<div class="wrap" ng-if="attribute.dataType === 'file' && attribute.remoteAttachment">
<div class="wrap" ng-if="attribute.dataType === 'file' && attribute.remoteAttachment" uib-tooltip="{{attribute.message}}" tooltip-placement="top-left">
{{attribute.remoteAttachment.filename}}
</div>
<div class="case-tags flexwrap mt-xxs" ng-if="attribute.tags.length > 0">
Expand Down Expand Up @@ -166,7 +166,7 @@ <h4 class="vpad10 text-primary">
<label class="col-sm-4 control-label">Import alert as</label>
<div class="col-sm-8 input-group">
<select class="form-control" ng-model="dialog.event.caseTemplate" ng-options="template for template in dialog.templates">
<option value="">Empty case</option>
<option value="" ng-if="dialog.templates.length === 0 || !!!dialog.hideEmptyCaseButton">Empty case</option>
</select>
<span class="input-group-btn">
<button class="btn btn-primary" type="submit" ng-disabled="dialog.loading">Yes, Import</button>
Expand Down
2 changes: 1 addition & 1 deletion ui/bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "thehive",
"version": "3.3.0-RC3",
"version": "3.3.0-RC5",
"license": "AGPL-3.0",
"dependencies": {
"angular": "1.5.8",
Expand Down
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "thehive",
"version": "3.3.0-RC3",
"version": "3.3.0-RC5",
"license": "AGPL-3.0",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "3.3.0-RC3"
version in ThisBuild := "3.3.0-RC5"

0 comments on commit 8af9700

Please sign in to comment.