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
@@ -8,7 +8,7 @@ import PriorityRow from './PriorityRow';
export default {
emits: ['update:value'],
components: { PriorityRow },
props: {
@@ -122,7 +122,9 @@ export default {
/>
</div>
<div
v-for="(row, idx) in rows" :key="idx">
v-for="(row, idx) in rows"
:key="idx"
>
<PriorityRow
:row="row"
:mode="mode"
@@ -133,8 +135,15 @@ export default {
/>
</div>
</div>
<div v-if="showAdd" class="footer">
<button type="button" class="btn role-tertiary add" @click="add()">
<div
v-if="showAdd"
class="footer"
>
<button
type="button"
class="btn role-tertiary add"
@click="add()"
>
<t k="harvester.ipPool.scope.addLabel" />
</button>
</div>
@@ -7,7 +7,7 @@ import { HCI } from '@pkg/harvester/types';
export default {
emits: ['update:value', 'remove'],
components: { Select },
props: {
@@ -82,13 +82,13 @@ export default {
guestClusterOptions() {
const clusters = this.$store.getters['management/all'](CAPI.RANCHER_CLUSTER);
const configs = this.$store.getters['management/all'](HCI.HARVESTER_CONFIG);
const selectedClusters = this.rows.map(row => row?.guestCluster);
const filteredNamespaces = this.filteredNamespaces.map(n => n.id);
const selectedClusters = this.rows.map((row) => row?.guestCluster);
const filteredNamespaces = this.filteredNamespaces.map((n) => n.id);
const out = clusters.filter((c) => {
const machinePools = c.spec?.rkeConfig?.machinePools || [];
const machineConfigName = machinePools[0]?.machineConfigRef?.name;
const config = configs.find(c => c.id === `fleet-default/${ machineConfigName }`);
const config = configs.find((c) => c.id === `fleet-default/${ machineConfigName }`);
if (config) {
const vmNamespace = config?.vmNamespace;
@@ -120,7 +120,7 @@ export default {
projectOptions() {
const projects = this.$store.getters['management/all'](MANAGEMENT.PROJECT);
const out = projects.filter(p => p.metadata.namespace === this.currentCluster.id).map((project) => {
const out = projects.filter((p) => p.metadata.namespace === this.currentCluster.id).map((project) => {
return {
label: project.nameDisplay,
value: project.id,
@@ -219,8 +219,15 @@ export default {
@update:value="update"
/>
</div>
<div v-if="showRemove" class="remove">
<button type="button" class="btn role-link" @click="remove(idx)">
<div
v-if="showRemove"
class="remove"
>
<button
type="button"
class="btn role-link"
@click="remove(idx)"
>
<t k="generic.remove" />
</button>
</div>
@@ -5,7 +5,7 @@ import { removeAt } from '@shell/utils/array';
export default {
emits: ['update:value'],
props: {
value: {
type: Array,
@@ -103,7 +103,9 @@ export default {
<div>
<div v-if="rows.length">
<div
v-for="(row, idx) in rows" :key="idx">
v-for="(row, idx) in rows"
:key="idx"
>
<div
class="pool-headers"
:class="{
@@ -196,19 +198,37 @@ export default {
@input="queueUpdate"
/>
</div>
<div v-if="showRemove" class="remove">
<button type="button" class="btn role-link" @click="remove(idx)">
<div
v-if="showRemove"
class="remove"
>
<button
type="button"
class="btn role-link"
@click="remove(idx)"
>
<t k="generic.remove" />
</button>
</div>
</div>
</div>
</div>
<div v-if="showAdd" class="footer">
<button type="button" class="btn role-tertiary add" @click="addCIDR()">
<div
v-if="showAdd"
class="footer"
>
<button
type="button"
class="btn role-tertiary add"
@click="addCIDR()"
>
<t k="harvester.ipPool.cidr.addLabel" />
</button>
<button type="button" class="btn role-tertiary add" @click="addRange()">
<button
type="button"
class="btn role-tertiary add"
@click="addRange()"
>
<t k="harvester.ipPool.range.addLabel" />
</button>
</div>
@@ -10,7 +10,7 @@ import Priority from './Priority';
export default {
emits: ['update:value'],
components: {
LabeledSelect,
LabeledInput,
@@ -47,7 +47,7 @@ export default {
return [{
label: this.t('generic.none'),
value: '',
}, ...networks.map(n => ({
}, ...networks.map((n) => ({
label: n.id,
value: n.id,
}))];
@@ -84,9 +84,9 @@ export default {
>
<NameNsDescription
:value="value"
@update:value="$emit('update:value', $event)"
:namespaced="false"
:mode="mode"
@update:value="$emit('update:value', $event)"
/>
<ResourceTabs