swirl/views/container/detail.jet
cuigh 999b9ec5a1 Support executing command in containers
This feature is only valid on single node since container API is not Swarmable
2018-06-14 18:41:22 +08:00

69 lines
2.8 KiB
Go

{{ extends "../_layouts/default" }}
{{ import "../_modules/detail" }}
{{ 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("container.title") }}</h1>
<h2 class="subtitle is-5">{{ i18n("container.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="/container/">{{ i18n("menu.container") }}</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">
{{ .Container.ContainerJSONBase.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="/container/{{.Container.ContainerJSONBase.ID}}/detail">{{ i18n("menu.detail") }}</a>
<a class="navbar-item is-tab" href="/container/{{.Container.ContainerJSONBase.ID}}/raw">{{ i18n("menu.raw") }}</a>
<a class="navbar-item is-tab" href="/container/{{.Container.ContainerJSONBase.ID}}/logs">{{ i18n("menu.log") }}</a>
<a class="navbar-item is-tab" href="/container/{{.Container.ContainerJSONBase.ID}}/exec">{{ i18n("menu.exec") }}</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>{{ .Container.ContainerJSONBase.ID }}</dd>
{{ yield desc(title="PID", value=.Container.ContainerJSONBase.State.Pid) }}
{{ yield desc(title=i18n("field.image"), value=.Container.ContainerJSONBase.Image) }}
{{ yield desc(title=i18n("field.created-at"), value=.Container.ContainerJSONBase.Created) }}
{{ yield desc(title="Started at", value=.Container.ContainerJSONBase.State.StartedAt) }}
<dt class="has-text-left">Status</dt>
<dd><span class="tag is-{{ .Container.ContainerJSONBase.State.Status == "running" ? "success" : "danger" }}">{{ .Container.ContainerJSONBase.State.Status }}</span></dd>
{{ yield desc(title="Error", value=.Container.ContainerJSONBase.State.Error) }}
</dl>
</div>
</div>
{{ yield tags(title="Labels", tags=.Container.Config.Labels) }}
<a href="/container/" class="button is-primary">
<span class="icon"><i class="fas fa-reply"></i></span>
<span>{{ i18n("button.return") }}</span>
</a>
</div>
</section>
{{ end }}