diff --git a/cyberpanel_upgrade.sh b/cyberpanel_upgrade.sh index af932faf1..52c1fe576 100644 --- a/cyberpanel_upgrade.sh +++ b/cyberpanel_upgrade.sh @@ -5,6 +5,7 @@ export LC_CTYPE=en_US.UTF-8 SUDO_TEST=$(set) SERVER_OS='Undefined' OUTPUT=$(cat /etc/*release) +BRANCH_NAME="v1.9.4" install_utility() { if [[ ! -f /usr/bin/cyberpanel_utility ]] ; then @@ -99,7 +100,7 @@ rm -rf /usr/local/CyberPanel virtualenv -p /usr/bin/python3 --system-site-packages /usr/local/CyberPanel check_return rm -rf requirments.txt -wget https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/requirments.txt +wget https://raw.githubusercontent.com/usmannasir/cyberpanel/$BRANCH_NAME/requirments.txt . /usr/local/CyberPanel/bin/activate check_return @@ -118,14 +119,14 @@ fi virtualenv -p /usr/bin/python3 --system-site-packages /usr/local/CyberPanel check_return rm -rf upgrade.py -wget https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/plogical/upgrade.py -/usr/local/CyberPanel/bin/python upgrade.py stable +wget https://raw.githubusercontent.com/usmannasir/cyberpanel/$BRANCH_NAME/plogical/upgrade.py +/usr/local/CyberPanel/bin/python upgrade.py $BRANCH_NAME check_return ## virtualenv -p /usr/bin/python3 /usr/local/CyberCP check_return -wget -O requirements.txt https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/requirments.txt +wget -O requirements.txt https://raw.githubusercontent.com/usmannasir/cyberpanel/$BRANCH_NAME/requirments.txt if [ $SERVER_OS = "Ubuntu" ] ; then . /usr/local/CyberCP/bin/activate diff --git a/preUpgrade.sh b/preUpgrade.sh index 205d6cac6..d8765f471 100644 --- a/preUpgrade.sh +++ b/preUpgrade.sh @@ -1,5 +1,8 @@ #!/bin/sh + +BRANCH_NAME="v1.9.4" + rm -f /usr/local/cyberpanel_upgrade.sh -wget -O /usr/local/cyberpanel_upgrade.sh https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/cyberpanel_upgrade.sh 2>/dev/null +wget -O /usr/local/cyberpanel_upgrade.sh https://raw.githubusercontent.com/usmannasir/cyberpanel/$BRANCH_NAME/cyberpanel_upgrade.sh 2>/dev/null chmod 700 /usr/local/cyberpanel_upgrade.sh /usr/local/cyberpanel_upgrade.sh diff --git a/static/IncBackups/IncBackups.js b/static/IncBackups/IncBackups.js index 438065c89..b1ba61062 100644 --- a/static/IncBackups/IncBackups.js +++ b/static/IncBackups/IncBackups.js @@ -741,6 +741,53 @@ app.controller('scheduleBackupInc', function ($scope, $http) { }; + $scope.editInitial = function (id) { + + $scope.jobID = id; + + $scope.cyberpanelLoading = false; + + + url = "/IncrementalBackups/fetchSites"; + + + var data = {id: id}; + + var config = { + headers: { + 'X-CSRFToken': getCookie('csrftoken') + } + }; + + + $http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas); + + + function ListInitialDatas(response) { + $scope.cyberpanelLoading = true; + if (response.data.status === 1) { + $scope.websites = JSON.parse(response.data.data); + } else { + new PNotify({ + title: 'Operation Failed!', + text: response.data.error_message, + type: 'error' + }); + } + + } + + function cantLoadInitialDatas(response) { + $scope.cyberpanelLoading = true; + new PNotify({ + title: 'Operation Failed!', + text: 'Could not connect to server, please refresh this page', + type: 'error' + }); + } + + }; + });