Skip to content

Commit

Permalink
Merge branch 'release/3.3.0-RC4'
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Feb 22, 2019
2 parents 50611e0 + b5ca2f0 commit 94e0efb
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 28 deletions.
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
# Change Log

## [3.3.0-RC3](https://github.com/TheHive-Project/TheHive/tree/3.3.0-RC3) (2019-02-21)
## [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 +820,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
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
4 changes: 2 additions & 2 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 @@ -55,7 +55,7 @@
return {
operator: 'any',
list: [{text: value.id, label:value.name}]
}
};
} else {
switch(fieldDef.type) {
case 'number':
Expand Down
2 changes: 1 addition & 1 deletion ui/app/views/partials/alert/event.dialog.html
Original file line number Diff line number Diff line change
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-RC4",
"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-RC4",
"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-RC4"

0 comments on commit 94e0efb

Please sign in to comment.