diff --git a/CHANGELOG.md b/CHANGELOG.md index ce9ab04631..f1f4ec8472 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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:** @@ -809,4 +820,4 @@ -\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file +\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* diff --git a/ui/app/scripts/controllers/RootCtrl.js b/ui/app/scripts/controllers/RootCtrl.js index 882465e6b2..acbd718b83 100644 --- a/ui/app/scripts/controllers/RootCtrl.js +++ b/ui/app/scripts/controllers/RootCtrl.js @@ -180,9 +180,9 @@ angular.module('theHiveControllers').controller('RootCtrl', templates: function(){ return $scope.templates; }, - uiSettings: function(UiSettingsSrv) { + uiSettings: ['UiSettingsSrv', function(UiSettingsSrv) { return UiSettingsSrv.all(); - } + }] } }); diff --git a/ui/app/scripts/controllers/alert/AlertEventCtrl.js b/ui/app/scripts/controllers/alert/AlertEventCtrl.js index 1176842eee..1f77b87a15 100644 --- a/ui/app/scripts/controllers/alert/AlertEventCtrl.js +++ b/ui/app/scripts/controllers/alert/AlertEventCtrl.js @@ -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; @@ -25,6 +25,8 @@ self.similarCasesStats = []; self.customFieldsCache = CustomFieldsCacheSrv; + self.hideEmptyCaseButton = UiSettingsSrv.hideEmptyCaseButton(); + var getTemplateCustomFields = function(customFields) { var result = []; diff --git a/ui/app/scripts/controllers/alert/AlertListCtrl.js b/ui/app/scripts/controllers/alert/AlertListCtrl.js index 05c2c9a57c..ba6c919b31 100755 --- a/ui/app/scripts/controllers/alert/AlertListCtrl.js +++ b/ui/app/scripts/controllers/alert/AlertListCtrl.js @@ -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', @@ -324,10 +328,10 @@ resolve: { templates: function(){ return templates; - }, - uiSettings: function(UiSettingsSrv) { + }, + uiSettings: ['UiSettingsSrv', function(UiSettingsSrv) { return UiSettingsSrv.all(); - } + }] } }); diff --git a/ui/app/scripts/directives/dashboard/counter.js b/ui/app/scripts/directives/dashboard/counter.js index 6997297622..7c0714581b 100644 --- a/ui/app/scripts/directives/dashboard/counter.js +++ b/ui/app/scripts/directives/dashboard/counter.js @@ -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: { @@ -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) { diff --git a/ui/app/scripts/directives/dashboard/donut.js b/ui/app/scripts/directives/dashboard/donut.js index 078d657031..6b0e2f0d52 100644 --- a/ui/app/scripts/directives/dashboard/donut.js +++ b/ui/app/scripts/directives/dashboard/donut.js @@ -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: { @@ -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: { diff --git a/ui/app/scripts/services/GlobalSearchSrv.js b/ui/app/scripts/services/GlobalSearchSrv.js index 994a48c993..3c93648c6b 100644 --- a/ui/app/scripts/services/GlobalSearchSrv.js +++ b/ui/app/scripts/services/GlobalSearchSrv.js @@ -18,7 +18,7 @@ var cfg = this.restore(); return cfg[entity] || {}; - } + }; this.restore = function() { return localStorageService.get('search-section') || { @@ -55,7 +55,7 @@ return { operator: 'any', list: [{text: value.id, label:value.name}] - } + }; } else { switch(fieldDef.type) { case 'number': diff --git a/ui/app/views/partials/alert/event.dialog.html b/ui/app/views/partials/alert/event.dialog.html index 84d5c44c2e..c59d144ac4 100644 --- a/ui/app/views/partials/alert/event.dialog.html +++ b/ui/app/views/partials/alert/event.dialog.html @@ -166,7 +166,7 @@