ACL Manager

This commit is contained in:
usmannasir
2018-08-18 00:39:10 +05:00
parent bc29c59287
commit f3230a010b
57 changed files with 25510 additions and 23870 deletions

View File

@@ -985,15 +985,10 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
///// ModSec configs
var modsecurity_status = false;
var SecAuditEngine = false;
var SecRuleEngine = false;
$('#modsecurity_status').change(function() {
modsecurity_status = $(this).prop('checked');
});
$('#SecAuditEngine').change(function() {
SecAuditEngine = $(this).prop('checked');
});
@@ -1008,7 +1003,6 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
$scope.modsecLoading = false;
$('#modsecurity_status').bootstrapToggle('off');
$('#SecAuditEngine').bootstrapToggle('off');
$('#SecRuleEngine').bootstrapToggle('off');
@@ -1037,10 +1031,6 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
if(response.data.installed === 1) {
if (response.data.modsecurity === 1) {
$('#modsecurity_status').bootstrapToggle('on');
}
if (response.data.SecAuditEngine === 1) {
$('#SecAuditEngine').bootstrapToggle('on');
}
@@ -1083,13 +1073,12 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
url = "/firewall/saveModSecConfigurations";
var data = {
modsecurity_status:modsecurity_status,
SecAuditEngine:SecAuditEngine,
SecRuleEngine:SecRuleEngine,
SecDebugLogLevel:$scope.SecDebugLogLevel,
SecAuditLogParts:$scope.SecAuditLogParts,
SecAuditLogRelevantStatus:$scope.SecAuditLogRelevantStatus,
SecAuditLogType:$scope.SecAuditLogType,
SecAuditLogType:$scope.SecAuditLogType
};
var config = {
@@ -1494,8 +1483,6 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
$scope.modsecLoading = false;
url = "/firewall/enableDisableRuleFile";
var data = {
@@ -1529,6 +1516,12 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
$scope.installationFailed = true;
$scope.installationSuccess = false;
new PNotify({
title: 'Success!',
text: 'Changes successfully applied.',
type:'success'
});
$scope.fetchRulesFile(packName);
}else{
@@ -1541,6 +1534,12 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
$scope.installationFailed = false;
$scope.installationSuccess = true;
new PNotify({
title: 'Error!',
text: response.data.error_message,
type:'error'
});
$scope.errorMessage = response.data.error_message;
}
@@ -1554,6 +1553,12 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
$scope.couldNotConnect = false;
$scope.installationFailed = true;
$scope.installationSuccess = true;
new PNotify({
title: 'Error!',
text: 'Could not connect to server, please refresh this page.',
type:'error'
});
}
}