mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 21:21:44 +00:00
Merge pull request #82 from harvester/mergify/bp/release-harvester-v1.5/pr-79
fix: add missing wording in delete VM modal (backport #79)
This commit is contained in:
commit
b96637e6d9
@ -1120,10 +1120,6 @@ export default class VirtVm extends HarvesterResource {
|
|||||||
return qemu?.status === 'True';
|
return qemu?.status === 'True';
|
||||||
}
|
}
|
||||||
|
|
||||||
get warnDeletionMessage() {
|
|
||||||
return this.t('harvester.virtualMachine.promptRemove.tips');
|
|
||||||
}
|
|
||||||
|
|
||||||
get instanceLabels() {
|
get instanceLabels() {
|
||||||
const all = this.spec?.template?.metadata?.labels || {};
|
const all = this.spec?.template?.metadata?.labels || {};
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import { isEmpty } from '@shell/utils/object';
|
|||||||
import Parse from 'url-parse';
|
import Parse from 'url-parse';
|
||||||
import { resourceNames } from '@shell/utils/string';
|
import { resourceNames } from '@shell/utils/string';
|
||||||
import { HCI } from '../types';
|
import { HCI } from '../types';
|
||||||
|
import { alternateLabel as alternateLabelButton } from '@shell/utils/platform';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'HarvesterPromptRemove',
|
name: 'HarvesterPromptRemove',
|
||||||
@ -39,8 +40,9 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
checkedList: [],
|
checkedList: [],
|
||||||
checkAll: true
|
checkAll: true,
|
||||||
|
alternateLabel: alternateLabelButton
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -138,44 +140,53 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="mt-10">
|
<div>
|
||||||
{{ t('promptRemove.attemptingToRemove', {type}) }}
|
|
||||||
<span v-clean-html="resourceNames(names, plusMore, t)"></span>
|
|
||||||
|
|
||||||
<div class="mt-10">
|
<div class="mt-10">
|
||||||
{{ t('harvester.virtualMachine.promptRemove.title') }}
|
{{ t('promptRemove.attemptingToRemove', {type}) }}
|
||||||
</div>
|
<span v-clean-html="resourceNames(names, plusMore, t)"></span>
|
||||||
<div v-if="value.length === 1">
|
|
||||||
<span
|
<div class="mt-10">
|
||||||
v-for="(name, i) in removeNameArr[value[0].id]"
|
{{ t('harvester.virtualMachine.promptRemove.title') }}
|
||||||
:key="i"
|
</div>
|
||||||
>
|
<div v-if="value.length === 1">
|
||||||
<label class="checkbox-container mr-15"><input
|
<span
|
||||||
v-model="checkedList"
|
v-for="(name, i) in removeNameArr[value[0].id]"
|
||||||
type="checkbox"
|
:key="i"
|
||||||
:label="name"
|
>
|
||||||
:value="name"
|
<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
|
<span
|
||||||
class="checkbox-custom mr-5"
|
class="checkbox-custom mr-5"
|
||||||
role="checkbox"
|
role="checkbox"
|
||||||
/>
|
/>
|
||||||
{{ name }}
|
{{ t('harvester.virtualMachine.promptRemove.deleteAll') }}
|
||||||
</label>
|
</label>
|
||||||
</span>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="text-warning mb-10 mt-10">
|
||||||
<div v-else>
|
{{ t('harvester.virtualMachine.promptRemove.tips') }}
|
||||||
<label class="checkbox-container mr-15"><input
|
</div>
|
||||||
v-model="checkAll"
|
<div class="text-info mt-20">
|
||||||
type="checkbox"
|
{{ t('promptRemove.protip', { alternateLabel }) }}
|
||||||
/>
|
|
||||||
<span
|
|
||||||
class="checkbox-custom mr-5"
|
|
||||||
role="checkbox"
|
|
||||||
/>
|
|
||||||
{{ t('harvester.virtualMachine.promptRemove.deleteAll') }}
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user