2017-09-14 06:04:59 +00:00
|
|
|
<rd-header>
|
2018-06-06 16:12:35 +00:00
|
|
|
<rd-header-title title-text="Swarm visualizer">
|
2018-02-01 12:27:52 +00:00
|
|
|
<a data-toggle="tooltip" title="Refresh" ui-sref="docker.swarm.visualizer" ui-sref-opts="{reload: true}">
|
2018-03-13 05:36:53 +00:00
|
|
|
<i class="fa fa-sync" aria-hidden="true"></i>
|
2017-09-14 06:04:59 +00:00
|
|
|
</a>
|
|
|
|
</rd-header-title>
|
|
|
|
<rd-header-content>
|
2018-02-01 12:27:52 +00:00
|
|
|
<a ui-sref="docker.swarm">Swarm</a> > <a ui-sref="docker.swarm.visualizer">Cluster visualizer</a>
|
2017-09-14 06:04:59 +00:00
|
|
|
</rd-header-content>
|
|
|
|
</rd-header>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<rd-widget>
|
2018-06-06 16:12:35 +00:00
|
|
|
<rd-widget-header icon="fa-object-group" title-text="Cluster information">
|
2017-09-14 06:04:59 +00:00
|
|
|
<div class="pull-right">
|
2018-04-06 08:59:25 +00:00
|
|
|
<button type="button" class="btn btn-sm btn-primary" ng-click="changeShowInformationPanel(true)" ng-if="!state.ShowInformationPanel">Show</button>
|
|
|
|
<button type="button" class="btn btn-sm btn-primary" ng-click="changeShowInformationPanel(false)" ng-if="state.ShowInformationPanel">Hide</button>
|
2017-09-14 06:04:59 +00:00
|
|
|
</div>
|
|
|
|
</rd-widget-header>
|
|
|
|
<rd-widget-body ng-if="state.ShowInformationPanel">
|
|
|
|
<table class="table">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td>Nodes</td>
|
|
|
|
<td>{{ nodes.length }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Services</td>
|
|
|
|
<td>{{ services.length }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Tasks</td>
|
|
|
|
<td>{{ tasks.length }}</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<form class="form-horizontal">
|
|
|
|
<div class="col-sm-12 form-section-title">
|
|
|
|
Filters
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<label class="control-label text-left">
|
|
|
|
Only display running tasks
|
|
|
|
</label>
|
|
|
|
<label class="switch" style="margin-left: 20px;">
|
2018-04-06 08:59:25 +00:00
|
|
|
<input type="checkbox" ng-model="state.DisplayOnlyRunningTasks" ng-change="changeDisplayOnlyRunningTasks()"><i></i>
|
2017-09-14 06:04:59 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
2018-01-12 15:10:02 +00:00
|
|
|
<form class="form-horizontal">
|
|
|
|
<div class="col-sm-12 form-section-title">
|
|
|
|
Refresh
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="refreshRate" class="col-sm-1 margin-sm-top control-label text-left">
|
|
|
|
Rate
|
|
|
|
<i id="refreshRateChange" class="fa fa-check green-icon" aria-hidden="true" style="display: none;"></i>
|
|
|
|
</label>
|
|
|
|
<div class="col-sm-2">
|
|
|
|
<select id="refreshRate" ng-model="state.refreshRate" ng-change="changeUpdateRepeater()" class="form-control">
|
|
|
|
<option value="5">5s</option>
|
|
|
|
<option value="10">10s</option>
|
|
|
|
<option value="30">30s</option>
|
|
|
|
<option value="60">60s</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
2017-09-14 06:04:59 +00:00
|
|
|
</rd-widget-body>
|
|
|
|
</rd-widget>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row" ng-if="visualizerData">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<rd-widget>
|
2018-06-06 16:12:35 +00:00
|
|
|
<rd-widget-header icon="fa-object-group" title-text="Cluster visualizer"></rd-widget-header>
|
2017-09-14 06:04:59 +00:00
|
|
|
<rd-widget-body>
|
|
|
|
<div class="visualizer_container">
|
|
|
|
<div class="node" ng-repeat="node in visualizerData.nodes track by $index">
|
|
|
|
<div class="node_info">
|
2017-09-14 08:22:27 +00:00
|
|
|
<div>
|
|
|
|
<div>
|
2018-10-03 23:07:31 +00:00
|
|
|
<b>{{ node.Name || node.Hostname }}</b>
|
2017-09-14 08:22:27 +00:00
|
|
|
<span class="node_platform">
|
2018-03-13 05:36:53 +00:00
|
|
|
<i class="fab fa-linux" aria-hidden="true" ng-if="node.PlatformOS === 'linux'"></i>
|
|
|
|
<i class="fab fa-windows" aria-hidden="true" ng-if="node.PlatformOS === 'windows'"></i>
|
2017-09-14 08:22:27 +00:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-09-14 06:04:59 +00:00
|
|
|
<div>{{ node.Role }}</div>
|
2017-12-04 17:01:07 +00:00
|
|
|
<div>CPU: {{ node.CPUs / 1000000000 }}</div>
|
|
|
|
<div>Memory: {{ node.Memory|humansize: 2 }}</div>
|
2018-01-12 15:10:02 +00:00
|
|
|
<div><span class="label label-{{ node.Status | nodestatusbadge }}">{{ node.Status }}</span></div>
|
2017-09-14 06:04:59 +00:00
|
|
|
</div>
|
|
|
|
<div class="tasks">
|
2018-10-03 22:57:07 +00:00
|
|
|
<div class="task task_{{ task.Status.State | visualizerTask }}" style="border: 2px solid {{ task.ServiceId | visualizerTaskBorderColor }}" ng-repeat="task in node.Tasks | orderBy: 'ServiceName' | filter: (state.DisplayOnlyRunningTasks || '') && { Status: { State: 'running' } }">
|
2017-09-14 06:04:59 +00:00
|
|
|
<div class="service_name">{{ task.ServiceName }}</div>
|
|
|
|
<div>Image: {{ task.Spec.ContainerSpec.Image | hideshasum }}</div>
|
|
|
|
<div>Status: {{ task.Status.State }}</div>
|
|
|
|
<div>Update: {{ task.Updated | getisodate }}</div>
|
2017-12-04 17:01:07 +00:00
|
|
|
<div ng-if="task.Spec.Resources.Limits.MemoryBytes">Memory limit: {{ task.Spec.Resources.Limits.MemoryBytes | humansize: 2:2 }}</div>
|
|
|
|
<div ng-if="task.Spec.Resources.Limits.NanoCPUs">CPU limit: {{ task.Spec.Resources.Limits.NanoCPUs / 1000000000 }}</div>
|
2017-09-14 06:04:59 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</rd-widget-body>
|
|
|
|
</rd-widget>
|
|
|
|
</div>
|
|
|
|
</div>
|