From 6aacce23ca4c6c4e85305556d65af67c0b1975f0 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Wed, 5 Dec 2018 06:21:32 +0100 Subject: [PATCH] admin: add the ability to deep sync from interface --- admin/static/js/app.js | 14 ++++++++++++++ admin/static/views/settings.html | 9 +++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/admin/static/js/app.js b/admin/static/js/app.js index 00fbace8..d46d1cb0 100644 --- a/admin/static/js/app.js +++ b/admin/static/js/app.js @@ -453,6 +453,20 @@ angular.module("FICApp") }); } }; + $scope.deepSyncInProgress = false; + $scope.deepSync = function(type) { + $rootScope.newYesNoBox('warning', 'Faire une synchronisation intégrale ?', '', + function() { + $scope.deepSyncInProgress = true; + $http.post("/api/sync/deep").then(function() { + $scope.deepSyncInProgress = false; + $rootScope.newBox('success', 'Synchronisation intégrale terminée.', 'Voir le rapport.', 15000); + }, function(response) { + $scope.deepSyncInProgress = false; + $rootScope.newBox('warning', 'Synchronisation intégrale terminée.', 'Voir le rapport.', 15000); + }); + }); + }; }) .controller("PKIController", function($scope, $rootScope, Certificate, CACertificate, Team, $location, $http) { diff --git a/admin/static/views/settings.html b/admin/static/views/settings.html index 3a2d1f2c..679a0ee1 100644 --- a/admin/static/views/settings.html +++ b/admin/static/views/settings.html @@ -119,6 +119,10 @@ +
+ +
+
@@ -126,9 +130,10 @@
{{ configro.sync }}
-
- +
+
+