open-consul/ui/packages/consul-ui/app/components/consul/lock-session/form
John Cowen c6dd21f4dd
ui: Refactor KV and Lock Sessions following partitions update (#11666)
This commit uses all our new ways of doing things to Lock Sessions and their interactions with KV and Nodes. This is mostly around are new under-the-hood things, but also I took the opportunity to upgrade some of the CSS to reuse some of our CSS utils that have been made over the past few months (%csv-list and %horizontal-kv-list).

Also added (and worked on existing) documentation for Lock Session related components.
2021-12-01 11:33:33 +00:00
..
README.mdx ui: Refactor KV and Lock Sessions following partitions update (#11666) 2021-12-01 11:33:33 +00:00
index.hbs ui: Refactor KV and Lock Sessions following partitions update (#11666) 2021-12-01 11:33:33 +00:00
index.scss ui: Refactor KV and Lock Sessions following partitions update (#11666) 2021-12-01 11:33:33 +00:00

README.mdx

# Consul::LockSession::Form

A component for rendering and deleting/invalidating a Lock Session.

The form is fully functional and will delete/invalidate and show its
notifications when pressing the delete/invalidate button.

```hbs preview-template
<DataSource
  @src={{uri "/partition/default/dc-1/sessions/for-key/my-kv"}} as |source|>
  {{#if source.data.ID}}
    <Consul::LockSession::Form
      @item={{source.data}}
      @ondelete={{noop}}
    />
  {{/if}}
</DataSource>
```

## Arguments

| Argument/Attribute | Type | Default | Description |
| --- | --- | --- | --- |
| `item` | `array` |  | A Lock Session |
| `ondelete` | `function` |  | An action to confirm when the `delete` (or Invalidate) action is clicked and confirmed |

## See

- [Template Source Code](./index.hbs)

---