Skip to content

Commit

Permalink
#79 Upgrade ui-bootstrap library to the latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Feb 6, 2017
1 parent 7f29669 commit 70c4769
Show file tree
Hide file tree
Showing 59 changed files with 211 additions and 211 deletions.
4 changes: 2 additions & 2 deletions ui/app/scripts/controllers/AboutCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
'use strict';

angular.module('theHiveControllers').controller('AboutCtrl',
function($rootScope, $scope, $modalInstance, VersionSrv, AlertSrv) {
function($rootScope, $scope, $uibModalInstance, VersionSrv, AlertSrv) {
VersionSrv.get().then(function(response) {
$scope.version = response.versions;
}, function(data, status) {
AlertSrv.error('AboutCtrl', data, status);
});

$scope.close = function() {
$modalInstance.close();
$uibModalInstance.close();
};
}
);
Expand Down
4 changes: 2 additions & 2 deletions ui/app/scripts/controllers/AuthenticationCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
(function() {
'use strict';
angular.module('theHiveControllers')
.controller('AuthenticationCtrl', function($scope, $state, $modalStack, AuthenticationSrv, AlertSrv) {
.controller('AuthenticationCtrl', function($scope, $state, $uibModalStack, AuthenticationSrv, AlertSrv) {
$scope.params = {};

$modalStack.dismissAll();
$uibModalStack.dismissAll();

$scope.login = function() {
$scope.params.username = angular.lowercase($scope.params.username);
Expand Down
6 changes: 3 additions & 3 deletions ui/app/scripts/controllers/RootCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Controller for main page
*/
angular.module('theHiveControllers').controller('RootCtrl',
function($scope, $modal, $location, $state, $base64, AuthenticationSrv, MispSrv, StreamSrv, StreamStatSrv, TemplateSrv, MetricsCacheSrv, AlertSrv) {
function($scope, $uibModal, $location, $state, $base64, AuthenticationSrv, MispSrv, StreamSrv, StreamStatSrv, TemplateSrv, MetricsCacheSrv, AlertSrv) {
'use strict';

$scope.querystring = '';
Expand Down Expand Up @@ -93,7 +93,7 @@ angular.module('theHiveControllers').controller('RootCtrl',
};

$scope.createNewCase = function(template) {
$modal.open({
$uibModal.open({
templateUrl: 'views/partials/case/case.creation.html',
controller: 'CaseCreationCtrl',
size: 'lg',
Expand All @@ -104,7 +104,7 @@ angular.module('theHiveControllers').controller('RootCtrl',
};

$scope.aboutTheHive = function() {
$modal.open({
$uibModal.open({
templateUrl: 'views/partials/about.html',
controller: 'AboutCtrl',
size: ''
Expand Down
18 changes: 9 additions & 9 deletions ui/app/scripts/controllers/admin/AdminCaseTemplatesCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'use strict';

angular.module('theHiveControllers').controller('AdminCaseTemplatesCtrl',
function($scope, $modal, TemplateSrv, AlertSrv, UtilsSrv, ListSrv, MetricsCacheSrv) {
function($scope, $uibModal, TemplateSrv, AlertSrv, UtilsSrv, ListSrv, MetricsCacheSrv) {
$scope.task = '';
$scope.tags = [];
$scope.templates = [];
Expand Down Expand Up @@ -74,7 +74,7 @@
};

$scope.openTaskDialog = function(task, action) {
$modal.open({
$uibModal.open({
scope: $scope,
templateUrl: 'views/partials/admin/case-templates.task.html',
controller: 'AdminCaseTemplateTasksCtrl',
Expand Down Expand Up @@ -106,7 +106,7 @@
};

$scope.deleteTemplate = function() {
$modal.open({
$uibModal.open({
scope: $scope,
templateUrl: 'views/partials/admin/case-templates.delete.html',
controller: 'AdminCaseTemplateDeleteCtrl',
Expand Down Expand Up @@ -152,25 +152,25 @@
};

})
.controller('AdminCaseTemplateTasksCtrl', function($scope, $modalInstance, action, task) {
.controller('AdminCaseTemplateTasksCtrl', function($scope, $uibModalInstance, action, task) {
$scope.task = task || {};
$scope.action = action;

$scope.cancel = function() {
$modalInstance.dismiss();
$uibModalInstance.dismiss();
};

$scope.addTask = function() {
if(action === 'Add') {
$scope.template.tasks.push(task);
}

$modalInstance.dismiss();
$uibModalInstance.dismiss();
};
})
.controller('AdminCaseTemplateDeleteCtrl', function($scope, $modalInstance, TemplateSrv) {
.controller('AdminCaseTemplateDeleteCtrl', function($scope, $uibModalInstance, TemplateSrv) {
$scope.cancel = function() {
$modalInstance.dismiss();
$uibModalInstance.dismiss();
};

$scope.confirm = function() {
Expand All @@ -181,7 +181,7 @@

$scope.$emit('templates:refresh');

$modalInstance.dismiss();
$uibModalInstance.dismiss();
});
};
});
Expand Down
26 changes: 13 additions & 13 deletions ui/app/scripts/controllers/admin/AdminReportTemplatesCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.controller('AdminReportTemplateDeleteCtrl', AdminReportTemplateDeleteCtrl);


function AdminReportTemplatesCtrl($q, $modal, AnalyzerSrv, ReportTemplateSrv) {
function AdminReportTemplatesCtrl($q, $uibModal, AnalyzerSrv, ReportTemplateSrv) {
var self = this;

this.templates = [];
Expand Down Expand Up @@ -45,7 +45,7 @@
};

this.showTemplate = function (reportTemplate, analyzer) {
var modalInstance = $modal.open({
var modalInstance = $uibModal.open({
//scope: $scope,
templateUrl: 'views/partials/admin/report-template-dialog.html',
controller: 'AdminReportTemplateDialogCtrl',
Expand All @@ -67,7 +67,7 @@
};

this.deleteTemplate = function(template) {
var modalInstance = $modal.open({
var modalInstance = $uibModal.open({
templateUrl: 'views/partials/admin/report-template-delete.html',
controller: 'AdminReportTemplateDeleteCtrl',
controllerAs: 'vm',
Expand All @@ -85,7 +85,7 @@
};

this.import = function () {
var modalInstance = $modal.open({
var modalInstance = $uibModal.open({
animation: true,
templateUrl: 'views/partials/admin/report-template-import.html',
controller: 'AdminReportTemplateImportCtrl',
Expand All @@ -101,7 +101,7 @@
this.load();
}

function AdminReportTemplateDialogCtrl($modalInstance, reportTemplate, ReportTemplateSrv, AlertSrv, analyzer) {
function AdminReportTemplateDialogCtrl($uibModalInstance, reportTemplate, ReportTemplateSrv, AlertSrv, analyzer) {
this.reportTemplate = reportTemplate;
this.analyzer = analyzer;
this.reportTypes = ['short', 'long'];
Expand All @@ -116,49 +116,49 @@
this.formData.analyzerId = this.analyzer.id;

this.cancel = function () {
$modalInstance.dismiss();
$uibModalInstance.dismiss();
};

this.saveTemplate = function() {
ReportTemplateSrv.save(this.formData)
.then(function() {
$modalInstance.close();
$uibModalInstance.close();
}, function(response) {
AlertSrv.error('AdminReportTemplateDialogCtrl', response.data, response.status);
});
};
}

function AdminReportTemplateDeleteCtrl($modalInstance, ReportTemplateSrv, AlertSrv, template) {
function AdminReportTemplateDeleteCtrl($uibModalInstance, ReportTemplateSrv, AlertSrv, template) {
this.template = template;

this.ok = function () {
ReportTemplateSrv.delete(template.id)
.then(function() {
$modalInstance.close();
$uibModalInstance.close();
}, function(response) {
AlertSrv.error('AdminReportTemplateDeleteCtrl', response.data, response.status);
});
};
this.cancel = function () {
$modalInstance.dismiss('cancel');
$uibModalInstance.dismiss('cancel');
};
}

function AdminReportTemplateImportCtrl($modalInstance, ReportTemplateSrv, AlertSrv) {
function AdminReportTemplateImportCtrl($uibModalInstance, ReportTemplateSrv, AlertSrv) {
this.formData = {};

this.ok = function () {
ReportTemplateSrv.import(this.formData)
.then(function() {
$modalInstance.close();
$uibModalInstance.close();
}, function(response) {
AlertSrv.error('AdminReportTemplateImportCtrl', response.data, response.status);
});
};

this.cancel = function () {
$modalInstance.dismiss('cancel');
$uibModalInstance.dismiss('cancel');
};
}
})();
6 changes: 3 additions & 3 deletions ui/app/scripts/controllers/case/CaseCloseModalCtrl.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function() {
'use strict';
angular.module('theHiveControllers').controller('CaseCloseModalCtrl',
function($scope, $modalInstance, SearchSrv, MetricsCacheSrv, AlertSrv) {
function($scope, $uibModalInstance, SearchSrv, MetricsCacheSrv, AlertSrv) {

$scope.tasksValid = false;
$scope.tasks = [];
Expand Down Expand Up @@ -71,12 +71,12 @@

AlertSrv.log('The case #' + caze.caseId + ' has been closed', 'success');

$modalInstance.close();
$uibModalInstance.close();
});
};

$scope.cancel = function() {
$modalInstance.dismiss();
$uibModalInstance.dismiss();
};
}
);
Expand Down
6 changes: 3 additions & 3 deletions ui/app/scripts/controllers/case/CaseCreationCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(function () {
'use strict';
angular.module('theHiveControllers').controller('CaseCreationCtrl',
function ($rootScope, $scope, $state, $modalInstance, CaseSrv, AlertSrv, MetricsCacheSrv, template) {
function ($rootScope, $scope, $state, $uibModalInstance, CaseSrv, AlertSrv, MetricsCacheSrv, template) {

$rootScope.title = 'New case';
$scope.activeTlp = 'active';
Expand Down Expand Up @@ -98,7 +98,7 @@
$state.go('app.case.details', {
caseId: data.id
});
$modalInstance.close();
$uibModalInstance.close();
}, function (response) {
$scope.pendingAsync = false;
AlertSrv.error('CaseCreationCtrl', response.data, response.status);
Expand All @@ -118,7 +118,7 @@
};

$scope.cancel = function () {
$modalInstance.dismiss();
$uibModalInstance.dismiss();
};
}
);
Expand Down
10 changes: 5 additions & 5 deletions ui/app/scripts/controllers/case/CaseDetailsCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'use strict';

angular.module('theHiveControllers').controller('CaseDetailsCtrl',
function($scope, $state, $modal, CaseTabsSrv, UserInfoSrv, PSearchSrv) {
function($scope, $state, $uibModal, CaseTabsSrv, UserInfoSrv, PSearchSrv) {

CaseTabsSrv.activateTab($state.current.data.tab);

Expand Down Expand Up @@ -43,7 +43,7 @@
};

$scope.addMetric = function(metric) {
var modalInstance = $modal.open({
var modalInstance = $uibModal.open({
scope: $scope,
templateUrl: 'views/partials/case/case.add.metric.html',
controller: 'CaseAddMetricConfirmCtrl',
Expand Down Expand Up @@ -74,15 +74,15 @@
}
);

angular.module('theHiveControllers').controller('CaseAddMetricConfirmCtrl', function($scope, $modalInstance, metric) {
angular.module('theHiveControllers').controller('CaseAddMetricConfirmCtrl', function($scope, $uibModalInstance, metric) {
$scope.metric = metric;

$scope.cancel = function() {
$modalInstance.dismiss(metric);
$uibModalInstance.dismiss(metric);
};

$scope.confirm = function() {
$modalInstance.close(metric);
$uibModalInstance.close(metric);
};
});

Expand Down
2 changes: 1 addition & 1 deletion ui/app/scripts/controllers/case/CaseLinksCtrl.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function() {
'use strict';
angular.module('theHiveControllers').controller('CaseLinksCtrl',
function($scope, $state, $stateParams, $modal, CaseTabsSrv) {
function($scope, $state, $stateParams, $uibModal, CaseTabsSrv) {
$scope.caseId = $stateParams.caseId;
var tabName = 'links-' + $scope.caseId;

Expand Down
8 changes: 4 additions & 4 deletions ui/app/scripts/controllers/case/CaseMainCtrl.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function() {
'use strict';
angular.module('theHiveControllers').controller('CaseMainCtrl',
function($scope, $rootScope, $state, $stateParams, $q, $modal, CaseTabsSrv, CaseSrv, MetricsCacheSrv, UserInfoSrv, StreamStatSrv, AlertSrv, UtilsSrv, CaseResolutionStatus, CaseImpactStatus, caze) {
function($scope, $rootScope, $state, $stateParams, $q, $uibModal, CaseTabsSrv, CaseSrv, MetricsCacheSrv, UserInfoSrv, StreamStatSrv, AlertSrv, UtilsSrv, CaseResolutionStatus, CaseImpactStatus, caze) {
$scope.CaseResolutionStatus = CaseResolutionStatus;
$scope.CaseImpactStatus = CaseImpactStatus;

Expand Down Expand Up @@ -160,7 +160,7 @@
};

$scope.openCloseDialog = function() {
var modalInstance = $modal.open({
var modalInstance = $uibModal.open({
scope: $scope,
templateUrl: 'views/partials/case/case.close.html',
controller: 'CaseCloseModalCtrl',
Expand All @@ -173,7 +173,7 @@
};

$scope.reopenCase = function() {
$modal.open({
$uibModal.open({
scope: $scope,
templateUrl: 'views/partials/case/case.reopen.html',
controller: 'CaseReopenModalCtrl',
Expand All @@ -182,7 +182,7 @@
};

$scope.mergeCase = function() {
$modal.open({
$uibModal.open({
templateUrl: 'views/partials/case/case.merge.html',
controller: 'CaseMergeModalCtrl',
controllerAs: 'dialog',
Expand Down
6 changes: 3 additions & 3 deletions ui/app/scripts/controllers/case/CaseMergeModalCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
angular.module('theHiveControllers')
.controller('CaseMergeModalCtrl', CaseMergeModalCtrl);

function CaseMergeModalCtrl($state, $modalInstance, $q, SearchSrv, CaseSrv, UserInfoSrv, AlertSrv, caze, $http) {
function CaseMergeModalCtrl($state, $uibModalInstance, $q, SearchSrv, CaseSrv, UserInfoSrv, AlertSrv, caze, $http) {
var me = this;

this.caze = caze;
Expand Down Expand Up @@ -70,7 +70,7 @@
caseId: merged.id
});

$modalInstance.dismiss();
$uibModalInstance.dismiss();

AlertSrv.log('The cases have been successfully merged into a new case #' + merged.caseId, 'success');
}, function (response) {
Expand All @@ -80,7 +80,7 @@
};

this.cancel = function () {
$modalInstance.dismiss();
$uibModalInstance.dismiss();
};
}
})();
Loading

0 comments on commit 70c4769

Please sign in to comment.