mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 22:36:12 +01:00
dkim fix for subdomains
This commit is contained in:
@@ -15,6 +15,8 @@ from plogical.backupManager import BackupManager
|
|||||||
import userManagment.views as um
|
import userManagment.views as um
|
||||||
from packages.packagesManager import PackagesManager
|
from packages.packagesManager import PackagesManager
|
||||||
from plogical.processUtilities import ProcessUtilities
|
from plogical.processUtilities import ProcessUtilities
|
||||||
|
from firewall.firewallManager import FirewallManager
|
||||||
|
from serverLogs.views import getLogsFromFile
|
||||||
|
|
||||||
class CloudManager:
|
class CloudManager:
|
||||||
def __init__(self, data=None, admin = None):
|
def __init__(self, data=None, admin = None):
|
||||||
@@ -674,3 +676,59 @@ class CloudManager:
|
|||||||
return HttpResponse(json_data)
|
return HttpResponse(json_data)
|
||||||
except BaseException, msg:
|
except BaseException, msg:
|
||||||
return self.ajaxPre(0, str(msg))
|
return self.ajaxPre(0, str(msg))
|
||||||
|
|
||||||
|
def getSSHConfigs(self):
|
||||||
|
try:
|
||||||
|
fm = FirewallManager()
|
||||||
|
return fm.getSSHConfigs(self.admin.pk, self.data)
|
||||||
|
except BaseException, msg:
|
||||||
|
return self.ajaxPre(0, str(msg))
|
||||||
|
|
||||||
|
def saveSSHConfigs(self):
|
||||||
|
try:
|
||||||
|
fm = FirewallManager()
|
||||||
|
return fm.saveSSHConfigs(self.admin.pk, self.data)
|
||||||
|
except BaseException, msg:
|
||||||
|
return self.ajaxPre(0, str(msg))
|
||||||
|
|
||||||
|
def deleteSSHKey(self):
|
||||||
|
try:
|
||||||
|
fm = FirewallManager()
|
||||||
|
return fm.deleteSSHKey(self.admin.pk, self.data)
|
||||||
|
except BaseException, msg:
|
||||||
|
return self.ajaxPre(0, str(msg))
|
||||||
|
|
||||||
|
def addSSHKey(self):
|
||||||
|
try:
|
||||||
|
fm = FirewallManager()
|
||||||
|
return fm.addSSHKey(self.admin.pk, self.data)
|
||||||
|
except BaseException, msg:
|
||||||
|
return self.ajaxPre(0, str(msg))
|
||||||
|
|
||||||
|
def getCurrentRules(self):
|
||||||
|
try:
|
||||||
|
fm = FirewallManager()
|
||||||
|
return fm.getCurrentRules(self.admin.pk)
|
||||||
|
except BaseException, msg:
|
||||||
|
return self.ajaxPre(0, str(msg))
|
||||||
|
|
||||||
|
def addRule(self):
|
||||||
|
try:
|
||||||
|
fm = FirewallManager()
|
||||||
|
return fm.addRule(self.admin.pk, self.data)
|
||||||
|
except BaseException, msg:
|
||||||
|
return self.ajaxPre(0, str(msg))
|
||||||
|
|
||||||
|
def deleteRule(self):
|
||||||
|
try:
|
||||||
|
fm = FirewallManager()
|
||||||
|
return fm.deleteRule(self.admin.pk, self.data)
|
||||||
|
except BaseException, msg:
|
||||||
|
return self.ajaxPre(0, str(msg))
|
||||||
|
|
||||||
|
def getLogsFromFile(self, request):
|
||||||
|
try:
|
||||||
|
request.session['userID'] = self.admin.pk
|
||||||
|
return getLogsFromFile(request)
|
||||||
|
except BaseException, msg:
|
||||||
|
return self.ajaxPre(0, str(msg))
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ def router(request):
|
|||||||
else:
|
else:
|
||||||
return cm.verifyLogin(request)[1]
|
return cm.verifyLogin(request)[1]
|
||||||
|
|
||||||
|
|
||||||
if controller == 'verifyLogin':
|
if controller == 'verifyLogin':
|
||||||
return cm.verifyLogin(request)[1]
|
return cm.verifyLogin(request)[1]
|
||||||
elif controller == 'fetchWebsites':
|
elif controller == 'fetchWebsites':
|
||||||
@@ -144,6 +143,22 @@ def router(request):
|
|||||||
return cm.submitApplicationInstall(request)
|
return cm.submitApplicationInstall(request)
|
||||||
elif controller == 'obtainServer':
|
elif controller == 'obtainServer':
|
||||||
return cm.obtainServer(request)
|
return cm.obtainServer(request)
|
||||||
|
elif controller == 'getSSHConfigs':
|
||||||
|
return cm.getSSHConfigs()
|
||||||
|
elif controller == 'saveSSHConfigs':
|
||||||
|
return cm.saveSSHConfigs()
|
||||||
|
elif controller == 'deleteSSHKey':
|
||||||
|
return cm.deleteSSHKey()
|
||||||
|
elif controller == 'addSSHKey':
|
||||||
|
return cm.addSSHKey()
|
||||||
|
elif controller == 'getCurrentRules':
|
||||||
|
return cm.getCurrentRules()
|
||||||
|
elif controller == 'addRule':
|
||||||
|
return cm.addRule()
|
||||||
|
elif controller == 'deleteRule':
|
||||||
|
return cm.deleteRule()
|
||||||
|
elif controller == 'getLogsFromFile':
|
||||||
|
return cm.getLogsFromFile(request)
|
||||||
|
|
||||||
except BaseException, msg:
|
except BaseException, msg:
|
||||||
cm = CloudManager(None)
|
cm = CloudManager(None)
|
||||||
|
|||||||
@@ -69,7 +69,8 @@ class FirewallManager:
|
|||||||
checker = 0
|
checker = 0
|
||||||
|
|
||||||
for items in rules:
|
for items in rules:
|
||||||
dic = {'id': items.id,
|
dic = {
|
||||||
|
'id': items.id,
|
||||||
'name': items.name,
|
'name': items.name,
|
||||||
'proto': items.proto,
|
'proto': items.proto,
|
||||||
'port': items.port,
|
'port': items.port,
|
||||||
@@ -83,11 +84,11 @@ class FirewallManager:
|
|||||||
json_data = json_data + ',' + json.dumps(dic)
|
json_data = json_data + ',' + json.dumps(dic)
|
||||||
|
|
||||||
json_data = json_data + ']'
|
json_data = json_data + ']'
|
||||||
final_json = json.dumps({'fetchStatus': 1, 'error_message': "None", "data": json_data})
|
final_json = json.dumps({'status': 1, 'fetchStatus': 1, 'error_message': "None", "data": json_data})
|
||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
|
|
||||||
except BaseException, msg:
|
except BaseException, msg:
|
||||||
final_dic = {'fetchStatus': 0, 'error_message': str(msg)}
|
final_dic = {'status': 0, 'fetchStatus': 0, 'error_message': str(msg)}
|
||||||
final_json = json.dumps(final_dic)
|
final_json = json.dumps(final_dic)
|
||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
|
|
||||||
@@ -111,12 +112,12 @@ class FirewallManager:
|
|||||||
newFWRule = FirewallRules(name=ruleName, proto=ruleProtocol, port=rulePort, ipAddress=ruleIP)
|
newFWRule = FirewallRules(name=ruleName, proto=ruleProtocol, port=rulePort, ipAddress=ruleIP)
|
||||||
newFWRule.save()
|
newFWRule.save()
|
||||||
|
|
||||||
final_dic = {'add_status': 1, 'error_message': "None"}
|
final_dic = {'status': 1, 'add_status': 1, 'error_message': "None"}
|
||||||
final_json = json.dumps(final_dic)
|
final_json = json.dumps(final_dic)
|
||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
|
|
||||||
except BaseException, msg:
|
except BaseException, msg:
|
||||||
final_dic = {'add_status': 0, 'error_message': str(msg)}
|
final_dic = {'status': 0, 'add_status': 0, 'error_message': str(msg)}
|
||||||
final_json = json.dumps(final_dic)
|
final_json = json.dumps(final_dic)
|
||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
|
|
||||||
@@ -141,12 +142,12 @@ class FirewallManager:
|
|||||||
delRule = FirewallRules.objects.get(id=ruleID)
|
delRule = FirewallRules.objects.get(id=ruleID)
|
||||||
delRule.delete()
|
delRule.delete()
|
||||||
|
|
||||||
final_dic = {'delete_status': 1, 'error_message': "None"}
|
final_dic = {'status': 1, 'delete_status': 1, 'error_message': "None"}
|
||||||
final_json = json.dumps(final_dic)
|
final_json = json.dumps(final_dic)
|
||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
|
|
||||||
except BaseException, msg:
|
except BaseException, msg:
|
||||||
final_dic = {'delete_status': 0, 'error_message': str(msg)}
|
final_dic = {'status': 0, 'delete_status': 0, 'error_message': str(msg)}
|
||||||
final_json = json.dumps(final_dic)
|
final_json = json.dumps(final_dic)
|
||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
|
|
||||||
@@ -325,7 +326,7 @@ class FirewallManager:
|
|||||||
|
|
||||||
res = subprocess.call(cmd)
|
res = subprocess.call(cmd)
|
||||||
|
|
||||||
final_dic = {'permitRootLogin': permitRootLogin, 'sshPort': sshPort}
|
final_dic = {'status': 1, 'permitRootLogin': permitRootLogin, 'sshPort': sshPort}
|
||||||
final_json = json.dumps(final_dic)
|
final_json = json.dumps(final_dic)
|
||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
else:
|
else:
|
||||||
@@ -406,7 +407,7 @@ class FirewallManager:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
updateFW = FirewallRules.objects.get(name="SSHCustom")
|
updateFW = FirewallRules.objects.get(name="SSHCustom")
|
||||||
FirewallUtilities.deleteRule("tcp", updateFW.port)
|
FirewallUtilities.deleteRule("tcp", updateFW.port, "0.0.0.0/0")
|
||||||
updateFW.port = sshPort
|
updateFW.port = sshPort
|
||||||
updateFW.save()
|
updateFW.save()
|
||||||
except:
|
except:
|
||||||
@@ -467,12 +468,12 @@ class FirewallManager:
|
|||||||
|
|
||||||
##
|
##
|
||||||
|
|
||||||
final_dic = {'saveStatus': 1}
|
final_dic = {'status': 1, 'saveStatus': 1}
|
||||||
final_json = json.dumps(final_dic)
|
final_json = json.dumps(final_dic)
|
||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
|
|
||||||
except BaseException, msg:
|
except BaseException, msg:
|
||||||
final_dic = {'saveStatus': 0, 'error_message': str(msg)}
|
final_dic = {'status': 0 ,'saveStatus': 0, 'error_message': str(msg)}
|
||||||
final_json = json.dumps(final_dic)
|
final_json = json.dumps(final_dic)
|
||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
|
|
||||||
@@ -522,12 +523,12 @@ class FirewallManager:
|
|||||||
|
|
||||||
##
|
##
|
||||||
|
|
||||||
final_dic = {'delete_status': 1}
|
final_dic = {'status': 1, 'delete_status': 1}
|
||||||
final_json = json.dumps(final_dic)
|
final_json = json.dumps(final_dic)
|
||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
|
|
||||||
except BaseException, msg:
|
except BaseException, msg:
|
||||||
final_dic = {'delete_status': 0, 'error_mssage': str(msg)}
|
final_dic = {'status': 0, 'delete_status': 0, 'error_mssage': str(msg)}
|
||||||
final_json = json.dumps(final_dic)
|
final_json = json.dumps(final_dic)
|
||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
|
|
||||||
@@ -584,13 +585,12 @@ class FirewallManager:
|
|||||||
|
|
||||||
##
|
##
|
||||||
|
|
||||||
|
final_dic = {'status': 1, 'add_status': 1}
|
||||||
final_dic = {'add_status': 1}
|
|
||||||
final_json = json.dumps(final_dic)
|
final_json = json.dumps(final_dic)
|
||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
|
|
||||||
except BaseException, msg:
|
except BaseException, msg:
|
||||||
final_dic = {'add_status': 0, 'error_mssage': str(msg)}
|
final_dic = {'status': 0, 'add_status': 0, 'error_mssage': str(msg)}
|
||||||
final_json = json.dumps(final_dic)
|
final_json = json.dumps(final_dic)
|
||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
|
|
||||||
|
|||||||
@@ -16,16 +16,10 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
$scope.couldNotConnect = true;
|
$scope.couldNotConnect = true;
|
||||||
$scope.rulesDetails = false;
|
$scope.rulesDetails = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
firewallStatus();
|
firewallStatus();
|
||||||
|
|
||||||
|
|
||||||
populateCurrentRecords();
|
populateCurrentRecords();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.addRule = function () {
|
$scope.addRule = function () {
|
||||||
|
|
||||||
$scope.rulesLoading = false;
|
$scope.rulesLoading = false;
|
||||||
@@ -45,7 +39,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
var rulePort = $scope.rulePort;
|
var rulePort = $scope.rulePort;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
ruleName: ruleName,
|
ruleName: ruleName,
|
||||||
ruleProtocol: ruleProtocol,
|
ruleProtocol: ruleProtocol,
|
||||||
@@ -80,7 +73,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
$scope.couldNotConnect = true;
|
$scope.couldNotConnect = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
@@ -97,6 +89,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.rulesLoading = true;
|
$scope.rulesLoading = true;
|
||||||
@@ -112,8 +105,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function populateCurrentRecords() {
|
function populateCurrentRecords() {
|
||||||
|
|
||||||
$scope.rulesLoading = false;
|
$scope.rulesLoading = false;
|
||||||
@@ -123,9 +114,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
|
|
||||||
url = "/firewall/getCurrentRules";
|
url = "/firewall/getCurrentRules";
|
||||||
|
|
||||||
var data = {
|
var data = {};
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
headers: {
|
headers: {
|
||||||
@@ -134,25 +123,20 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
function ListInitialDatas(response) {
|
function ListInitialDatas(response) {
|
||||||
|
if (response.data.fetchStatus === 1) {
|
||||||
|
|
||||||
if(response.data.fetchStatus == 1){
|
|
||||||
|
|
||||||
$scope.rules = JSON.parse(response.data.data);
|
$scope.rules = JSON.parse(response.data.data);
|
||||||
$scope.rulesLoading = true;
|
$scope.rulesLoading = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$scope.rulesLoading = true;
|
$scope.rulesLoading = true;
|
||||||
$scope.errorMessage = response.data.error_message;
|
$scope.errorMessage = response.data.error_message;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.couldNotConnect = false;
|
$scope.couldNotConnect = false;
|
||||||
|
|
||||||
@@ -160,13 +144,8 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.deleteRule = function (id, proto, port, ruleIP) {
|
$scope.deleteRule = function (id, proto, port, ruleIP) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.rulesLoading = false;
|
$scope.rulesLoading = false;
|
||||||
|
|
||||||
url = "/firewall/deleteRule";
|
url = "/firewall/deleteRule";
|
||||||
@@ -175,7 +154,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
id: id,
|
id: id,
|
||||||
proto: proto,
|
proto: proto,
|
||||||
port: port,
|
port: port,
|
||||||
ruleIP:ruleIP,
|
ruleIP: ruleIP
|
||||||
};
|
};
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
@@ -185,14 +164,13 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
function ListInitialDatas(response) {
|
function ListInitialDatas(response) {
|
||||||
|
|
||||||
|
|
||||||
if(response.data.delete_status == 1){
|
if (response.data.delete_status === 1) {
|
||||||
|
|
||||||
|
|
||||||
populateCurrentRecords();
|
populateCurrentRecords();
|
||||||
@@ -205,7 +183,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
$scope.couldNotConnect = true;
|
$scope.couldNotConnect = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
@@ -224,6 +201,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.rulesLoading = true;
|
$scope.rulesLoading = true;
|
||||||
@@ -235,7 +213,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
$scope.couldNotConnect = false;
|
$scope.couldNotConnect = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -256,8 +233,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
|
|
||||||
url = "/firewall/reloadFirewall";
|
url = "/firewall/reloadFirewall";
|
||||||
|
|
||||||
var data = {
|
var data = {};
|
||||||
};
|
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
headers: {
|
headers: {
|
||||||
@@ -266,7 +242,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -285,7 +260,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
$scope.couldNotConnect = true;
|
$scope.couldNotConnect = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
@@ -303,6 +277,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.rulesLoading = true;
|
$scope.rulesLoading = true;
|
||||||
@@ -333,8 +308,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
|
|
||||||
url = "/firewall/startFirewall";
|
url = "/firewall/startFirewall";
|
||||||
|
|
||||||
var data = {
|
var data = {};
|
||||||
};
|
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
headers: {
|
headers: {
|
||||||
@@ -343,7 +317,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -366,7 +339,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
firewallStatus();
|
firewallStatus();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
@@ -384,6 +356,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.rulesLoading = true;
|
$scope.rulesLoading = true;
|
||||||
@@ -415,8 +388,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
|
|
||||||
url = "/firewall/stopFirewall";
|
url = "/firewall/stopFirewall";
|
||||||
|
|
||||||
var data = {
|
var data = {};
|
||||||
};
|
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
headers: {
|
headers: {
|
||||||
@@ -425,7 +397,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -448,7 +419,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
firewallStatus();
|
firewallStatus();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
@@ -466,6 +436,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.rulesLoading = true;
|
$scope.rulesLoading = true;
|
||||||
@@ -486,12 +457,9 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
function firewallStatus() {
|
function firewallStatus() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
url = "/firewall/firewallStatus";
|
url = "/firewall/firewallStatus";
|
||||||
|
|
||||||
var data = {
|
var data = {};
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
headers: {
|
headers: {
|
||||||
@@ -500,7 +468,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -526,6 +493,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.couldNotConnect = false;
|
$scope.couldNotConnect = false;
|
||||||
@@ -536,10 +504,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/* Java script code to ADD Firewall Rules */
|
/* Java script code to ADD Firewall Rules */
|
||||||
@@ -596,7 +560,6 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -620,12 +583,13 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.couldNotConnect = false;
|
$scope.couldNotConnect = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
$scope.saveChanges = function () {
|
$scope.saveChanges = function () {
|
||||||
|
|
||||||
@@ -639,7 +603,7 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
var data = {
|
var data = {
|
||||||
type: "1",
|
type: "1",
|
||||||
sshPort: $scope.sshPort,
|
sshPort: $scope.sshPort,
|
||||||
rootLogin:rootLogin,
|
rootLogin: rootLogin
|
||||||
};
|
};
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
@@ -649,7 +613,6 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -672,6 +635,7 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.couldNotSave = true;
|
$scope.couldNotSave = true;
|
||||||
$scope.detailsSaved = true;
|
$scope.detailsSaved = true;
|
||||||
@@ -687,7 +651,7 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
url = "/firewall/getSSHConfigs";
|
url = "/firewall/getSSHConfigs";
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
type:"2",
|
type: "2"
|
||||||
};
|
};
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
@@ -697,20 +661,18 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
function ListInitialDatas(response) {
|
function ListInitialDatas(response) {
|
||||||
|
|
||||||
if(response.data.status == 1){
|
if (response.data.status === 1) {
|
||||||
$scope.records = JSON.parse(response.data.data);
|
$scope.records = JSON.parse(response.data.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.couldNotConnect = false;
|
$scope.couldNotConnect = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -733,7 +695,6 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -750,6 +711,7 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.couldNotConnect = false;
|
$scope.couldNotConnect = false;
|
||||||
$scope.secureSSHLoading = true;
|
$scope.secureSSHLoading = true;
|
||||||
@@ -777,7 +739,6 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -802,6 +763,7 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.secureSSHLoading = true;
|
$scope.secureSSHLoading = true;
|
||||||
$scope.saveKeyBtn = false;
|
$scope.saveKeyBtn = false;
|
||||||
@@ -832,7 +794,6 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
|
|||||||
$scope.installationFailed = true;
|
$scope.installationFailed = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.installModSec = function () {
|
$scope.installModSec = function () {
|
||||||
|
|
||||||
$scope.modSecNotifyBox = true;
|
$scope.modSecNotifyBox = true;
|
||||||
@@ -854,7 +815,6 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -886,6 +846,7 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.modSecNotifyBox = false;
|
$scope.modSecNotifyBox = false;
|
||||||
@@ -920,7 +881,6 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -956,12 +916,15 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
|
|||||||
$scope.errorMessage = response.data.error_message;
|
$scope.errorMessage = response.data.error_message;
|
||||||
} else {
|
} else {
|
||||||
$scope.modSecSuccessfullyInstalled = false;
|
$scope.modSecSuccessfullyInstalled = false;
|
||||||
$timeout(function() { $window.location.reload(); }, 3000);
|
$timeout(function () {
|
||||||
|
$window.location.reload();
|
||||||
|
}, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.modSecNotifyBox = false;
|
$scope.modSecNotifyBox = false;
|
||||||
@@ -1019,7 +982,6 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -1051,6 +1013,7 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.modsecLoading = true;
|
$scope.modsecLoading = true;
|
||||||
}
|
}
|
||||||
@@ -1092,7 +1055,6 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -1117,6 +1079,7 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.failedToSave = true;
|
$scope.failedToSave = true;
|
||||||
$scope.successfullySaved = false;
|
$scope.successfullySaved = false;
|
||||||
@@ -1171,6 +1134,7 @@ app.controller('modSecRules', function($scope, $http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.modsecLoading = true;
|
$scope.modsecLoading = true;
|
||||||
}
|
}
|
||||||
@@ -1219,6 +1183,7 @@ app.controller('modSecRules', function($scope, $http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.modsecLoading = true;
|
$scope.modsecLoading = true;
|
||||||
$scope.rulesSaved = true;
|
$scope.rulesSaved = true;
|
||||||
@@ -1307,7 +1272,6 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -1350,6 +1314,7 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.modsecLoading = true;
|
$scope.modsecLoading = true;
|
||||||
}
|
}
|
||||||
@@ -1409,6 +1374,7 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.modsecLoading = true;
|
$scope.modsecLoading = true;
|
||||||
|
|
||||||
@@ -1447,7 +1413,6 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -1472,6 +1437,7 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.modsecLoading = true;
|
$scope.modsecLoading = true;
|
||||||
$scope.installationQuote = true;
|
$scope.installationQuote = true;
|
||||||
@@ -1488,7 +1454,6 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
|
|||||||
$scope.modsecLoading = false;
|
$scope.modsecLoading = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
url = "/firewall/enableDisableRuleFile";
|
url = "/firewall/enableDisableRuleFile";
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
@@ -1538,6 +1503,7 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.modsecLoading = true;
|
$scope.modsecLoading = true;
|
||||||
|
|
||||||
@@ -1552,7 +1518,6 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -1572,7 +1537,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
$scope.installationFailed = true;
|
$scope.installationFailed = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.installCSF = function () {
|
$scope.installCSF = function () {
|
||||||
|
|
||||||
$scope.modSecNotifyBox = true;
|
$scope.modSecNotifyBox = true;
|
||||||
@@ -1594,7 +1558,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -1626,6 +1589,7 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.modSecNotifyBox = false;
|
$scope.modSecNotifyBox = false;
|
||||||
@@ -1659,7 +1623,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -1695,12 +1658,15 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
$scope.errorMessage = response.data.error_message;
|
$scope.errorMessage = response.data.error_message;
|
||||||
} else {
|
} else {
|
||||||
$scope.modSecSuccessfullyInstalled = false;
|
$scope.modSecSuccessfullyInstalled = false;
|
||||||
$timeout(function() { $window.location.reload(); }, 3000);
|
$timeout(function () {
|
||||||
|
$window.location.reload();
|
||||||
|
}, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.modSecNotifyBox = false;
|
$scope.modSecNotifyBox = false;
|
||||||
@@ -1753,7 +1719,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -1770,7 +1735,9 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
|
|
||||||
$timeout(function() { $window.location.reload(); }, 3000);
|
$timeout(function () {
|
||||||
|
$window.location.reload();
|
||||||
|
}, 3000);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -1783,6 +1750,7 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
new PNotify({
|
new PNotify({
|
||||||
@@ -1839,7 +1807,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.fetchSettings = function () {
|
$scope.fetchSettings = function () {
|
||||||
|
|
||||||
$scope.csfLoading = false;
|
$scope.csfLoading = false;
|
||||||
@@ -1859,7 +1826,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -1897,6 +1863,7 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.csfLoading = true;
|
$scope.csfLoading = true;
|
||||||
|
|
||||||
@@ -1916,7 +1883,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
$scope.csfLoading = false;
|
$scope.csfLoading = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
url = "/firewall/changeStatus";
|
url = "/firewall/changeStatus";
|
||||||
|
|
||||||
|
|
||||||
@@ -1932,7 +1898,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -1958,6 +1923,7 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.csfLoading = true;
|
$scope.csfLoading = true;
|
||||||
|
|
||||||
@@ -1987,7 +1953,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
url = "/firewall/modifyPorts";
|
url = "/firewall/modifyPorts";
|
||||||
|
|
||||||
|
|
||||||
@@ -2003,7 +1968,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -2029,6 +1993,7 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.csfLoading = true;
|
$scope.csfLoading = true;
|
||||||
|
|
||||||
@@ -2054,7 +2019,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
url = "/firewall/modifyIPs";
|
url = "/firewall/modifyIPs";
|
||||||
|
|
||||||
|
|
||||||
@@ -2070,7 +2034,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -2096,6 +2059,7 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.csfLoading = true;
|
$scope.csfLoading = true;
|
||||||
|
|
||||||
|
|||||||
@@ -2390,14 +2390,16 @@ class preFlightsChecks:
|
|||||||
def removeUfw(self):
|
def removeUfw(self):
|
||||||
try:
|
try:
|
||||||
preFlightsChecks.stdOut("Checking to see if ufw firewall is installed (will be removed)", 1)
|
preFlightsChecks.stdOut("Checking to see if ufw firewall is installed (will be removed)", 1)
|
||||||
status = subprocess.check_output(shlex.split('ufw status'), stderr=subprocess.STDOUT)
|
status = subprocess.check_output(shlex.split('ufw status'))
|
||||||
preFlightsChecks.stdOut("ufw current status: " + status + "...will be removed")
|
preFlightsChecks.stdOut("ufw current status: " + status + "...will be removed")
|
||||||
except subprocess.CalledProcessError as err:
|
except BaseException, msg:
|
||||||
preFlightsChecks.stdOut("Expected access to ufw not available, do not need to remove it", 1)
|
preFlightsChecks.stdOut("Expected access to ufw not available, do not need to remove it", 1)
|
||||||
return True
|
return True
|
||||||
|
try:
|
||||||
preFlightsChecks.call('apt-get -y remove ufw', self.distro, '[remove_ufw]', 'Remove ufw firewall ' +
|
preFlightsChecks.call('apt-get -y remove ufw', self.distro, '[remove_ufw]', 'Remove ufw firewall ' +
|
||||||
'(using firewalld)', 1, 1, os.EX_OSERR)
|
'(using firewalld)', 1, 0, os.EX_OSERR)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def installFirewalld(self):
|
def installFirewalld(self):
|
||||||
@@ -3514,9 +3516,29 @@ def main():
|
|||||||
logging.InstallLog.writeToFile("Starting CyberPanel installation..")
|
logging.InstallLog.writeToFile("Starting CyberPanel installation..")
|
||||||
preFlightsChecks.stdOut("Starting CyberPanel installation..")
|
preFlightsChecks.stdOut("Starting CyberPanel installation..")
|
||||||
|
|
||||||
|
if args.ent == None:
|
||||||
|
ent = 0
|
||||||
|
preFlightsChecks.stdOut("OpenLiteSpeed web server will be installed.")
|
||||||
|
else:
|
||||||
|
if args.ent == 'ols':
|
||||||
|
ent = 0
|
||||||
|
preFlightsChecks.stdOut("OpenLiteSpeed web server will be installed.")
|
||||||
|
else:
|
||||||
|
preFlightsChecks.stdOut("LiteSpeed Enterprise web server will be installed.")
|
||||||
|
ent = 1
|
||||||
|
if args.serial != None:
|
||||||
|
serial = args.serial
|
||||||
|
preFlightsChecks.stdOut("LiteSpeed Enterprise Serial detected: " + serial)
|
||||||
|
else:
|
||||||
|
preFlightsChecks.stdOut("Installation failed, please specify LiteSpeed Enterprise key using --serial")
|
||||||
|
os._exit(0)
|
||||||
|
|
||||||
## Writing public IP
|
## Writing public IP
|
||||||
|
|
||||||
|
try:
|
||||||
os.mkdir("/etc/cyberpanel")
|
os.mkdir("/etc/cyberpanel")
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
machineIP = open("/etc/cyberpanel/machineIP", "w")
|
machineIP = open("/etc/cyberpanel/machineIP", "w")
|
||||||
machineIP.writelines(args.publicip)
|
machineIP.writelines(args.publicip)
|
||||||
@@ -3537,20 +3559,6 @@ def main():
|
|||||||
mysql = args.mysql
|
mysql = args.mysql
|
||||||
preFlightsChecks.stdOut("Dobule MySQL instance version will be installed.")
|
preFlightsChecks.stdOut("Dobule MySQL instance version will be installed.")
|
||||||
|
|
||||||
if args.ent == None:
|
|
||||||
ent = 0
|
|
||||||
else:
|
|
||||||
if args.ent == 'ols':
|
|
||||||
ent = 0
|
|
||||||
else:
|
|
||||||
ent = 1
|
|
||||||
if args.serial != None:
|
|
||||||
serial = args.serial
|
|
||||||
preFlightsChecks.stdOut("LiteSpeed Enterprise Serial detected: " + serial)
|
|
||||||
else:
|
|
||||||
preFlightsChecks.stdOut("Installation failed, please specify LiteSpeed Enterprise key using --serial")
|
|
||||||
os._exit(0)
|
|
||||||
|
|
||||||
checks.checkPythonVersion()
|
checks.checkPythonVersion()
|
||||||
checks.setup_account_cyberpanel()
|
checks.setup_account_cyberpanel()
|
||||||
if distro == centos:
|
if distro == centos:
|
||||||
|
|||||||
@@ -67,6 +67,21 @@ class InstallCyberPanel:
|
|||||||
try:
|
try:
|
||||||
count = 0
|
count = 0
|
||||||
while (1):
|
while (1):
|
||||||
|
try:
|
||||||
|
|
||||||
|
command = 'groupadd nobody'
|
||||||
|
cmd = shlex.split(command)
|
||||||
|
subprocess.call(cmd)
|
||||||
|
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
command = 'usermod -a -G nobody nobody'
|
||||||
|
cmd = shlex.split(command)
|
||||||
|
subprocess.call(cmd)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
command = 'wget https://www.litespeedtech.com/packages/5.0/lsws-5.3-ent-x86_64-linux.tar.gz'
|
command = 'wget https://www.litespeedtech.com/packages/5.0/lsws-5.3-ent-x86_64-linux.tar.gz'
|
||||||
cmd = shlex.split(command)
|
cmd = shlex.split(command)
|
||||||
@@ -1301,7 +1316,7 @@ class InstallCyberPanel:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
def Main(cwd, mysql, distro, ent):
|
def Main(cwd, mysql, distro, ent, serial = None):
|
||||||
|
|
||||||
InstallCyberPanel.mysqlPassword = randomPassword.generate_pass()
|
InstallCyberPanel.mysqlPassword = randomPassword.generate_pass()
|
||||||
InstallCyberPanel.mysql_Root_password = randomPassword.generate_pass()
|
InstallCyberPanel.mysql_Root_password = randomPassword.generate_pass()
|
||||||
@@ -1321,7 +1336,7 @@ def Main(cwd, mysql, distro, ent):
|
|||||||
else:
|
else:
|
||||||
InstallCyberPanel.mysqlPassword = InstallCyberPanel.mysql_Root_password
|
InstallCyberPanel.mysqlPassword = InstallCyberPanel.mysql_Root_password
|
||||||
|
|
||||||
installer = InstallCyberPanel("/usr/local/lsws/",cwd, distro, ent)
|
installer = InstallCyberPanel("/usr/local/lsws/",cwd, distro, ent, serial)
|
||||||
|
|
||||||
installer.installLiteSpeed()
|
installer.installLiteSpeed()
|
||||||
if ent == 0:
|
if ent == 0:
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ from dns.models import Records as dnsRecords
|
|||||||
from mailServer.models import Forwardings
|
from mailServer.models import Forwardings
|
||||||
from plogical.acl import ACLManager
|
from plogical.acl import ACLManager
|
||||||
import os
|
import os
|
||||||
|
from plogical.dnsUtilities import DNS
|
||||||
|
from loginSystem.models import Administrator
|
||||||
|
|
||||||
class MailServerManager:
|
class MailServerManager:
|
||||||
|
|
||||||
@@ -428,9 +430,16 @@ class MailServerManager:
|
|||||||
execPath = execPath + " generateKeys --domain " + domainName
|
execPath = execPath + " generateKeys --domain " + domainName
|
||||||
output = subprocess.check_output(shlex.split(execPath))
|
output = subprocess.check_output(shlex.split(execPath))
|
||||||
|
|
||||||
if output.find("1,None") > -1:
|
admin = Administrator.objects.get(pk=userID)
|
||||||
|
DNS.dnsTemplate(domainName, admin)
|
||||||
|
|
||||||
zone = dnsDomains.objects.get(name=domainName)
|
if output.find("1,None") > -1:
|
||||||
|
import tldextract
|
||||||
|
|
||||||
|
extractDomain = tldextract.extract(domainName)
|
||||||
|
topLevelDomain = extractDomain.domain + '.' + extractDomain.suffix
|
||||||
|
|
||||||
|
zone = dnsDomains.objects.get(name=topLevelDomain)
|
||||||
zone.save()
|
zone.save()
|
||||||
|
|
||||||
path = "/etc/opendkim/keys/" + domainName + "/default.txt"
|
path = "/etc/opendkim/keys/" + domainName + "/default.txt"
|
||||||
@@ -439,6 +448,8 @@ class MailServerManager:
|
|||||||
leftIndex = output.index('(') + 2
|
leftIndex = output.index('(') + 2
|
||||||
rightIndex = output.rindex(')') - 1
|
rightIndex = output.rindex(')') - 1
|
||||||
|
|
||||||
|
DNS.createDKIMRecords(domainName)
|
||||||
|
|
||||||
record = dnsRecords(domainOwner=zone,
|
record = dnsRecords(domainOwner=zone,
|
||||||
domain_id=zone.id,
|
domain_id=zone.id,
|
||||||
name="default._domainkey." + domainName,
|
name="default._domainkey." + domainName,
|
||||||
|
|||||||
@@ -146,8 +146,8 @@ class mailUtilities:
|
|||||||
|
|
||||||
import tldextract
|
import tldextract
|
||||||
|
|
||||||
extractDomain = tldextract.extract(virtualHostName)
|
#extractDomain = tldextract.extract(virtualHostName)
|
||||||
virtualHostName = extractDomain.domain + '.' + extractDomain.suffix
|
#virtualHostName = extractDomain.domain + '.' + extractDomain.suffix
|
||||||
|
|
||||||
if os.path.exists("/etc/opendkim/keys/" + virtualHostName):
|
if os.path.exists("/etc/opendkim/keys/" + virtualHostName):
|
||||||
return 1, "None"
|
return 1, "None"
|
||||||
|
|||||||
@@ -134,20 +134,25 @@ def getLogsFromFile(request):
|
|||||||
fileName = "/var/log/messages"
|
fileName = "/var/log/messages"
|
||||||
elif type == "modSec":
|
elif type == "modSec":
|
||||||
fileName = "/usr/local/lsws/logs/auditmodsec.log"
|
fileName = "/usr/local/lsws/logs/auditmodsec.log"
|
||||||
|
elif type == "cyberpanel":
|
||||||
|
fileName = "/home/cyberpanel/error-logs.txt"
|
||||||
|
|
||||||
|
try:
|
||||||
command = "sudo tail -50 " + fileName
|
command = "sudo tail -50 " + fileName
|
||||||
|
|
||||||
fewLinesOfLogFile = subprocess.check_output(shlex.split(command))
|
fewLinesOfLogFile = subprocess.check_output(shlex.split(command))
|
||||||
|
status = {"status": 1, "logstatus": 1, "logsdata": fewLinesOfLogFile}
|
||||||
status = {"logstatus": 1, "logsdata": fewLinesOfLogFile}
|
final_json = json.dumps(status)
|
||||||
|
return HttpResponse(final_json)
|
||||||
|
except:
|
||||||
|
status = {"status": 1, "logstatus": 1, "logsdata": 'Emtpy File.'}
|
||||||
final_json = json.dumps(status)
|
final_json = json.dumps(status)
|
||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
|
|
||||||
|
|
||||||
except KeyError, msg:
|
except KeyError, msg:
|
||||||
status = {"logstatus":0,"error":"Could not fetch data from log file, please see CyberCP main log file through command line."}
|
status = {"status": 0, "logstatus":0,"error":"Could not fetch data from log file, please see CyberCP main log file through command line."}
|
||||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + "[getLogsFromFile]")
|
logging.CyberCPLogFileWriter.writeToFile(str(msg) + "[getLogsFromFile]")
|
||||||
return HttpResponse("Not Logged in as admin")
|
final_json = json.dumps(status)
|
||||||
|
return HttpResponse(final_json)
|
||||||
|
|
||||||
def clearLogFile(request):
|
def clearLogFile(request):
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -16,16 +16,10 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
$scope.couldNotConnect = true;
|
$scope.couldNotConnect = true;
|
||||||
$scope.rulesDetails = false;
|
$scope.rulesDetails = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
firewallStatus();
|
firewallStatus();
|
||||||
|
|
||||||
|
|
||||||
populateCurrentRecords();
|
populateCurrentRecords();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.addRule = function () {
|
$scope.addRule = function () {
|
||||||
|
|
||||||
$scope.rulesLoading = false;
|
$scope.rulesLoading = false;
|
||||||
@@ -45,7 +39,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
var rulePort = $scope.rulePort;
|
var rulePort = $scope.rulePort;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
ruleName: ruleName,
|
ruleName: ruleName,
|
||||||
ruleProtocol: ruleProtocol,
|
ruleProtocol: ruleProtocol,
|
||||||
@@ -80,7 +73,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
$scope.couldNotConnect = true;
|
$scope.couldNotConnect = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
@@ -97,6 +89,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.rulesLoading = true;
|
$scope.rulesLoading = true;
|
||||||
@@ -112,8 +105,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function populateCurrentRecords() {
|
function populateCurrentRecords() {
|
||||||
|
|
||||||
$scope.rulesLoading = false;
|
$scope.rulesLoading = false;
|
||||||
@@ -123,9 +114,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
|
|
||||||
url = "/firewall/getCurrentRules";
|
url = "/firewall/getCurrentRules";
|
||||||
|
|
||||||
var data = {
|
var data = {};
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
headers: {
|
headers: {
|
||||||
@@ -134,25 +123,20 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
function ListInitialDatas(response) {
|
function ListInitialDatas(response) {
|
||||||
|
if (response.data.fetchStatus === 1) {
|
||||||
|
|
||||||
if(response.data.fetchStatus == 1){
|
|
||||||
|
|
||||||
$scope.rules = JSON.parse(response.data.data);
|
$scope.rules = JSON.parse(response.data.data);
|
||||||
$scope.rulesLoading = true;
|
$scope.rulesLoading = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$scope.rulesLoading = true;
|
$scope.rulesLoading = true;
|
||||||
$scope.errorMessage = response.data.error_message;
|
$scope.errorMessage = response.data.error_message;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.couldNotConnect = false;
|
$scope.couldNotConnect = false;
|
||||||
|
|
||||||
@@ -160,13 +144,8 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.deleteRule = function (id, proto, port, ruleIP) {
|
$scope.deleteRule = function (id, proto, port, ruleIP) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.rulesLoading = false;
|
$scope.rulesLoading = false;
|
||||||
|
|
||||||
url = "/firewall/deleteRule";
|
url = "/firewall/deleteRule";
|
||||||
@@ -175,7 +154,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
id: id,
|
id: id,
|
||||||
proto: proto,
|
proto: proto,
|
||||||
port: port,
|
port: port,
|
||||||
ruleIP:ruleIP,
|
ruleIP: ruleIP
|
||||||
};
|
};
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
@@ -185,14 +164,13 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
function ListInitialDatas(response) {
|
function ListInitialDatas(response) {
|
||||||
|
|
||||||
|
|
||||||
if(response.data.delete_status == 1){
|
if (response.data.delete_status === 1) {
|
||||||
|
|
||||||
|
|
||||||
populateCurrentRecords();
|
populateCurrentRecords();
|
||||||
@@ -205,7 +183,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
$scope.couldNotConnect = true;
|
$scope.couldNotConnect = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
@@ -224,6 +201,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.rulesLoading = true;
|
$scope.rulesLoading = true;
|
||||||
@@ -235,7 +213,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
$scope.couldNotConnect = false;
|
$scope.couldNotConnect = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -256,8 +233,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
|
|
||||||
url = "/firewall/reloadFirewall";
|
url = "/firewall/reloadFirewall";
|
||||||
|
|
||||||
var data = {
|
var data = {};
|
||||||
};
|
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
headers: {
|
headers: {
|
||||||
@@ -266,7 +242,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -285,7 +260,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
$scope.couldNotConnect = true;
|
$scope.couldNotConnect = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
@@ -303,6 +277,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.rulesLoading = true;
|
$scope.rulesLoading = true;
|
||||||
@@ -333,8 +308,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
|
|
||||||
url = "/firewall/startFirewall";
|
url = "/firewall/startFirewall";
|
||||||
|
|
||||||
var data = {
|
var data = {};
|
||||||
};
|
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
headers: {
|
headers: {
|
||||||
@@ -343,7 +317,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -366,7 +339,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
firewallStatus();
|
firewallStatus();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
@@ -384,6 +356,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.rulesLoading = true;
|
$scope.rulesLoading = true;
|
||||||
@@ -415,8 +388,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
|
|
||||||
url = "/firewall/stopFirewall";
|
url = "/firewall/stopFirewall";
|
||||||
|
|
||||||
var data = {
|
var data = {};
|
||||||
};
|
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
headers: {
|
headers: {
|
||||||
@@ -425,7 +397,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -448,7 +419,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
firewallStatus();
|
firewallStatus();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
@@ -466,6 +436,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.rulesLoading = true;
|
$scope.rulesLoading = true;
|
||||||
@@ -486,12 +457,9 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
function firewallStatus() {
|
function firewallStatus() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
url = "/firewall/firewallStatus";
|
url = "/firewall/firewallStatus";
|
||||||
|
|
||||||
var data = {
|
var data = {};
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
headers: {
|
headers: {
|
||||||
@@ -500,7 +468,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -526,6 +493,7 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.couldNotConnect = false;
|
$scope.couldNotConnect = false;
|
||||||
@@ -536,10 +504,6 @@ app.controller('firewallController', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/* Java script code to ADD Firewall Rules */
|
/* Java script code to ADD Firewall Rules */
|
||||||
@@ -596,7 +560,6 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -620,12 +583,13 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.couldNotConnect = false;
|
$scope.couldNotConnect = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
$scope.saveChanges = function () {
|
$scope.saveChanges = function () {
|
||||||
|
|
||||||
@@ -639,7 +603,7 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
var data = {
|
var data = {
|
||||||
type: "1",
|
type: "1",
|
||||||
sshPort: $scope.sshPort,
|
sshPort: $scope.sshPort,
|
||||||
rootLogin:rootLogin,
|
rootLogin: rootLogin
|
||||||
};
|
};
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
@@ -649,7 +613,6 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -672,6 +635,7 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.couldNotSave = true;
|
$scope.couldNotSave = true;
|
||||||
$scope.detailsSaved = true;
|
$scope.detailsSaved = true;
|
||||||
@@ -687,7 +651,7 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
url = "/firewall/getSSHConfigs";
|
url = "/firewall/getSSHConfigs";
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
type:"2",
|
type: "2"
|
||||||
};
|
};
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
@@ -697,20 +661,18 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
function ListInitialDatas(response) {
|
function ListInitialDatas(response) {
|
||||||
|
|
||||||
if(response.data.status == 1){
|
if (response.data.status === 1) {
|
||||||
$scope.records = JSON.parse(response.data.data);
|
$scope.records = JSON.parse(response.data.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.couldNotConnect = false;
|
$scope.couldNotConnect = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -733,7 +695,6 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -750,6 +711,7 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.couldNotConnect = false;
|
$scope.couldNotConnect = false;
|
||||||
$scope.secureSSHLoading = true;
|
$scope.secureSSHLoading = true;
|
||||||
@@ -777,7 +739,6 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -802,6 +763,7 @@ app.controller('secureSSHCTRL', function($scope,$http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.secureSSHLoading = true;
|
$scope.secureSSHLoading = true;
|
||||||
$scope.saveKeyBtn = false;
|
$scope.saveKeyBtn = false;
|
||||||
@@ -832,7 +794,6 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
|
|||||||
$scope.installationFailed = true;
|
$scope.installationFailed = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.installModSec = function () {
|
$scope.installModSec = function () {
|
||||||
|
|
||||||
$scope.modSecNotifyBox = true;
|
$scope.modSecNotifyBox = true;
|
||||||
@@ -854,7 +815,6 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -886,6 +846,7 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.modSecNotifyBox = false;
|
$scope.modSecNotifyBox = false;
|
||||||
@@ -920,7 +881,6 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -956,12 +916,15 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
|
|||||||
$scope.errorMessage = response.data.error_message;
|
$scope.errorMessage = response.data.error_message;
|
||||||
} else {
|
} else {
|
||||||
$scope.modSecSuccessfullyInstalled = false;
|
$scope.modSecSuccessfullyInstalled = false;
|
||||||
$timeout(function() { $window.location.reload(); }, 3000);
|
$timeout(function () {
|
||||||
|
$window.location.reload();
|
||||||
|
}, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.modSecNotifyBox = false;
|
$scope.modSecNotifyBox = false;
|
||||||
@@ -1019,7 +982,6 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -1051,6 +1013,7 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.modsecLoading = true;
|
$scope.modsecLoading = true;
|
||||||
}
|
}
|
||||||
@@ -1092,7 +1055,6 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -1117,6 +1079,7 @@ app.controller('modSec', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.failedToSave = true;
|
$scope.failedToSave = true;
|
||||||
$scope.successfullySaved = false;
|
$scope.successfullySaved = false;
|
||||||
@@ -1171,6 +1134,7 @@ app.controller('modSecRules', function($scope, $http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.modsecLoading = true;
|
$scope.modsecLoading = true;
|
||||||
}
|
}
|
||||||
@@ -1219,6 +1183,7 @@ app.controller('modSecRules', function($scope, $http) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.modsecLoading = true;
|
$scope.modsecLoading = true;
|
||||||
$scope.rulesSaved = true;
|
$scope.rulesSaved = true;
|
||||||
@@ -1307,7 +1272,6 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -1350,6 +1314,7 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.modsecLoading = true;
|
$scope.modsecLoading = true;
|
||||||
}
|
}
|
||||||
@@ -1409,6 +1374,7 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.modsecLoading = true;
|
$scope.modsecLoading = true;
|
||||||
|
|
||||||
@@ -1447,7 +1413,6 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -1472,6 +1437,7 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.modsecLoading = true;
|
$scope.modsecLoading = true;
|
||||||
$scope.installationQuote = true;
|
$scope.installationQuote = true;
|
||||||
@@ -1488,7 +1454,6 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
|
|||||||
$scope.modsecLoading = false;
|
$scope.modsecLoading = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
url = "/firewall/enableDisableRuleFile";
|
url = "/firewall/enableDisableRuleFile";
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
@@ -1538,6 +1503,7 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.modsecLoading = true;
|
$scope.modsecLoading = true;
|
||||||
|
|
||||||
@@ -1552,7 +1518,6 @@ app.controller('modSecRulesPack', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -1572,7 +1537,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
$scope.installationFailed = true;
|
$scope.installationFailed = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.installCSF = function () {
|
$scope.installCSF = function () {
|
||||||
|
|
||||||
$scope.modSecNotifyBox = true;
|
$scope.modSecNotifyBox = true;
|
||||||
@@ -1594,7 +1558,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -1626,6 +1589,7 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.modSecNotifyBox = false;
|
$scope.modSecNotifyBox = false;
|
||||||
@@ -1659,7 +1623,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -1695,12 +1658,15 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
$scope.errorMessage = response.data.error_message;
|
$scope.errorMessage = response.data.error_message;
|
||||||
} else {
|
} else {
|
||||||
$scope.modSecSuccessfullyInstalled = false;
|
$scope.modSecSuccessfullyInstalled = false;
|
||||||
$timeout(function() { $window.location.reload(); }, 3000);
|
$timeout(function () {
|
||||||
|
$window.location.reload();
|
||||||
|
}, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
$scope.modSecNotifyBox = false;
|
$scope.modSecNotifyBox = false;
|
||||||
@@ -1753,7 +1719,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -1770,7 +1735,9 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
|
|
||||||
$timeout(function() { $window.location.reload(); }, 3000);
|
$timeout(function () {
|
||||||
|
$window.location.reload();
|
||||||
|
}, 3000);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -1783,6 +1750,7 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
|
|
||||||
new PNotify({
|
new PNotify({
|
||||||
@@ -1839,7 +1807,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.fetchSettings = function () {
|
$scope.fetchSettings = function () {
|
||||||
|
|
||||||
$scope.csfLoading = false;
|
$scope.csfLoading = false;
|
||||||
@@ -1859,7 +1826,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -1897,6 +1863,7 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.csfLoading = true;
|
$scope.csfLoading = true;
|
||||||
|
|
||||||
@@ -1916,7 +1883,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
$scope.csfLoading = false;
|
$scope.csfLoading = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
url = "/firewall/changeStatus";
|
url = "/firewall/changeStatus";
|
||||||
|
|
||||||
|
|
||||||
@@ -1932,7 +1898,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -1958,6 +1923,7 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.csfLoading = true;
|
$scope.csfLoading = true;
|
||||||
|
|
||||||
@@ -1987,7 +1953,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
url = "/firewall/modifyPorts";
|
url = "/firewall/modifyPorts";
|
||||||
|
|
||||||
|
|
||||||
@@ -2003,7 +1968,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -2029,6 +1993,7 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.csfLoading = true;
|
$scope.csfLoading = true;
|
||||||
|
|
||||||
@@ -2054,7 +2019,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
url = "/firewall/modifyIPs";
|
url = "/firewall/modifyIPs";
|
||||||
|
|
||||||
|
|
||||||
@@ -2070,7 +2034,6 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||||
|
|
||||||
|
|
||||||
@@ -2096,6 +2059,7 @@ app.controller('csf', function($scope, $http, $timeout, $window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cantLoadInitialDatas(response) {
|
function cantLoadInitialDatas(response) {
|
||||||
$scope.csfLoading = true;
|
$scope.csfLoading = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user