diff --git a/admin/index.go b/admin/index.go
index 46c13c15..705dd0d3 100644
--- a/admin/index.go
+++ b/admin/index.go
@@ -105,7 +105,7 @@ const indextpl = `
{{ "{{ myClaims }}" }}
{{ "{{ newClaims }}" }}
-
+
Synchronisation
diff --git a/admin/static/js/app.js b/admin/static/js/app.js
index eec966e5..e02d53d2 100644
--- a/admin/static/js/app.js
+++ b/admin/static/js/app.js
@@ -728,6 +728,30 @@ angular.module("FICApp")
$scope.repositories = response.data.repositories;
});
})
+ .component('repositoryUptodate', {
+ bindings: {
+ repository: '<',
+ },
+ controller: function($http) {
+ var ctrl = this;
+
+ ctrl.status = {};
+ ctrl.color = "badge-secondary";
+
+ ctrl.$onInit = function() {
+ $http.post("api/repositories/" + ctrl.repository.path).then(function(response) {
+ ctrl.status = response.data;
+
+ if (ctrl.repository.hash.startsWith(ctrl.status.hash)) {
+ ctrl.color = "badge-success";
+ } else {
+ ctrl.color = "badge-danger";
+ }
+ });
+ };
+ },
+ template: `{{ $ctrl.status.hash }} {{ $ctrl.status.text }}`
+ })
.controller("SyncController", function($scope, $rootScope, ROSettings, $location, $http, $interval) {
$scope.displayDangerousActions = false;
diff --git a/admin/static/views/repositories.html b/admin/static/views/repositories.html
index 18051923..3946b181 100644
--- a/admin/static/views/repositories.html
+++ b/admin/static/views/repositories.html
@@ -18,7 +18,7 @@
{{ repository.path }} |
{{ repository.branch }} |
{{ repository.hash }} |
- |
+ |
diff --git a/admin/static/views/sync.html b/admin/static/views/sync.html
index d777c395..b3361870 100644
--- a/admin/static/views/sync.html
+++ b/admin/static/views/sync.html
@@ -22,6 +22,9 @@
Dernier import : {{ syncReport._updated[syncReport._updated.length-1] | date:"medium" }}
+
+ Voir les dépôts
+