mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-01 03:36:04 +08:00
Lint fixes
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
@@ -31,7 +31,7 @@ export default class HciClusterNetwork extends HarvesterResource {
|
||||
}
|
||||
|
||||
get isReady() {
|
||||
const readyCondition = (this?.status?.conditions || []).find(c => c.type === 'ready') || {};
|
||||
const readyCondition = (this?.status?.conditions || []).find((c) => c.type === 'ready') || {};
|
||||
|
||||
return readyCondition?.status === 'True';
|
||||
}
|
||||
@@ -44,12 +44,12 @@ export default class HciClusterNetwork extends HarvesterResource {
|
||||
const nodes = this.$rootGetters[`${ this.inStore }/all`](NODE);
|
||||
|
||||
// filter out witness nodes and unschedulable nodes
|
||||
return nodes.filter(n => !n.isUnSchedulable && n.isEtcd !== 'true');
|
||||
return nodes.filter((n) => !n.isUnSchedulable && n.isEtcd !== 'true');
|
||||
}
|
||||
|
||||
get vlanStatuses() {
|
||||
const vlanStatuses = this.$rootGetters[`${ this.inStore }/all`](HCI.VLAN_STATUS);
|
||||
const nodeIds = this.nodes.map(n => n.id);
|
||||
const nodeIds = this.nodes.map((n) => n.id);
|
||||
|
||||
return vlanStatuses.filter((s) => {
|
||||
return nodeIds.includes(s?.status?.node) &&
|
||||
@@ -61,7 +61,7 @@ export default class HciClusterNetwork extends HarvesterResource {
|
||||
if (this.id === 'mgmt') {
|
||||
return true;
|
||||
} else {
|
||||
const readyStatuses = this.vlanStatuses.filter(s => s.isReady) || [];
|
||||
const readyStatuses = this.vlanStatuses.filter((s) => s.isReady) || [];
|
||||
|
||||
return readyStatuses.length === this.nodes.length && this.isReady;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user