mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-03 03:58:01 +00:00
HCP Link Status (#16959)
* adds LinkStatus component to NavHeader to display banner with HCP link status * adds changelog entry * adds period to connected status message * updates hcp link status to current cluster polling to automatically update state
This commit is contained in:
29
ui/app/components/link-status.js
Normal file
29
ui/app/components/link-status.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import Component from '@glimmer/component';
|
||||
import { inject as service } from '@ember/service';
|
||||
|
||||
/**
|
||||
* @module LinkStatus
|
||||
* LinkStatus components are used to indicate link status to the hashicorp cloud platform
|
||||
*
|
||||
* @example
|
||||
* ```js
|
||||
* <LinkStatus @status={{this.currentCluser.cluster.hcpLinkStatus}} />
|
||||
* ```
|
||||
*
|
||||
* @param {string} status - cluster.hcpLinkStatus value from currentCluster service
|
||||
*/
|
||||
|
||||
export default class LinkStatus extends Component {
|
||||
@service store;
|
||||
@service version;
|
||||
|
||||
get showBanner() {
|
||||
// enterprise only feature at this time but will expand to OSS in future release
|
||||
// there are plans to handle connection failure states -- only alert if connected until further states are returned
|
||||
return this.version.isEnterprise && this.args.status === 'connected';
|
||||
}
|
||||
|
||||
get bannerClass() {
|
||||
return this.args.status === 'connected' ? 'connected' : 'warning';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user