open-vault/ui/app/templates/components/pricing-metrics-dates.hbs
claire bontempo dacbc154af
UI/Client count page bug fixes (#12914)
* fix spacing between bars

* fix month displayed on client count page

* centers tooltip over cursor when page browser fills window

* wraps date.length check in conditional

* adds test to date-format helper

* formats client count numbers

* fixes tooltip miscalculating percent

* fixes config data for monthly mirage endpoint
2021-10-26 16:10:09 -07:00

45 lines
1.3 KiB
Handlebars

<form onsubmit={{action "handleQuery"}}>
<div class="field-body pricing-metrics-date-form" data-test-pricing-metrics-form>
<div class="field is-narrow">
<label for="start" class="is-label">From</label>
<div class="control">
<Input
@type="string"
@value={{start}}
@name="start"
class={{concat "input" (unless startDate " has-error")}}
@autocomplete="off"
@spellcheck="false"
data-test-start-input="true"
/>
</div>
</div>
<div class="field is-narrow">
<label for="end" class="is-label">Through</label>
<div class="control">
<Input
@type="string"
@value={{end}}
@name="end"
class={{concat "input" (unless endDate " has-error")}}
@autocomplete="off"
@spellcheck="false"
data-test-end-input="true"
/>
</div>
</div>
<button disabled={{error}} type="submit" class="button">Query</button>
</div>
</form>
{{#if error}}
<FormError>{{error}}</FormError>
{{/if}}
<div class="box is-fullwidth is-shadowless">
{{#if (and resultStart resultEnd)}}
<h2 class="title is-4" data-test-pricing-result-dates>
{{date-format resultStart "MMM dd, yyyy" dateOnly=true}} through {{date-format resultEnd "MMM dd, yyyy" dateOnly=true}}
</h2>
{{/if}}
</div>