5ce35d1c52
* first round of fixes and setup * test fixes * fix dumb options on new method * test fix * clean up * fixes * clean up * handle utc time * add changelog
77 lines
2.4 KiB
Handlebars
77 lines
2.4 KiB
Handlebars
{{#if (eq mode "edit")}}
|
||
<form onsubmit={{action "onSaveChanges"}} data-test-pricing-metrics-config-form>
|
||
<div class="box is-sideless is-fullwidth is-marginless">
|
||
{{message-error model=model errorMessage=error}}
|
||
{{#each model.configAttrs as |attr|}}
|
||
<FormField
|
||
data-test-field
|
||
@attr={{attr}}
|
||
@model={{model}}
|
||
/>
|
||
{{/each}}
|
||
</div>
|
||
<div class="field is-grouped-split box is-fullwidth is-bottomless">
|
||
<div class="control">
|
||
<button
|
||
type="submit"
|
||
disabled={{buttonDisabled}}
|
||
class="button is-primary"
|
||
data-test-edit-metrics-config-save=true
|
||
>
|
||
Save
|
||
</button>
|
||
{{#link-to
|
||
"vault.cluster.metrics.config"
|
||
class="button"
|
||
}}
|
||
Cancel
|
||
{{/link-to}}
|
||
</div>
|
||
</div>
|
||
</form>
|
||
<Modal
|
||
@title={{modalTitle}}
|
||
@onClose={{action (mut modalOpen) false}}
|
||
@isActive={{modalOpen}}
|
||
@type="warning"
|
||
@showCloseButton={{true}}
|
||
>
|
||
<section class="modal-card-body">
|
||
{{#if (eq model.enabled "On")}}
|
||
<p class="has-bottom-margin-s">Vault will start tracking data starting from today’s date, {{date-format (now) "d MMMM yyyy"}}. You will not be able to see or query usage until the end of the month.</p>
|
||
<p>If you’ve previously enabled usage tracking, that historical data will still be available to you.</p>
|
||
{{else}}
|
||
<p class="has-bottom-margin-s">Turning usage tracking off means that all data for the current month will be deleted. You will still be able to query previous months.</p>
|
||
<p>Are you sure?</p>
|
||
{{/if}}
|
||
</section>
|
||
<footer class="modal-card-foot modal-card-foot-outlined">
|
||
<button
|
||
type="button"
|
||
class="button is-secondary"
|
||
onclick={{action (mut modalOpen) false}}
|
||
data-test-metrics-config-cancel
|
||
>
|
||
Cancel
|
||
</button>
|
||
<button
|
||
type="button"
|
||
class="button is-primary"
|
||
onclick={{perform save}}
|
||
>
|
||
Continue
|
||
</button>
|
||
</footer>
|
||
</Modal>
|
||
{{else}}
|
||
<div class="tabs-container box is-bottomless is-marginless is-fullwidth is-paddingless" data-test-pricing-metrics-config-table>
|
||
{{#each infoRows as |item|}}
|
||
<InfoTableRow
|
||
@label={{item.label}}
|
||
@helperText={{item.helperText}}
|
||
@value={{get model item.valueKey}}
|
||
/>
|
||
{{/each}}
|
||
</div>
|
||
{{/if}}
|