vault/ui/lib/replication/addon/templates/components/replication-action-disable.hbs
Joshua Ogle 6603a86499
UI: Confirm Action as a popover
* Refactors ConfirmAction implementation as a popover
* Improves copy surrounding consequences of destructive actions
* Moves 'Delete' buttons to Toolbar
2019-05-17 11:29:21 -06:00

68 lines
2.2 KiB
Handlebars

<h4 class="title is-5 is-marginless">
Disable Replication
</h4>
<div class="content">
<p>
Disable {{replicationDisplayMode}} Replication entirely on the cluster.
{{#if model.replicationAttrs.isPrimary}}
Any secondaries will no longer be able to connect.
{{else if (eq model.replicationAttrs.modeForUrl 'bootstrapping')}}
<br>
Since the cluster is currently bootstrapping, we need to know which mode to disable.
Be sure to choose it below.
<label for="replication-mode" class="is-label">
Replication cluster mode
</label>
<div class="field is-expanded">
<div class="control select is-fullwidth">
<select onchange={{action (mut mode) value="target.value"}} id="replication-mode" name="replication-mode">
{{#each (array 'primary' 'secondary') as |modeOption|}}
<option
selected={{if mode (eq mode modeOption) (eq modeOption 'primary')}}
value={{modeOption}}
>
{{modeOption}}
</option>
{{/each}}
</select>
</div>
</div>
{{else}}
The cluster will no longer be able to connect to the primary.
{{/if}}
<AlertInline
@type="danger"
@message="Caution: re-enabling this node as a primary or secondary will change its cluster ID."
/>
</p>
<p>
In the secondary case this means a wipe of the
underlying storage when connected to a primary, and in the primary case,
secondaries connecting back to the cluster (even if they have connected
before) will require a wipe of the underlying storage.
</p>
</div>
<div class="field">
<div class="control">
<ConfirmAction
@buttonClasses="button is-primary"
@confirmTitle="Disable this cluster?"
@confirmMessage="Data in this cluster will no longer be replicated."
@confirmButtonText="Disable"
@horizontalPosition="auto-left"
@onConfirmAction={{action
"onSubmit"
"disable"
(if
(eq model.replicationAttrs.modeForUrl 'bootstrapping')
mode
model.replicationAttrs.modeForUrl
)
}}
data-test-disable-replication="true"
>
Disable Replication
</ConfirmAction>
</div>
</div>