mirror of
https://github.com/cuigh/swirl
synced 2024-12-31 16:23:13 +00:00
80 lines
3.0 KiB
Go
80 lines
3.0 KiB
Go
{{ extends "../_layouts/default" }}
|
|
{{ import "../_modules/form" }}
|
|
|
|
{{ block script() }}
|
|
<script>$(() => new Swirl.Secret.NewPage())</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("secret.title") }}</h1>
|
|
<h2 class="subtitle is-5">{{ i18n("secret.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="/secret/">{{ i18n("menu.secret") }}</a></li>
|
|
<li class="is-active"><a>{{ i18n("menu.edit") }}</a></li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
<section class="hero is-small is-light">
|
|
<div class="hero-body">
|
|
<div class="container">
|
|
<h2 class="title is-2">
|
|
{{ .Secret.Spec.Name }}
|
|
</h2>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<nav class="navbar has-shadow">
|
|
<div class="container">
|
|
<div class="navbar-brand">
|
|
{*<a class="navbar-item is-tab" href="/secret/{{.Secret.ID}}/detail">Detail</a>*}
|
|
{*<a class="navbar-item is-tab" href="/secret/{{.Secret.ID}}/raw">Raw</a>*}
|
|
<a class="navbar-item is-tab is-active" href="/node/{{.Secret.ID}}/edit">{{ i18n("menu.edit") }}</a>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<section class="section">
|
|
<div class="container">
|
|
<form method="post" action="update" data-form="ajax-json" data-form="ajax-json" data-url="/secret/">
|
|
<input name="id" value="{{ .Secret.ID }}" type="hidden">
|
|
<input name="version" value="{{ .Secret.Version.Index }}" data-type="integer" type="hidden">
|
|
{*<div class="field">*}
|
|
{*<label class="label">{{ i18n("field.data") }}</label>*}
|
|
{*<div class="control">*}
|
|
{*<textarea class="textarea" rows="12" readonly>{{ .Secret.Spec.Data }}</textarea>*}
|
|
{*</div>*}
|
|
{*<p class="help">Editing is not supported now!</p>*}
|
|
{*</div>*}
|
|
<div class="field">
|
|
<label class="label">{{ i18n("field.label") }}</label>
|
|
{{ yield options(name="label", items=.Secret.Spec.Labels) }}
|
|
</div>
|
|
<div class="field">
|
|
<label class="label">{{ i18n("field.template") }}</label>
|
|
<div class="control">
|
|
{{ if .Secret.Spec.Templating }}
|
|
{{ yield radio(name="template.name", value="", label="None", disabled=true, checked=.Secret.Spec.Templating.Name) }}
|
|
{{ yield radio(name="template.name", value="golang", label="Golang", disabled=true, checked=.Secret.Spec.Templating.Name) }}
|
|
{{ else }}
|
|
{{ yield radio(name="template.name", value="", label="None", disabled=true, checked="") }}
|
|
{{ yield radio(name="template.name", value="golang", label="Golang", disabled=true) }}
|
|
{{ end }}
|
|
</div>
|
|
<p class="help">Template feature needs Docker API version 1.37+</p>
|
|
</div>
|
|
{{ yield form_submit(url="/secret/") }}
|
|
</form>
|
|
</div>
|
|
</section>
|
|
{{ end }} |