Lint fixes

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
Francesco Torchia
2024-11-12 11:50:20 +01:00
parent 19b11aac2c
commit 4626d56acd
214 changed files with 3162 additions and 1298 deletions
@@ -40,7 +40,7 @@ export default {
addons: this.$store.dispatch(`${ inStore }/findAll`, { type: HCI.ADD_ONS }),
});
this.enabledPCI = hash.addons.find(addon => addon.name === ADD_ONS.PCI_DEVICE_CONTROLLER)?.spec?.enabled === true;
this.enabledPCI = hash.addons.find((addon) => addon.name === ADD_ONS.PCI_DEVICE_CONTROLLER)?.spec?.enabled === true;
this.$store.dispatch('type-map/configureType', { match: HCI.PCI_DEVICE, isCreatable: this.enabledPCI });
} catch (e) {}
@@ -81,7 +81,11 @@ export default {
{{ t('harvester.pci.noPCIPermission') }}
</Banner>
</div>
<DeviceList v-else-if="hasSchema && enabledPCI" :devices="rows" :schema="schema" />
<DeviceList
v-else-if="hasSchema && enabledPCI"
:devices="rows"
:schema="schema"
/>
<div v-else>
<Banner color="warning">
<MessageLink
@@ -33,8 +33,8 @@ export default {
addons: this.$store.dispatch(`${ inStore }/findAll`, { type: HCI.ADD_ONS }),
});
this.hasPCIAddon = hash.addons.find(addon => addon.name === ADD_ONS.PCI_DEVICE_CONTROLLER)?.spec?.enabled === true;
this.hasSriovgpuAddon = hash.addons.find(addon => addon.name === ADD_ONS.NVIDIA_DRIVER_TOOLKIT_CONTROLLER)?.spec?.enabled === true;
this.hasPCIAddon = hash.addons.find((addon) => addon.name === ADD_ONS.PCI_DEVICE_CONTROLLER)?.spec?.enabled === true;
this.hasSriovgpuAddon = hash.addons.find((addon) => addon.name === ADD_ONS.NVIDIA_DRIVER_TOOLKIT_CONTROLLER)?.spec?.enabled === true;
} catch (e) {}
}
},
@@ -30,7 +30,7 @@ export default {
addons: this.$store.dispatch(`${ inStore }/findAll`, { type: HCI.ADD_ONS }),
});
this.hasPCIAddon = hash.addons.find(addon => addon.name === ADD_ONS.PCI_DEVICE_CONTROLLER)?.spec?.enabled === true;
this.hasPCIAddon = hash.addons.find((addon) => addon.name === ADD_ONS.PCI_DEVICE_CONTROLLER)?.spec?.enabled === true;
} catch (e) {}
}
},
@@ -79,5 +79,9 @@ export default {
/>
</Banner>
</div>
<DeviceList v-else-if="hasSchema" :devices="devices" :schema="schema" />
<DeviceList
v-else-if="hasSchema"
:devices="devices"
:schema="schema"
/>
</template>
@@ -30,8 +30,8 @@ export default {
addons: this.$store.dispatch(`${ inStore }/findAll`, { type: HCI.ADD_ONS }),
});
this.hasPCIAddon = hash.addons.find(addon => addon.name === ADD_ONS.PCI_DEVICE_CONTROLLER)?.spec?.enabled === true;
this.hasSriovgpuAddon = hash.addons.find(addon => addon.name === ADD_ONS.NVIDIA_DRIVER_TOOLKIT_CONTROLLER)?.spec?.enabled === true;
this.hasPCIAddon = hash.addons.find((addon) => addon.name === ADD_ONS.PCI_DEVICE_CONTROLLER)?.spec?.enabled === true;
this.hasSriovgpuAddon = hash.addons.find((addon) => addon.name === ADD_ONS.NVIDIA_DRIVER_TOOLKIT_CONTROLLER)?.spec?.enabled === true;
this.hasSRIOVGPUSchema = !!this.$store.getters[`${ inStore }/schemaFor`](HCI.SR_IOVGPU_DEVICE);
if (this.hasSRIOVGPUSchema) {
@@ -64,7 +64,7 @@ export default {
const srioVGpuDevices = this.$store.getters[`${ inStore }/all`](HCI.SR_IOVGPU_DEVICE) || [];
if (this.hasSRIOVGPUSchema) {
return vGpuDevices.filter(device => !!srioVGpuDevices.find(s => s.isEnabled && s.spec?.nodeName === device.spec?.nodeName));
return vGpuDevices.filter((device) => !!srioVGpuDevices.find((s) => s.isEnabled && s.spec?.nodeName === device.spec?.nodeName));
}
return vGpuDevices;
@@ -108,5 +108,9 @@ export default {
/>
</Banner>
</div>
<VGpuDeviceList v-else-if="hasSchema" :devices="rows" :schema="schema" />
<VGpuDeviceList
v-else-if="hasSchema"
:devices="rows"
:schema="schema"
/>
</template>
+4 -1
View File
@@ -66,7 +66,10 @@ export default {
>
<template #cell:name="scope">
<div class="cell-name">
<LinkDetail v-model:value="scope.row.displayName" :row="scope.row" />
<LinkDetail
v-model:value="scope.row.displayName"
:row="scope.row"
/>
<a
v-if="scope.row.metadata.name === 'rancher-vcluster' && scope.row.spec.enabled"
@@ -29,7 +29,7 @@ export default {
const configSchema = this.$store.getters[`${ inStore }/schemaFor`](CONFIG_MAP);
if (!configSchema?.collectionMethods.find(x => x.toLowerCase() === 'post')) {
if (!configSchema?.collectionMethods.find((x) => x.toLowerCase() === 'post')) {
this.$store.dispatch('type-map/configureType', { match: HCI.CLOUD_TEMPLATE, isCreatable: false });
}
},
@@ -54,7 +54,7 @@ export default {
},
filteredRows() {
return this.rows.filter(r => !!r.metadata?.labels?.[HCI_ANNOTATIONS.CLOUD_INIT]);
return this.rows.filter((r) => !!r.metadata?.labels?.[HCI_ANNOTATIONS.CLOUD_INIT]);
},
schema() {
@@ -78,6 +78,5 @@ export default {
:schema="schema"
:rows="filteredRows"
key-field="_key"
/>
</template>
@@ -181,7 +181,7 @@ export default {
const addons = this.$store.getters[`${ inStore }/all`](HCI.ADD_ONS);
this.monitoring = addons.find(addon => addon.id === MONITORING_ID);
this.monitoring = addons.find((addon) => addon.id === MONITORING_ID);
this.enabledMonitoringAddon = this.monitoring?.spec?.enabled;
},
@@ -241,7 +241,7 @@ export default {
accessibleResources() {
const inStore = this.$store.getters['currentProduct'].inStore;
return RESOURCES.filter(resource => this.$store.getters[`${ inStore }/schemaFor`](resource.type));
return RESOURCES.filter((resource) => this.$store.getters[`${ inStore }/schemaFor`](resource.type));
},
totalCountGaugeInput() {
@@ -370,7 +370,7 @@ export default {
},
storageStats() {
const storageOverProvisioningPercentageSetting = this.longhornSettings.find(s => s.id === 'longhorn-system/storage-over-provisioning-percentage');
const storageOverProvisioningPercentageSetting = this.longhornSettings.find((s) => s.id === 'longhorn-system/storage-over-provisioning-percentage');
const stats = this.longhornNodes.reduce((total, node) => {
const disks = node?.spec?.disks || {};
const diskStatus = node?.status?.diskStatus || {};
@@ -412,19 +412,19 @@ export default {
},
vmEvents() {
return this.events.filter( E => ['VirtualMachineInstance', 'VirtualMachine'].includes(E.involvedObject.kind));
return this.events.filter( (E) => ['VirtualMachineInstance', 'VirtualMachine'].includes(E.involvedObject.kind));
},
volumeEvents() {
return this.events.filter( E => ['PersistentVolumeClaim'].includes(E.involvedObject.kind));
return this.events.filter( (E) => ['PersistentVolumeClaim'].includes(E.involvedObject.kind));
},
hostEvents() {
return this.events.filter( E => ['Node'].includes(E.involvedObject.kind));
return this.events.filter( (E) => ['Node'].includes(E.involvedObject.kind));
},
imageEvents() {
return this.events.filter( E => ['VirtualMachineImage'].includes(E.involvedObject.kind));
return this.events.filter( (E) => ['VirtualMachineImage'].includes(E.involvedObject.kind));
},
hasMetricsTabs() {
@@ -435,7 +435,7 @@ export default {
const inStore = this.$store.getters['currentProduct'].inStore;
const pods = this.$store.getters[`${ inStore }/all`](POD) || [];
return pods.filter(p => p?.metadata?.name !== 'removing');
return pods.filter((p) => p?.metadata?.name !== 'removing');
},
cpuReserved() {
@@ -458,14 +458,14 @@ export default {
},
availableNodes() {
return (this.metricNodes || []).map(node => node.id);
return (this.metricNodes || []).map((node) => node.id);
},
metricAggregations() {
const nodes = this.nodes;
const someNonWorkerRoles = this.nodes.some(node => node.hasARole && !node.isWorker);
const someNonWorkerRoles = this.nodes.some((node) => node.hasARole && !node.isWorker);
const metrics = this.nodeMetrics.filter((nodeMetrics) => {
const node = nodes.find(nd => nd.id === nodeMetrics.id);
const node = nodes.find((nd) => nd.id === nodeMetrics.id);
return node && (!someNonWorkerRoles || node.isWorker);
});
@@ -630,7 +630,9 @@ export default {
<div class="resource-gauges">
<ResourceSummary
v-for="(resource, i) in totalCountGaugeInput" :key="i" :spoofed-counts="resource.isSpoofed ? resource : null"
v-for="(resource, i) in totalCountGaugeInput"
:key="i"
:spoofed-counts="resource.isSpoofed ? resource : null"
:resource="resource.resource"
/>
</div>
+12 -3
View File
@@ -221,14 +221,23 @@ export default {
:rows="[...rows]"
:namespaced="false"
key-field="_key"
>
<template #cell:console="{row}">
<div class="console-button">
<button v-clean-tooltip="consoleTooltip(row)" type="button" class="mr-5 btn btn-sm role-primary" :disabled="!row.consoleUrl" @click="goto(row)">
<button
v-clean-tooltip="consoleTooltip(row)"
type="button"
class="mr-5 btn btn-sm role-primary"
:disabled="!row.consoleUrl"
@click="goto(row)"
>
{{ t('harvester.host.console') }}
</button>
<a v-if="!row.consoleUrl" :href="consoleDocLink" target="_blank"><i class="icon icon-info" /></a>
<a
v-if="!row.consoleUrl"
:href="consoleDocLink"
target="_blank"
><i class="icon icon-info" /></a>
</div>
</template>
</ResourceTable>
@@ -45,7 +45,7 @@ export default {
this.rows = hash.rows;
this.loggingAddon = hash.loggingAddon;
this.$store.dispatch('type-map/configureType', { match: HCI.CLUSTER_FLOW, isCreatable: this.listSchema && this.listSchema?.collectionMethods.find(x => x.toLowerCase() === 'post') });
this.$store.dispatch('type-map/configureType', { match: HCI.CLUSTER_FLOW, isCreatable: this.listSchema && this.listSchema?.collectionMethods.find((x) => x.toLowerCase() === 'post') });
},
data() {
@@ -77,7 +77,10 @@ export default {
<template>
<Loading v-if="$fetchState.pending" />
<div v-else-if="listSchema">
<Banner v-if="loggingEnabled === false" color="info">
<Banner
v-if="loggingEnabled === false"
color="info"
>
<MessageLink
:to="to"
prefix-label="harvester.logging.diabledTips.prefix"
@@ -86,9 +89,17 @@ export default {
/>
</Banner>
<ResourceTable :schema="schema" :rows="rows" :ignore-filter="true" :groupable="false" />
<ResourceTable
:schema="schema"
:rows="rows"
:ignore-filter="true"
:groupable="false"
/>
</div>
<Banner v-else color="warning">
<Banner
v-else
color="warning"
>
{{ t('harvester.generic.noSchema', {schema: schema.id}) }}
</Banner>
</template>
@@ -44,7 +44,7 @@ export default {
this.rows = hash.rows;
this.loggingAddon = hash.loggingAddon;
this.$store.dispatch('type-map/configureType', { match: HCI.CLUSTER_OUTPUT, isCreatable: this.listSchema && this.listSchema?.collectionMethods.find(x => x.toLowerCase() === 'post') });
this.$store.dispatch('type-map/configureType', { match: HCI.CLUSTER_OUTPUT, isCreatable: this.listSchema && this.listSchema?.collectionMethods.find((x) => x.toLowerCase() === 'post') });
},
data() {
@@ -76,7 +76,10 @@ export default {
<template>
<Loading v-if="$fetchState.pending" />
<div v-else-if="listSchema">
<Banner v-if="loggingEnabled === false" color="info">
<Banner
v-if="loggingEnabled === false"
color="info"
>
<MessageLink
:to="to"
prefix-label="harvester.logging.diabledTips.prefix"
@@ -85,9 +88,17 @@ export default {
/>
</Banner>
<ResourceTable :schema="schema" :rows="rows" :ignore-filter="true" :groupable="false" />
<ResourceTable
:schema="schema"
:rows="rows"
:ignore-filter="true"
:groupable="false"
/>
</div>
<Banner v-else color="warning">
<Banner
v-else
color="warning"
>
{{ t('harvester.generic.noSchema', {schema: schema.id}) }}
</Banner>
</template>
@@ -50,7 +50,7 @@ export default {
this.rows = hash.rows;
this.loggingAddon = hash.loggingAddon;
this.$store.dispatch('type-map/configureType', { match: HCI.FLOW, isCreatable: this.listSchema && this.listSchema?.collectionMethods.find(x => x.toLowerCase() === 'post') });
this.$store.dispatch('type-map/configureType', { match: HCI.FLOW, isCreatable: this.listSchema && this.listSchema?.collectionMethods.find((x) => x.toLowerCase() === 'post') });
},
data() {
@@ -82,7 +82,10 @@ export default {
<template>
<Loading v-if="$fetchState.pending" />
<div v-else-if="listSchema">
<Banner v-if="loggingEnabled === false" color="info">
<Banner
v-if="loggingEnabled === false"
color="info"
>
<MessageLink
:to="to"
prefix-label="harvester.logging.diabledTips.prefix"
@@ -91,9 +94,17 @@ export default {
/>
</Banner>
<ResourceTable :schema="schema" :rows="rows" :ignore-filter="true" :groupable="false" />
<ResourceTable
:schema="schema"
:rows="rows"
:ignore-filter="true"
:groupable="false"
/>
</div>
<Banner v-else color="warning">
<Banner
v-else
color="warning"
>
{{ t('harvester.generic.noSchema', {schema: schema.id}) }}
</Banner>
</template>
@@ -44,7 +44,7 @@ export default {
this.rows = hash.rows;
this.loggingAddon = hash.loggingAddon;
this.$store.dispatch('type-map/configureType', { match: HCI.OUTPUT, isCreatable: this.listSchema && this.listSchema?.collectionMethods.find(x => x.toLowerCase() === 'post') });
this.$store.dispatch('type-map/configureType', { match: HCI.OUTPUT, isCreatable: this.listSchema && this.listSchema?.collectionMethods.find((x) => x.toLowerCase() === 'post') });
},
data() {
@@ -76,7 +76,10 @@ export default {
<template>
<Loading v-if="$fetchState.pending" />
<div v-else-if="listSchema">
<Banner v-if="loggingEnabled === false" color="info">
<Banner
v-if="loggingEnabled === false"
color="info"
>
<MessageLink
:to="to"
prefix-label="harvester.logging.diabledTips.prefix"
@@ -85,9 +88,17 @@ export default {
/>
</Banner>
<ResourceTable :schema="schema" :rows="rows" :ignore-filter="true" :groupable="false" />
<ResourceTable
:schema="schema"
:rows="rows"
:ignore-filter="true"
:groupable="false"
/>
</div>
<Banner v-else color="warning">
<Banner
v-else
color="warning"
>
{{ t('harvester.generic.noSchema', {schema: schema.id}) }}
</Banner>
</template>
@@ -42,7 +42,7 @@ export default {
const configSchema = this.$store.getters[`${ inStore }/schemaFor`](MONITORING.ALERTMANAGERCONFIG);
this.$store.dispatch('type-map/configureType', { match: HCI.ALERTMANAGERCONFIG, isCreatable: configSchema?.collectionMethods.find(x => x.toLowerCase() === 'post') });
this.$store.dispatch('type-map/configureType', { match: HCI.ALERTMANAGERCONFIG, isCreatable: configSchema?.collectionMethods.find((x) => x.toLowerCase() === 'post') });
},
data() {
@@ -78,7 +78,10 @@ export default {
<template>
<Loading v-if="$fetchState.pending" />
<div v-else>
<Banner v-if="monitoringEnabled === false" color="info">
<Banner
v-if="monitoringEnabled === false"
color="info"
>
<MessageLink
:to="to"
prefix-label="harvester.monitoring.alertmanagerConfig.diabledMonitoringTips.prefix"
@@ -86,7 +89,10 @@ export default {
suffix-label="harvester.monitoring.alertmanagerConfig.diabledMonitoringTips.suffix"
/>
</Banner>
<Banner v-if="alertingEnabled === false" color="info">
<Banner
v-if="alertingEnabled === false"
color="info"
>
<MessageLink
:to="to"
prefix-label="harvester.monitoring.alertmanagerConfig.diabledAlertingTips.prefix"
@@ -125,9 +125,9 @@ export default {
},
abnormalNetwork() {
const notReadyCrd = this.hostNetworks.filter( O => !O.isReady);
const notReadyCrd = this.hostNetworks.filter( (O) => !O.isReady);
return notReadyCrd.map( O => O.linkMessage);
return notReadyCrd.map( (O) => O.linkMessage);
},
filterRows() {
@@ -148,7 +148,9 @@ export default {
<div v-else>
<template v-if="abnormalNetwork.length">
<Banner
v-for="(item, i) in abnormalNetwork" :key="i" color="error"
v-for="(item, i) in abnormalNetwork"
:key="i"
color="error"
>
<router-link :to="item.to">
{{ item.name }}:
@@ -165,7 +167,6 @@ export default {
:groupable="true"
:rows="filterRows"
key-field="_key"
>
<template #cell:state="{row}">
<div class="state">
@@ -68,7 +68,7 @@ export default {
},
filteredRows() {
return this.rows.filter(R => R.spec?.type !== BACKUP_TYPE.SNAPSHOT);
return this.rows.filter((R) => R.spec?.type !== BACKUP_TYPE.SNAPSHOT);
},
typeDisplay() {
@@ -91,7 +91,7 @@ export default {
:schema="schema"
:resource="resource"
:type-display="typeDisplay"
:parentNameOverride="'Virtual Machine schedule'"
:parent-name-override="'Virtual Machine schedule'"
:create-button-label="t('harvester.schedule.createButtonText')"
/>
<ResourceTable
@@ -15,8 +15,8 @@ const schema = {
};
export default {
name: 'HarvesterSecret',
components: { ResourceTable, Loading },
name: 'HarvesterSecret',
components: { ResourceTable, Loading },
inheritAttrs: false,
async fetch() {
@@ -26,7 +26,7 @@ export default {
const configSchema = this.$store.getters[`${ inStore }/schemaFor`](SECRET);
if (!configSchema?.collectionMethods.find(x => x.toLowerCase() === 'post')) {
if (!configSchema?.collectionMethods.find((x) => x.toLowerCase() === 'post')) {
this.$store.dispatch('type-map/configureType', { match: HCI.SECRET, isCreatable: false });
}
},
@@ -56,6 +56,5 @@ export default {
:schema="schema"
:rows="rows"
key-field="_key"
/>
</template>
@@ -136,7 +136,10 @@ export default {
<template>
<Loading v-if="$fetchState.pending" />
<div v-else>
<Banner color="warning" class="settings-banner">
<Banner
color="warning"
class="settings-banner"
>
<div>
{{ t('harvester.setting.modifiedMessage') }}
</div>
@@ -34,7 +34,7 @@ export default {
const storageSchema = this.$store.getters[`${ inStore }/schemaFor`](STORAGE_CLASS);
if ( storageSchema && !storageSchema?.collectionMethods.find(x => ['blocked-post', 'post'].includes(x.toLowerCase())) ) {
if ( storageSchema && !storageSchema?.collectionMethods.find((x) => ['blocked-post', 'post'].includes(x.toLowerCase())) ) {
this.$store.dispatch('type-map/configureType', { match: HCI.STORAGE, isCreatable: false });
}
},
@@ -49,7 +49,7 @@ export default {
const storages = this.$store.getters[`${ inStore }/all`](STORAGE_CLASS);
return storages.filter(s => !s.parameters?.backingImage);
return storages.filter((s) => !s.parameters?.backingImage);
},
headers() {
@@ -38,7 +38,7 @@ export default {
this.rows = hash.backups;
this.settings = hash.settings;
if (this.$store.getters[`${ inStore }/schemaFor`](HCI.SETTING)) {
const backupTargetResource = hash.settings.find( O => O.id === 'backup-target');
const backupTargetResource = hash.settings.find( (O) => O.id === 'backup-target');
const isEmpty = this.getBackupTargetValueIsEmpty(backupTargetResource);
if (backupTargetResource && !isEmpty) {
@@ -161,16 +161,16 @@ export default {
},
hasBackupProgresses() {
return !!this.backups.find(r => r.status?.progress !== undefined);
return !!this.backups.find((r) => r.status?.progress !== undefined);
},
filteredRows() {
return this.backups.filter(r => r.spec?.type !== BACKUP_TYPE.SNAPSHOT);
return this.backups.filter((r) => r.spec?.type !== BACKUP_TYPE.SNAPSHOT);
},
getRawRows() {
return this.rows.filter(r => r.spec?.type === BACKUP_TYPE.BACKUP);
return this.rows.filter((r) => r.spec?.type === BACKUP_TYPE.BACKUP);
},
backupTargetResource() {
return this.settings.find(O => O.id === 'backup-target');
return this.settings.find((O) => O.id === 'backup-target');
},
isEmptyValue() {
@@ -70,10 +70,13 @@ export default {
:schema="schema"
:sort-generation-fn="sortGenerationFn"
key-field="_key"
>
<template #more-header-middle>
<FilterLabel ref="filterLabel" :rows="rows" @changeRows="changeRows" />
<FilterLabel
ref="filterLabel"
:rows="rows"
@changeRows="changeRows"
/>
</template>
<template #col:name="{row}">
<td>
@@ -83,7 +86,10 @@ export default {
:to="row.detailLocation"
>
{{ row.nameDisplay }}
<i v-if="row.isEncrypted" class="icon icon-lock" />
<i
v-if="row.isEncrypted"
class="icon icon-lock"
/>
</router-link>
<span v-else>
{{ row.nameDisplay }}
@@ -108,12 +108,14 @@ export default {
:schema="schema"
:group-can-action="true"
key-field="_key"
>
<template #group-by="group">
<div class="group-bar">
<div class="group-tab">
<div v-clean-html="templateLabel(group.group)" class="project-name" />
<div
v-clean-html="templateLabel(group.group)"
class="project-name"
/>
</div>
<div class="right">
@@ -124,7 +126,11 @@ export default {
/>
</div>
<button type="button" class="btn btn-sm actions mr-10 role-multi-action" @click="showActions($event, group.group)">
<button
type="button"
class="btn btn-sm actions mr-10 role-multi-action"
@click="showActions($event, group.group)"
>
<i class="icon icon-actions" />
</button>
</div>
@@ -35,7 +35,7 @@ export default {
const schema = this.$store.getters[`${ inStore }/schemaFor`](HCI.BACKUP);
if (!schema?.collectionMethods.find(x => x.toLowerCase() === 'post')) {
if (!schema?.collectionMethods.find((x) => x.toLowerCase() === 'post')) {
this.$store.dispatch('type-map/configureType', { match: HCI.VM_SNAPSHOT, isCreatable: false });
}
@@ -90,7 +90,7 @@ export default {
},
getRawRows() {
return this.rows.filter(r => r.spec?.type === BACKUP_TYPE.SNAPSHOT);
return this.rows.filter((r) => r.spec?.type === BACKUP_TYPE.SNAPSHOT);
},
schema() {
@@ -102,7 +102,7 @@ export default {
},
filteredRows() {
return this.snapshots.filter(r => r.spec?.type !== BACKUP_TYPE.BACKUP);
return this.snapshots.filter((r) => r.spec?.type !== BACKUP_TYPE.BACKUP);
},
},
@@ -141,7 +141,6 @@ export default {
:sort-generation-fn="sortGenerationFn"
key-field="_key"
default-sort-by="age"
>
<template #more-header-middle>
<FilterVMSchedule
+13 -4
View File
@@ -55,7 +55,7 @@ export default {
const pvcSchema = this.$store.getters[`${ inStore }/schemaFor`](PVC);
if (!pvcSchema?.collectionMethods.find(x => x.toLowerCase() === 'post')) {
if (!pvcSchema?.collectionMethods.find((x) => x.toLowerCase() === 'post')) {
this.$store.dispatch('type-map/configureType', { match: HCI.VOLUME, isCreatable: false });
}
@@ -152,12 +152,18 @@ export default {
>
<template #cell:state="{row}">
<div class="state">
<HarvesterVolumeState class="vmstate" :row="row" />
<HarvesterVolumeState
class="vmstate"
:row="row"
/>
</div>
</template>
<template #cell:AttachedVM="{row}">
<div>
<router-link v-if="getVMName(row)" :to="goTo(row)">
<router-link
v-if="getVMName(row)"
:to="goTo(row)"
>
{{ getVMName(row) }}
</router-link>
</div>
@@ -170,7 +176,10 @@ export default {
:to="row.detailLocation"
>
{{ row.nameDisplay }}
<i v-if="row.isEncrypted" class="icon icon-lock" />
<i
v-if="row.isEncrypted"
class="icon icon-lock"
/>
</router-link>
<span v-else>
{{ row.nameDisplay }}
@@ -35,7 +35,7 @@ export default {
const snapShotSchema = this.$store.getters[`${ inStore }/schemaFor`](VOLUME_SNAPSHOT);
if (!snapShotSchema?.collectionMethods.find(x => x.toLowerCase() === 'post')) {
if (!snapShotSchema?.collectionMethods.find((x) => x.toLowerCase() === 'post')) {
this.$store.dispatch('type-map/configureType', { match: HCI.SNAPSHOT, isCreatable: false });
}
},
@@ -73,6 +73,5 @@ export default {
:schema="schema"
:rows="filteredRows"
key-field="_key"
/>
</template>
@@ -152,7 +152,7 @@ export default {
},
rows() {
const matchVMIs = this.allVMIs.filter(VMI => !this.allVMs.find(VM => VM.id === VMI.id));
const matchVMIs = this.allVMIs.filter((VMI) => !this.allVMs.find((VM) => VM.id === VMI.id));
return [...this.allVMs, ...matchVMIs];
},
@@ -161,7 +161,7 @@ export default {
* We want to show the progress bar only for Backup's restore; snapshot's restore is immediate.
*/
hasBackUpRestoreInProgress() {
return !!this.rows.find(r => r.restoreResource && !r.restoreResource.fromSnapshot && !r.restoreResource.isComplete);
return !!this.rows.find((r) => r.restoreResource && !r.restoreResource.fromSnapshot && !r.restoreResource.isComplete);
}
},
@@ -201,11 +201,18 @@ export default {
:schema="schema"
:groupable="true"
key-field="_key"
>
<template #cell:state="scope" class="state-col">
<template
#cell:state="scope"
class="state-col"
>
<div class="state">
<HarvesterVmState class="vmstate" :row="scope.row" :all-node-network="allNodeNetworks" :all-cluster-network="allClusterNetworks" />
<HarvesterVmState
class="vmstate"
:row="scope.row"
:all-node-network="allNodeNetworks"
:all-cluster-network="allClusterNetworks"
/>
</div>
</template>
@@ -226,7 +233,10 @@ export default {
<span v-else>
{{ scope.row.metadata.name }}
</span>
<ConsoleBar :resourceType="scope.row" class="console mr-10 ml-10" />
<ConsoleBar
:resource-type="scope.row"
class="console mr-10 ml-10"
/>
</div>
</template>
</ResourceTable>
@@ -50,7 +50,7 @@ export default {
name: 'type',
labelKey: 'tableHeaders.type',
value: 'typeDisplay',
getValue: row => row.typeDisplay,
getValue: (row) => row.typeDisplay,
sort: ['typeDisplay'],
},
AGE,
@@ -99,7 +99,7 @@ export default {
const clusterNetworks = this.$store.getters[`${ inStore }/all`](HCI.CLUSTER_NETWORK);
const out = clusterNetworks.map((network) => {
const hasChild = !!this.rows.find(config => config?.spec?.clusterNetwork === network.id);
const hasChild = !!this.rows.find((config) => config?.spec?.clusterNetwork === network.id);
return {
...network,
@@ -230,7 +230,8 @@ export default {
</div>
</template>
<template
v-for="(clusterNetwork, i) in clusterNetworkWithoutConfigs" :key="i"
v-for="(clusterNetwork, i) in clusterNetworkWithoutConfigs"
:key="i"
v-slot:[slotName(clusterNetwork.id)]
>
<tr