PATH:
usr
/
local
/
jetapps
/
frontend
/
jetbackup
/
app
/
controllers
define([ "app" ],function(app) { app.controller('snapshots', ['$scope', '$interval', '$routeParams', 'meta', 'lang', 'backup', 'jetapi', 'consts', '$timeout', function ($scope, $interval, $routeParams, meta, lang, backup, jetapi, consts, $timeout) { $scope.backupType = consts.BACKUP_TYPE_FULL; $scope.backups = []; $scope.loading = false; $scope.actionModule= ''; $scope.config = PAGE.config; $scope.refreshIntervalRate = 3000; $scope.interval = null; var metaSnapshots = meta.new('snapshots'); $scope.meta = metaSnapshots; $scope.metaData = metaSnapshots.getData(); metaSnapshots.setSortReverse(false); if(!metaSnapshots.getSortBy()) metaSnapshots.setSortBy("created"); if(!metaSnapshots.getSortDirection()) metaSnapshots.setSortDirection("asc"); metaSnapshots.setSortFields(["type", "created", "size", "flag_name", "destination"]); metaSnapshots.setTotalItems($scope.backups.length); $scope.backupHandler = new backup($scope.backupType, metaSnapshots); $scope.onClickCreateSnapshot = function() { $scope.creatingSnapshot = true; jetapi.addQueueSnapshot({}, function(response) { $scope.snapshotStatus = { message: response.status ? response.messages[0] : response.errors[0], type: response.status ? "success" : "danger", closeable: true, ttl: 10000 }; $scope.creatingSnapshot = false; $scope.backupHandler.checkStatus($scope); }); }; $scope.fetchData = function() { $scope.loading = true; $scope.backups = []; $scope.backupHandler.onlySnapshots = true; $scope.backupHandler.loadList(function(response) { metaSnapshots.setTotalItems(response.data.total); metaSnapshots.calculate(response.data.backups); $scope.backups = response.data.backups; $scope.loading = false; $scope.backupHandler.checkStatus($scope); $scope.backupHandler.setList($scope.backups); }); }; $scope.checkStatus = function () { $interval(function() { if($scope.actionModule) return; $scope.backupHandler.checkStatus($scope); }, $scope.refreshIntervalRate); }; $timeout(function () { $scope.fetchData(); $scope.checkStatus(); }()); } ] ) } );
[-] gdpr.js
[edit]
[+]
..
[-] emailBackups.js
[edit]
[-] cronBackups.js
[edit]
[-] dnsBackups.js
[edit]
[-] settings.js
[edit]
[-] queues.js
[edit]
[-] sslBackups.js
[edit]
[-] backups.js
[edit]
[-] fileBackups.js
[edit]
[-] dbBackups.js
[edit]
[-] fileManager.js
[edit]
[-] fullBackups.js
[edit]
[-] snapshots.js
[edit]