mirror of https://github.com/portainer/portainer
Add container name to stats and top pages.
parent
49d4c5800f
commit
b244242cb2
|
@ -1,19 +1,29 @@
|
|||
<div class="containerTop">
|
||||
<div class="form-group col-xs-2">
|
||||
<input type="text" class="form-control" placeholder="[options] (aux)" ng-model="ps_args">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h1>Top for: {{ containerName }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-xs-2">
|
||||
<input type="text" class="form-control" placeholder="[options] (aux)" ng-model="ps_args">
|
||||
</div>
|
||||
<button type="button" class="btn btn-default" ng-click="getTop()">Submit</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th ng-repeat="title in containerTop.Titles">{{title}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="processInfos in containerTop.Processes">
|
||||
<td ng-repeat="processInfo in processInfos track by $index">{{processInfo}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-default" ng-click="getTop()">Submit</button>
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th ng-repeat="title in containerTop.Titles">{{title}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="processInfos in containerTop.Processes">
|
||||
<td ng-repeat="processInfo in processInfos track by $index">{{processInfo}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('containerTop', [])
|
||||
.controller('ContainerTopController', ['$scope', '$routeParams', 'ContainerTop', 'ViewSpinner', function ($scope, $routeParams, ContainerTop, ViewSpinner) {
|
||||
.controller('ContainerTopController', ['$scope', '$routeParams', 'ContainerTop', 'Container', 'ViewSpinner', function ($scope, $routeParams, ContainerTop, Container, ViewSpinner) {
|
||||
$scope.ps_args = '';
|
||||
|
||||
/**
|
||||
|
@ -15,5 +15,11 @@ angular.module('containerTop', [])
|
|||
});
|
||||
};
|
||||
|
||||
Container.get({id: $routeParams.id}, function (d) {
|
||||
$scope.containerName = d.Name.substring(1);
|
||||
}, function (e) {
|
||||
Messages.error("Failure", e.data);
|
||||
});
|
||||
|
||||
$scope.getTop();
|
||||
}]);
|
|
@ -1,6 +1,6 @@
|
|||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h1>Stats</h1>
|
||||
<h1>Stats for: {{ containerName }}</h1>
|
||||
|
||||
<h2>CPU</h2>
|
||||
|
||||
|
|
|
@ -172,5 +172,11 @@ angular.module('stats', [])
|
|||
}
|
||||
return cpuPercent;
|
||||
}
|
||||
|
||||
Container.get({id: $routeParams.id}, function (d) {
|
||||
$scope.containerName = d.Name.substring(1);
|
||||
}, function (e) {
|
||||
Messages.error("Failure", e.data);
|
||||
});
|
||||
}])
|
||||
;
|
Loading…
Reference in New Issue