Skip to content

Commit

Permalink
Fix lint and messages
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
  • Loading branch information
torchiaf authored and a110605 committed Aug 7, 2024
1 parent e52d21f commit 6ca2d55
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions pkg/harvester/dialog/HarvesterMaintenanceDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Banner } from '@components/Banner';
import { Checkbox } from '@components/Form/Checkbox';
import { exceptionToErrorsArray } from '@shell/utils/error';
import { BadgeState } from '@components/BadgeState';
import { ucFirst } from '@shell/utils/string';
export default {
components: {
Expand Down Expand Up @@ -40,6 +41,10 @@ export default {
},
methods: {
errorLabel(err) {
return ucFirst(err);
},
close() {
this.$emit('close');
},
Expand Down Expand Up @@ -99,14 +104,12 @@ export default {
</div>
<Banner color="warning" :label="t('harvester.host.enableMaintenance.protip')" />
<Banner v-for="(err, i) in errors" :key="i" color="error" :label="err" />
<Banner v-if="unhealthyVMs.length" class="mt-0" color="warning">
<t k="harvester.host.enableMaintenance.shoutDownVMs" :raw="true" />
</Banner>
<Banner v-for="(err, i) in errors" :key="i" color="error" :label="errorLabel(err)" />
<Banner v-if="!force" class="mt-0" color="warning" :labelKey="'harvester.host.enableMaintenance.shutDownVMs'" />
<div v-for="unhealthyVM in unhealthyVMs">
<div v-for="(unhealthyVM, i) in unhealthyVMs" :key="i">
<Banner color="error mt-0 mb-5">
<p>
{{ unhealthyVM.message }}
Expand Down
2 changes: 1 addition & 1 deletion pkg/harvester/l10n/en-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ harvester:
enableMaintenance:
title: Enable Maintenance Mode
protip: The operation will migrate all virtual machines on this node to other nodes.
shoutDownVMs: You can click <b>Force</b> to automatically shutdown non-migratable VMs and continue with enabling Maintenance Mode
shutDownVMs: Check <b>Force</b> option to shutdown VMs which cannot be migrated in live mode.
force: Force
cordon:
title: Cordon
Expand Down

0 comments on commit 6ca2d55

Please sign in to comment.