Skip to content

Commit

Permalink
Merge pull request #79 from a110605/fix_7317
Browse files Browse the repository at this point in the history
fix: add missing wording in delete VM modal
  • Loading branch information
a110605 authored Jan 13, 2025
2 parents 345fe63 + 7e32ea4 commit 5bd8ad2
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 37 deletions.
4 changes: 0 additions & 4 deletions pkg/harvester/models/kubevirt.io.virtualmachine.js
Original file line number Diff line number Diff line change
Expand Up @@ -1120,10 +1120,6 @@ export default class VirtVm extends HarvesterResource {
return qemu?.status === 'True';
}

get warnDeletionMessage() {
return this.t('harvester.virtualMachine.promptRemove.tips');
}

get instanceLabels() {
const all = this.spec?.template?.metadata?.labels || {};

Expand Down
77 changes: 44 additions & 33 deletions pkg/harvester/promptRemove/kubevirt.io.virtualmachine.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { isEmpty } from '@shell/utils/object';
import Parse from 'url-parse';
import { resourceNames } from '@shell/utils/string';
import { HCI } from '../types';
import { alternateLabel as alternateLabelButton } from '@shell/utils/platform';
export default {
name: 'HarvesterPromptRemove',
Expand Down Expand Up @@ -39,8 +40,9 @@ export default {
data() {
return {
checkedList: [],
checkAll: true
checkedList: [],
checkAll: true,
alternateLabel: alternateLabelButton
};
},
Expand Down Expand Up @@ -138,44 +140,53 @@ export default {
</script>
<template>
<div class="mt-10">
{{ t('promptRemove.attemptingToRemove', {type}) }}
<span v-clean-html="resourceNames(names, plusMore, t)"></span>
<div>
<div class="mt-10">
{{ t('harvester.virtualMachine.promptRemove.title') }}
</div>
<div v-if="value.length === 1">
<span
v-for="(name, i) in removeNameArr[value[0].id]"
:key="i"
>
<label class="checkbox-container mr-15"><input
v-model="checkedList"
type="checkbox"
:label="name"
:value="name"
/>
{{ t('promptRemove.attemptingToRemove', {type}) }}
<span v-clean-html="resourceNames(names, plusMore, t)"></span>
<div class="mt-10">
{{ t('harvester.virtualMachine.promptRemove.title') }}
</div>
<div v-if="value.length === 1">
<span
v-for="(name, i) in removeNameArr[value[0].id]"
:key="i"
>
<label class="checkbox-container mr-15">
<input
v-model="checkedList"
type="checkbox"
:label="name"
:value="name"
/>
<span
class="checkbox-custom mr-5"
role="checkbox"
/>
{{ name }}
</label>
</span>
</div>
<div v-else>
<label class="checkbox-container mr-15">
<input
v-model="checkedList"
type="checkbox"
/>
<span
class="checkbox-custom mr-5"
role="checkbox"
/>
{{ name }}
{{ t('harvester.virtualMachine.promptRemove.deleteAll') }}
</label>
</span>
</div>
</div>
<div v-else>
<label class="checkbox-container mr-15"><input
v-model="checkAll"
type="checkbox"
/>
<span
class="checkbox-custom mr-5"
role="checkbox"
/>
{{ t('harvester.virtualMachine.promptRemove.deleteAll') }}
</label>
<div class="text-warning mb-10 mt-10">
{{ t('harvester.virtualMachine.promptRemove.tips') }}
</div>
<div class="text-info mt-20">
{{ t('promptRemove.protip', { alternateLabel }) }}
</div>
</div>
</template>

0 comments on commit 5bd8ad2

Please sign in to comment.