admin: Add a route and a button to sync the filesystem
This commit is contained in:
parent
a06602a7e8
commit
038abe450d
4 changed files with 27 additions and 6 deletions
|
@ -610,10 +610,10 @@ angular.module("FICApp")
|
|||
$scope.deepSyncInProgress = true;
|
||||
$http.post(url).then(function() {
|
||||
$scope.deepSyncInProgress = false;
|
||||
$scope.addToast('success', 'Synchronisation intégrale terminée.', '<a href="check_import.html">Voir le rapport</a>.', 15000);
|
||||
$scope.addToast('success', 'Synchronisation intégrale terminée.', '<a href="check_import.html" target="_self">Voir le rapport</a>.', 15000);
|
||||
}, function(response) {
|
||||
$scope.deepSyncInProgress = false;
|
||||
$scope.addToast('warning', 'Synchronisation intégrale terminée.', '<a href="check_import.html">Voir le rapport</a>.', 15000);
|
||||
$scope.addToast('warning', 'Synchronisation intégrale terminée.', '<a href="check_import.html" target="_self">Voir le rapport</a>.', 15000);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
@ -623,10 +623,23 @@ angular.module("FICApp")
|
|||
$scope.deepSyncInProgress = true;
|
||||
$http.post("api/sync/speed").then(function() {
|
||||
$scope.deepSyncInProgress = false;
|
||||
$scope.addToast('success', 'Synchronisation profonde rapide terminée.', '<a href="check_import.html">Voir le rapport</a>.', 15000);
|
||||
$scope.addToast('success', 'Synchronisation profonde rapide terminée.', '<a href="check_import.html" target="_self">Voir le rapport</a>.', 15000);
|
||||
}, function(response) {
|
||||
$scope.deepSyncInProgress = false;
|
||||
$scope.addToast('warning', 'Synchronisation profinde rapide terminée.', '<a href="check_import.html">Voir le rapport</a>.', 15000);
|
||||
$scope.addToast('warning', 'Synchronisation profinde rapide terminée.', '<a href="check_import.html" target="_self">Voir le rapport</a>.', 15000);
|
||||
});
|
||||
});
|
||||
};
|
||||
$scope.baseSync = function() {
|
||||
$scope.addToast('warning', 'Tirer les mises à jour du dépôt ?', '',
|
||||
function() {
|
||||
$scope.deepSyncInProgress = true;
|
||||
$http.post("api/sync/base").then(function() {
|
||||
$scope.deepSyncInProgress = false;
|
||||
$scope.addToast('success', 'Mise à jour terminée.');
|
||||
}, function(response) {
|
||||
$scope.deepSyncInProgress = false;
|
||||
$scope.addToast('danger', 'Mise à jour terminée.', response.data.errmsg);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
Reference in a new issue