Commit aab6ec2d authored by Nabil Adouani's avatar Nabil Adouani

#890 Fix UiSettingsSrv service injection

parent b8fd37a7
......@@ -180,9 +180,9 @@ angular.module('theHiveControllers').controller('RootCtrl',
templates: function(){
return $scope.templates;
},
uiSettings: function(UiSettingsSrv) {
uiSettings: ['UiSettingsSrv', function(UiSettingsSrv) {
return UiSettingsSrv.all();
}
}]
}
});
......
(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 = [];
......
......@@ -328,10 +328,10 @@
resolve: {
templates: function(){
return templates;
},
uiSettings: function(UiSettingsSrv) {
},
uiSettings: ['UiSettingsSrv', function(UiSettingsSrv) {
return UiSettingsSrv.all();
}
}]
}
});
......
......@@ -166,7 +166,7 @@
<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>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment