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:
@@ -121,12 +121,31 @@ export default {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="row" @update:value="update">
|
||||
<div
|
||||
class="row"
|
||||
@update:value="update"
|
||||
>
|
||||
<div class="col span-12">
|
||||
<LabeledSelect v-model:value="parseDefaultValue.type" class="mb-20" :label="t('harvester.fields.type')" :options="typeOption" @update:value="update" />
|
||||
<LabeledSelect
|
||||
v-model:value="parseDefaultValue.type"
|
||||
class="mb-20"
|
||||
:label="t('harvester.fields.type')"
|
||||
:options="typeOption"
|
||||
@update:value="update"
|
||||
/>
|
||||
|
||||
<LabeledInput v-model:value="parseDefaultValue.endpoint" class="mb-5" :placeholder="endpointPlaceholder" :mode="mode" label="Endpoint" />
|
||||
<Tip class="mb-20" icon="icon icon-info" :text="t('harvester.backup.backupTargetTip')" />
|
||||
<LabeledInput
|
||||
v-model:value="parseDefaultValue.endpoint"
|
||||
class="mb-5"
|
||||
:placeholder="endpointPlaceholder"
|
||||
:mode="mode"
|
||||
label="Endpoint"
|
||||
/>
|
||||
<Tip
|
||||
class="mb-20"
|
||||
icon="icon icon-info"
|
||||
:text="t('harvester.backup.backupTargetTip')"
|
||||
/>
|
||||
|
||||
<template v-if="isS3">
|
||||
<LabeledInput
|
||||
@@ -163,7 +182,13 @@ export default {
|
||||
required
|
||||
/>
|
||||
|
||||
<LabeledSelect v-model:value="parseDefaultValue.virtualHostedStyle" class="mb-20" label="Virtual Hosted-Style" :options="virtualHostedStyleType" @update:value="update" />
|
||||
<LabeledSelect
|
||||
v-model:value="parseDefaultValue.virtualHostedStyle"
|
||||
class="mb-20"
|
||||
label="Virtual Hosted-Style"
|
||||
:options="virtualHostedStyleType"
|
||||
@update:value="update"
|
||||
/>
|
||||
|
||||
<div class="mb-20">
|
||||
<Tip icon="icon icon-info">
|
||||
|
||||
@@ -225,8 +225,16 @@ export default {
|
||||
<div>
|
||||
<h3>{{ t('harvester.setting.containerdRegistry.mirrors.mirrors') }}</h3>
|
||||
<div>
|
||||
<InfoBox v-for="mirror, idx in mirrors" :key="mirror.idx" class="box">
|
||||
<button type="button" class="role-link btn btn-sm remove" @click="remove('mirrors', idx)">
|
||||
<InfoBox
|
||||
v-for="mirror, idx in mirrors"
|
||||
:key="mirror.idx"
|
||||
class="box"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
class="role-link btn btn-sm remove"
|
||||
@click="remove('mirrors', idx)"
|
||||
>
|
||||
<i class="icon icon-2x icon-x" />
|
||||
</button>
|
||||
|
||||
@@ -273,7 +281,10 @@ export default {
|
||||
</infobox>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-sm role-primary" @click.self="addMirror">
|
||||
<button
|
||||
class="btn btn-sm role-primary"
|
||||
@click.self="addMirror"
|
||||
>
|
||||
{{ t('harvester.setting.containerdRegistry.mirrors.addMirror') }}
|
||||
</button>
|
||||
|
||||
@@ -281,8 +292,16 @@ export default {
|
||||
|
||||
<h3>{{ t('harvester.setting.containerdRegistry.configs.configs') }}</h3>
|
||||
<div>
|
||||
<InfoBox v-for="config, idx in configs" :key="config.idx" class="box">
|
||||
<button type="button" class="role-link btn btn-sm remove" @click="remove('configs', idx)">
|
||||
<InfoBox
|
||||
v-for="config, idx in configs"
|
||||
:key="config.idx"
|
||||
class="box"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
class="role-link btn btn-sm remove"
|
||||
@click="remove('configs', idx)"
|
||||
>
|
||||
<i class="icon icon-2x icon-x" />
|
||||
</button>
|
||||
|
||||
@@ -355,7 +374,10 @@ export default {
|
||||
</div>
|
||||
</infobox>
|
||||
|
||||
<button class="btn btn-sm role-primary" @click="addConfig">
|
||||
<button
|
||||
class="btn btn-sm role-primary"
|
||||
@click="addConfig"
|
||||
>
|
||||
{{ t('harvester.setting.containerdRegistry.configs.addConfig') }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -64,7 +64,7 @@ export default {
|
||||
const csiDrivers = this.$store.getters[`${ inStore }/all`](CSI_DRIVER) || [];
|
||||
|
||||
return csiDrivers.filter((provisioner) => {
|
||||
return !this.configArr.map(config => config.key).includes(provisioner.name);
|
||||
return !this.configArr.map((config) => config.key).includes(provisioner.name);
|
||||
}).map((provisioner) => {
|
||||
return provisioner.name;
|
||||
});
|
||||
@@ -181,8 +181,16 @@ export default {
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<InfoBox v-for="(driver, idx) in configArr" :key="idx">
|
||||
<button :disabled="disableEdit(driver.key)" type="button" class="role-link btn btn-sm remove" @click="remove(idx)">
|
||||
<InfoBox
|
||||
v-for="(driver, idx) in configArr"
|
||||
:key="idx"
|
||||
>
|
||||
<button
|
||||
:disabled="disableEdit(driver.key)"
|
||||
type="button"
|
||||
class="role-link btn btn-sm remove"
|
||||
@click="remove(idx)"
|
||||
>
|
||||
<i class="icon icon-x" />
|
||||
</button>
|
||||
|
||||
@@ -229,7 +237,11 @@ export default {
|
||||
</div>
|
||||
</infobox>
|
||||
|
||||
<button class="btn btn-sm role-primary" :disabled="disableAdd" @click.self="add">
|
||||
<button
|
||||
class="btn btn-sm role-primary"
|
||||
:disabled="disableAdd"
|
||||
@click.self="add"
|
||||
>
|
||||
{{ t('generic.add') }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -54,10 +54,16 @@ export default {
|
||||
<template>
|
||||
<div>
|
||||
<Banner color="warning">
|
||||
<t k="harvester.setting.httpProxy.warning" :raw="true" />
|
||||
<t
|
||||
k="harvester.setting.httpProxy.warning"
|
||||
:raw="true"
|
||||
/>
|
||||
</Banner>
|
||||
|
||||
<div class="row" @update:value="update">
|
||||
<div
|
||||
class="row"
|
||||
@update:value="update"
|
||||
>
|
||||
<div class="col span-12">
|
||||
<LabeledInput
|
||||
v-model:value="parseDefaultValue.httpProxy"
|
||||
|
||||
@@ -107,7 +107,7 @@ export default {
|
||||
|
||||
methods: {
|
||||
update() {
|
||||
const exclude = this.exclude.filter(ip => ip);
|
||||
const exclude = this.exclude.filter((ip) => ip);
|
||||
|
||||
if (Array.isArray(exclude) && exclude.length > 0) {
|
||||
this.parsedDefaultValue.exclude = exclude;
|
||||
@@ -172,7 +172,10 @@ export default {
|
||||
@update:value="update"
|
||||
>
|
||||
<Banner color="warning">
|
||||
<t k="harvester.setting.storageNetwork.warning" :raw="true" />
|
||||
<t
|
||||
k="harvester.setting.storageNetwork.warning"
|
||||
:raw="true"
|
||||
/>
|
||||
</Banner>
|
||||
|
||||
<RadioGroup
|
||||
@@ -210,8 +213,15 @@ export default {
|
||||
:placeholder="t('harvester.setting.storageNetwork.range.placeholder')"
|
||||
label-key="harvester.setting.storageNetwork.range.label"
|
||||
/>
|
||||
<Tip class="mb-20" icon="icon icon-info">
|
||||
<t k="harvester.setting.storageNetwork.tip" :raw="true" :url="storageNetworkExampleLink" />
|
||||
<Tip
|
||||
class="mb-20"
|
||||
icon="icon icon-info"
|
||||
>
|
||||
<t
|
||||
k="harvester.setting.storageNetwork.tip"
|
||||
:raw="true"
|
||||
:url="storageNetworkExampleLink"
|
||||
/>
|
||||
</Tip>
|
||||
|
||||
<ArrayList
|
||||
|
||||
@@ -29,6 +29,7 @@ export default {
|
||||
|
||||
data() {
|
||||
let parseDefaultValue = {};
|
||||
|
||||
try {
|
||||
parseDefaultValue = JSON.parse(this.value.value);
|
||||
} catch (error) {
|
||||
@@ -63,6 +64,7 @@ export default {
|
||||
methods: {
|
||||
update() {
|
||||
const value = JSON.stringify(this.parseDefaultValue);
|
||||
|
||||
this.value['value'] = value;
|
||||
},
|
||||
|
||||
@@ -99,7 +101,10 @@ export default {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="row" @input="update">
|
||||
<div
|
||||
class="row"
|
||||
@input="update"
|
||||
>
|
||||
<div class="col span-12">
|
||||
<LabeledInput
|
||||
v-model:value="parseDefaultValue.repository"
|
||||
|
||||
@@ -48,7 +48,10 @@ export default {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="row" @input="update">
|
||||
<div
|
||||
class="row"
|
||||
@input="update"
|
||||
>
|
||||
<div class="col span-12">
|
||||
<RadioGroup
|
||||
v-model:value="parseDefaultValue.enable"
|
||||
|
||||
Reference in New Issue
Block a user