mirror of
https://github.com/status-im/consul.git
synced 2025-01-14 07:44:50 +00:00
200945714a
* ui: Styling fixes (#7885) * Move cellHeight to ListCollection js file * Fix composite row border-top-color onHover state * Add empty health check icon to CompositeRow styling * ui: Slightly refactor %composite-rows and reuse ConsulServiceList component (#7886) * ui: Move individual component types into a single %composite-list plus 1. Removes all out separate CSS components (that match HTML components) to favour not having those separate for the moemnt at least 2. Reuses <ConsulServiceList /> component for Terminating Gateways > Linked Services * ui: Tweak breadcrumb spacing for '/' separator * Fix up the tests i.e. services per tab so we can call them all services * ui: Misc discovery chain fixes (#7892) 1. Look for a default splitter before looking for a default resolver in order to route to. 2. Delay adding svg listeners until afterRender (fixes split tooltip) 3. Make router id's consistent for highlighting default routers in when clicking the graph * ui: If an error occurs on the server, surface it in the notification (#7893) * ui: Delete old unused CSS (#7909) This commit deletes CSS that we no longer use and we definitely will not ever use. We also dedup all of our imports here as it turns out SASS doesn't dedupe imports. Strangely this increases out CSS weight by ~1kb instead of reducing but we'd rather keep things deduped as that was the intention * ui: Redesign - Exposed Paths (#7912) * Add new exposed paths icons to codebase * Redesign Exposed Paths and create copy-button hover on Composite Row * Refactor FeedbackDialog and CopyButton * Change this.element to use `{{ref }}` now we don't have an element We changed this to a tagless component with an eye to moving this to a glimmer component, without spotting that this would also remove the `this.element` property. This adds an equivalent using the ref modifier. Co-authored-by: John Cowen <jcowen@hashicorp.com> * ui: Remove box-shadow and pointer cursor from metada list hover effect (#7914) Co-authored-by: Kenia <19161242+kaxcode@users.noreply.github.com>
82 lines
3.0 KiB
Handlebars
82 lines
3.0 KiB
Handlebars
{{#if create }}
|
|
{{title 'New Key/Value'}}
|
|
{{else}}
|
|
{{title 'Edit Key/Value'}}
|
|
{{/if}}
|
|
<AppView @class="kv edit" @loading={{isLoading}}>
|
|
<BlockSlot @name="notification" as |status type item error|>
|
|
{{partial 'dc/kv/notifications'}}
|
|
</BlockSlot>
|
|
<BlockSlot @name="breadcrumbs">
|
|
<ol>
|
|
<li><a data-test-back href={{href-to 'dc.kv.index'}}>Key / Values</a></li>
|
|
{{#if (not-eq parent.Key '/')}}
|
|
{{#each (slice 0 -1 (split parent.Key '/')) as |breadcrumb index|}}
|
|
<li><a href={{href-to 'dc.kv.folder' (join '/' (append (slice 0 (add index 1) (split parent.Key '/')) ''))}}>{{breadcrumb}}</a></li>
|
|
{{/each}}
|
|
{{/if}}
|
|
</ol>
|
|
</BlockSlot>
|
|
<BlockSlot @name="header">
|
|
<h1>
|
|
{{#if item.Key}}
|
|
{{left-trim item.Key parent.Key}}
|
|
{{else}}
|
|
New Key / Value
|
|
{{/if}}
|
|
</h1>
|
|
</BlockSlot>
|
|
<BlockSlot @name="content">
|
|
{{#if session}}
|
|
<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_DOCS_URL'}}/internals/sessions.html" target="_blank" rel="noopener noreferrer">our documentation</a> for more information.
|
|
</p>
|
|
{{/if}}
|
|
{{partial 'dc/kv/form'}}
|
|
{{#if session}}
|
|
<div data-test-session={{session.ID}}>
|
|
<h2>
|
|
<a href="{{env 'CONSUL_DOCS_URL'}}/internals/sessions.html#session-design" rel="help noopener noreferrer" target="_blank">Lock Session</a>
|
|
</h2>
|
|
<dl>
|
|
<dt>Name</dt>
|
|
<dd>{{session.Name}}</dd>
|
|
<dt>Agent</dt>
|
|
<dd>
|
|
<a href={{href-to 'dc.nodes.show' session.Node}}>{{session.Node}}</a>
|
|
</dd>
|
|
<dt>ID</dt>
|
|
<dd>{{session.ID}}</dd>
|
|
<dt>Behavior</dt>
|
|
<dd>{{session.Behavior}}</dd>
|
|
{{#if session.Delay }}
|
|
<dt>Delay</dt>
|
|
<dd>{{session.LockDelay}}</dd>
|
|
{{/if}}
|
|
{{#if session.TTL }}
|
|
<dt>TTL</dt>
|
|
<dd>{{session.TTL}}</dd>
|
|
{{/if}}
|
|
{{#if (gt session.Checks.length 0)}}
|
|
<dt>Health Checks</dt>
|
|
<dd>
|
|
{{ join ', ' session.Checks}}
|
|
</dd>
|
|
{{/if}}
|
|
</dl>
|
|
<ConfirmationDialog @message="Are you sure you want to invalidate this session?">
|
|
<BlockSlot @name="action" as |confirm|>
|
|
<button type="button" data-test-delete class="type-delete" {{action confirm "invalidateSession" session}}>Invalidate Session</button>
|
|
</BlockSlot>
|
|
<BlockSlot @name="dialog" as |execute cancel message|>
|
|
<p>
|
|
{{message}}
|
|
</p>
|
|
<button type="button" class="type-delete" {{action execute}}>Confirm Invalidation</button>
|
|
<button type="button" class="type-cancel" {{action cancel}}>Cancel</button>
|
|
</BlockSlot>
|
|
</ConfirmationDialog>
|
|
</div>
|
|
{{/if}}
|
|
</BlockSlot>
|
|
</AppView> |