Lint fixes

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
Francesco Torchia committed 2024-11-12 11:50:20 +01:00
1 parent 19b11aac2c
commit 4626d56acd
214 files changed
+3162 -1298

No files matched your search

@@ -1,5 +1,5 @@
<script>
import { Sortable } from "sortablejs-vue3";
import { Sortable } from 'sortablejs-vue3';
import InfoBox from '@shell/components/InfoBox';
import { Banner } from '@components/Banner';
import BadgeStateFormatter from '@shell/components/formatter/BadgeStateFormatter';
@@ -20,7 +20,7 @@ import { HCI } from '../../../types';
export default {
emits: ['update:value'],
components: {
Banner, BadgeStateFormatter, Sortable, InfoBox, LabeledInput, UnitInput, LabeledSelect, ModalWithCard
},
@@ -146,7 +146,7 @@ export default {
query: { mode: _EDIT }
};
V.pvc = this.pvcs.find(pvc => pvc.metadata.name === V.realName);
V.pvc = this.pvcs.find((pvc) => pvc.metadata.name === V.realName);
}
return V;
@@ -189,7 +189,7 @@ export default {
while (hasName) {
name = `disk-${ this.nameIdx }`;
hasName = this.rows.find(O => O.name === name);
hasName = this.rows.find((O) => O.name === name);
this.nameIdx++;
}
@@ -255,7 +255,7 @@ export default {
},
getImageDisplayName(id) {
return this.$store.getters['harvester/all'](HCI.IMAGE).find(image => image.id === id)?.spec?.displayName;
return this.$store.getters['harvester/all'](HCI.IMAGE).find((image) => image.id === id)?.spec?.displayName;
},
isLonghornV2(volume) {
@@ -275,8 +275,8 @@ export default {
<Sortable
:list="rows"
:options="{disabled: isView}"
@end="update"
item-key="id"
@end="update"
>
<template #item="{element: volume, index: i}">
<div :key="volume.name">
@@ -6,7 +6,7 @@ import { VOLUME_TYPE, InterfaceOption } from '../../../../config/harvester-map';
import { Banner } from '@components/Banner';
export default {
name: 'HarvesterEditContainer',
name: 'HarvesterEditContainer',
emits: ['update'],
@@ -13,7 +13,7 @@ import { HCI } from '../../../../types';
import { VOLUME_TYPE, InterfaceOption } from '../../../../config/harvester-map';
export default {
name: 'HarvesterEditExisting',
name: 'HarvesterEditExisting',
emits: ['update'],
@@ -79,7 +79,7 @@ export default {
},
image() {
const imageResource = this.$store.getters['harvester/all'](HCI.IMAGE).find(I => I.id === this.pvcResource?.metadata?.annotations?.[HCI_ANNOTATIONS.IMAGE_ID]);
const imageResource = this.$store.getters['harvester/all'](HCI.IMAGE).find((I) => I.id === this.pvcResource?.metadata?.annotations?.[HCI_ANNOTATIONS.IMAGE_ID]);
if (!imageResource) {
return;
@@ -89,7 +89,7 @@ export default {
},
pvcResource() {
return this.allPVCs.find( P => P.metadata.name === this.value.volumeName );
return this.allPVCs.find( (P) => P.metadata.name === this.value.volumeName );
},
volumeOption() {
@@ -130,7 +130,7 @@ export default {
watch: {
'value.volumeName'(neu) {
const pvcResource = this.allPVCs.find( P => P.metadata.name === neu);
const pvcResource = this.allPVCs.find( (P) => P.metadata.name === neu);
if (!pvcResource) {
return;
@@ -88,7 +88,7 @@ export default {
},
imagesOption() {
return this.images.filter(c => c.isReady).sort((a, b) => a.creationTimestamp > b.creationTimestamp ? -1 : 1).map( (I) => {
return this.images.filter((c) => c.isReady).sort((a, b) => a.creationTimestamp > b.creationTimestamp ? -1 : 1).map( (I) => {
return {
label: `${ I.metadata.namespace }/${ I.spec.displayName }`,
value: I.id
@@ -97,7 +97,7 @@ export default {
},
imageName() {
const image = this.imagesOption.find(I => I.value === this.value.image);
const image = this.imagesOption.find((I) => I.value === this.value.image);
return image ? image.label : '-';
},
@@ -163,7 +163,7 @@ export default {
},
onImageChange() {
const imageResource = this.$store.getters['harvester/all'](HCI.IMAGE)?.find( I => this.value.image === I.id);
const imageResource = this.$store.getters['harvester/all'](HCI.IMAGE)?.find( (I) => this.value.image === I.id);
const isIsoImage = /iso$/i.test(imageResource?.imageSuffix);
const imageSize = Math.max(imageResource?.status?.size, imageResource?.status?.virtualSize);
@@ -212,7 +212,11 @@ export default {
data-testid="input-hevi-name"
class="col span-6"
>
<InputOrDisplay :name="t('harvester.fields.name')" :value="value.name" :mode="mode">
<InputOrDisplay
:name="t('harvester.fields.name')"
:value="value.name"
:mode="mode"
>
<LabeledInput
v-model:value="value.name"
:label="t('harvester.fields.name')"
@@ -321,7 +325,10 @@ export default {
</div>
</div>
<div class="row mb-20">
<div v-if="value.volumeBackups && isView" class="col span-3">
<div
v-if="value.volumeBackups && isView"
class="col span-3"
>
<LabelValue
:name="t('harvester.virtualMachine.volume.readyToUse')"
:value="readyToUse"
@@ -14,7 +14,7 @@ import { LVM_DRIVER } from '../../../../models/harvester/storage.k8s.io.storagec
import { DATA_ENGINE_V2 } from '../../../../edit/harvesterhci.io.storage/index.vue';
export default {
name: 'HarvesterEditVolume',
name: 'HarvesterEditVolume',
emits: ['update'],
@@ -82,7 +82,7 @@ export default {
pvcsResource() {
const allPVCs = this.$store.getters['harvester/all'](PVC) || [];
return allPVCs.find(P => P.id === `${ this.namespace }/${ this.value.volumeName }`);
return allPVCs.find((P) => P.id === `${ this.namespace }/${ this.value.volumeName }`);
},
isDisabled() {
@@ -94,7 +94,7 @@ export default {
},
storageClassOptions() {
return this.storageClasses.filter(s => !s.parameters?.backingImage).map((s) => {
return this.storageClasses.filter((s) => !s.parameters?.backingImage).map((s) => {
const label = s.isDefault ? `${ s.name } (${ this.t('generic.default') })` : s.name;
return {
@@ -113,7 +113,7 @@ export default {
'value.storageClassName': {
immediate: true,
handler(neu) {
const storageClass = this.storageClasses.find(sc => sc.name === neu);
const storageClass = this.storageClasses.find((sc) => sc.name === neu);
const provisioner = storageClass?.provisioner;
const engine = storageClass?.parameters?.dataEngine;
@@ -158,7 +158,10 @@ export default {
<template>
<div>
<Loading mode="relative" :loading="loading" />
<Loading
mode="relative"
:loading="loading"
/>
<div class="row mb-20">
<div
class="col span-6"
@@ -249,7 +252,11 @@ export default {
data-testid="input-hev-bus"
class="col span-6"
>
<InputOrDisplay :name="t('harvester.virtualMachine.volume.bus')" :value="value.bus" :mode="mode">
<InputOrDisplay
:name="t('harvester.virtualMachine.volume.bus')"
:value="value.bus"
:mode="mode"
>
<LabeledSelect
v-model:value="value.bus"
:label="t('harvester.virtualMachine.volume.bus')"
@@ -271,7 +278,10 @@ export default {
</div>
</div>
<div class="row mb-20">
<div v-if="value.volumeBackups && isView" class="col span-3">
<div
v-if="value.volumeBackups && isView"
class="col span-3"
>
<LabelValue
:name="t('harvester.virtualMachine.volume.readyToUse')"
:value="readyToUse"