swirl/views/secret/edit.jet
2017-09-27 15:36:50 +08:00

70 lines
2.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">
SECRET
</h1>
<h2 class="subtitle is-5">
Secrets are sensitive data that can be used by services.
</h2>
</div>
</div>
</section>
<div class="container">
<nav class="breadcrumb has-succeeds-separator is-small is-marginless" aria-label="breadcrumbs">
<ul>
<li><a href="/">Dashboard</a></li>
<li><a href="/secret/">Secrets</a></li>
<li class="is-active"><a>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">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">
<div class="field">
<label class="label">Labels</label>
{{ yield options(name="label", items=.Secret.Spec.Labels) }}
</div>
<div class="field is-grouped">
<div class="control">
<button type="submit" class="button is-primary">Submit</button>
</div>
<div class="control">
<a href="/secret/" class="button is-link">Cancel</a>
</div>
</div>
</form>
</div>
</section>
{{ end }}