diff --git a/firewall/models.pyc b/firewall/models.pyc index 20daa8a47..8a31d6931 100644 Binary files a/firewall/models.pyc and b/firewall/models.pyc differ diff --git a/static/backup/backup.js b/static/backup/backup.js index ae8c7cef4..cf81eb4bd 100644 --- a/static/backup/backup.js +++ b/static/backup/backup.js @@ -1216,6 +1216,8 @@ app.controller('remoteBackupControl', function($scope, $http, $timeout) { return; } + // disable fetch accounts button + $scope.fetchAccountsBtn = true; $scope.backupLoading = false; diff --git a/static/firewall/firewall.js b/static/firewall/firewall.js index e0e7a71b6..fd35d3d32 100644 --- a/static/firewall/firewall.js +++ b/static/firewall/firewall.js @@ -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 = { diff --git a/static/websiteFunctions/websiteFunctions.js b/static/websiteFunctions/websiteFunctions.js index ed008dcc9..09cf5f778 100644 --- a/static/websiteFunctions/websiteFunctions.js +++ b/static/websiteFunctions/websiteFunctions.js @@ -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