diff --git a/Duplicati/Server/webroot/Duplicati/CountDownHelper.js b/Duplicati/Server/webroot/Duplicati/CountDownHelper.js deleted file mode 100644 index e28955854..000000000 --- a/Duplicati/Server/webroot/Duplicati/CountDownHelper.js +++ /dev/null @@ -1,61 +0,0 @@ -Ext.define('Duplicati.CountDownHelper', { - mixins: { - observable: 'Ext.util.Observable' - }, - - statics: { - callbackkeycounter: 0, - callbacklookup: {}, - callbackhelper: function(id) { - this.callbacklookup["" + id].onCallback(); - } - }, - - expireTime: null, - intervalId : null, - - constructor: function(config) { - this.mixins.observable.constructor.call(this, config); - this.addEvents('count-down-tick', 'count-down-complete'); - }, - - isRunning: function() { - return this.intervalId != null; - }, - - start: function(time) { - if (this.intervalId != null) - this.stop(false); - - this.expireTime = time; - var selfid = Duplicati.CountDownHelper.callbackkeycounter++; - - Duplicati.CountDownHelper.callbacklookup["" + selfid] = this; - this.intervalId = window.setInterval('Duplicati.CountDownHelper.callbackhelper(' + selfid + ');', 500); - }, - - onCallback: function() { - var secondsLeft = parseInt((this.expireTime.getTime() - new Date().getTime()) / 1000); - this.fireEvent('count-down-tick', Math.max(0, secondsLeft)); - if (secondsLeft <= 0) - this.stop(true); - }, - - stop: function(activateEvent) { - if (this.intervalId != null) { - window.clearInterval(this.intervalId); - this.intervalId = null; - } - - for(var k in Duplicati.CountDownHelper.callbacklookup) { - if (Duplicati.CountDownHelper.callbacklookup[k] == this) { - delete Duplicati.CountDownHelper.callbacklookup[k]; - break; - } - } - - if (activateEvent || activateEvent === undefined) - this.fireEvent('count-down-complete'); - } - -}) diff --git a/Duplicati/Server/webroot/Duplicati/ListUtility.js b/Duplicati/Server/webroot/Duplicati/ListUtility.js deleted file mode 100644 index bd5d69890..000000000 --- a/Duplicati/Server/webroot/Duplicati/ListUtility.js +++ /dev/null @@ -1,118 +0,0 @@ -Ext.define('Duplicati.ListUtility', { - statics: { - - currentScheduleId: null, - - showContextMenu: function(id, el) { - var lst = Ext.getCmp('status-window-schedule-list'); - var mnu = lst.elementContextMenu; - this.currentScheduleId = id; - var elx = Ext.get(el); - mnu.showBy(elx, 'tr-br?'); - }, - - formatSizeString: function(size) { return Duplicati.Utility.formatSizeString(size); }, - timeAgo: function(date) { return Duplicati.Utility.timeAgo(date); }, - formatCountString: function(count, singular, plural) { - count = parseInt(count); - if (count == 1) - return 1 + ' ' + singluar; - - //Make a string - count = count + ''; - var tmp = ''; - while (count.length > 3) { - tmp = count.substr(count.length - 3, 3) + (tmp.length == 0 ? '' : '.') + tmp; - count = count.substr(0, count.length - 3); - } - - tmp = count + (tmp.length == 0 ? '' : '.') + tmp; - - return tmp + ' ' + plural; - }, - - formatBackupScheduleDetails: function(values) - { - var metadata = ''; - - if (values.Metadata != null) - { - var metadataItems = []; - var mt = values.Metadata; - - var sourceData = ''; - if (mt['source-file-size'] != null && mt['source-file-count'] != null) - sourceData = this.formatSizeString(mt['source-file-size']) + ' (' + this.formatCountString(mt['source-file-count'], 'file', 'files') + ')'; - else if (mt['source-file-size'] != null) - sourceData = this.formatSizeString(mt['source-file-size']); - else if (mt['source-file-count'] != null) - sourceData = this.formatCountString(mt['source-file-count'], 'file', 'files'); - - if (sourceData != '') - metadataItems.push('Source: ' + sourceData + ''); - - var backupData = ''; - if (mt['total-backup-size'] != null && parseInt(mt['total-backup-size']) > 0 && mt['total-file-count'] != null && parseInt(mt['total-file-count']) > 0) - backupData = this.formatSizeString(mt['total-backup-size']) + ' (' + this.formatCountString(mt['total-file-count'], 'file', 'files') + ')'; - else if (mt['total-backup-size'] != null && parseInt(mt['total-backup-size']) > 0) - backupData = this.formatSizeString(mt['total-backup-size']); - else if (mt['total-file-count'] != null && parseInt(mt['total-file-count']) > 0) - backupData = this.formatCountString(mt['total-file-count'], 'file', 'files'); - - if (backupData != '') - metadataItems.push('Backup: ' + backupData + ''); - - if (mt['assigned-quota-space'] != null || mt['free-quota-space'] != null) - { - var spaceLeft = null; - if (mt['assigned-quota-space'] != null && mt['free-quota-space'] != null && mt['total-backup-size'] != null) - spaceLeft = Math.min(parseInt(mt['assigned-quota-space']) - parseInt(mt['total-backup-size']), parseInt(mt['free-quota-space'])); - else if (mt['assigned-quota-space'] != null && mt['total-backup-size'] != null) - spaceLeft = parseInt(mt['assigned-quota-space']) - parseInt(mt['total-backup-size']); - else if (mt['free-quota-space'] != null) - spaceLeft = parseInt(mt['free-quota-space']); - - var extracls = ''; - if (mt['total-backup-size'] != null) - { - //We mark it as low if there is less than 10% free - if (spaceLeft < (parseInt(mt['total-backup-size']) * 0.1)) - extracls = 'class="low-storage-space"'; - } - - if (spaceLeft != null) - metadataItems.push('Free space: ' + this.formatSizeString(spaceLeft) + ''); - } - - if (mt['changed-file-count'] != null) - { - var changedFiles = parseInt(mt['changed-file-count']); - var str = changedFiles + ' ' + changedFiles == 1 ? "change" : "changes"; - - if (mt['last-backup-date'] != null) - str += ' since ' + this.timeAgo(new Date(mt['last-backup-date'])); - - metadataItems.push('' + str + ''); - } else if (mt['last-backup-date'] != null || mt['last-backup-completed-time'] != null) { - if (mt['last-backup-completed-time'] != null) - metadataItems.push('Last backup: ' + this.timeAgo(new Date(mt['last-backup-completed-time'])) + ''); - else - metadataItems.push('Last backup: ' + this.timeAgo(new Date(mt['last-backup-date'])) + ''); - } - - for(var ix = 0; ix < metadataItems.length; ix++) - { - /*if (ix != 0) - metadata += ", "; */ - - metadata += metadataItems[ix]; - } - } - - if (metadata == '') - metadata = 'No backup information was found, run a backup to obtain data' - - return metadata; - } - } -}) \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/Service.js b/Duplicati/Server/webroot/Duplicati/Service.js deleted file mode 100644 index 31838ff36..000000000 --- a/Duplicati/Server/webroot/Duplicati/Service.js +++ /dev/null @@ -1,319 +0,0 @@ -Ext.define('Duplicati.Service', { - requires: [ - 'Duplicati.CountDownHelper' - ], - mixins: { - observable: 'Ext.util.Observable' - }, - - controlUrl: '/control.cgi', - pauseCountDownHelper: null, - lostConnectionCountDownHelper: null, - updateRequestParams: { - action: 'get-current-state', - longpoll: true, - lasteventid: '-1', - duration: '5m' - }, - updateRequestRunning: false, - updateRequestFailureCount: 0, - - //Cache for server responses - serverdata: { - 'current-state': null, - 'installed-backends': null, - 'installed-compression-modules': null, - 'installed-encryption-modules': null, - 'installed-generic-modules': null, - 'backup-defaults': null, - 'system-info': null - }, - - constructor: function(config) { - this.mixins.observable.constructor.call(this, config); - this.addEvents('current-state-updated', 'count-down-pause-timer', 'lost-connection', 'reconnected', 'lost-connection-retry', 'lost-connection-retry-delay'); - this.lostConnectionCountDownHelper = new Duplicati.CountDownHelper(); - this.pauseCountDownHelper = new Duplicati.CountDownHelper(); - - this.pauseCountDownHelper.on({ - 'count-down-tick': function(secondsleft) { - this.fireEvent('count-down-pause-timer', secondsleft); - }, - 'count-down-complete': function() { - this.fireEvent('count-down-pause-timer', 0); - }, - scope: this - }); - - this.lostConnectionCountDownHelper.on({ - 'count-down-tick': function(seconds) { - this.fireEvent('lost-connection-retry-delay', seconds); - }, - 'count-down-complete': function() { - this.updateCurrentState(); - this.fireEvent('lost-connection-retry'); - }, - scope: this - }) - - this.loadSystemInfo(false); - }, - - loadSystemInfo: function(reload) { - - if (reload || this.serverdata['system-info'] == null) { - - Ext.Ajax.request({ - url: this.controlUrl, - params: {action: 'system-info'}, - scope: this, - success: function(response) { - var res = eval('(' + response.responseText + ')'); - if (res != null) - this.serverdata['system-info'] = res; - - if (this.serverdata['system-info'] == null) - window.setTimeout(this.loadSystemInfo, 1000); - }, - - error: function() { - if (this.serverdata['system-info'] == null) - window.setTimeout(this.loadSystemInfo, 1000); - } - }); - } - }, - - reconnectNow: function() { - if (this.lostConnectionCountDownHelper.isRunning()) { - this.lostConnectionCountDownHelper.stop(true); - } - }, - - updateCurrentState: function(force) { - if (this.updateRequestRunning && !force) - return; - - var params = force ? { action: 'get-current-state' } : this.updateRequestParams; - var timeout = force ? 5000 : (1000 * ((60 * 5) + 5)); - - if (!force) - { - this.updateRequestRunning = true; - if (this.updateRequestFailureCount > 0) - { - //Last request failed, so lets retry, - // with a short timeout and make sure we - // don't wait for an update - timeout = 10000; //10 sec - this.updateRequestParams.lasteventid = -1; - } - } - - Ext.Ajax.request({ - url: this.controlUrl, - params: params, - timeout: timeout, - scope: this, - success: function(response) { - var res = eval('(' + response.responseText + ')'); - if (res != null) - { - if (this.updateRequestFailureCount >= 2) - this.fireEvent('reconnected'); - - this.updateRequestFailureCount = 0; - Ext.log('Got update: ' + res.LastEventID + ', last: ' + this.updateRequestParams.lasteventid); - var realUpdate = this.updateRequestParams.lasteventid != res.LastEventID; - this.serverdata['current-state'] = res; - this.updateRequestParams.lasteventid = res.LastEventID; - - //Register next request - if (!force) - { - this.updateRequestRunning = false; - this.updateCurrentState(); - } - - if (realUpdate) - this.fireEvent('current-state-updated', this.serverdata['current-state']); - if (this.getExpectedPauseEnd() != null) - this.pauseCountDownHelper.start(this.getExpectedPauseEnd()); - else if (this.pauseCountDownHelper.isRunning()) - this.pauseCountDownHelper.stop(true); - - } - }, - failure: function(response, opts) { - //Register next request - if (!force) - { - Ext.log('Failure in longpoll: ' + response.status + ', timeout: ' + response.timedout); - - this.updateRequestFailureCount++; - this.updateRequestRunning = false; - - if (this.updateRequestFailureCount == 2) - this.fireEvent('lost-connection'); - - if (this.updateRequestFailureCount >= 2) { - - this.lostConnectionCountDownHelper.start(Ext.Date.add(new Date(), Ext.Date.SECOND, 30)); - } - else - { - this.updateCurrentState(); - } - } - } - }); - }, - - getExpectedPauseEnd: function() { - var pauseEnd = this.serverdata['current-state'].EstimatedPauseEnd; - if (pauseEnd != null) { - pauseEnd = Duplicati.Utility.parseJsonDate(pauseEnd); - if (pauseEnd != null && pauseEnd.getTime() > new Date().getTime()) - return pauseEnd; - } - return null; - }, - - getSchedulePosition: function(id) { - var state = this.serverdata['current-state']; - if (state == null) - return -1; - - if (id == state.ActiveScheduleId) - return 0; - else if (state.SchedulerQueueIds != null) - for(var i = 0; i < state.SchedulerQueueIds.length; i++) - if (state.SchedulerQueueIds[i] == id) - return i+1; - - return -1; - }, - - pause: function(duration) { - var self = this; - Ext.Ajax.request({ - url: this.controlUrl, - params: { - action: 'send-command', - command: 'pause', - duration: duration - }, - success: function(response) { } - }); - }, - - resume: function() { - var self = this; - Ext.Ajax.request({ - url: this.controlUrl, - params: { - action: 'send-command', - command: 'resume' - }, - success: function(response) { } - }); - }, - - isPaused: function() { - var state = this.serverdata['current-state']; - if (state != null) - return state.ProgramState != 'Running'; - - return true; - }, - - togglePause: function() { - if (this.isPaused()) - this.resume(); - else - this.pause(); - }, - - getInstalledCompressionModules: function(callback) { - if (this.serverdata['installed-compression-modules'] == null) { - var self = this; - Ext.Ajax.request({ - url: this.controlUrl, - params: { action: 'list-installed-compression-modules' }, - success: function(response) { - self.serverdata['installed-compression-modules'] = eval('(' + response.responseText + ')'); - callback(self.serverdata['installed-compression-modules']); - } - }); - } else { - callback(this.serverdata['installed-compression-modules']); - } - }, - - getInstalledGenericModules: function(callback) { - if (this.serverdata['installed-generic-modules'] == null) { - var self = this; - Ext.Ajax.request({ - url: this.controlUrl, - params: { action: 'list-installed-generic-modules' }, - success: function(response) { - self.serverdata['installed-generic-modules'] = eval('(' + response.responseText + ')'); - callback(self.serverdata['installed-generic-modules']); - } - }); - } else { - callback(this.serverdata['installed-generic-modules']); - } - }, - - getInstalledEncryptionModules: function(callback) { - if (this.serverdata['installed-encryption-modules'] == null) { - var self = this; - Ext.Ajax.request({ - url: this.controlUrl, - params: { action: 'list-installed-encryption-modules' }, - success: function(response) { - self.serverdata['installed-encryption-modules'] = eval('(' + response.responseText + ')'); - callback(self.serverdata['installed-encryption-modules']); - } - }); - } else { - callback(this.serverdata['installed-encryption-modules']); - } - }, - - getBackupDefaults: function(callback) { - if (this.serverdata['backup-defaults'] == null) { - var self = this; - Ext.Ajax.request({ - url: this.controlUrl, - params: { action: 'get-backup-defaults' }, - success: function(response) { - self.serverdata['backup-defaults'] = eval('(' + response.responseText + ')'); - callback(self.serverdata['backup-defaults']); - }, - scope: this - }); - } else { - callback(this.serverdata['backup-defaults']); - } - }, - - runBackup: function(id, full) { - var self = this; - - Ext.Ajax.request({ - url: this.controlUrl, - params: { - action: 'send-command', - command: 'run-backup', - id: id, - full: full - }, - success: function(response) { - } - }); - - } - -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/Utility.js b/Duplicati/Server/webroot/Duplicati/Utility.js deleted file mode 100644 index 43db5b39f..000000000 --- a/Duplicati/Server/webroot/Duplicati/Utility.js +++ /dev/null @@ -1,168 +0,0 @@ -Ext.define('Duplicati.Utility', { - statics: { - - strings: { - terabyteShort: 'TB', - gigabyteShort: 'GB', - megabyteShort: 'MB', - kilobyteShort: 'KB', - bytesShort: 'bytes', - - prefixAgo: null, - prefixFromNow: "in", - suffixAgo: "ago", - suffixFromNow: null, - seconds: "less than a minute", - minute: "about a minute", - minutes: "%d minutes", - hour: "about an hour", - hours: "about %d hours", - day: "a day", - days: "%d days", - month: "about a month", - months: "%d months", - year: "about a year", - years: "%d years", - wordSeparator: " " - }, - - timeAgoTimer: window.setInterval('Duplicati.Utility.updateTimeAgoFields()', 1000 * 150), - - //Simplified version of jquery.timeago - timeAgo: function(date) { - var distanceMillis = (new Date().getTime() - date.getTime()); - var strings = this.strings; - - var prefix = strings.prefixAgo; - var suffix = strings.suffixAgo; - if (distanceMillis < 0) { - prefix = strings.prefixFromNow; - suffix = strings.suffixFromNow; - } - - var seconds = Math.abs(distanceMillis) / 1000; - var minutes = seconds / 60; - var hours = minutes / 60; - var days = hours / 24; - var years = days / 365; - - var words = seconds < 45 && strings.seconds.replace(/%d/i, Math.round(seconds)) || - seconds < 90 && strings.minute || - minutes < 45 && strings.minutes.replace(/%d/i, Math.round(minutes)) || - minutes < 90 && strings.hour || - hours < 24 && strings.hours.replace(/%d/i, Math.round(hours)) || - hours < 42 && strings.day || - days < 30 && strings.days.replace(/%d/i, Math.round(days)) || - days < 45 && strings.month || - days < 365 && strings.months.replace(/%d/i, Math.round(days / 30)) || - years < 1.5 && strings.year || - strings.years.replace(/%d/i, Math.round(years)); - - var separator = strings.wordSeparator === undefined ? " " : strings.wordSeparator; - return Ext.String.trim([prefix, words, suffix].join(separator)); - }, - - updateTimeAgoFields: function() { - var parent = Ext.get(document); - var els = parent.query('.marker-time-ago'); - for(var i = 0; i < els.length; i++) { - var time = this.parseJsonDate(els[i].title); - if (els[i].nextSibling.nodeType == 3) - els[i].nextSibling.nodeValue = this.timeAgo(time); - else if (els[i].nextSibling.innerText != null) - els[i].nextSibling.innerText = this.timeAgo(time); - } - }, - - - parseJsonDate: function(str) { - if (str == null) - return null; - - if (Ext.String.trim(str).length == 0) - return null; - - if (str.indexOf("\/") == 0) - { - var strtmp = str.replace(/\/Date\((-?\d+(((\+|\-)\d+)|Z|z)?)\)\//gi, "new Date($1)"); - return eval(strtmp); - } - else - { - return new Date(str); - } - }, - - formatSecondsAsTime: function(seconds) { - seconds = parseInt(seconds); - var hours = parseInt(Math.floor(seconds / (60 * 60))); - seconds = seconds - (hours * 60 * 60); - var minutes = parseInt(Math.floor(seconds / 60)); - seconds = seconds - (minutes * 60); - var res = ''; - if (hours > 0) { - res += hours + ':'; - if (minutes < 10) - res += '0'; - } - - res += minutes + ':' ; - if (seconds < 10) - res += '0'; - res += seconds; - - return res; - }, - - formatSizeString: function(size) { - size = parseInt(size); - if (isNaN(size)) - return size; - - var strings = this.strings; - - if (size >= 1024 * 1024 * 1024 * 1024) - return (size / (1024 * 1024 * 1024 * 1024.0)).toFixed(2) + ' ' + strings.terabyteShort; - else if (size >= 1024 * 1024 * 1024) - return (size / (1024 * 1024 * 1024.0)).toFixed(2) + ' ' + strings.gigabyteShort; - else if (size >= 1024 * 1024) - return (size / (1024 * 1024.0)).toFixed(2) + ' ' + strings.megabyteShort; - else if (size >= 1024) - return (size / (1024.0)).toFixed(2) + ' ' + strings.kilobyteShort; - else - return size + ' ' + strings.bytesShort; - }, - - estimatedFreeSpace: function(assignedQuota, freeQuota, backupSize) { - if (assignedQuota != null && freeQuota != null && backupSize != null) - return Math.min(parseInt(assignedQuota) - parseInt(backupSize), parseInt(freeQuota)); - else if (assignedQuota != null && backupSize != null) - return parseInt(assignedQuota) - parseInt(backupSize); - else if (freeQuota != null) - return parseInt(freeQuota); - else - return null; - }, - - createRecordFromData: function(classname, data) { - var entry = Ext.create(classname); - var model = Ext.ModelManager.getModel(classname); - var fields = model.getFields(); - var associations = entry.associations; - - for(var i = 0; i < fields.length; i++) { - var key = fields[i].mapping || fields[i].name; - if (data[key] !== undefined) - entry.set(fields[i].name, data[key]); - } - - for(var i = 0; i < associations.length; i++) { - var a = associations.getAt(i); - if (data[a.associationKey]) - entry[a.setterName](Duplicati.Utility.createRecordFromData(a.associatedName, data[a.associationKey])); - } - - return entry; - } - } -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/controller/BackupConfig.js b/Duplicati/Server/webroot/Duplicati/controller/BackupConfig.js deleted file mode 100644 index c47c8bdd0..000000000 --- a/Duplicati/Server/webroot/Duplicati/controller/BackupConfig.js +++ /dev/null @@ -1,168 +0,0 @@ -Ext.define('Duplicati.controller.BackupConfig', { - extend: 'Ext.app.Controller', - - onBtnGeneratePasswordClick: function(button, e, options) { - var text = ""; - var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-.,_:;+#?=)(/&%$§"; - for( var i=0; i < 16; i++ ) { - text += possible.charAt(Math.floor(Math.random() * possible.length)); - } - var t = Ext.getCmp('sEncryptionPassword'); - var t2 = Ext.getCmp('sEncryptionPasswordCheck'); - var pwdButton = Ext.getCmp('btnPassword'); - t.inputEl.dom.type = t2.inputEl.dom.type = 'text'; - pwdButton.setText( 'Hide Password' ); - t.setValue(text); - }, - - onButtonClick: function(button, e, options) { - var t = Ext.getCmp('sEncryptionPassword'); - var t2 = Ext.getCmp('sEncryptionPasswordCheck'); - var pwdButton = Ext.getCmp('btnPassword'); - t.inputEl.dom.type = t2.inputEl.dom.type = ( t.inputEl.dom.type == 'password' )?'text':'password'; - pwdButton.setText( ( t.inputEl.dom.type == 'password' )?'Show Password':'Hide Password' ); - }, - - onTAddLocationClick: function(tool, e, options) { - Ext.create('Duplicati.view.wndAddLocation').show(); - }, - - onTAddFilterClick: function(tool, e, options) { - Ext.create('Duplicati.view.wndAddFilter').show(); - }, - - onBtnBuildURLClick: function(button, e, options) { - Ext.create('Duplicati.view.wndCreateConnection').show(); - }, - - onTAddOverrideClick: function(tool, e, options) { - Ext.create('Duplicati.view.wndAddOverride').show(); - }, - - onBtnNextClick: function(button, e, options) { - if( Ext.getCmp('btnNext').getText() == 'Finish' ) { - // Save all the stuff and Finish work - // Checks need to happen here, if everything is filled in proper - alert( "DONE!!"); - button.findParentByType('window').destroy(); - } else { - var wizardTabs = Ext.getCmp('panelWizard'); - wizardTabs.setActiveTab( wizardTabs.getActiveTab().activeItem + 1 ); - } - }, - - onAddLocationsClick: function(button, e, options) { - var records = Ext.getCmp('treeLocation').getChecked(); - Ext.getCmp('Locations').getStore().removeAll(); - - Ext.Array.each(records, function(rec){ - Ext.getCmp('Locations').getStore().add( - new Duplicati.model.TaskItems.BackupLocation ( { - Location: rec.get('id'), - TotalSize:0 - } - ) - ); - }); - - Ext.getCmp("winAddLocation").destroy(); - }, - - onBtnCloseClick: function(button, e, options) { - button.findParentByType('window').destroy(); - }, - - afterWindowLayout: function(abstractcontainer, layout, options) { - if (abstractcontainer.scheduleId == null || abstractcontainer.scheduleId < 0) - { - Duplicati.service.getBackupDefaults(function(data) { - var entry = Duplicati.Utility.createRecordFromData('Duplicati.model.BackupJob', data.data); - abstractcontainer.loadRecord(entry); - }); - } - else - { - var backupJobModel = Ext.ModelManager.getModel('Duplicati.model.BackupJob'); - backupJobModel.load(abstractcontainer.scheduleId, { - scope: this, - success : function(backupJobResult, operation) { - abstractcontainer.loadRecord(backupJobResult); - } - }); - } - }, - - onControllerClickStub: function() { - - }, - - onWizardTabChange: function(tabPanel, newCard, oldCard, eOpts) { - if (newCard.activeItem == -1) { - Ext.getCmp('btnNext').setText( 'Finish' ); - } else { - Ext.getCmp('btnNext').setText( 'Next >' ); - } - }, - - afterEncryptionModuleChange: function() { - var combo = Ext.getCmp('EncryptionModule'); - var t = Ext.getCmp('sEncryptionPassword'); - var t2 = Ext.getCmp('sEncryptionPasswordCheck'); - var b = Ext.getCmp('btnPassword'); - var b2 = Ext.getCmp('btnGeneratePassword'); - - if (combo.getValue() == '') { - t.disable(); - t2.disable(); - b.disable(); - b2.disable(); - } else { - t.enable(); - t2.enable(); - b.enable(); - b2.enable(); - } - }, - - init: function() { - this.control({ - "#btnGeneratePassword": { - click: this.onBtnGeneratePasswordClick - }, - "#btnPassword": { - click: this.onButtonClick - }, - "#tAddLocation": { - click: this.onTAddLocationClick - }, - "#tAddFilter": { - click: this.onTAddFilterClick - }, - "#tAddOverride": { - click: this.onTAddOverrideClick - }, - "#btnBuildURL": { - click: this.onBtnBuildURLClick - }, - "#btnNext": { - click: this.onBtnNextClick - }, - "#btnAddLocations": { - click: this.onAddLocationsClick - }, - "#btnClose": { - click: this.onBtnCloseClick - }, - "backupconfigpanel": { - afterlayout: this.afterWindowLayout - }, - "#EncryptionModule": { - change: this.afterEncryptionModuleChange - }, - "#panelWizard": { - tabchange: this.onWizardTabChange - } - }); - } - -}); diff --git a/Duplicati/Server/webroot/Duplicati/controller/Schedules.js b/Duplicati/Server/webroot/Duplicati/controller/Schedules.js deleted file mode 100644 index 0acea3cda..000000000 --- a/Duplicati/Server/webroot/Duplicati/controller/Schedules.js +++ /dev/null @@ -1,36 +0,0 @@ -Ext.define('Duplicati.controller.Schedules', { - extend: 'Ext.app.Controller', - stores: [ 'Schedules' ], - views: [ 'schedule.List' ], - - refs: [{ - selector: 'viewport > panel', - ref: 'basicPanel' - }], - - lastEventID: -1, - - init: function() { - this.control({ - 'viewport > panel': { - render: this.onPanelRendered - } - }); - - this.application.on({ - 'current-state-updated': function(data) { - - //Update the data store if there is new metadata - if (data.LastEventID != this.lastEventID) - this.getSchedulesStore().load(); - - this.lastEventID = data.LastEventID; - }, - scope: this - }); - }, - - onPanelRendered: function() { - //console.log('The panel was rendered'); - } -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/controller/StatuswindowFooter.js b/Duplicati/Server/webroot/Duplicati/controller/StatuswindowFooter.js deleted file mode 100644 index 681a63488..000000000 --- a/Duplicati/Server/webroot/Duplicati/controller/StatuswindowFooter.js +++ /dev/null @@ -1,16 +0,0 @@ -Ext.define('Duplicati.controller.StatuswindowFooter', { - extend: 'Ext.app.Controller', - views: [ 'StatuswindowFooter' ], - - init: function() { - this.control({ - 'viewport > panel': { - render: this.onPanelRendered - } - }); - }, - - onPanelRendered: function() { - //console.log('The footer panel was rendered'); - } -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/controller/StatuswindowHeader.js b/Duplicati/Server/webroot/Duplicati/controller/StatuswindowHeader.js deleted file mode 100644 index d837a063f..000000000 --- a/Duplicati/Server/webroot/Duplicati/controller/StatuswindowHeader.js +++ /dev/null @@ -1,60 +0,0 @@ -Ext.define('Duplicati.controller.StatuswindowHeader', { - extend: 'Ext.app.Controller', - views: [ 'StatuswindowHeader' ], - - refs: [{ - selector: '#status-window-header-pause-button', - ref: 'pauseButton' - }, { - selector: '#status-window-header-pause-menu', - ref: 'pauseMenu' - }], - - init: function() { - this.application.on({ - 'current-state-updated': function() { - var btn = this.getPauseButton(); - var mnu = this.getPauseMenu(); - var srv = this.application.service; - var util = Duplicati.Utility; - - if (srv.isPaused()) { - if (srv.getExpectedPauseEnd() != null) - btn.setText('Resume (' + util.formatSecondsAsTime((srv.getExpectedPauseEnd().getTime() - new Date().getTime()) / 1000) + ')'); - else - btn.setText('Resume'); - btn.setIconCls('backups-paused'); - mnu.setText('Resume Duplicati'); - } else { - btn.setText('Pause'); - btn.setIconCls('backups-running'); - mnu.setText('Pause Duplicati'); - } - }, - scope: this - }); - - this.application.on({ - 'count-down-pause-timer': function(data) { - var btn = this.getPauseButton(); - var srv = this.application.service; - var util = Duplicati.Utility; - if (data <= 0) - btn.setText('Pause'); - else - btn.setText('Resume (' + util.formatSecondsAsTime(data) + ')'); - }, - scope: this - }); - - this.control({ - 'viewport > panel': { - render: this.onPanelRendered - } - }); - }, - - onPanelRendered: function() { - //console.log('The header panel was rendered'); - } -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/model/BackupJob.js b/Duplicati/Server/webroot/Duplicati/model/BackupJob.js deleted file mode 100644 index 7c8c802eb..000000000 --- a/Duplicati/Server/webroot/Duplicati/model/BackupJob.js +++ /dev/null @@ -1,35 +0,0 @@ -Ext.define('Duplicati.model.BackupJob', { - extend: 'Ext.data.Model', - uses: [ - 'Duplicati.model.Task', - 'Duplicati.model.Schedule' - ], - - proxy: { - type: 'ajax', - url: '/control.cgi?action=get-schedule-details', - reader: { - type: 'json', - idProperty: 'ID', - root: 'data' - } - }, - - associations: [{ - name: 'task', - type: 'hasOne', - associationKey: 'Task', - primaryKey: 'ID', - getterName: 'getTask', - setterName: 'setTask', - model: 'Duplicati.model.Task' - },{ - name: 'schedule', - type: 'hasOne', - associationKey: 'Schedule', - primaryKey: 'ID', - getterName: 'getSchedule', - setterName: 'setSchedule', - model: 'Duplicati.model.Schedule' - }] -}); diff --git a/Duplicati/Server/webroot/Duplicati/model/Schedule.js b/Duplicati/Server/webroot/Duplicati/model/Schedule.js deleted file mode 100644 index bf7e040d4..000000000 --- a/Duplicati/Server/webroot/Duplicati/model/Schedule.js +++ /dev/null @@ -1,41 +0,0 @@ -Ext.define('Duplicati.model.Schedule', { - extend: 'Ext.data.Model', - - associations: [{ - name: 'task', - type: 'hasOne', - model: 'Duplicati.model.Task', - primaryKey: 'ID', - foreignKey: 'ScheduleID' - }], - - fields: [ - { - name: 'NextScheduledTime' - }, - { - name: 'AllowedWeekdays' - }, - { - name: 'ID' - }, - { - name: 'Name' - }, - { - name: 'Path' - }, - { - name: 'When' - }, - { - name: 'Repeat' - }, - { - name: 'Weekdays' - }, - { - name: 'Metadata' - } - ] -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/model/ScheduleItems/Metadata.js b/Duplicati/Server/webroot/Duplicati/model/ScheduleItems/Metadata.js deleted file mode 100644 index 56b2a0639..000000000 --- a/Duplicati/Server/webroot/Duplicati/model/ScheduleItems/Metadata.js +++ /dev/null @@ -1,73 +0,0 @@ -Ext.define('Duplicati.model.ScheduleItems.Metadata', { - extend: 'Ext.data.Model', - - fields: [ - { - name: 'total_size', - mapping: 'total-size' - }, - { - name: 'full_backup_count' - }, - { - name: 'total_volume_count' - }, - { - name: 'total_file_count' - }, - { - name: 'longest_chain_length' - }, - { - name: 'current_chain_length' - }, - { - name: 'current_full_date' - }, - { - name: 'current_chain_size' - }, - { - name: 'last_backup_date' - }, - { - name: 'last_backup_size' - }, - { - name: 'total_backup_size' - }, - { - name: 'total_quota_space' - }, - { - name: 'free_quota_space' - }, - { - name: 'source_file_size' - }, - { - name: 'source_file_count' - }, - { - name: 'source_folder_count' - }, - { - name: 'orphan_file_count' - }, - { - name: 'orphan_file_size' - }, - { - name: 'alien_file_count' - }, - { - name: 'alien_file_size' - }, - { - name: 'total_backup_sets' - }, - { - name: 'last_backup_completed_time' - } - ] -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/model/Task.js b/Duplicati/Server/webroot/Duplicati/model/Task.js deleted file mode 100644 index 4290e50cc..000000000 --- a/Duplicati/Server/webroot/Duplicati/model/Task.js +++ /dev/null @@ -1,88 +0,0 @@ -Ext.define('Duplicati.model.Task', { - extend: 'Ext.data.Model', - uses: [ - 'Duplicati.model.TaskItems.BackendSettings', - 'Duplicati.model.TaskItems.Extensions', - 'Duplicati.model.TaskItems.Overrides', - 'Duplicati.model.TaskItems.EncryptionSettings', - 'Duplicati.model.TaskItems.CompressionSettings' - ], - - associations: [{ - name: 'backendSettings', - associationKey: 'BackendSettings', - type: 'hasOne', - model: 'Duplicati.model.TaskItems.BackendSettings', - getterName: 'getBackendSettings', - setterName: 'setBackendSettings' - },{ - name: 'extensions', - associationKey: 'Extensions', - type: 'hasOne', - model: 'Duplicati.model.TaskItems.Extensions', - getterName: 'getExtensions', - setterName: 'setExtensions' - },{ - name: 'overrides', - associationKey: 'Overrides', - type: 'hasOne', - model: 'Duplicati.model.TaskItems.Overrides', - getterName: 'getOverrides', - setterName: 'setOverrides' - },{ - name: 'encryptionSettings', - associationKey: 'EncryptionSettings', - type: 'hasOne', - model: 'Duplicati.model.TaskItems.EncryptionSettings', - getterName: 'getEncryptionSettings', - setterName: 'setEncryptionSettings' - },{ - name: 'compressionSettings', - associationKey: 'CompressionSettings', - type: 'hasOne', - model: 'Duplicati.model.TaskItems.CompressionSettings', - getterName: 'getCompressionSettings', - setterName: 'setCompressionSettings' - }], - - - fields: [ - { - name: 'Filter' - }, - { - name: 'ID' - }, - { - name: 'Service' - }, - { - name: 'Encryptionkey' - }, - { - name: 'SourcePath' - }, - { - name: 'ScheduleID' - }, - { - name: 'KeepFull' - }, - { - name: 'KeepTime' - }, - { - name: 'FullAfter' - }, - { - name: 'IncludeSetup', - type: 'boolean' - }, - { - name: 'EncryptionModule' - }, - { - name: 'CompressionModule' - } - ] -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/model/TaskItems/BackendSettings.js b/Duplicati/Server/webroot/Duplicati/model/TaskItems/BackendSettings.js deleted file mode 100644 index 6d03863b2..000000000 --- a/Duplicati/Server/webroot/Duplicati/model/TaskItems/BackendSettings.js +++ /dev/null @@ -1,18 +0,0 @@ -Ext.define('Duplicati.model.TaskItems.BackendSettings', { - extend: 'Ext.data.Model', - - fields: [ - { - name: 'UI_Checked_empty' - }, - { - name: 'Destination' - }, - { - name: 'Username' - }, - { - name: 'Password' - } - ] -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/model/TaskItems/BackupLocation.js b/Duplicati/Server/webroot/Duplicati/model/TaskItems/BackupLocation.js deleted file mode 100644 index 6f6377406..000000000 --- a/Duplicati/Server/webroot/Duplicati/model/TaskItems/BackupLocation.js +++ /dev/null @@ -1,14 +0,0 @@ -Ext.define('Duplicati.model.TaskItems.BackupLocation', { - extend: 'Ext.data.Model', - - fields: [ - { - name: 'Location', - type: 'string' - }, - { - name: 'TotalSize', - type: 'float' - } - ] -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/model/TaskItems/CompressionSettings.js b/Duplicati/Server/webroot/Duplicati/model/TaskItems/CompressionSettings.js deleted file mode 100644 index 343ffdc6c..000000000 --- a/Duplicati/Server/webroot/Duplicati/model/TaskItems/CompressionSettings.js +++ /dev/null @@ -1,3 +0,0 @@ -Ext.define('Duplicati.model.TaskItems.CompressionSettings', { - extend: 'Ext.data.Model' -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/model/TaskItems/EncryptionSettings.js b/Duplicati/Server/webroot/Duplicati/model/TaskItems/EncryptionSettings.js deleted file mode 100644 index f029f928b..000000000 --- a/Duplicati/Server/webroot/Duplicati/model/TaskItems/EncryptionSettings.js +++ /dev/null @@ -1,3 +0,0 @@ -Ext.define('Duplicati.model.TaskItems.EncryptionSettings', { - extend: 'Ext.data.Model' -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/model/TaskItems/Extensions.js b/Duplicati/Server/webroot/Duplicati/model/TaskItems/Extensions.js deleted file mode 100644 index 897c8b5ac..000000000 --- a/Duplicati/Server/webroot/Duplicati/model/TaskItems/Extensions.js +++ /dev/null @@ -1,120 +0,0 @@ -Ext.define('Duplicati.model.TaskItems.Extensions', { - extend: 'Ext.data.Model', - - fields: [ - { - name: 'UploadBandwidth', - mapping: "Upload Bandwidth" - }, - { - name: 'DownloadBandwidth', - mapping: 'Download Bandwidth' - }, - { - name: 'MaxUploadSize', - mapping: 'Max Upload Size' - }, - { - name: 'VolumeSize', - mapping: 'Volume Size' - }, - { - name: 'ThreadPriority', - mapping: 'Thread Priority' - }, - { - name: 'AsyncTransfer', - mapping: 'Async Transfer', - type: 'boolean', - convert: parseBool - }, - { - name: 'IgnoreTimestamps', - mapping: 'Ignore Timestamps', - type: 'boolean', - convert: parseBool - }, - { - name: 'FileSizeLimit', - mapping: 'File Size Limit' - }, - { - name: 'DisableAESfallbackencryption', - mapping: 'Disable AES fallback encryption', - type: 'boolean', - convert: parseBool - }, - { - name: 'SelectFilesVersion', - mapping: 'Select Files - Version', - type: 'int', - convert: parseInt - }, - { - name: 'SelectFilesUseSimpleMode', - mapping: 'Select Files - Use Simple Mode', - type: 'boolean', - convert: parseBool - }, - { - name: 'SelectFilesIncludeDocuments', - mapping: 'Select Files - Include Documents', - type: 'boolean', - convert: parseBool - }, - { - name: 'SelectFilesIncludeDesktop', - mapping: 'Select Files - Include Desktop', - type: 'boolean', - convert: parseBool - }, - { - name: 'SelectFilesIncludeMusic', - mapping: 'Select Files - Include Music', - type: 'boolean', - convert: parseBool - }, - { - name: 'SelectFilesIncludeImages', - mapping: 'Select Files - Include Images', - type: 'boolean', - convert: parseBool - }, - { - name: 'SelectFilesIncludeAppData', - mapping: 'Select Files - Include AppData', - type: 'boolean', - convert: parseBool - }, - { - name: 'SelectWhenWarnedNoSchedule', - mapping: 'Select When - Warned No Schedule', - type: 'boolean', - convert: parseBool - }, - { - name: 'SelectWhenWarnedTooManyIncrementals', - mapping: 'Select When - Warned Too Many Incrementals', - type: 'boolean', - convert: parseBool - }, - { - name: 'SelectWhenWarnedNoIncrementals', - mapping: 'Select When - Warned No Incrementals', - type: 'boolean', - convert: parseBool - }, - { - name: 'PasswordSettingsWarnedNoPassword', - mapping: 'Password Settings - Warned No Password', - type: 'boolean', - convert: parseBool - }, - { - name: 'CleanupSettingsWarnedNoCleanup', - mapping: 'Cleanup Settings - Warned No Cleanup', - type: 'boolean', - convert: parseBool - } - ] -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/model/TaskItems/Overrides.js b/Duplicati/Server/webroot/Duplicati/model/TaskItems/Overrides.js deleted file mode 100644 index f4bfa1be2..000000000 --- a/Duplicati/Server/webroot/Duplicati/model/TaskItems/Overrides.js +++ /dev/null @@ -1,3 +0,0 @@ -Ext.define('Duplicati.model.TaskItems.Overrides', { - extend: 'Ext.data.Model' -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/model/override/BackupJob.js b/Duplicati/Server/webroot/Duplicati/model/override/BackupJob.js deleted file mode 100644 index 2e83f86ae..000000000 --- a/Duplicati/Server/webroot/Duplicati/model/override/BackupJob.js +++ /dev/null @@ -1,38 +0,0 @@ -Ext.define('Duplicati.model.override.BackupJob', { - requires: 'Duplicati.model.BackupJob' -}, function() { - Ext.override(Duplicati.model.BackupJob, { - - setValues: function(values, arrayField) { - var me = this; - - function setVal(fieldId, val) { - if (arrayField) { - fieldId = arrayField + '.' + fieldId; - } - var field = me.findField(fieldId); - if (field) { - field.setValue(val); - if (me.trackResetOnLoad) { - field.resetOriginalValue(); - } - } else if(Ext.isObject(val)) { - me.setValues(val, fieldId); - } - } - - alert( "Servus setValues" ); - - if (Ext.isArray(values)) { - // array of objects - Ext.each(values, function(val) { - setVal(val.id, val.value); - }); - } else { - // object hash - Ext.iterate(values, setVal); - } - return this; - } - }); -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/store/AdditionalPathStore.js b/Duplicati/Server/webroot/Duplicati/store/AdditionalPathStore.js deleted file mode 100644 index 071c4c5df..000000000 --- a/Duplicati/Server/webroot/Duplicati/store/AdditionalPathStore.js +++ /dev/null @@ -1,23 +0,0 @@ -Ext.define('Duplicati.store.AdditionalPathStore', { - extend: 'Ext.data.Store', - requires: [ - 'Duplicati.model.TaskItems.BackupLocation' - ], - - constructor: function(cfg) { - var me = this; - cfg = cfg || {}; - me.callParent([Ext.apply({ - autoLoad: true, - storeId: 'pathStore', - model: 'Duplicati.model.TaskItems.BackupLocation', - proxy: { - type: 'memory', - reader: { - type: 'json', - root: 'root' - } - } - }, cfg)]); - } -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/store/BackupJob.js b/Duplicati/Server/webroot/Duplicati/store/BackupJob.js deleted file mode 100644 index 5f25dab9b..000000000 --- a/Duplicati/Server/webroot/Duplicati/store/BackupJob.js +++ /dev/null @@ -1,24 +0,0 @@ -Ext.define('Duplicati.store.BackupJob', { - extend: 'Ext.data.Store', - requires: [ - 'Duplicati.model.BackupJob' - ], - - constructor: function(cfg) { - var me = this; - cfg = cfg || {}; - me.callParent([Ext.apply({ - storeId: 'MyJsonStore', - model: 'Duplicati.model.BackupJob', - proxy: { - type: 'ajax', - url: '/control.cgi?action=get-schedule-details', - reader: { - type: 'json', - idProperty: 'ID', - root: 'data' - } - } - }, cfg)]); - } -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/store/DefaultSizeRangeStore.js b/Duplicati/Server/webroot/Duplicati/store/DefaultSizeRangeStore.js deleted file mode 100644 index b65d7004a..000000000 --- a/Duplicati/Server/webroot/Duplicati/store/DefaultSizeRangeStore.js +++ /dev/null @@ -1,26 +0,0 @@ -Ext.define('Duplicati.store.DefaultSizeRangeStore', { - extend: 'Ext.data.Store', - - constructor: function(cfg) { - var me = this; - cfg = cfg || {}; - me.callParent([Ext.apply({ - storeId: 'DefaultSizeRangeStore', - data: [ - {key: 'b', value: 'bytes'}, - {key: 'kb', value: 'Kilobytes'}, - {key: 'mb', value: 'Megabytes'}, - {key: 'gb', value: 'Gigabytes'}, - {key: 'tb', value: 'Terabyts'} - ], - fields: [ - { - name: 'key' - }, - { - name: 'value' - } - ] - }, cfg)]); - } -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/store/DefaultTimeRangesStore.js b/Duplicati/Server/webroot/Duplicati/store/DefaultTimeRangesStore.js deleted file mode 100644 index 4da9330f0..000000000 --- a/Duplicati/Server/webroot/Duplicati/store/DefaultTimeRangesStore.js +++ /dev/null @@ -1,28 +0,0 @@ -Ext.define('Duplicati.store.DefaultTimeRangesStore', { - extend: 'Ext.data.Store', - - constructor: function(cfg) { - var me = this; - cfg = cfg || {}; - me.callParent([Ext.apply({ - storeId: 'DefaultTimeRangesStore', - data: [ - {key: 's', value: 'Seconds'}, - {key: 'm', value: 'Minutes'}, - {key: 'h', value: 'Hours'}, - {key: 'D', value: 'Days'}, - {key: 'W', value: 'Weeks'}, - {key: 'M', value: 'Months'}, - {key: 'Y', value: 'Years'} - ], - fields: [ - { - name: 'key' - }, - { - name: 'value' - } - ] - }, cfg)]); - } -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/store/DeleteOldChainsWhenStore.js b/Duplicati/Server/webroot/Duplicati/store/DeleteOldChainsWhenStore.js deleted file mode 100644 index 1663ecf64..000000000 --- a/Duplicati/Server/webroot/Duplicati/store/DeleteOldChainsWhenStore.js +++ /dev/null @@ -1,24 +0,0 @@ -Ext.define('Duplicati.store.DeleteOldChainsWhenStore', { - extend: 'Ext.data.Store', - - constructor: function(cfg) { - var me = this; - cfg = cfg || {}; - me.callParent([Ext.apply({ - storeId: 'DeleteOldChainsWhenStore', - data: [ - {key: '0', value: 'When there are more chains than ...'}, - {key: '1', value: 'When the last backup in the chain is older than ...'}, - {key: '2', value: 'Never'} - ], - fields: [ - { - name: 'key' - }, - { - name: 'value' - } - ] - }, cfg)]); - } -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/store/EncryptionMethodStore.js b/Duplicati/Server/webroot/Duplicati/store/EncryptionMethodStore.js deleted file mode 100644 index 6f72407a9..000000000 --- a/Duplicati/Server/webroot/Duplicati/store/EncryptionMethodStore.js +++ /dev/null @@ -1,44 +0,0 @@ -Ext.define('Duplicati.store.EncryptionMethodStore', { - extend: 'Ext.data.Store', - - constructor: function(cfg) { - var me = this; - cfg = cfg || {}; - me.callParent([Ext.apply({ - autoLoad: true, - filterOnLoad: false, - sortOnLoad: false, - storeId: 'EncryptionMethodStore', - - /*listeners: { - load: function(records, success, eOpts) { - alert('WS'); - } - - //TODO: Should we add the empty row here instad? - - },*/ - - fields: [ - { - mapping: 'DisplayName', - name: 'encryptionMethodName', - type: 'string' - }, - { - mapping: 'FilenameExtension', - name: 'encryptionMethodIdentifier', - type: 'string' - } - ], - proxy: { - type: 'ajax', - url: '/control.cgi?action=list-installed-encryption-modules', - reader: { - type: 'array', - idProperty: 'id' - } - } - }, cfg)]); - } -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/store/LabelStore.js b/Duplicati/Server/webroot/Duplicati/store/LabelStore.js deleted file mode 100644 index ae3fc772d..000000000 --- a/Duplicati/Server/webroot/Duplicati/store/LabelStore.js +++ /dev/null @@ -1,21 +0,0 @@ -Ext.define('Duplicati.store.LabelStore', { - extend: 'Ext.data.Store', - - constructor: function(cfg) { - var me = this; - cfg = cfg || {}; - me.callParent([Ext.apply({ - storeId: 'LabelStore', - data: [ - {name: 'private'}, - {name: 'important'}, - {name: 'weekly'} - ], - fields: [ - { - name: 'name' - } - ] - }, cfg)]); - } -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/store/MyComputerTreeStore.js b/Duplicati/Server/webroot/Duplicati/store/MyComputerTreeStore.js deleted file mode 100644 index 0bd4fd38e..000000000 --- a/Duplicati/Server/webroot/Duplicati/store/MyComputerTreeStore.js +++ /dev/null @@ -1,37 +0,0 @@ -Ext.define('Duplicati.store.MyComputerTreeStore', { - extend: 'Ext.data.TreeStore', - - constructor: function(cfg) { - cfg = cfg || {}; - this.callParent([Ext.apply({ - autoLoad: true, - filterOnLoad: false, - sortOnLoad: false, - storeId: 'MyComputerTreeStore', - folderSort: false, - nodeParam: 'path', - root: { - text: 'My Computer', - id: '/', - expanded: false - }, - proxy: { - type: 'ajax', - url: '/control.cgi?action=get-folder-contents&onlyfolders=true', - reader: { - type: 'json', - root: '/' - } - }, - fields: [ - { - mapping: 'check', - name: 'checked' - }, - { - name: 'text' - } - ] - }, cfg)]); - } -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/store/NewBackupChainWhenStore.js b/Duplicati/Server/webroot/Duplicati/store/NewBackupChainWhenStore.js deleted file mode 100644 index c7f92307d..000000000 --- a/Duplicati/Server/webroot/Duplicati/store/NewBackupChainWhenStore.js +++ /dev/null @@ -1,25 +0,0 @@ -Ext.define('Duplicati.store.NewBackupChainWhenStore', { - extend: 'Ext.data.Store', - - constructor: function(cfg) { - var me = this; - cfg = cfg || {}; - me.callParent([Ext.apply({ - storeId: 'NewBackupChainWhenStore', - data: [ - {key: '0', value: 'When there are more backups in the chain than ...'}, - {key: '1', value: 'When the chain is older than ...'}, - {key: '2', value: 'Once, and then backup changes only'}, - {key: '3', value: 'Every time'} - ], - fields: [ - { - name: 'key' - }, - { - name: 'value' - } - ] - }, cfg)]); - } -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/store/Schedules.js b/Duplicati/Server/webroot/Duplicati/store/Schedules.js deleted file mode 100644 index 7b89c2507..000000000 --- a/Duplicati/Server/webroot/Duplicati/store/Schedules.js +++ /dev/null @@ -1,95 +0,0 @@ -Ext.define('Duplicati.store.Schedules', { - extend: 'Ext.data.Store', - model: 'Duplicati.model.Schedule', - autoLoad: true, - - /* Sort order, - * first by queue position - * second by next schedule time, - * third by last backup time - * */ - sorters: [{ - sorterFn: function(a, b) { - var schedulePosA = Duplicati.service.getSchedulePosition(a.get("ID")); - var schedulePosB = Duplicati.service.getSchedulePosition(b.get("ID")); - - if(schedulePosA >= 0 && schedulePosB >= 0) - { - if (schedulePosA == schedulePosB) - return 0; - else - return schedulePosA < schedulePosB ? -1 : 1; - } - else if (schedulePosA >= 0) - return -1; - else if (schedulePosB >= 0) - return 1; - else - return 0; - } - }, { - sorterFn: function(a, b) { - var nextTimeA = Duplicati.Utility.parseJsonDate(a.get('NextScheduledTime')); - var nextTimeB = Duplicati.Utility.parseJsonDate(b.get('NextScheduledTime')); - var now = new Date().getTime(); - - //Scheduled time in past, but not in queue, so it will not run - if (nextTimeA != null && nextTimeA < now) - nextTimeA = null; - if (nextTimeB != null && nextTimeB < now) - nextTimeB = null; - - if (nextTimeA != null && nextTimeB != null) - { - nextTimeA = nextTimeA.getTime(); - nextTimeB = nextTimeB.getTime(); - if (nextTimeA == nextTimeB) - return 0; - else - return nextTimeA < nextTimeB ? -1 : 1; - } - else if (nextTimeA != null) - return -1; - else if (nextTimeB != null) - return 1; - else - return 0; - } - }, { - sorterFn: function(a, b) { - var lastTimeA = Duplicati.Utility.parseJsonDate(a.data.Metadata['last-backup-completed-time']); - var lastTimeB = Duplicati.Utility.parseJsonDate(b.data.Metadata['last-backup-completed-time']); - if (lastTimeA == null) - lastTimeA = Duplicati.Utility.parseJsonDate(a.data.Metadata['last-backup-date']); - if (lastTimeB == null) - lastTimeB = Duplicati.Utility.parseJsonDate(b.data.Metadata['last-backup-date']); - - if ((lastTimeA != null && lastTimeB != null)) - { - lastTimeA = lastTimeA.getTime(); - lastTimeB = lastTimeB.getTime(); - - if (lastTimeA == lastTimeB) - return 0; - else - return lastTimeA > lastTimeB ? -1 : 1; - } - else if (lastTimeA != null) - return -1; - else if (lastTimeB != null) - return 1; - else - return 0; - } - }, { - property: 'Name' - }], - - proxy: { - type: 'ajax', - url: 'control.cgi?action=list-schedules', - reader: { - type: 'json' - } - } -}); \ No newline at end of file diff --git a/Duplicati/Server/webroot/Duplicati/view/AboutWindow.js b/Duplicati/Server/webroot/Duplicati/view/AboutWindow.js deleted file mode 100644 index 68724e4e2..000000000 --- a/Duplicati/Server/webroot/Duplicati/view/AboutWindow.js +++ /dev/null @@ -1,32 +0,0 @@ -Ext.define('Duplicati.view.AboutWindow', { - statics: { - dialogWindow: null, - show: function() { - if (this.dialogWindow == null) - this.dialogWindow = Ext.create('Ext.window.Window', { - title: 'About Duplicati', - height: 200, - width: 400, - modal: true, - resizable: false, - buttonAlign: 'center', - closeAction: 'hide', - layout: 'auto', - items: [{ - xtype: 'label', - text: 'Duplicati 2.0' - }], - buttons: [{ - xtype: 'button', - text: 'OK', - handler: function() { - Duplicati.view.AboutWindow.dialogWindow.hide(); - } - }] - }); - - this.dialogWindow.show(); - } - } -}); - diff --git a/Duplicati/Server/webroot/Duplicati/view/BackupConfig.js b/Duplicati/Server/webroot/Duplicati/view/BackupConfig.js deleted file mode 100644 index ae8fae9e3..000000000 --- a/Duplicati/Server/webroot/Duplicati/view/BackupConfig.js +++ /dev/null @@ -1,927 +0,0 @@ -Ext.define('Duplicati.view.BackupConfig', { - extend: 'Ext.form.Panel', - - xtype: 'backupconfigpanel', - draggable: false, - floating: false, - frame: false, - height: 550, - width: 698, - autoScroll: false, - resizable: false, - layout: { - type: 'absolute' - }, - bodyBorder: false, - closable: false, - collapsed: false, - collapsible: false, - frameHeader: false, - hideCollapseTool: false, - overlapHeader: false, - preventHeader: true, - title: 'Backup Job', - titleCollapse: true, - waitMsgTarget: true, - - initComponent: function(params) { - var me = this; - - me.scheduleId = me.initialConfig.scheduleId; - - me.initialConfig = Ext.apply({ - waitMsgTarget: true - }, me.initialConfig); - - Ext.applyIf(me, { - items: [ - { - xtype: 'tabpanel', - height: 484, - id: 'panelWizard', - activeTab: 0, - plain: true, - layout: { - deferredRender: true, - type: 'card' - }, - items: [ - { - xtype: 'panel', - height: 409, - activeItem: 0, - layout: { - type: 'anchor' - }, - hideCollapseTool: false, - title: 'General', - items: [ - { - xtype: 'fieldset', - margin: 10, - padding: 10, - collapsed: false, - collapsible: false, - title: 'Name & Label', - formBind: false, - items: [ - { - xtype: 'textfield', - id: 'Name', - name: 'Schedule.Name', - fieldLabel: 'Name of Backup', - labelAlign: 'right', - labelWidth: 140, - msgTarget: 'side', - allowBlank: false, - blankText: 'Required: Short Description to identify your Backup', - disableKeyFilter: false, - emptyText: 'Short Description to identify your Backup', - enableKeyEvents: false, - minLength: 6, - anchor: '100%', - formBind: false - }, - { - xtype: 'combobox', - id: 'sLabel', - name: 'Schedule.Path', - fieldLabel: 'Labels/Groups', - labelAlign: 'right', - labelWidth: 140, - msgTarget: 'side', - blankText: 'Required: Select a Label or Create a new one', - emptyText: 'Select a Label or Create a new one', - displayField: 'name', - multiSelect: true, - store: 'LabelStore', - anchor: '100%', - formBind: false, - listeners: { - change: { - fn: me.onSLabelChange, - scope: me - } - } - }, - { - xtype: 'container', - height: 27, - hidden: true, - layout: { - align: 'stretchmax', - pack: 'end', - type: 'hbox' - }, - items: [ - { - xtype: 'button', - text: 'Manage Labels', - flex: 1 - } - ] - } - ] - }, - { - xtype: 'fieldset', - height: 220, - hidden: false, - margin: 10, - padding: 10, - styleHtmlContent: false, - activeItem: 0, - title: 'Security', - formBind: false, - items: [ - { - xtype: 'component', - floating: false, - html: 'It is recommended to encrypt all backups which are stored on remote Servers', - margin: 10, - padding: 10, - tpl: [ - '