ui - add force option when promoting a replication secondary (#5438)
This commit is contained in:
parent
03cf7958ad
commit
87ed1e4f52
|
@ -10,6 +10,7 @@ const DEFAULTS = {
|
|||
errors: [],
|
||||
id: null,
|
||||
replicationMode: null,
|
||||
force: false,
|
||||
};
|
||||
|
||||
export default Component.extend(ReplicationActions, DEFAULTS, {
|
||||
|
|
|
@ -32,6 +32,23 @@
|
|||
Overrides the cluster address that the primary gives to secondary nodes.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<div class="b-checkbox">
|
||||
<input type="checkbox"
|
||||
id="forcePromote"
|
||||
class="styled"
|
||||
checked={{force}}
|
||||
onchange={{action (mut force) value="target.checked"}}
|
||||
/>
|
||||
<label for="forcePromote" class="is-label">
|
||||
Force promotion of this cluster
|
||||
</label>
|
||||
</div>
|
||||
<p class="help has-text-grey">
|
||||
Promote the cluster even if certain safety checks fail.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
@ -40,7 +57,7 @@
|
|||
<div class="control">
|
||||
{{#confirm-action
|
||||
buttonClasses="button is-primary"
|
||||
onConfirmAction=(action "onSubmit" "promote" model.replicationAttrs.modeForUrl (hash dr_operation_token=dr_operation_token primary_cluster_addr=primary_cluster_addr))
|
||||
onConfirmAction=(action "onSubmit" "promote" model.replicationAttrs.modeForUrl (hash dr_operation_token=dr_operation_token primary_cluster_addr=primary_cluster_addr force=force))
|
||||
confirmMessage="Are you sure you want to promote this cluster?"
|
||||
confirmButtonText="Promote cluster"
|
||||
cancelButtonText="Cancel"
|
||||
|
@ -71,12 +88,28 @@
|
|||
Overrides the cluster address that the primary gives to secondary nodes.
|
||||
</p>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="b-checkbox">
|
||||
<input type="checkbox"
|
||||
id="forcePromote"
|
||||
class="styled"
|
||||
checked={{force}}
|
||||
onchange={{action (mut force) value="target.checked"}}
|
||||
/>
|
||||
<label for="forcePromote" class="is-label">
|
||||
Force promotion of this cluster
|
||||
</label>
|
||||
</div>
|
||||
<p class="help has-text-grey">
|
||||
Promote the cluster even if certain safety checks fail.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="control">
|
||||
{{#confirm-action
|
||||
buttonClasses="button is-primary"
|
||||
onConfirmAction=(action "onSubmit" "promote" model.replicationAttrs.modeForUrl (hash primary_cluster_addr=primary_cluster_addr))
|
||||
onConfirmAction=(action "onSubmit" "promote" model.replicationAttrs.modeForUrl (hash primary_cluster_addr=primary_cluster_addr force=force))
|
||||
confirmMessage="Are you sure you want to promote this cluster?"
|
||||
confirmButtonText="Promote cluster"
|
||||
cancelButtonText="Cancel"
|
||||
|
|
Loading…
Reference in New Issue