open-vault/ui/app/components/cluster-info.js
Arnav Palnitkar f2552b708b
Update cluster status partial to component (#11680)
* Update cluster status partial to component

* Added changelog

* Close menu when link is clicked

* Upgraded to glimmer components

* Fixed indentations
Added back activeCluster
Updated changelog
2021-05-27 09:52:51 -07:00

28 lines
695 B
JavaScript

import { inject as service } from '@ember/service';
import Component from '@glimmer/component';
/**
* @module ClusterInfo
*
* @example
* ```js
* <ClusterInfo @cluster={{cluster}} @onLinkClick={{action}} />
* ```
*
* @param {object} cluster - details of the current cluster, passed from the parent.
* @param {Function} onLinkClick - parent action which determines the behavior on link click
*/
export default class ClusterInfoComponent extends Component {
@service auth;
@service store;
@service version;
get activeCluster() {
return this.store.peekRecord('cluster', this.auth.activeCluster);
}
transitionToRoute() {
this.router.transitionTo(...arguments);
}
}