/
index.hbs
92 lines (90 loc) · 3.32 KB
/
index.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<PageHeader as |p|>
<p.levelLeft>
<h1 class="title is-3">
Metrics
</h1>
</p.levelLeft>
</PageHeader>
<div class="tabs-container box is-bottomless is-marginless is-fullwidth is-paddingless" data-test-pricing-metrics>
<nav class="tabs">
<ul>
{{#link-to
"vault.cluster.metrics.index"
tagName="li"
activeClass="is-active"
}}
{{#link-to
"vault.cluster.metrics.index"
data-test-usage-tab=true
}}
Vault usage
{{/link-to}}
{{/link-to}}
{{#if model.config.configPath.canRead}}
{{#link-to
"vault.cluster.metrics.config"
tagName="li"
activeClass="is-active"
}}
{{#link-to
"vault.cluster.metrics.config"
data-test-configuration-tab=true
}}
Configuration
{{/link-to}}
{{/link-to}}
{{/if}}
</ul>
</nav>
</div>
{{#if (eq model.config.queriesAvailable false)}}
{{#if (eq model.config.enabled "On")}}
<EmptyState @title="No data is being received" @message="We haven't yet gathered enough data to display here. We collect it at the end of each month, so your data will be available on the first of next month. It will include the current namespace and all its children." />
{{else}}
<EmptyState @title="No data is being received" @message='Tracking is disabled, and no data is being collected. To turn it on, edit the configuration.'>
<p>{{#link-to 'vault.cluster.metrics.config'}}Go to configuration{{/link-to}}</p>
</EmptyState>
{{/if}}
{{else}}
<div class="box is-sideless is-fullwidth is-marginless is-bottomless">
{{#if (eq model.config.enabled 'Off')}}
<AlertBanner
data-test-tracking-disabled
@type="warning"
@title="Tracking is disabled"
>
This feature is currently disabled and data is not being collected. {{#link-to 'vault.cluster.metrics.edit'}}Edit the configuration{{/link-to}} to enable tracking again.
</AlertBanner>
{{/if}}
<p class="has-bottom-margin-s">The active clients metric contributes to billing. It is collected at the end of each month alongside unique entities and direct active tokens. The data below includes the current namespace and all its children.</p>
<PricingMetricsDates
@queryStart={{model.queryStart}}
@queryEnd={{model.queryEnd}}
@resultStart={{model.activity.startTime}}
@resultEnd={{model.activity.endTime}}
@defaultSpan={{or model.config.defaultReportMonths 12}}
@retentionMonths={{model.config.retentionMonths}}
/>
{{#unless model.activity.total}}
<EmptyState @title="No data found" @message="No data exists for that query period. Try searching again." />
{{else}}
<div class="selectable-card-container">
<SelectableCard
@cardTitle="Active clients"
@total={{model.activity.total.clients}}
@subText="Current namespace"
/>
<SelectableCard
@cardTitle="Unique entities"
@total={{model.activity.total.distinct_entities}}
@subText="Current namespace"
/>
<SelectableCard
@cardTitle="Active direct tokens"
@total={{model.activity.total.non_entity_tokens}}
@subText="Current namespace"
/>
</div>
{{/unless}}
</div>
{{/if}}