admin: View out of sync repositories
This commit is contained in:
parent
9a34e393f3
commit
08107931ea
@ -105,7 +105,7 @@ const indextpl = `<!DOCTYPE html>
|
|||||||
<span class="badge badge-{{ "{{ priorities[myClaimsMaxLevel] }}" }}" ng-show="myClaims">{{ "{{ myClaims }}" }}</span>
|
<span class="badge badge-{{ "{{ priorities[myClaimsMaxLevel] }}" }}" ng-show="myClaims">{{ "{{ myClaims }}" }}</span>
|
||||||
<span class="badge badge-{{ "{{ priorities[newClaimsMaxLevel] }}" }}" ng-show="newClaims">{{ "{{ newClaims }}" }}</span>
|
<span class="badge badge-{{ "{{ priorities[newClaimsMaxLevel] }}" }}" ng-show="newClaims">{{ "{{ newClaims }}" }}</span>
|
||||||
</a></li>
|
</a></li>
|
||||||
<li class="nav-item" ng-class="{'active': $location.path().startsWith('/sync')}">
|
<li class="nav-item" ng-class="{'active': $location.path().startsWith('/sync') || $location.path().startsWith('/repositories')}">
|
||||||
<a class="nav-link" href="sync" ng-show="settings.wip">
|
<a class="nav-link" href="sync" ng-show="settings.wip">
|
||||||
Synchronisation
|
Synchronisation
|
||||||
</a>
|
</a>
|
||||||
|
@ -728,6 +728,30 @@ angular.module("FICApp")
|
|||||||
$scope.repositories = response.data.repositories;
|
$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: `<span class="badge {{ $ctrl.color }}">{{ $ctrl.status.hash }}</span> <small>{{ $ctrl.status.text }}</small>`
|
||||||
|
})
|
||||||
|
|
||||||
.controller("SyncController", function($scope, $rootScope, ROSettings, $location, $http, $interval) {
|
.controller("SyncController", function($scope, $rootScope, ROSettings, $location, $http, $interval) {
|
||||||
$scope.displayDangerousActions = false;
|
$scope.displayDangerousActions = false;
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<td>{{ repository.path }}</td>
|
<td>{{ repository.path }}</td>
|
||||||
<td>{{ repository.branch }}</td>
|
<td>{{ repository.branch }}</td>
|
||||||
<td>{{ repository.hash }}</td>
|
<td>{{ repository.hash }}</td>
|
||||||
<td></td>
|
<td><repository-uptodate repository="repository" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
<div class="badge badge-success align-self-center" ng-if="syncReport" title="{{ syncReport._updated[syncReport._updated.length-1] }}">
|
<div class="badge badge-success align-self-center" ng-if="syncReport" title="{{ syncReport._updated[syncReport._updated.length-1] }}">
|
||||||
Dernier import : {{ syncReport._updated[syncReport._updated.length-1] | date:"medium" }}
|
Dernier import : {{ syncReport._updated[syncReport._updated.length-1] | date:"medium" }}
|
||||||
</div>
|
</div>
|
||||||
|
<a ng-if="configro['sync-type'] === 'GitImporter'" href="repositories" class="btn btn-secondary">
|
||||||
|
Voir les dépôts
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="progress" style="height: 5px; border-radius: 0;">
|
<div class="progress" style="height: 5px; border-radius: 0;">
|
||||||
<div class="progress-bar bg-primary progress-bar-striped" ng-class="{'progress-bar-animated': syncPercent && syncPercent < 100}" role="progressbar" style="width: {{ syncPercent }}%"></div>
|
<div class="progress-bar bg-primary progress-bar-striped" ng-class="{'progress-bar-animated': syncPercent && syncPercent < 100}" role="progressbar" style="width: {{ syncPercent }}%"></div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user