PDF rausgenommen

This commit is contained in:
aschwarz
2023-01-23 11:03:31 +01:00
parent 82d562a322
commit a6523903eb
28078 changed files with 4247552 additions and 2 deletions

View File

@ -0,0 +1,65 @@
/*!
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
(function () {
angular.module('piwikApp').controller('ScheduleReportDeletionController', ScheduleReportDeletionController);
ScheduleReportDeletionController.$inject = ['reportDeletionModel', 'piwikApi', '$timeout'];
function ScheduleReportDeletionController(reportDeletionModel, piwikApi, $timeout) {
var self = this;
this.isLoading = false;
this.dataWasPurged = false;
this.showPurgeNowLink = true;
this.model = reportDeletionModel;
this.save = function () {
var method = 'PrivacyManager.setScheduleReportDeletionSettings';
self.model.savePurageDataSettings(this, method, {
deleteLowestInterval: this.deleteLowestInterval
});
};
this.executeDataPurgeNow = function () {
if (reportDeletionModel.isModified) {
piwikHelper.modalConfirm('#saveSettingsBeforePurge', {yes: function () {}});
return;
}
// ask user if they really want to delete their old data
piwikHelper.modalConfirm('#confirmPurgeNow', {
yes: function () {
self.loadingDataPurge = true;
self.showPurgeNowLink = false;
// execute a data purge
piwikApi.withTokenInUrl();
var ajaxRequest = piwikApi.fetch({
module: 'PrivacyManager',
action: 'executeDataPurge',
format: 'html'
}).then(function () {
self.loadingDataPurge = false;
// force reload
reportDeletionModel.reloadDbStats();
self.dataWasPurged = true;
$timeout(function () {
self.dataWasPurged = false;
self.showPurgeNowLink = true;
}, 2000);
}, function () {
self.loadingDataPurge = false;
});
}
});
};
}
})();