github.com/outbrain/consul@v1.4.5/ui-v2/app/templates/dc/kv/edit.hbs (about) 1 {{#app-view class="kv edit" loading=isLoading}} 2 {{#block-slot 'notification' as |status type|}} 3 {{partial 'dc/kv/notifications'}} 4 {{/block-slot}} 5 {{#block-slot 'breadcrumbs'}} 6 <ol> 7 <li><a data-test-back href={{href-to 'dc.kv.index'}}>Key / Values</a></li> 8 {{#if (not-eq parent.Key '/') }} 9 {{#each (slice 0 -1 (split parent.Key '/')) as |breadcrumb index|}} 10 <li><a href={{href-to 'dc.kv.folder' (join '/' (append (slice 0 (add index 1) (split parent.Key '/')) ''))}}>{{breadcrumb}}</a></li> 11 {{/each}} 12 {{/if}} 13 </ol> 14 {{/block-slot}} 15 {{#block-slot 'header'}} 16 <h1> 17 {{#if item.Key }} 18 {{left-trim item.Key parent.Key }} 19 {{else}} 20 New Key / Value 21 {{/if}} 22 </h1> 23 {{/block-slot}} 24 {{#block-slot 'content'}} 25 {{#if session}} 26 <p class="notice warning"><strong>Warning.</strong> This KV has a lock session. You can edit KV's with lock sessions, but we recommend doing so with care, or not doing so at all. It may negatively impact the active node it's associated with. See below for more details on the Lock Session and see <a href="{{env 'CONSUL_DOCUMENTATION_URL'}}/internals/sessions.html" target="_blank" rel="noopener noreferrer">our documentation</a> for more information.</p> 27 {{/if}} 28 {{partial 'dc/kv/form'}} 29 {{#if session}} 30 <div data-test-session> 31 <h2><a href="{{env 'CONSUL_DOCUMENTATION_URL'}}/internals/sessions.html#session-design" rel="help noopener noreferrer" target="_blank">Lock Session</a></h2> 32 <dl> 33 <dt>Name</dt> 34 <dd>{{session.Name}}</dd> 35 <dt>Agent</dt> 36 <dd> 37 <a href={{href-to 'dc.nodes.show' session.Node }}>{{session.Node}}</a> 38 </dd> 39 <dt>ID</dt> 40 <dd>{{session.ID}}</dd> 41 <dt>Behavior</dt> 42 <dd><{{session.Behavior}}/dd> 43 {{#if session.Delay }} 44 <dt>Delay</dt> 45 <dd><{{session.LockDelay}}/dd> 46 {{/if}} 47 {{#if session.TTL }} 48 <dt>TTL</dt> 49 <dd>{{session.TTL}}</dd> 50 {{/if}} 51 {{#if (gt session.Checks.length 0)}} 52 <dt>Health Checks</dt> 53 <dd> 54 {{ join ', ' session.Checks}} 55 </dd> 56 {{/if}} 57 </dl> 58 {{#confirmation-dialog message='Are you sure you want to invalidate this session?'}} 59 {{#block-slot 'action' as |confirm|}} 60 <button type="button" data-test-delete class="type-delete" {{ action confirm "invalidateSession" session }}>Invalidate Session</button> 61 {{/block-slot}} 62 {{#block-slot 'dialog' as |execute cancel message|}} 63 <p> 64 {{message}} 65 </p> 66 <button type="button" class="type-delete" {{action execute}}>Confirm Invalidation</button> 67 <button type="button" class="type-cancel" {{action cancel}}>Cancel</button> 68 {{/block-slot}} 69 {{/confirmation-dialog}} 70 </div> 71 {{/if}} 72 {{/block-slot}} 73 {{/app-view}}