mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-04 21:26:08 +08:00
Lint fixes
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
@@ -193,16 +193,25 @@ export default {
|
||||
<h3>{{ t('harvester.host.tabs.overview') }}</h3>
|
||||
<div class="row mb-20">
|
||||
<div class="col span-6">
|
||||
<LabelValue :name="t('harvester.host.detail.customName')" :value="customName" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.detail.customName')"
|
||||
:value="customName"
|
||||
/>
|
||||
</div>
|
||||
<div class="col span-6">
|
||||
<LabelValue :name="t('harvester.host.detail.hostIP')" :value="value.internalIp" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.detail.hostIP')"
|
||||
:value="value.internalIp"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-20">
|
||||
<div class="col span-6">
|
||||
<LabelValue :name="t('harvester.host.detail.os')" :value="value.status.nodeInfo.osImage" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.detail.os')"
|
||||
:value="value.status.nodeInfo.osImage"
|
||||
/>
|
||||
</div>
|
||||
<div class="col span-6">
|
||||
<div class="role">
|
||||
@@ -223,20 +232,39 @@ export default {
|
||||
|
||||
<div class="row mb-20">
|
||||
<div class="col span-6">
|
||||
<LabelValue :name="t('harvester.host.detail.create')" :value="value.metadata.creationTimestamp" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.detail.create')"
|
||||
:value="value.metadata.creationTimestamp"
|
||||
/>
|
||||
</div>
|
||||
<div class="col span-6">
|
||||
<LabelValue :name="t('harvester.host.detail.update')" :value="lastUpdateTime" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.detail.update')"
|
||||
:value="lastUpdateTime"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-20">
|
||||
<div v-if="!value.isEtcd" class="col span-6">
|
||||
<LabelValue :name="t('harvester.host.detail.cpuManager')" :value="cpuManagerStatus" />
|
||||
<div
|
||||
v-if="!value.isEtcd"
|
||||
class="col span-6"
|
||||
>
|
||||
<LabelValue
|
||||
:name="t('harvester.host.detail.cpuManager')"
|
||||
:value="cpuManagerStatus"
|
||||
/>
|
||||
</div>
|
||||
<div class="col span-6">
|
||||
<LabelValue :name="t('harvester.host.detail.consoleUrl')" :value="consoleUrl.value">
|
||||
<a slot="value" :href="consoleUrl.value" target="_blank">{{ consoleUrl.display }}</a>
|
||||
<LabelValue
|
||||
:name="t('harvester.host.detail.consoleUrl')"
|
||||
:value="consoleUrl.value"
|
||||
>
|
||||
<a
|
||||
slot="value"
|
||||
:href="consoleUrl.value"
|
||||
target="_blank"
|
||||
>{{ consoleUrl.display }}</a>
|
||||
</LabelValue>
|
||||
</div>
|
||||
</div>
|
||||
@@ -288,15 +316,24 @@ export default {
|
||||
<h3>{{ t('harvester.host.detail.more') }}</h3>
|
||||
<div class="row mb-20">
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.detail.uuid')" :value="value.status.nodeInfo.systemUUID" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.detail.uuid')"
|
||||
:value="value.status.nodeInfo.systemUUID"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.detail.kernel')" :value="value.status.nodeInfo.kernelVersion" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.detail.kernel')"
|
||||
:value="value.status.nodeInfo.kernelVersion"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.detail.containerRuntime')" :value="value.status.nodeInfo.containerRuntimeVersion" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.detail.containerRuntime')"
|
||||
:value="value.status.nodeInfo.containerRuntimeVersion"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
|
||||
@@ -10,7 +10,7 @@ import { LONGHORN_VERSION_V1 } from '@shell/config/types';
|
||||
|
||||
export default {
|
||||
emits: ['update:value'],
|
||||
|
||||
|
||||
components: {
|
||||
LabelValue,
|
||||
BadgeState,
|
||||
@@ -44,7 +44,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
targetDisk() {
|
||||
return this.disks.find(disk => disk.name === this.value.name);
|
||||
return this.disks.find((disk) => disk.name === this.value.name);
|
||||
},
|
||||
schedulableTooltipMessage() {
|
||||
const { name, path } = this.value;
|
||||
@@ -124,7 +124,10 @@ export default {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="disk" @update:value="update">
|
||||
<div
|
||||
class="disk"
|
||||
@update:value="update"
|
||||
>
|
||||
<Banner
|
||||
v-if="mountedMessage"
|
||||
color="error"
|
||||
@@ -139,7 +142,10 @@ export default {
|
||||
>
|
||||
<template #value>
|
||||
<div class="mt-5">
|
||||
<Tag v-for="(prop, key) in value.tags" :key="key">
|
||||
<Tag
|
||||
v-for="(prop, key) in value.tags"
|
||||
:key="key"
|
||||
>
|
||||
{{ prop }}
|
||||
</Tag>
|
||||
</div>
|
||||
@@ -185,7 +191,10 @@ export default {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!value.isNew" class="row mt-30">
|
||||
<div
|
||||
v-if="!value.isNew"
|
||||
class="row mt-30"
|
||||
>
|
||||
<div class="col span-4">
|
||||
<LabelValue
|
||||
:name="t('harvester.host.disk.storageAvailable.label')"
|
||||
@@ -214,7 +223,10 @@ export default {
|
||||
:value="value.displayName"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="value.path" class="col span-4">
|
||||
<div
|
||||
v-if="value.path"
|
||||
class="col span-4"
|
||||
>
|
||||
<LabelValue
|
||||
:name="t('harvester.host.disk.path.label')"
|
||||
:value="value.path"
|
||||
|
||||
@@ -37,7 +37,7 @@ export default {
|
||||
modeText() {
|
||||
const mode = this.ksmtuned.spec.mode;
|
||||
|
||||
return ksmtunedMode.find(M => M.value === mode).label;
|
||||
return ksmtunedMode.find((M) => M.value === mode).label;
|
||||
},
|
||||
|
||||
thresCoef() {
|
||||
@@ -47,7 +47,7 @@ export default {
|
||||
runText() {
|
||||
const run = this.ksmtuned.spec.run;
|
||||
|
||||
return ksmtunedRunOption.find(M => M.value === run).label;
|
||||
return ksmtunedRunOption.find((M) => M.value === run).label;
|
||||
},
|
||||
|
||||
showRunInformation() {
|
||||
@@ -77,20 +77,35 @@ export default {
|
||||
</h2>
|
||||
<div class="row mb-20">
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.ksmtuned.run')" :value="runText" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.ksmtuned.run')"
|
||||
:value="runText"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="showRunInformation" class="row mb-20">
|
||||
<div
|
||||
v-if="showRunInformation"
|
||||
class="row mb-20"
|
||||
>
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.ksmtuned.thresCoef')" :value="thresCoef" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.ksmtuned.thresCoef')"
|
||||
:value="thresCoef"
|
||||
/>
|
||||
</div>
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.ksmtuned.mode')" :value="modeText" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.ksmtuned.mode')"
|
||||
:value="modeText"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.ksmtuned.enableMergeNodes')" :value="mergeNodesText" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.ksmtuned.enableMergeNodes')"
|
||||
:value="mergeNodesText"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -100,31 +115,51 @@ export default {
|
||||
<h3>{{ t('harvester.host.ksmtuned.parameters.title') }}</h3>
|
||||
<div class="row mb-20">
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.ksmtuned.parameters.boost')" :value="ksmtuned.spec.ksmtunedParameters.boost" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.ksmtuned.parameters.boost')"
|
||||
:value="ksmtuned.spec.ksmtunedParameters.boost"
|
||||
/>
|
||||
</div>
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.ksmtuned.parameters.decay')" :value="ksmtuned.spec.ksmtunedParameters.decay" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.ksmtuned.parameters.decay')"
|
||||
:value="ksmtuned.spec.ksmtunedParameters.decay"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.ksmtuned.parameters.sleepMsec')" :value="ksmtuned.spec.ksmtunedParameters.sleepMsec" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.ksmtuned.parameters.sleepMsec')"
|
||||
:value="ksmtuned.spec.ksmtunedParameters.sleepMsec"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-20">
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.ksmtuned.parameters.minPages')" :value="ksmtuned.spec.ksmtunedParameters.minPages" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.ksmtuned.parameters.minPages')"
|
||||
:value="ksmtuned.spec.ksmtunedParameters.minPages"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.ksmtuned.parameters.maxPages')" :value="ksmtuned.spec.ksmtunedParameters.maxPages" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.ksmtuned.parameters.maxPages')"
|
||||
:value="ksmtuned.spec.ksmtunedParameters.maxPages"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<hr class="divider" />
|
||||
<h3><t k="harvester.host.ksmtuned.statistics.title" :raw="true" /></h3>
|
||||
<h3>
|
||||
<t
|
||||
k="harvester.host.ksmtuned.statistics.title"
|
||||
:raw="true"
|
||||
/>
|
||||
</h3>
|
||||
<div class="row mb-20">
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.ksmtuned.ksmStatus')">
|
||||
@@ -135,34 +170,55 @@ export default {
|
||||
</div>
|
||||
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.ksmtuned.statistics.sharing')" :value="ksmtuned.status.sharing" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.ksmtuned.statistics.sharing')"
|
||||
:value="ksmtuned.status.sharing"
|
||||
/>
|
||||
</div>
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.ksmtuned.statistics.shared')" :value="ksmtuned.status.shared" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.ksmtuned.statistics.shared')"
|
||||
:value="ksmtuned.status.shared"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-20">
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.ksmtuned.statistics.unshared')" :value="ksmtuned.status.unshared" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.ksmtuned.statistics.unshared')"
|
||||
:value="ksmtuned.status.unshared"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.ksmtuned.statistics.volatile')" :value="ksmtuned.status.volatile" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.ksmtuned.statistics.volatile')"
|
||||
:value="ksmtuned.status.volatile"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.ksmtuned.statistics.fullScans')" :value="ksmtuned.status.fullScans" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.ksmtuned.statistics.fullScans')"
|
||||
:value="ksmtuned.status.fullScans"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-20">
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.ksmtuned.statistics.stableNodeDups')" :value="ksmtuned.status.stableNodeDups" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.ksmtuned.statistics.stableNodeDups')"
|
||||
:value="ksmtuned.status.stableNodeDups"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col span-4">
|
||||
<LabelValue :name="t('harvester.host.ksmtuned.statistics.stableNodeChains')" :value="ksmtuned.status.stableNodeChains" />
|
||||
<LabelValue
|
||||
:name="t('harvester.host.ksmtuned.statistics.stableNodeChains')"
|
||||
:value="ksmtuned.status.stableNodeChains"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -57,7 +57,9 @@ export default {
|
||||
<div>
|
||||
<div v-if="inventory.warningMessages.length > 0">
|
||||
<Banner
|
||||
v-for="(msg, i) in inventory.warningMessages" :key="i" color="error"
|
||||
v-for="(msg, i) in inventory.warningMessages"
|
||||
:key="i"
|
||||
color="error"
|
||||
:label="msg.text"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -94,7 +94,11 @@ export default {
|
||||
|
||||
<template>
|
||||
<Loading v-if="$fetchState.pending" />
|
||||
<div v-else id="host-instances" class="row">
|
||||
<div
|
||||
v-else
|
||||
id="host-instances"
|
||||
class="row"
|
||||
>
|
||||
<div class="col span-12">
|
||||
<SortableTable
|
||||
v-bind="$attrs"
|
||||
@@ -102,11 +106,17 @@ export default {
|
||||
default-sort-by="age"
|
||||
:rows="rows"
|
||||
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-cluster-network="allClusterNetwork" />
|
||||
<HarvesterVmState
|
||||
class="vmstate"
|
||||
:row="scope.row"
|
||||
:all-cluster-network="allClusterNetwork"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</Sortabletable>
|
||||
|
||||
@@ -46,7 +46,7 @@ export default {
|
||||
|
||||
const inStore = this.$store.getters['currentProduct'].inStore;
|
||||
const linkMonitors = this.$store.getters[`${ inStore }/all`](HCI.LINK_MONITOR);
|
||||
const linkMonitor = (linkMonitors.filter(l => l.id === linkMonitorId) || [])[0] || {};
|
||||
const linkMonitor = (linkMonitors.filter((l) => l.id === linkMonitorId) || [])[0] || {};
|
||||
|
||||
return linkMonitor?.status?.linkStatus?.[nodeName] || [];
|
||||
},
|
||||
|
||||
@@ -93,7 +93,7 @@ export default {
|
||||
}
|
||||
|
||||
const res = await allHash(hash);
|
||||
const hostNetworkResource = (res.hostNetworks || []).find( O => this.value.id === O.attachNodeName);
|
||||
const hostNetworkResource = (res.hostNetworks || []).find( (O) => this.value.id === O.attachNodeName);
|
||||
|
||||
this.loadMetrics();
|
||||
|
||||
@@ -126,7 +126,7 @@ export default {
|
||||
this.newDisks = clone(disks);
|
||||
|
||||
const addons = this.$store.getters[`${ inStore }/all`](HCI.ADD_ONS);
|
||||
const seeder = addons.find(addon => addon.id === 'harvester-system/harvester-seeder');
|
||||
const seeder = addons.find((addon) => addon.id === 'harvester-system/harvester-seeder');
|
||||
|
||||
const seederEnabled = seeder ? seeder?.spec?.enabled : false;
|
||||
|
||||
@@ -134,7 +134,7 @@ export default {
|
||||
const inStore = this.$store.getters['currentProduct'].inStore;
|
||||
const inventories = this.$store.getters[`${ inStore }/all`](HCI.INVENTORY) || [];
|
||||
|
||||
const inventory = inventories.find(inv => inv.id === `harvester-system/${ this.value.id }`);
|
||||
const inventory = inventories.find((inv) => inv.id === `harvester-system/${ this.value.id }`);
|
||||
|
||||
if (inventory) {
|
||||
this.inventory = inventory;
|
||||
@@ -222,14 +222,14 @@ export default {
|
||||
const nodeId = this.value.id;
|
||||
const vlanStatuses = this.$store.getters[`${ inStore }/all`](HCI.VLAN_STATUS);
|
||||
|
||||
return vlanStatuses.filter(s => s?.status?.node === nodeId) || [];
|
||||
return vlanStatuses.filter((s) => s?.status?.node === nodeId) || [];
|
||||
},
|
||||
|
||||
longhornNode() {
|
||||
const inStore = this.$store.getters['currentProduct'].inStore;
|
||||
const longhornNodes = this.$store.getters[`${ inStore }/all`](LONGHORN.NODES);
|
||||
|
||||
return longhornNodes.find(node => node.id === `${ LONGHORN_SYSTEM }/${ this.value.id }`);
|
||||
return longhornNodes.find((node) => node.id === `${ LONGHORN_SYSTEM }/${ this.value.id }`);
|
||||
},
|
||||
|
||||
events() {
|
||||
@@ -275,7 +275,7 @@ export default {
|
||||
seederEnabled() {
|
||||
const inStore = this.$store.getters['currentProduct'].inStore;
|
||||
const addons = this.$store.getters[`${ inStore }/all`](HCI.ADD_ONS);
|
||||
const seeder = addons.find(addon => addon.id === 'harvester-system/harvester-seeder');
|
||||
const seeder = addons.find((addon) => addon.id === 'harvester-system/harvester-seeder');
|
||||
|
||||
return seeder ? seeder?.spec?.enabled : false;
|
||||
},
|
||||
@@ -373,14 +373,24 @@ export default {
|
||||
:side-tabs="true"
|
||||
@changed="tabChange"
|
||||
>
|
||||
<Tab name="basics" :label="t('harvester.host.tabs.basics')" :weight="4" class="bordered-table">
|
||||
<Tab
|
||||
name="basics"
|
||||
:label="t('harvester.host.tabs.basics')"
|
||||
:weight="4"
|
||||
class="bordered-table"
|
||||
>
|
||||
<Basic
|
||||
:value="value"
|
||||
:metrics="metrics"
|
||||
:mode="mode"
|
||||
/>
|
||||
</Tab>
|
||||
<Tab name="instance" :label="t('harvester.host.tabs.instance')" :weight="3" class="bordered-table">
|
||||
<Tab
|
||||
name="instance"
|
||||
:label="t('harvester.host.tabs.instance')"
|
||||
:weight="3"
|
||||
class="bordered-table"
|
||||
>
|
||||
<Instance :node="value" />
|
||||
</Tab>
|
||||
<Tab
|
||||
@@ -391,7 +401,9 @@ export default {
|
||||
class="bordered-table"
|
||||
>
|
||||
<InfoBox
|
||||
v-for="(vlan, i) in vlanStatuses" :key="i" >
|
||||
v-for="(vlan, i) in vlanStatuses"
|
||||
:key="i"
|
||||
>
|
||||
<VlanStatus
|
||||
:value="vlan"
|
||||
:mode="mode"
|
||||
@@ -415,7 +427,10 @@ export default {
|
||||
>
|
||||
<template #value>
|
||||
<div class="mt-5">
|
||||
<Tag v-for="(prop, key) in longhornNode.spec.tags" :key="key">
|
||||
<Tag
|
||||
v-for="(prop, key) in longhornNode.spec.tags"
|
||||
:key="key"
|
||||
>
|
||||
{{ prop }}
|
||||
</Tag>
|
||||
</div>
|
||||
@@ -447,7 +462,10 @@ export default {
|
||||
:show-header="false"
|
||||
:label="t('harvester.host.tabs.ksmtuned')"
|
||||
>
|
||||
<HarvesterKsmtuned :mode="mode" :node="value" />
|
||||
<HarvesterKsmtuned
|
||||
:mode="mode"
|
||||
:node="value"
|
||||
/>
|
||||
</Tab>
|
||||
|
||||
<Tab
|
||||
|
||||
Reference in New Issue
Block a user