mirror of
https://github.com/cuigh/swirl
synced 2024-12-30 15:53:24 +00:00
110 lines
3.6 KiB
Go
110 lines
3.6 KiB
Go
{{ extends "../_layouts/default" }}
|
|
{{ import "../_modules/detail" }}
|
|
|
|
{{ block script() }}
|
|
<script>$(() => new Swirl.Network.DetailPage())</script>
|
|
{{ end }}
|
|
|
|
{{ block body() }}
|
|
<section class="hero is-info">
|
|
<div class="hero-body">
|
|
<div class="container has-text-centered">
|
|
<h1 class="title is-2 is-uppercase">{{ i18n("network.title") }}</h1>
|
|
<h2 class="subtitle is-5">{{ i18n("network.description") }}</h2>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<div class="container">
|
|
<nav class="breadcrumb has-succeeds-separator is-small is-marginless" aria-label="breadcrumbs">
|
|
<ul>
|
|
<li><a href="/">{{ i18n("menu.home") }}</a></li>
|
|
<li><a href="/network/">{{ i18n("menu.network") }}</a></li>
|
|
<li class="is-active"><a>{{ i18n("menu.detail") }}</a></li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
<section class="hero is-small is-light">
|
|
<div class="hero-body">
|
|
<div class="container">
|
|
<h2 class="title is-2">
|
|
{{ .Network.Name }}
|
|
</h2>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<nav class="navbar has-shadow">
|
|
<div class="container">
|
|
<div class="navbar-brand">
|
|
<a class="navbar-item is-tab is-active" href="/network/{{.Network.Name}}/detail">{{ i18n("menu.detail") }}</a>
|
|
<a class="navbar-item is-tab" href="/network/{{.Network.Name}}/raw">{{ i18n("menu.raw") }}</a>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<section class="section">
|
|
<div class="container">
|
|
|
|
<div class="message is-primary">
|
|
<div class="message-body">
|
|
<dl class="is-horizontal is-marginless">
|
|
<dt class="has-text-left">{{ i18n("field.id") }}</dt>
|
|
<dd>{{ .Network.ID }}</dd>
|
|
<dt class="has-text-left">{{ i18n("field.driver") }}</dt>
|
|
<dd>{{ .Network.Driver }}</dd>
|
|
<dt class="has-text-left">{{ i18n("field.scope") }}</dt>
|
|
<dd>{{ .Network.Scope}}</dd>
|
|
<dt class="has-text-left">{{ i18n("field.created-at") }}</dt>
|
|
<dd>{{ time(.Network.Created) }}</dd>
|
|
{{ if .Network.IPAM.Config }}
|
|
<dt class="has-text-left">IP</dt>
|
|
{{range .Network.IPAM.Config}}
|
|
<dd>Subnet: {{ .Subnet }}, Gateway: {{ .Gateway }}</dd>
|
|
{{end}}
|
|
{{end}}
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
{{ yield tags(title="Options", tags=.Network.Options) }}
|
|
{{ yield tags(title="Labels", tags=.Network.Labels) }}
|
|
|
|
{{if .Network.Containers}}
|
|
<div class="block">
|
|
<div class="block-header">
|
|
<p>Containers</p>
|
|
</div>
|
|
<div class="block-body is-paddingless">
|
|
<table id="table-containers" class="table is-bordered is-striped is-narrow is-fullwidth is-marginless">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ i18n("field.name") }}</th>
|
|
<th>IPV4</th>
|
|
<th>IPV6</th>
|
|
<th>Mac</th>
|
|
<th>{{ i18n("field.action") }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range id, c := .Network.Containers}}
|
|
<tr>
|
|
<td><a href="/container/{{id}}/detail">{{c.Name}}</a></td>
|
|
<td>{{c.IPv4Address}}</td>
|
|
<td>{{c.IPv6Address}}</td>
|
|
<td>{{c.MacAddress}}</td>
|
|
<td>
|
|
<button class="button is-small is-danger is-outlined" data-action="disconnect" value="{{id}}">{{ i18n("button.leave") }}</button>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
|
|
<a href="/network/" class="button is-primary">
|
|
<span class="icon"><i class="fas fa-reply"></i></span>
|
|
<span>{{ i18n("button.return") }}</span>
|
|
</a>
|
|
</div>
|
|
</section>
|
|
{{ end }} |