4fd783d3f4
* Add http request volume table (#6765) * init http metrics page * remove flex-table-column * add http requests table * calculate percent change between each counter * start percent change tests * style request table * show percent more/less glyph * add percent more less tests * add inline alert about recorded metrics * make arrows diagonal * remove conditional inside countersWithChange * add better error msg * use tagName and wrapping element a la glimmer components * extend ClusterRouteBase so auth and seal checks happen * make table accessible * remove curlies * add HttpRequestsTable to storybook * make table accessible * use qunit dom for better assertions * remove EmptyState since we will never have 0 requests * ensure counters is set in test context * Http request volume/add barchart (#6814) * Add http request volume table (#6765) * init http metrics page * remove flex-table-column * add http requests table * calculate percent change between each counter * start percent change tests * style request table * show percent more/less glyph * add percent more less tests * add inline alert about recorded metrics * make arrows diagonal * remove conditional inside countersWithChange * add better error msg * use tagName and wrapping element a la glimmer components * extend ClusterRouteBase so auth and seal checks happen * make table accessible * remove curlies * add HttpRequestsTable to storybook * make table accessible * use qunit dom for better assertions * remove EmptyState since we will never have 0 requests * ensure counters is set in test context * add http-requests-bar-chart * add HttpRequestsBarChart tests * add HttpRequestsBarChart to Storybook * format total number of requests according to locale * do not show extra minus sign when percent change is negative * add link to request metrics in status bar menu * only show bar chart if we have data for more than 1 month * make ticks lighter * ensure charts show data for correct month * make example counters response look like the adapter response instead of the raw api response * ensure ui shows the same utc date as the api response * add format-utc tests * downgrade to d3 v4 to support ie11 * add gridlines * move dasharray to css * use scheduleOnce instead of debounce to prevent multiple re-renders * add key function to bars * add exit case when data is no longer in parsedCounters * fix timestamp in table test * fix timestamps * use utcParse and fallback to isoParse for non-UTC dates * fix bar chart tests
141 lines
5 KiB
Handlebars
141 lines
5 KiB
Handlebars
<div class="popup-menu-content">
|
|
<div class="box">
|
|
{{#unless version.isOSS}}
|
|
{{#if (and activeCluster.unsealed auth.currentToken)}}
|
|
{{#if (has-permission 'status' routeParams='replication')}}
|
|
<nav class="menu">
|
|
<p class="menu-label">Replication</p>
|
|
<ul>
|
|
{{#if cluster.anyReplicationEnabled}}
|
|
<li>
|
|
{{#link-to
|
|
"vault.cluster.replication.mode.index"
|
|
"dr"
|
|
disabled=(not currentToken)
|
|
invokeAction=(action onLinkClick)
|
|
}}
|
|
{{replication-mode-summary
|
|
mode="dr"
|
|
display='menu'
|
|
cluster=cluster
|
|
}}
|
|
{{/link-to}}
|
|
</li>
|
|
<li>
|
|
{{#if (has-feature "Performance Replication")}}
|
|
{{#link-to
|
|
"vault.cluster.replication.mode.index"
|
|
"performance"
|
|
disabled=(not currentToken)
|
|
invokeAction=(action onLinkClick)
|
|
}}
|
|
{{replication-mode-summary
|
|
mode="performance"
|
|
display="menu"
|
|
cluster=cluster
|
|
tagName="span"
|
|
}}
|
|
{{/link-to}}
|
|
{{else}}
|
|
{{replication-mode-summary
|
|
mode="performance"
|
|
display="menu"
|
|
cluster=cluster
|
|
class="menu-item"
|
|
}}
|
|
{{/if}}
|
|
</li>
|
|
{{else}}
|
|
<li>
|
|
{{#link-to "vault.cluster.replication"
|
|
invokeAction=(action onLinkClick)
|
|
}}
|
|
<div class="level is-mobile">
|
|
<span class="level-left">Enable</span>
|
|
<Icon @glyph="plus-circle-outline" @class="has-text-grey-light level-right" />
|
|
</div>
|
|
{{/link-to}}
|
|
</li>
|
|
{{/if}}
|
|
</ul>
|
|
</nav>
|
|
<hr/>
|
|
{{/if}}
|
|
{{/if}}
|
|
{{#if (has-permission 'status' routeParams='license')}}
|
|
<nav class="menu">
|
|
<div class="menu-label">
|
|
License
|
|
</div>
|
|
<ul class="menu-list">
|
|
<li class="action">
|
|
{{#link-to "vault.cluster.license" activeCluster.name invokeAction=onLinkClick}}
|
|
<div class="level is-mobile">
|
|
<span class="level-left">See details</span>
|
|
<Chevron class="has-text-grey-light level-right" />
|
|
</div>
|
|
{{/link-to}}
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
<hr/>
|
|
{{/if}}
|
|
{{/unless}}
|
|
<nav class="menu">
|
|
<div class="menu-label">
|
|
Seal status
|
|
</div>
|
|
<ul class="menu-list">
|
|
<li class="action">
|
|
{{#if activeCluster.unsealed}}
|
|
{{#if (has-permission 'status' routeParams='seal')}}
|
|
{{#link-to 'vault.cluster.settings.seal' cluster.name
|
|
invokeAction=(action (queue (action onLinkClick) (action d.actions.close)))
|
|
}}
|
|
<div class="level is-mobile">
|
|
<span class="level-left">Unsealed</span>
|
|
<Icon @glyph="check-circle-outline" class="has-text-success level-right" />
|
|
</div>
|
|
{{/link-to}}
|
|
{{else}}
|
|
<span class="menu-item">
|
|
<div class="level is-mobile">
|
|
<span class="level-left">Unsealed</span>
|
|
<Icon @glyph="check-circle-outline" class="has-text-success level-right" />
|
|
</div>
|
|
</span>
|
|
{{/if}}
|
|
{{else}}
|
|
<span class="menu-item">
|
|
<div class="level is-mobile">
|
|
<span class="level-left has-text-danger">Sealed</span>
|
|
<Icon @glyph="cancel-circle-outline" class="has-text-danger level-right" />
|
|
</div>
|
|
</span>
|
|
{{/if}}
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
{{#if (has-permission 'metrics' routeParams='requests')}}
|
|
<hr />
|
|
<nav class="menu">
|
|
<div class="menu-label">
|
|
Metrics
|
|
</div>
|
|
<ul class="menu-list">
|
|
<li class="action">
|
|
{{#if activeCluster.unsealed}}
|
|
{{#link-to "vault.cluster.requests"}}
|
|
<div class="level is-mobile">
|
|
<span class="level-left">HTTP Requests</span>
|
|
<Chevron class="has-text-grey-light level-right" />
|
|
</div>
|
|
{{/link-to}}
|
|
{{/if}}
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|