admin: Can delete a repository directory if needed
This commit is contained in:
parent
7692f92aa4
commit
c1924c0e92
5 changed files with 48 additions and 4 deletions
|
@ -755,6 +755,12 @@ angular.module("FICApp")
|
|||
$http.get("api/repositories").then(function (response) {
|
||||
$scope.repositories = response.data.repositories;
|
||||
});
|
||||
|
||||
$scope.deleteRepository = function(repo) {
|
||||
$http.delete("api/repositories/" + repo.path).then(function (response) {
|
||||
$scope.repositories[$scope.repositories.indexOf(repo)].hash = "- DELETED -";
|
||||
});
|
||||
};
|
||||
})
|
||||
.component('repositoryUptodate', {
|
||||
bindings: {
|
||||
|
|
|
@ -9,16 +9,20 @@
|
|||
<tr>
|
||||
<th>Chemin</th>
|
||||
<th>Branche</th>
|
||||
<th>Commit</th>
|
||||
<th>Plus récent</th>
|
||||
<th>Commit <span class="text-muted">Plus récent</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="repository in repositories">
|
||||
<td>{{ repository.path }}</td>
|
||||
<td>{{ repository.branch }}</td>
|
||||
<td>{{ repository.hash }}</td>
|
||||
<td><repository-uptodate repository="repository" /></td>
|
||||
<td>
|
||||
{{ repository.hash }}<br>
|
||||
<repository-uptodate repository="repository" />
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" ng-click="deleteRepository(repository)" class="btn btn-sm btn-danger"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Reference in a new issue