Merge branch 'master' of github.com:litespeedtech/cyberpanel

Add Firewall rules by IP, Bug Fixes: SSL, Remote Backups, Error Logs.
This commit is contained in:
usmannasir
2017-11-02 02:23:09 +05:00
parent e366876b9b
commit 0f7ab39b37
4 changed files with 120 additions and 5 deletions

Binary file not shown.

View File

@@ -1216,6 +1216,8 @@ app.controller('remoteBackupControl', function($scope, $http, $timeout) {
return;
}
// disable fetch accounts button
$scope.fetchAccountsBtn = true;
$scope.backupLoading = false;

View File

@@ -54,6 +54,7 @@ app.controller('firewallController', function($scope,$http) {
ruleName:ruleName,
ruleProtocol:ruleProtocol,
rulePort:rulePort,
ruleIP:$scope.ruleIP,
};
var config = {
@@ -165,7 +166,7 @@ app.controller('firewallController', function($scope,$http) {
$scope.deleteRule = function(id,proto,port){
$scope.deleteRule = function(id,proto,port,ruleIP){
@@ -178,6 +179,7 @@ app.controller('firewallController', function($scope,$http) {
id:id,
proto:proto,
port:port,
ruleIP:ruleIP,
};
var config = {

View File

@@ -429,11 +429,16 @@ app.controller('websitePages', function($scope,$http) {
$scope.couldNotConnect = true;
$scope.fetchedData = true;
$scope.hideLogs = true;
$scope.hideErrorLogs = true;
$scope.hidelogsbtn = function(){
$scope.hideLogs = true;
};
$scope.hideErrorLogsbtn = function(){
$scope.hideLogs = true;
};
$scope.fileManagerURL = "filemanager/"+$("#domainNamePage").text();
var logType = 0;
@@ -441,7 +446,7 @@ app.controller('websitePages', function($scope,$http) {
$scope.fetchLogs = function(type){
pageNumber = $scope.pageNumber;
var pageNumber = $scope.pageNumber;
if(type==3){
@@ -462,6 +467,7 @@ app.controller('websitePages', function($scope,$http) {
$scope.couldNotFetchLogs = true;
$scope.couldNotConnect = true;
$scope.fetchedData = false;
$scope.hideErrorLogs = true;
@@ -470,9 +476,6 @@ app.controller('websitePages', function($scope,$http) {
var domainNamePage = $("#domainNamePage").text();
var data = {
logType: logType,
virtualHost:domainNamePage,
@@ -538,6 +541,114 @@ app.controller('websitePages', function($scope,$http) {
};
$scope.errorPageNumber = 1;
$scope.fetchErrorLogs = function(type){
var errorPageNumber = $scope.errorPageNumber;
if(type==3){
errorPageNumber = $scope.errorPageNumber+1;
$scope.errorPageNumber = errorPageNumber;
}
else if(type==4){
errorPageNumber = $scope.errorPageNumber-1;
$scope.errorPageNumber = errorPageNumber;
}
else{
logType = type;
}
// notifications
$scope.logFileLoading = false;
$scope.logsFeteched = true;
$scope.couldNotFetchLogs = true;
$scope.couldNotConnect = true;
$scope.fetchedData = true;
$scope.hideErrorLogs = true;
$scope.hideLogs = false;
url = "/websites/fetchErrorLogs";
var domainNamePage = $("#domainNamePage").text();
var data = {
virtualHost:domainNamePage,
page:errorPageNumber,
};
var config = {
headers : {
'X-CSRFToken': getCookie('csrftoken')
}
};
$http.post(url, data,config).then(ListInitialDatas, cantLoadInitialDatas);
function ListInitialDatas(response) {
if(response.data.logstatus == 1){
// notifications
$scope.logFileLoading = true;
$scope.logsFeteched = false;
$scope.couldNotFetchLogs = true;
$scope.couldNotConnect = true;
$scope.fetchedData = true;
$scope.hideLogs = false;
$scope.hideErrorLogs = false;
$scope.errorLogsData = response.data.data;
}
else
{
// notifications
$scope.logFileLoading = true;
$scope.logsFeteched = true;
$scope.couldNotFetchLogs = false;
$scope.couldNotConnect = true;
$scope.fetchedData = true;
$scope.hideLogs = true;
$scope.hideErrorLogs = true;
$scope.errorMessage = response.data.error_message;
}
}
function cantLoadInitialDatas(response) {
// notifications
$scope.logFileLoading = true;
$scope.logsFeteched = true;
$scope.couldNotFetchLogs = true;
$scope.couldNotConnect = false;
$scope.fetchedData = true;
$scope.hideLogs = true;
$scope.hideErrorLogs = true;
}
};
///////// Configurations Part