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-11-28 02:00:28 +00:00
|
|
|
<rd-widget-header icon="trello" 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-07-20 00:39:44 +00:00
|
|
|
<por-switch-field
|
|
|
|
label-class="'col-sm-2'"
|
|
|
|
checked="state.DisplayOnlyRunningTasks"
|
|
|
|
label="'Only display running tasks'"
|
|
|
|
on-change="(handleChangeDisplayOnlyRunningTasks)"
|
|
|
|
></por-switch-field>
|
2017-09-14 06:04:59 +00:00
|
|
|
</div>
|
2022-07-20 00:39:44 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-08-13 15:38:04 +00:00
|
|
|
<div class="col-sm-12">
|
2022-07-20 00:39:44 +00:00
|
|
|
<por-switch-field
|
|
|
|
label-class="'col-sm-2'"
|
|
|
|
checked="state.DisplayNodeLabels"
|
|
|
|
label="'Display node labels'"
|
|
|
|
on-change="(handleChangeDisplayNodeLabels)"
|
|
|
|
></por-switch-field>
|
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-11-28 02:00:28 +00:00
|
|
|
<div class="col-sm-12 form-section-title"> Refresh rate </div>
|
2018-01-12 15:10:02 +00:00
|
|
|
<div class="form-group">
|
2022-08-04 14:05:27 +00:00
|
|
|
<label for="refreshRate" class="col-sm-2 margin-sm-top control-label text-left">
|
2022-11-28 02:00:28 +00:00
|
|
|
<pr-icon id="refreshRateChange" icon="'check'" mode="'success'" size="'sm'" style="display: none"></pr-icon>
|
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-11-28 02:00:28 +00:00
|
|
|
<rd-widget-header icon="trello" 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">
|
2022-11-28 02:00:28 +00:00
|
|
|
<pr-icon ng-if="node.PlatformOS === 'linux'" icon="'svg-linux'"></pr-icon>
|
|
|
|
<pr-icon ng-if="node.PlatformOS === 'windows'" icon="'layout-grid'"></pr-icon>
|
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>
|
2023-02-12 21:04:24 +00:00
|
|
|
<div>Memory: {{ node.Memory | humansize : 2 }}</div>
|
2020-04-10 21:54:53 +00:00
|
|
|
<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>
|
2023-02-12 21:04:24 +00:00
|
|
|
<div ng-if="task.Spec.Resources.Limits.MemoryBytes">Memory limit: {{ task.Spec.Resources.Limits.MemoryBytes | humansize : 2 : 2 }}</div>
|
2017-12-04 17:01:07 +00:00
|
|
|
<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>
|