admin: add the ability to deep sync from interface
This commit is contained in:
parent
4dba8dc882
commit
6aacce23ca
@ -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.', '<a href="check_import.html">Voir le rapport</a>.', 15000);
|
||||||
|
}, function(response) {
|
||||||
|
$scope.deepSyncInProgress = false;
|
||||||
|
$rootScope.newBox('warning', 'Synchronisation intégrale terminée.', '<a href="check_import.html">Voir le rapport</a>.', 15000);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
.controller("PKIController", function($scope, $rootScope, Certificate, CACertificate, Team, $location, $http) {
|
.controller("PKIController", function($scope, $rootScope, Certificate, CACertificate, Team, $location, $http) {
|
||||||
|
@ -119,6 +119,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
<div class="text-right">
|
||||||
|
<button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-save" aria-hidden="true"></span> Propager ces paramètres</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
@ -126,9 +130,10 @@
|
|||||||
<div class="col-sm-10">{{ configro.sync }}</div>
|
<div class="col-sm-10">{{ configro.sync }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-right">
|
<div class="text-left" ng-if="configro.sync">
|
||||||
<button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-save" aria-hidden="true"></span> Propager ces paramètres</button>
|
<button type="button" class="btn btn-secondary" ng-click="deepSync()" ng-disabled="deepSyncInProgress"><span class="glyphicon glyphicon-import" aria-hidden="true"></span> Synchronisation intégrale</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user