Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2.3.5 dev #1135

Merged
merged 26 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
25ee799
backup v2 delete repo page
hassanhashmey Aug 14, 2023
44ec81b
enhancement: https://app.clickup.com/t/866at448g
usmannasir Aug 14, 2023
a9137fe
bug fix: https://github.com/usmannasir/cyberpanel/issues/1105
usmannasir Aug 18, 2023
d65b6b5
bug fix: mail function shift
usmannasir Aug 21, 2023
488bb11
remote backup error reporting fixed
hassanhashmey Aug 23, 2023
f7c2680
Merge branch 'v2.3.5-dev' of https://github.com/usmannasir/cyberpanel…
hassanhashmey Aug 23, 2023
eb6e32e
wp manager error fixed
hassanhashmey Aug 26, 2023
5fe9d16
add proper php path to get old site wp version
usmannasir Aug 26, 2023
ea76f19
resolve ticket id #BPRA5PZCI
usmannasir Aug 28, 2023
ff04747
Merge branch 'v2.3.4' into v2.3.5-dev
usmannasir Aug 29, 2023
89d0bb7
resolve internal ticket to show php on list site https://app.clickup.…
usmannasir Aug 29, 2023
44a2e03
litespeed conf
hassanhashmey Aug 30, 2023
a0af084
Merge branch 'v2.3.5-dev' of https://github.com/usmannasir/cyberpanel…
hassanhashmey Aug 30, 2023
08996f3
finalize pre_main_global https://app.clickup.com/t/866atra07
usmannasir Aug 30, 2023
7f7d25d
bug fix: return only the php versions exists on the server
usmannasir Sep 3, 2023
b59de61
bug fix cPanel importer internal ticket: https://app.clickup.com/t/86…
usmannasir Sep 3, 2023
88a182f
users in alphatic order, internal ticket https://app.clickup.com/t/86…
usmannasir Sep 3, 2023
30c7ee6
add php 8.2 and also add support for cloud linux 8
usmannasir Sep 12, 2023
a4528f3
add php 8.2 and also add support for cloud linux 8
usmannasir Sep 12, 2023
eb5d2e0
add php 8.2 and also add support for cloud linux 8
usmannasir Sep 12, 2023
0fc4b91
minor bug fix with php 8.2
usmannasir Sep 12, 2023
48f328b
cloudlinux 8 based install
usmannasir Sep 19, 2023
7972d16
bug fix in password generation
usmannasir Sep 24, 2023
d87a8d8
possible resolution of https://github.com/usmannasir/cyberpanel/issue…
usmannasir Sep 24, 2023
964141f
bug fix: dkim permissions
usmannasir Sep 24, 2023
30bfdda
Internal Upgrade
master3395 Oct 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
175 changes: 167 additions & 8 deletions IncBackups/static/IncBackups/IncBackups.js
Original file line number Diff line number Diff line change
Expand Up @@ -1918,10 +1918,10 @@ app.controller('ScheduleV2Backup', function ($scope, $http, $timeout, $compile)
if (response.data.status === 1) {
$scope.selectwebsite();
new PNotify({
title: 'Success!',
text: 'Successfully deleted.',
type: 'success'
});
title: 'Success!',
text: 'Successfully deleted.',
type: 'success'
});

} else {
new PNotify({
Expand Down Expand Up @@ -2054,10 +2054,10 @@ app.controller('ScheduleV2Backup', function ($scope, $http, $timeout, $compile)
if (response.data.status === 1) {
$scope.selectwebsite();
new PNotify({
title: 'Success!',
text: 'Successfully created.',
type: 'success'
});
title: 'Success!',
text: 'Successfully created.',
type: 'success'
});

} else {
new PNotify({
Expand Down Expand Up @@ -2242,3 +2242,162 @@ app.controller('ScheduleV2Backup', function ($scope, $http, $timeout, $compile)

});


app.controller('DeleteBackuprepo', function ($scope, $http, $timeout, $compile) {

$scope.backupLoading = true;
$scope.installationProgress = true;
$scope.errorMessageBox = true;
$scope.success = true;
$scope.couldNotConnect = true;
$scope.goBackDisable = true;

$scope.selectwebsite = function () {
document.getElementById('reposelectbox').innerHTML = "";
$scope.backupLoading = false;
// document.getElementById('CreateV2BackupButton').style.display = "block";
var url = "/IncrementalBackups/selectwebsiteCreatev2";

var data = {
Selectedwebsite: $scope.selwebsite,
Selectedrepo: $('#reposelectbox').val(),
};
//alert( $scope.selwebsite);

var config = {
headers: {
'X-CSRFToken': getCookie('csrftoken')
}
};


$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);


function ListInitialDatas(response) {
$scope.backupLoading = true;
if (response.data.status === 1) {

const selectBox = document.getElementById('reposelectbox');


const options = response.data.data;
const option = document.createElement('option');


option.value = 1;
option.text = 'Choose Repo';

selectBox.appendChild(option);

if (options.length >= 1) {
for (let i = 0; i < options.length; i++) {

const option = document.createElement('option');


option.value = options[i];
option.text = options[i];

selectBox.appendChild(option);
}

} else {
new PNotify({
title: 'Error!',
text: 'file empty',
type: 'error'
});
}


} else {
new PNotify({
title: 'Error!',
text: response.data.error_message,
type: 'error'
});
}

}

function cantLoadInitialDatas(response) {
$scope.backupLoading = true;
new PNotify({
title: 'Operation Failed!',
text: 'Could not connect to server, please refresh this page',
type: 'error'
});
}
}

$scope.DeleteV2BackupButton = function () {
$scope.backupLoading = false;
$scope.installationDetailsForm = true;
$scope.installationProgress = false;
$scope.errorMessageBox = true;
$scope.success = true;
$scope.couldNotConnect = true;
$scope.goBackDisable = true;

var url = "/IncrementalBackups/DeleteV2BackupButton";


data = {
Selectedwebsite: $scope.selwebsite,
Selectedrepo: $('#reposelectbox').val(),
};

var config = {
headers: {
'X-CSRFToken': getCookie('csrftoken')
}
};

//alert('Done..........')
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);

function ListInitialDatas(response) {
if (response.data.status === 1) {
$scope.backupLoading = true;
$scope.installationDetailsForm = true;
$scope.installationProgress = true;
$scope.errorMessageBox = true;
$scope.success = false;
$scope.couldNotConnect = true;
$scope.goBackDisable = true;
new PNotify({
title: 'Operation Done!',
text: 'Delete Successfully',
type: 'sucess'
});
} else {
$scope.backupLoading = true;
$scope.installationDetailsForm = true;
$scope.installationProgress = false;
$scope.errorMessageBox = false;
$scope.success = true;
$scope.couldNotConnect = true;
$scope.goBackDisable = false;

$scope.errorMessage = response.data.error_message;
new PNotify({
title: 'Operation Failed!',
text: response.data.error_message,
type: 'error'
});
}

}

function cantLoadInitialDatas(response) {
$scope.backupLoading = true;
new PNotify({
title: 'Operation Failed!',
text: 'Could not connect to server, please refresh this page',
type: 'error'
});
}
}
});

3 changes: 1 addition & 2 deletions IncBackups/templates/IncBackups/CreateV2Backup.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ <h3 class="title-hero">
- <a href="{% url 'RestoreV2backupSite' %}">Restore Backups</a>
</h3>
<div class="example-box-wrapper">

<p align="center" style="margin-top: 2%; margin-bottom: 2%">
<iframe width="788.54" height="443" src="https://www.youtube.com/embed/7dI1013xvUc"
title="YouTube video player" frameborder="0"
Expand Down Expand Up @@ -58,7 +57,7 @@ <h3 class="title-hero">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Backup Content" %}</label>
<label class="col-sm-3 control-label">{% trans "Backup Contents" %}</label>
<div class="col-sm-9">
<div class="checkbox">
<label>
Expand Down
121 changes: 121 additions & 0 deletions IncBackups/templates/IncBackups/DeleteV2repo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{% extends "baseTemplate/index.html" %}
{% load i18n %}
{% block title %}{% trans "Delete v2 Backup" %}{% endblock %}
{% block content %}

{% load static %}

{% get_current_language as LANGUAGE_CODE %}
<!-- Current language: {{ LANGUAGE_CODE }} -->
<style>

</style>

<div class="container">

<div id="page-title">
<h2>{% trans "Delete V2 Repo" %} - <a target="_blank" href="http://go.cyberpanel.net/backup"
style="height: 23px;line-height: 21px;"
class="btn btn-border btn-alt border-red btn-link font-red"
title=""><span>{% trans "Backup Docs" %}</span></a></h2>
<p>{% trans "This page can be used to delete your backup repo" %}</p>
</div>

<div ng-controller="DeleteBackuprepo" class="panel">
<div class="panel-body">
<h3 class="title-hero">
{% trans "Create v2 Backup" %} <img ng-hide="backupLoading" src="{% static 'images/loading.gif' %}">

</h3>
<div class="example-box-wrapper">



<form class="form-horizontal bordered-row">


<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Select Website" %} </label>
<div class="col-sm-6">
<select id="create-backup-select" ng-change="selectwebsite()" ng-model="selwebsite"
class="form-control">
{% for items in websiteList %}
<option value="{{ items }}">{{ items }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Select Repo" %} </label>
<div class="col-sm-6">
<select id="reposelectbox" ng-change="selectrepo()" ng-model="testhabbi"
class="form-control">
</select>
</div>
</div>

<div class="form-group">
<label class="col-sm-3 control-label">{% trans " " %} </label>
<div class="col-sm-6">
<button class="btn" id="DeleteV2BackupButton" ng-click="DeleteV2BackupButton()"
style="border-radius: 6px;background-color: #3447b7;color: white !important;">
Delete Backup repo
</button>
</div>
</div>


<div ng-hide="installationProgress" class="form-group">
<label class="col-sm-2 control-label"></label>
<div class="col-sm-7">

<div class="alert alert-success text-center">
<h2>{$ currentStatus $}</h2>
</div>

<div class="progress">
<div id="installProgress" class="progress-bar" role="progressbar" aria-valuenow="70"
aria-valuemin="0" aria-valuemax="100" style="width:0%">
<span class="sr-only">70% Complete</span>
</div>
</div>

<div ng-hide="errorMessageBox" class="alert alert-danger">
<p>{% trans "Error message:" %} {$ errorMessage $}</p>
</div>

<div ng-hide="success" class="alert alert-success">
<p>{% trans "Backup succesfully." %}</p>
</div>


<div ng-hide="couldNotConnect" class="alert alert-danger">
<p>{% trans "Could not connect to server. Please refresh this page." %}</p>
</div>


</div>
</div>

<div ng-hide="installationProgress" class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-4">
<button type="button" ng-disabled="goBackDisable" ng-click="goBack()"
class="btn btn-primary btn-lg">{% trans "Go Back" %}</button>
</div>
</div>

</form>


</div>

</div>

</div>


</div>


{% endblock %}
2 changes: 2 additions & 0 deletions IncBackups/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,7 @@
url(r'^schedulev2Backups$', views.schedulev2Backups, name='schedulev2Backups'),
url(r'^DeleteScheduleV2$', views.DeleteScheduleV2, name='DeleteScheduleV2'),
url(r'^CreateScheduleV2$', views.CreateScheduleV2, name='CreateScheduleV2'),
url(r'^DeleteRepoV2$', views.DeleteRepoV2, name='DeleteRepoV2'),
url(r'^DeleteV2BackupButton$', views.DeleteV2BackupButton, name='DeleteV2BackupButton'),

]
Loading