refactored incBackups

This commit is contained in:
Chris
2021-02-03 00:35:08 -05:00
parent 386f8dfdcd
commit e8831b3674
8 changed files with 384 additions and 574 deletions

View File

@@ -101,7 +101,7 @@ app.controller('createIncrementalBackups', function ($scope, $http, $timeout) {
function ListInitialDatas(response) {
if (response.data.status === 1) {
$scope.records = JSON.parse(response.data.data);
$scope.records = response.data.data;
} else {
new PNotify({
title: 'Error!',
@@ -240,7 +240,7 @@ app.controller('createIncrementalBackups', function ($scope, $http, $timeout) {
function ListInitialDatas(response) {
$scope.cyberpanelLoading = true;
if (response.data.status === 1) {
$scope.jobs = JSON.parse(response.data.data);
$scope.jobs = response.data.data;
} else {
new PNotify({
title: 'Operation Failed!',
@@ -358,7 +358,7 @@ app.controller('incrementalDestinations', function ($scope, $http) {
function ListInitialDatas(response) {
$scope.cyberpanelLoading = true;
if (response.data.status === 1) {
$scope.records = JSON.parse(response.data.data);
$scope.records = response.data.data;
} else {
new PNotify({
title: 'Operation Failed!',
@@ -621,7 +621,7 @@ app.controller('scheduleBackupInc', function ($scope, $http) {
if (response.data.status === 1) {
new PNotify({
title: 'Success!',
text: 'Destination successfully removed.',
text: 'Operation successful.',
type: 'success'
});
} else {
@@ -668,12 +668,11 @@ app.controller('scheduleBackupInc', function ($scope, $http) {
function ListInitialDatas(response) {
$scope.cyberpanelLoading = true;
if (response.data.status === 1) {
$scope.records = JSON.parse(response.data.data);
var parsed = JSON.parse(response.data.data);
for (var j = 0; j < parsed.length; j++) {
websitesToBeBackedTemp.push(parsed[j].website);
}
let data = response.data.data;
$scope.records = data;
data.forEach(item => {
websitesToBeBackedTemp.push(item.website)
})
} else {
new PNotify({
title: 'Operation Failed!',
@@ -766,7 +765,7 @@ app.controller('scheduleBackupInc', function ($scope, $http) {
function ListInitialDatas(response) {
$scope.cyberpanelLoading = true;
if (response.data.status === 1) {
$scope.websites = JSON.parse(response.data.data);
$scope.websites = response.data.data;
if(response.data.websiteData === 1){
$scope.websiteData = true;
@@ -1074,7 +1073,7 @@ app.controller('restoreRemoteBackupsInc', function ($scope, $http, $timeout) {
function ListInitialDatas(response) {
$scope.cyberpanelLoading = true;
if (response.data.status === 1) {
$scope.records = JSON.parse(response.data.data);
$scope.records = response.data.data;
} else {
new PNotify({
title: 'Error!',