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:
@@ -5,7 +5,7 @@ import RadioGroup from '@components/Form/Radio/RadioGroup';
|
||||
|
||||
export default {
|
||||
emits: ['enabled'],
|
||||
|
||||
|
||||
components: {
|
||||
LabeledInput,
|
||||
LabeledSelect,
|
||||
@@ -42,7 +42,7 @@ export default {
|
||||
portOptions() {
|
||||
const ports = this.model?.spec?.listeners || [];
|
||||
|
||||
return ports.filter(p => p.port && p.protocol === 'TCP').map(p => p.backendPort) || [];
|
||||
return ports.filter((p) => p.port && p.protocol === 'TCP').map((p) => p.backendPort) || [];
|
||||
},
|
||||
},
|
||||
|
||||
@@ -71,7 +71,10 @@ export default {
|
||||
</div>
|
||||
<div v-if="healthCheckEnabled">
|
||||
<div class="row mt-10">
|
||||
<div v-if="healthCheckEnabled" class="col span-6">
|
||||
<div
|
||||
v-if="healthCheckEnabled"
|
||||
class="col span-6"
|
||||
>
|
||||
<LabeledSelect
|
||||
v-model:value="value.port"
|
||||
:mode="mode"
|
||||
|
||||
@@ -7,7 +7,7 @@ import Select from '@shell/components/form/Select';
|
||||
|
||||
export default {
|
||||
emits: ['update:value'],
|
||||
|
||||
|
||||
components: { Select },
|
||||
props: {
|
||||
value: {
|
||||
@@ -129,7 +129,9 @@ export default {
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
v-for="(row, idx) in rows" :key="idx" class="listener-row"
|
||||
v-for="(row, idx) in rows"
|
||||
:key="idx"
|
||||
class="listener-row"
|
||||
>
|
||||
<div class="port-name">
|
||||
<span v-if="isView">
|
||||
@@ -182,15 +184,29 @@ 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 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="generic.add" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -105,7 +105,7 @@ export default {
|
||||
ipPoolOptions() {
|
||||
const ipPools = this.$store.getters['harvester/all'](HCI.IP_POOL);
|
||||
|
||||
const out = ipPools.map(ipPool => ipPool.id);
|
||||
const out = ipPools.map((ipPool) => ipPool.id);
|
||||
|
||||
return [{
|
||||
label: this.t('harvester.loadBalancer.ipPool.options.none'),
|
||||
@@ -116,13 +116,13 @@ export default {
|
||||
projectOptions() {
|
||||
const projects = this.$store.getters['harvester/all'](MANAGEMENT.PROJECT);
|
||||
|
||||
return projects.map(project => project.id);
|
||||
return projects.map((project) => project.id);
|
||||
},
|
||||
|
||||
namespaceOptions() {
|
||||
const namespaces = this.$store.getters['harvester/all'](NAMESPACE);
|
||||
|
||||
return namespaces.map(n => n.id);
|
||||
return namespaces.map((n) => n.id);
|
||||
},
|
||||
|
||||
backendServerSelector: {
|
||||
@@ -166,7 +166,7 @@ export default {
|
||||
|
||||
healthCheckPortInUseWarning() {
|
||||
const healthCheckPort = this.value?.spec?.healthCheck?.port;
|
||||
const portInUse = this.value?.spec?.listeners?.find(l => l.backendPort === healthCheckPort);
|
||||
const portInUse = this.value?.spec?.listeners?.find((l) => l.backendPort === healthCheckPort);
|
||||
|
||||
if (healthCheckPort && portInUse) {
|
||||
return this.t('harvester.loadBalancer.healthCheck.warning.portInUse', { port: portInUse.backendPort }, true);
|
||||
@@ -191,7 +191,7 @@ export default {
|
||||
|
||||
updateMatchingVMs: throttle(function() {
|
||||
const backendServerSelector = this.value.spec.backendServerSelector;
|
||||
const allVMs = this.$store.getters['harvester/all'](HCI.VM).filter(vm => vm.metadata.namespace === this.value.metadata.namespace);
|
||||
const allVMs = this.$store.getters['harvester/all'](HCI.VM).filter((vm) => vm.metadata.namespace === this.value.metadata.namespace);
|
||||
|
||||
if (isEmpty(backendServerSelector)) {
|
||||
this.matchingVMs = {
|
||||
@@ -238,9 +238,9 @@ export default {
|
||||
>
|
||||
<NameNsDescription
|
||||
:value="value"
|
||||
@update:value="$emit('update:value', $event)"
|
||||
:namespaced="true"
|
||||
:mode="mode"
|
||||
@update:value="$emit('update:value', $event)"
|
||||
/>
|
||||
|
||||
<ResourceTabs
|
||||
|
||||
Reference in New Issue
Block a user