admin: New routes to expose git repositories status
This commit is contained in:
parent
598b34eb4f
commit
b08039c997
8 changed files with 265 additions and 0 deletions
|
|
@ -13,6 +13,10 @@ angular.module("FICApp", ["ngRoute", "ngResource", "ngSanitize"])
|
|||
controller: "ExerciceController",
|
||||
templateUrl: "views/exercice.html"
|
||||
})
|
||||
.when("/repositories", {
|
||||
controller: "RepositoriesController",
|
||||
templateUrl: "views/repositories.html"
|
||||
})
|
||||
.when("/sync", {
|
||||
controller: "SyncController",
|
||||
templateUrl: "views/sync.html"
|
||||
|
|
@ -719,6 +723,12 @@ angular.module("FICApp")
|
|||
};
|
||||
})
|
||||
|
||||
.controller("RepositoriesController", function($scope, $http) {
|
||||
$http.get("api/repositories").then(function(response) {
|
||||
$scope.repositories = response.data.repositories;
|
||||
});
|
||||
})
|
||||
|
||||
.controller("SyncController", function($scope, $rootScope, ROSettings, $location, $http, $interval) {
|
||||
$scope.displayDangerousActions = false;
|
||||
$scope.configro = ROSettings.get();
|
||||
|
|
|
|||
25
admin/static/views/repositories.html
Normal file
25
admin/static/views/repositories.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<div class="card mt-3 mb-5">
|
||||
<div class="card-header bg-secondary text-light">
|
||||
<h3 class="mb-0">
|
||||
Repositories
|
||||
</h3>
|
||||
</div>
|
||||
<table class="table table-hover table-striped mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Chemin</th>
|
||||
<th>Branche</th>
|
||||
<th>Commit</th>
|
||||
<th>Plus récent</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="repository in repositories">
|
||||
<td>{{ repository.path }}</td>
|
||||
<td>{{ repository.branch }}</td>
|
||||
<td>{{ repository.hash }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
Reference in a new issue