mirror of
				https://github.com/usmannasir/cyberpanel.git
				synced 2025-10-31 02:15:55 +01:00 
			
		
		
		
	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:
		
										
											Binary file not shown.
										
									
								
							| @@ -1216,6 +1216,8 @@ app.controller('remoteBackupControl', function($scope, $http, $timeout) { | |||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         // disable fetch accounts button | ||||||
|  |  | ||||||
|         $scope.fetchAccountsBtn = true; |         $scope.fetchAccountsBtn = true; | ||||||
|  |  | ||||||
|         $scope.backupLoading = false; |         $scope.backupLoading = false; | ||||||
|   | |||||||
| @@ -54,6 +54,7 @@ app.controller('firewallController', function($scope,$http) { | |||||||
|                             ruleName:ruleName, |                             ruleName:ruleName, | ||||||
|                             ruleProtocol:ruleProtocol, |                             ruleProtocol:ruleProtocol, | ||||||
|                             rulePort:rulePort, |                             rulePort:rulePort, | ||||||
|  |                             ruleIP:$scope.ruleIP, | ||||||
|                         }; |                         }; | ||||||
|  |  | ||||||
|                         var config = { |                         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, |                             id:id, | ||||||
|                             proto:proto, |                             proto:proto, | ||||||
|                             port:port, |                             port:port, | ||||||
|  |                             ruleIP:ruleIP, | ||||||
|                         }; |                         }; | ||||||
|  |  | ||||||
|                         var config = { |                         var config = { | ||||||
|   | |||||||
| @@ -429,11 +429,16 @@ app.controller('websitePages', function($scope,$http) { | |||||||
|     $scope.couldNotConnect = true; |     $scope.couldNotConnect = true; | ||||||
|     $scope.fetchedData = true; |     $scope.fetchedData = true; | ||||||
|     $scope.hideLogs = true; |     $scope.hideLogs = true; | ||||||
|  |     $scope.hideErrorLogs = true; | ||||||
|  |  | ||||||
|     $scope.hidelogsbtn = function(){ |     $scope.hidelogsbtn = function(){ | ||||||
|         $scope.hideLogs = true; |         $scope.hideLogs = true; | ||||||
|     }; |     }; | ||||||
|  |  | ||||||
|  |     $scope.hideErrorLogsbtn = function(){ | ||||||
|  |         $scope.hideLogs = true; | ||||||
|  |     }; | ||||||
|  |  | ||||||
|     $scope.fileManagerURL = "filemanager/"+$("#domainNamePage").text(); |     $scope.fileManagerURL = "filemanager/"+$("#domainNamePage").text(); | ||||||
|  |  | ||||||
|     var logType = 0; |     var logType = 0; | ||||||
| @@ -441,7 +446,7 @@ app.controller('websitePages', function($scope,$http) { | |||||||
|  |  | ||||||
|     $scope.fetchLogs = function(type){ |     $scope.fetchLogs = function(type){ | ||||||
|  |  | ||||||
|                 pageNumber = $scope.pageNumber; |                 var pageNumber = $scope.pageNumber; | ||||||
|  |  | ||||||
|  |  | ||||||
|                 if(type==3){ |                 if(type==3){ | ||||||
| @@ -462,6 +467,7 @@ app.controller('websitePages', function($scope,$http) { | |||||||
|                 $scope.couldNotFetchLogs = true; |                 $scope.couldNotFetchLogs = true; | ||||||
|                 $scope.couldNotConnect = true; |                 $scope.couldNotConnect = true; | ||||||
|                 $scope.fetchedData = false; |                 $scope.fetchedData = false; | ||||||
|  |                 $scope.hideErrorLogs = true; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -470,9 +476,6 @@ app.controller('websitePages', function($scope,$http) { | |||||||
|                 var domainNamePage = $("#domainNamePage").text(); |                 var domainNamePage = $("#domainNamePage").text(); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|                 var data = { |                 var data = { | ||||||
|                     logType: logType, |                     logType: logType, | ||||||
|                     virtualHost:domainNamePage, |                     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 |     ///////// Configurations Part | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user