mirror of https://github.com/portainer/portainer
227 lines
11 KiB
HTML
227 lines
11 KiB
HTML
<rd-header>
|
|
<rd-header-title title="Cluster overview">
|
|
<a data-toggle="tooltip" title="Refresh" ui-sref="swarm" ui-sref-opts="{reload: true}">
|
|
<i class="fa fa-refresh" aria-hidden="true"></i>
|
|
</a>
|
|
</rd-header-title>
|
|
<rd-header-content>Swarm</rd-header-content>
|
|
</rd-header>
|
|
|
|
<div class="row">
|
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
|
<rd-widget>
|
|
<rd-widget-header icon="fa-object-group" title="Cluster status"></rd-widget-header>
|
|
<rd-widget-body classes="no-padding">
|
|
<table class="table">
|
|
<tbody>
|
|
<tr>
|
|
<td>Nodes</td>
|
|
<td ng-if="applicationState.endpoint.mode.provider === 'DOCKER_SWARM'">{{ swarm.Nodes }}</td>
|
|
<td ng-if="applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE'">{{ info.Swarm.Nodes }}</td>
|
|
</tr>
|
|
<tr ng-if="applicationState.endpoint.mode.provider === 'DOCKER_SWARM'">
|
|
<td>Images</td>
|
|
<td>{{ info.Images }}</td>
|
|
</tr>
|
|
<tr ng-if="applicationState.endpoint.mode.provider === 'DOCKER_SWARM'">
|
|
<td>Swarm version</td>
|
|
<td>{{ docker.Version|swarmversion }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Docker API version</td>
|
|
<td>{{ docker.ApiVersion }}</td>
|
|
</tr>
|
|
<tr ng-if="applicationState.endpoint.mode.provider === 'DOCKER_SWARM'">
|
|
<td>Strategy</td>
|
|
<td>{{ swarm.Strategy }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Total CPU</td>
|
|
<td ng-if="applicationState.endpoint.mode.provider === 'DOCKER_SWARM'">{{ info.NCPU }}</td>
|
|
<td ng-if="applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE'">{{ totalCPU }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Total memory</td>
|
|
<td ng-if="applicationState.endpoint.mode.provider === 'DOCKER_SWARM'">{{ info.MemTotal|humansize: 2 }}</td>
|
|
<td ng-if="applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE'">{{ totalMemory|humansize: 2 }}</td>
|
|
</tr>
|
|
<tr ng-if="applicationState.endpoint.mode.provider === 'DOCKER_SWARM'">
|
|
<td>Operating system</td>
|
|
<td>{{ info.OperatingSystem }}</td>
|
|
</tr>
|
|
<tr ng-if="applicationState.endpoint.mode.provider === 'DOCKER_SWARM'">
|
|
<td>Kernel version</td>
|
|
<td>{{ info.KernelVersion }}</td>
|
|
</tr>
|
|
<tr ng-if="applicationState.endpoint.mode.provider === 'DOCKER_SWARM'">
|
|
<td>Go version</td>
|
|
<td>{{ docker.GoVersion }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</rd-widget-body>
|
|
</rd-widget>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" ng-if="applicationState.endpoint.mode.provider === 'DOCKER_SWARM'">
|
|
<rd-widget>
|
|
<rd-widget-header icon="fa-hdd-o" title="Node status">
|
|
<div class="pull-right">
|
|
Items per page:
|
|
<select ng-model="state.pagination_count" ng-change="changePaginationCount()">
|
|
<option value="0">All</option>
|
|
<option value="10">10</option>
|
|
<option value="25">25</option>
|
|
<option value="50">50</option>
|
|
<option value="100">100</option>
|
|
</select>
|
|
</div>
|
|
</rd-widget-header>
|
|
<rd-widget-body classes="no-padding">
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
<a ui-sref="swarm" ng-click="order('name')">
|
|
Name
|
|
<span ng-show="sortType == 'name' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
|
|
<span ng-show="sortType == 'name' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
|
|
</a>
|
|
</th>
|
|
<th>
|
|
<a ui-sref="swarm" ng-click="order('cpu')">
|
|
CPU
|
|
<span ng-show="sortType == 'cpu' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
|
|
<span ng-show="sortType == 'cpu' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
|
|
</a>
|
|
</th>
|
|
<th>
|
|
<a ui-sref="swarm" ng-click="order('memory')">
|
|
Memory
|
|
<span ng-show="sortType == 'memory' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
|
|
<span ng-show="sortType == 'memory' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
|
|
</a>
|
|
</th>
|
|
<th>
|
|
<a ui-sref="swarm" ng-click="order('ip')">
|
|
IP
|
|
<span ng-show="sortType == 'ip' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
|
|
<span ng-show="sortType == 'ip' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
|
|
</a>
|
|
</th>
|
|
<th>
|
|
<a ui-sref="swarm" ng-click="order('version')">
|
|
Engine
|
|
<span ng-show="sortType == 'version' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
|
|
<span ng-show="sortType == 'version' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
|
|
</a>
|
|
</th>
|
|
<th>
|
|
<a ui-sref="swarm" ng-click="order('status')">
|
|
Status
|
|
<span ng-show="sortType == 'status' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
|
|
<span ng-show="sortType == 'status' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
|
|
</a>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr dir-paginate="node in (state.filteredNodes = (swarm.Status | filter:state.filter | orderBy:sortType:sortReverse | itemsPerPage: state.pagination_count))">
|
|
<td>{{ node.name }}</td>
|
|
<td>{{ node.cpu }}</td>
|
|
<td>{{ node.memory }}</td>
|
|
<td>{{ node.ip }}</td>
|
|
<td>{{ node.version }}</td>
|
|
<td><span class="label label-{{ node.status|nodestatusbadge }}">{{ node.status }}</span></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="pagination-controls">
|
|
<dir-pagination-controls></dir-pagination-controls>
|
|
</div>
|
|
</rd-widget-body>
|
|
</rd-widget>
|
|
</div>
|
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" ng-if="applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE'">
|
|
<rd-widget>
|
|
<rd-widget-header icon="fa-hdd-o" title="Node status">
|
|
<div class="pull-right">
|
|
Items per page:
|
|
<select ng-model="state.pagination_count" ng-change="changePaginationCount()">
|
|
<option value="0">All</option>
|
|
<option value="10">10</option>
|
|
<option value="25">25</option>
|
|
<option value="50">50</option>
|
|
<option value="100">100</option>
|
|
</select>
|
|
</div>
|
|
</rd-widget-header>
|
|
<rd-widget-body classes="no-padding">
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
<a ui-sref="swarm" ng-click="order('Description.Hostname')">
|
|
Name
|
|
<span ng-show="sortType == 'Description.Hostname' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
|
|
<span ng-show="sortType == 'Description.Hostname' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
|
|
</a>
|
|
</th>
|
|
<th>
|
|
<a ui-sref="swarm" ng-click="order('Spec.Role')">
|
|
Role
|
|
<span ng-show="sortType == 'Spec.Role' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
|
|
<span ng-show="sortType == 'Spec.Role' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
|
|
</a>
|
|
</th>
|
|
<th>
|
|
<a ui-sref="swarm" ng-click="order('Description.Resources.NanoCPUs')">
|
|
CPU
|
|
<span ng-show="sortType == 'Description.Resources.NanoCPUs' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
|
|
<span ng-show="sortType == 'Description.Resources.NanoCPUs' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
|
|
</a>
|
|
</th>
|
|
<th>
|
|
<a ui-sref="swarm" ng-click="order('Description.Resources.MemoryBytes')">
|
|
Memory
|
|
<span ng-show="sortType == 'Description.Resources.MemoryBytes' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
|
|
<span ng-show="sortType == 'Description.Resources.MemoryBytes' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
|
|
</a>
|
|
</th>
|
|
<th>
|
|
<a ui-sref="swarm" ng-click="order('Description.Engine.EngineVersion')">
|
|
Engine
|
|
<span ng-show="sortType == 'Description.Engine.EngineVersion' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
|
|
<span ng-show="sortType == 'Description.Engine.EngineVersion' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
|
|
</a>
|
|
</th>
|
|
<th>
|
|
<a ui-sref="swarm" ng-click="order('node.Status.State')">
|
|
Status
|
|
<span ng-show="sortType == 'node.Status.State' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
|
|
<span ng-show="sortType == 'node.Status.State' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
|
|
</a>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr dir-paginate="node in (state.filteredNodes = (nodes | filter:state.filter | orderBy:sortType:sortReverse | itemsPerPage: state.pagination_count))">
|
|
<td><a ui-sref="node({id: node.ID})">{{ node.Description.Hostname }}</a></td>
|
|
<td>{{ node.Spec.Role }}</td>
|
|
<td>{{ node.Description.Resources.NanoCPUs / 1000000000 }}</td>
|
|
<td>{{ node.Description.Resources.MemoryBytes|humansize }}</td>
|
|
<td>{{ node.Description.Engine.EngineVersion }}</td>
|
|
<td><span class="label label-{{ node.Status.State|nodestatusbadge }}">{{ node.Status.State }}</span></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="pagination-controls">
|
|
<dir-pagination-controls></dir-pagination-controls>
|
|
</div>
|
|
</rd-widget-body>
|
|
</rd-widget>
|
|
</div>
|
|
</div>
|