2022-07-06 06:08:45 +00:00
|
|
|
<page-header title="'Swarm visualizer'" breadcrumbs="[{label:'Swarm', link:'docker.swarm'}, {label:'Cluster visualizer', link:'docker.swarm.visualizer'}]" reload="true">
|
|
|
|
</page-header>
|
2017-09-14 06:04:59 +00:00
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<rd-widget>
|
2022-07-19 03:29:50 +00:00
|
|
|
<rd-widget-header icon="trello" feather-icon="true" 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">
|
2022-01-17 05:53:32 +00:00
|
|
|
<div class="col-sm-12 form-section-title"> Options </div>
|
2017-09-14 06:04:59 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<div class="col-sm-12">
|
2022-01-17 05:53:32 +00:00
|
|
|
<label class="control-label text-left"> Only display running tasks </label>
|
|
|
|
<label class="switch" style="margin-left: 20px">
|
2020-04-10 21:54:53 +00:00
|
|
|
<input type="checkbox" ng-model="state.DisplayOnlyRunningTasks" ng-change="changeDisplayOnlyRunningTasks()" /><i></i>
|
2017-09-14 06:04:59 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
2019-08-13 15:38:04 +00:00
|
|
|
<div class="col-sm-12">
|
2022-01-17 05:53:32 +00:00
|
|
|
<label class="control-label text-left"> Display node labels </label>
|
|
|
|
<label class="switch" style="margin-left: 20px"> <input type="checkbox" ng-model="state.DisplayNodeLabels" ng-change="changeDisplayNodeLabels()" /><i></i> </label>
|
2019-08-13 15:38:04 +00:00
|
|
|
</div>
|
2017-09-14 06:04:59 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
2018-01-12 15:10:02 +00:00
|
|
|
<form class="form-horizontal">
|
2022-01-17 05:53:32 +00:00
|
|
|
<div class="col-sm-12 form-section-title"> Refresh </div>
|
2018-01-12 15:10:02 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="refreshRate" class="col-sm-1 margin-sm-top control-label text-left">
|
|
|
|
Rate
|
2022-01-17 05:53:32 +00:00
|
|
|
<i id="refreshRateChange" class="fa fa-check green-icon" aria-hidden="true" style="display: none"></i>
|
2018-01-12 15:10:02 +00:00
|
|
|
</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>
|
2022-07-19 03:29:50 +00:00
|
|
|
<rd-widget-header icon="trello" feather-icon="true" title-text="Cluster visualizer"></rd-widget-header>
|
2017-09-14 06:04:59 +00:00
|
|
|
<rd-widget-body>
|
|
|
|
<div class="visualizer_container">
|
2019-06-21 13:50:58 +00:00
|
|
|
<div class="node" ng-repeat="node in visualizerData.nodes | orderBy : ['Role', 'Hostname'] track by $index">
|
2017-09-14 06:04:59 +00:00
|
|
|
<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>
|
2020-04-10 21:54:53 +00:00
|
|
|
<div>Memory: {{ node.Memory | humansize: 2 }}</div>
|
|
|
|
<div
|
|
|
|
><span class="label label-{{ node.Status | nodestatusbadge }}">{{ node.Status }}</span></div
|
|
|
|
>
|
2019-08-13 15:38:04 +00:00
|
|
|
<div class="node_labels" ng-if="node.Labels.length > 0 && state.DisplayNodeLabels">
|
|
|
|
<div>Labels</div>
|
|
|
|
<div class="node_label" ng-repeat="label in node.Labels">
|
|
|
|
<span class="label_key">
|
|
|
|
{{ label.key }}
|
|
|
|
</span>
|
2020-04-10 21:54:53 +00:00
|
|
|
<span class="label_value" ng-if="label.value"> = {{ label.value }} </span>
|
2019-08-13 15:38:04 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-09-14 06:04:59 +00:00
|
|
|
</div>
|
|
|
|
<div class="tasks">
|
2020-04-10 21:54:53 +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>
|