mirror of https://github.com/portainer/portainer
Add changes to container display
parent
6853a9cefa
commit
353751ea4e
|
@ -96,11 +96,20 @@ var ContainerController = (function (_super) {
|
|||
$scope.remove = function () {
|
||||
return _this.remove($scope, $routeParams, Container);
|
||||
};
|
||||
$scope.changes = [];
|
||||
$scope.getChanges = function () {
|
||||
Container.changes({
|
||||
id: $routeParams.id
|
||||
}, function (d) {
|
||||
$scope.changes = d;
|
||||
});
|
||||
};
|
||||
Container.get({
|
||||
id: $routeParams.id
|
||||
}, function (d) {
|
||||
$scope.container = d;
|
||||
});
|
||||
$scope.getChanges();
|
||||
}
|
||||
return ContainerController;
|
||||
})(ContainerControllerBase);
|
||||
|
|
|
@ -87,10 +87,19 @@ class ContainerController extends ContainerControllerBase {
|
|||
$scope.start = () => this.start($scope, $routeParams, Container);
|
||||
$scope.stop = () => this.stop($scope, $routeParams, Container);
|
||||
$scope.remove = () => this.remove($scope, $routeParams, Container);
|
||||
$scope.changes = [];
|
||||
|
||||
$scope.getChanges = () => {
|
||||
Container.changes({id: $routeParams.id}, (d) => {
|
||||
$scope.changes = d;
|
||||
});
|
||||
};
|
||||
|
||||
Container.get({id: $routeParams.id}, (d) => {
|
||||
$scope.container = d;
|
||||
});
|
||||
|
||||
$scope.getChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,8 +47,9 @@ angular.module('dockerui.services', [
|
|||
changes: {
|
||||
method: 'GET',
|
||||
params: {
|
||||
action: 'chagnes'
|
||||
}
|
||||
action: 'changes'
|
||||
},
|
||||
isArray: true
|
||||
},
|
||||
create: {
|
||||
method: 'POST',
|
||||
|
|
|
@ -13,7 +13,7 @@ angular.module('dockerui.services', ['ngResource'])
|
|||
stop: {method: 'POST', params: {t: 5, action: 'stop'}},
|
||||
restart: {method: 'POST', params: {t: 5, action: 'restart' }},
|
||||
kill :{method: 'POST', params: {action:'kill'}},
|
||||
changes :{method: 'GET', params: {action:'chagnes'}},
|
||||
changes :{method: 'GET', params: {action:'changes'}, isArray: true},
|
||||
create :{method: 'POST', params: {action:'create'}},
|
||||
remove :{method: 'DELETE', params: {v:0}}
|
||||
});
|
||||
|
|
|
@ -33,10 +33,28 @@
|
|||
<td>Running:</td>
|
||||
<td>{{ container.State.Running }}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span1">
|
||||
Changes:
|
||||
</div>
|
||||
<div class="span5">
|
||||
<i class="icon-refresh" style="width:32px;height:32px;" ng-click="getChanges()"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="well well-large">
|
||||
<ul>
|
||||
<li ng-repeat="change in changes">
|
||||
<strong>{{ change.Path }}</strong> {{ change.Kind }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="btn-remove">
|
||||
<button class="btn btn-large btn-block btn-primary btn-danger" ng-click="remove()">Remove Container</button>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue