Display data on config editing page

This commit is contained in:
cuigh 2018-04-23 21:12:43 +08:00
parent d2eeace4b3
commit 4266fcd296
2 changed files with 14 additions and 6 deletions

View File

@ -49,12 +49,13 @@
<form method="post" action="update" data-form="ajax-json" data-form="ajax-json" data-url="/config/"> <form method="post" action="update" data-form="ajax-json" data-form="ajax-json" data-url="/config/">
<input name="id" value="{{ .Config.ID }}" type="hidden"> <input name="id" value="{{ .Config.ID }}" type="hidden">
<input name="version" value="{{ .Config.Version.Index }}" data-type="integer" type="hidden"> <input name="version" value="{{ .Config.Version.Index }}" data-type="integer" type="hidden">
{*<div class="field">*} <div class="field">
{*<label class="label">Data</label>*} <label class="label">Data</label>
{*<div class="control">*} <div class="control">
{*<textarea name="data" class="textarea" rows="12" placeholder="Config file content" data-v-rule="native" required></textarea>*} <textarea class="textarea" rows="12" readonly>{{ .Config.Spec.Data }}</textarea>
{*</div>*} </div>
{*</div>*} <p class="help is-danger">Editing is not supported now!</p>
</div>
<div class="field"> <div class="field">
<label class="label">Labels</label> <label class="label">Labels</label>
{{ yield options(name="label", items=.Config.Spec.Labels) }} {{ yield options(name="label", items=.Config.Spec.Labels) }}

View File

@ -49,6 +49,13 @@
<form method="post" action="update" data-form="ajax-json" data-form="ajax-json" data-url="/secret/"> <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="id" value="{{ .Secret.ID }}" type="hidden">
<input name="version" value="{{ .Secret.Version.Index }}" data-type="integer" type="hidden"> <input name="version" value="{{ .Secret.Version.Index }}" data-type="integer" type="hidden">
{*<div class="field">*}
{*<label class="label">Data</label>*}
{*<div class="control">*}
{*<textarea class="textarea" rows="12" readonly>{{ .Secret.Spec.Data }}</textarea>*}
{*</div>*}
{*<p class="help is-danger">Editing is not supported now!</p>*}
{*</div>*}
<div class="field"> <div class="field">
<label class="label">Labels</label> <label class="label">Labels</label>
{{ yield options(name="label", items=.Secret.Spec.Labels) }} {{ yield options(name="label", items=.Secret.Spec.Labels) }}