mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-03-02 02:10:48 +01:00
Cyberpanel_Haabi
This commit is contained in:
@@ -1311,6 +1311,7 @@ app.controller('restorev2backupoage', function ($scope, $http, $timeout) {
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
$scope.backupLoading = true;
|
||||
if (response.data.status === 1) {
|
||||
@@ -1320,15 +1321,33 @@ app.controller('restorev2backupoage', function ($scope, $http, $timeout) {
|
||||
console.log(response.data.data)
|
||||
console.log(response.data.data[0][1])
|
||||
var snaphots = response.data.data[0][1]
|
||||
for (var i=0; i<=snaphots.length; i++)
|
||||
{
|
||||
var tml = ' <tr>\n' +
|
||||
' <td>'+ snaphots[i].id +'</td>\n' +
|
||||
' <td><button type="button" \n' +
|
||||
' class="btn btn-danger">Delete</button></td>\n' +
|
||||
' </tr>'
|
||||
$('#listsnapshots').append(tml)
|
||||
|
||||
for (var i = 0; i < snaphots.length; i++) {
|
||||
var tml = ' <tr style="">\n' +
|
||||
' <td>' + snaphots[i].id + '</td>' +
|
||||
' <td><button type="button" \n' +
|
||||
' class="btn btn-danger">Delete</button></td>\n' +
|
||||
' \n' +
|
||||
' </tr>' +
|
||||
'<tr style="border: none!important;"> <td colspan="2" style="display: inherit;max-height: 10px;background-color: transparent; border: none">\n' +
|
||||
' <button id="' + snaphots[i].id + '" class="my-4 mx-4 btn " style="margin-bottom: 15px;margin-top: -8px;background-color: #161a69; color: white;border-radius: 6px" onclick=listpaths("' + i + '","' + snaphots[i].id + '")>+</button>\n' +
|
||||
' </td></tr>' +
|
||||
'<tr style="border: none!important;">' +
|
||||
' <td colspan="2" style="display: none;border: none" id="' + i + '">' +
|
||||
' <table id="inside" style="margin: 0 auto;">\n';
|
||||
|
||||
for (var j = 0; j < snaphots[i].paths.length; j++) {
|
||||
tml += '<tr>\n' +
|
||||
'<td>' + snaphots[i].paths[j] + '</td>\n' +
|
||||
'</tr>\n';
|
||||
}
|
||||
|
||||
tml += '</table>\n' +
|
||||
'</td>\n' +
|
||||
'</tr>\n' +
|
||||
'</tr>\n';
|
||||
|
||||
$('#listsnapshots').append(tml);
|
||||
}
|
||||
|
||||
// $scope.Snaphot_ID
|
||||
@@ -1398,4 +1417,21 @@ app.controller('createV2Backups', function ($scope, $http, $timeout){
|
||||
$scope.setupAccount = function(){
|
||||
window.open("https://platform.cyberpersons.com/gDrive?name=" + $scope.accountName + '&server=' + window.location.href + 'Setup');
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
function listpaths(pathid,button){
|
||||
|
||||
console.log("LIST PAYH FUNCTIOB CALLED WITH ID "+ pathid);
|
||||
var pathlist = document.getElementById(pathid)
|
||||
if (pathlist.style.display === "none") {
|
||||
pathlist.style.display = "revert";
|
||||
|
||||
document.getElementById(button).innerText="-"
|
||||
|
||||
} else {
|
||||
pathlist.style.display = "none";
|
||||
|
||||
document.getElementById(button).innerText="+"
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,9 @@
|
||||
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div class="container">
|
||||
<div id="page-title">
|
||||
@@ -55,9 +58,9 @@
|
||||
|
||||
<table id="snapshotstable" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Snapshot ID" %}</th>
|
||||
<th>{% trans "Action" %} ></th>
|
||||
<tr style="border-bottom: #cccccc solid 1px!important;" >
|
||||
<th style="border: none">{% trans "Snapshot ID" %}</th>
|
||||
<th style="border: none">{% trans "Action" %} ></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="listsnapshots">
|
||||
|
||||
Reference in New Issue
Block a user