feat(lite/VM): add copy, snapshot single action (#7087)
This commit is contained in:
parent
2e634a9d1c
commit
8bfe293414
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
## **next**
|
## **next**
|
||||||
|
|
||||||
|
- Ability to snapshot/copy a VM from its view (PR [#7087](https://github.com/vatesfr/xen-orchestra/pull/7087))
|
||||||
|
|
||||||
## **0.1.4** (2023-10-03)
|
## **0.1.4** (2023-10-03)
|
||||||
|
|
||||||
- Ability to migrate selected VMs to another host (PR [#7040](https://github.com/vatesfr/xen-orchestra/pull/7040))
|
- Ability to migrate selected VMs to another host (PR [#7040](https://github.com/vatesfr/xen-orchestra/pull/7040))
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
v-tooltip="!areAllSelectedVmsHalted && $t('selected-vms-in-execution')"
|
v-tooltip="
|
||||||
|
!areAllSelectedVmsHalted &&
|
||||||
|
$t(isSingleAction ? 'vm-is-running' : 'selected-vms-in-execution')
|
||||||
|
"
|
||||||
:busy="areSomeSelectedVmsCloning"
|
:busy="areSomeSelectedVmsCloning"
|
||||||
:disabled="isDisabled"
|
:disabled="isDisabled"
|
||||||
:icon="faCopy"
|
:icon="faCopy"
|
||||||
@ -22,6 +25,7 @@ import { computed } from "vue";
|
|||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
selectedRefs: XenApiVm["$ref"][];
|
selectedRefs: XenApiVm["$ref"][];
|
||||||
|
isSingleAction?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const { getByOpaqueRef, isOperationPending } = useVmCollection();
|
const { getByOpaqueRef, isOperationPending } = useVmCollection();
|
||||||
|
@ -11,6 +11,23 @@
|
|||||||
</template>
|
</template>
|
||||||
<VmActionPowerStateItems :vm-refs="[vm.$ref]" />
|
<VmActionPowerStateItems :vm-refs="[vm.$ref]" />
|
||||||
</AppMenu>
|
</AppMenu>
|
||||||
|
<AppMenu v-if="vm !== undefined" placement="bottom-end" shadow>
|
||||||
|
<template #trigger="{ open, isOpen }">
|
||||||
|
<UiButton
|
||||||
|
:active="isOpen"
|
||||||
|
:icon="faEllipsisVertical"
|
||||||
|
@click="open"
|
||||||
|
transparent
|
||||||
|
class="more-actions-button"
|
||||||
|
v-tooltip="{
|
||||||
|
placement: 'left',
|
||||||
|
content: $t('more-actions'),
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<VmActionCopyItem :selected-refs="[vm.$ref]" is-single-action />
|
||||||
|
<VmActionSnapshotItem :vm-refs="[vm.$ref]" />
|
||||||
|
</AppMenu>
|
||||||
</template>
|
</template>
|
||||||
</TitleBar>
|
</TitleBar>
|
||||||
</template>
|
</template>
|
||||||
@ -21,11 +38,15 @@ import TitleBar from "@/components/TitleBar.vue";
|
|||||||
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
||||||
import UiButton from "@/components/ui/UiButton.vue";
|
import UiButton from "@/components/ui/UiButton.vue";
|
||||||
import VmActionPowerStateItems from "@/components/vm/VmActionItems/VmActionPowerStateItems.vue";
|
import VmActionPowerStateItems from "@/components/vm/VmActionItems/VmActionPowerStateItems.vue";
|
||||||
|
import VmActionSnapshotItem from "@/components/vm/VmActionItems/VmActionSnapshotItem.vue";
|
||||||
|
import VmActionCopyItem from "@/components/vm/VmActionItems/VmActionCopyItem.vue";
|
||||||
import { useVmCollection } from "@/stores/xen-api/vm.store";
|
import { useVmCollection } from "@/stores/xen-api/vm.store";
|
||||||
|
import { vTooltip } from "@/directives/tooltip.directive";
|
||||||
import type { XenApiVm } from "@/libs/xen-api/xen-api.types";
|
import type { XenApiVm } from "@/libs/xen-api/xen-api.types";
|
||||||
import {
|
import {
|
||||||
faAngleDown,
|
faAngleDown,
|
||||||
faDisplay,
|
faDisplay,
|
||||||
|
faEllipsisVertical,
|
||||||
faPowerOff,
|
faPowerOff,
|
||||||
} from "@fortawesome/free-solid-svg-icons";
|
} from "@fortawesome/free-solid-svg-icons";
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
@ -40,3 +61,9 @@ const vm = computed(() =>
|
|||||||
|
|
||||||
const name = computed(() => vm.value?.name_label);
|
const name = computed(() => vm.value?.name_label);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="postcss">
|
||||||
|
.more-actions-button {
|
||||||
|
font-size: 1.2em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -86,6 +86,7 @@
|
|||||||
"loading-hosts": "Loading hosts…",
|
"loading-hosts": "Loading hosts…",
|
||||||
"log-out": "Log out",
|
"log-out": "Log out",
|
||||||
"login": "Login",
|
"login": "Login",
|
||||||
|
"more-actions": "More actions",
|
||||||
"migrate": "Migrate",
|
"migrate": "Migrate",
|
||||||
"migrate-n-vms": "Migrate 1 VM | Migrate {n} VMs",
|
"migrate-n-vms": "Migrate 1 VM | Migrate {n} VMs",
|
||||||
"n-hosts-awaiting-patch": "{n} host is awaiting this patch | {n} hosts are awaiting this patch",
|
"n-hosts-awaiting-patch": "{n} host is awaiting this patch | {n} hosts are awaiting this patch",
|
||||||
@ -173,6 +174,7 @@
|
|||||||
"vcpus": "vCPUs",
|
"vcpus": "vCPUs",
|
||||||
"vcpus-used": "vCPUs used",
|
"vcpus-used": "vCPUs used",
|
||||||
"version": "Version",
|
"version": "Version",
|
||||||
|
"vm-is-running": "The VM is running",
|
||||||
"vms": "VMs",
|
"vms": "VMs",
|
||||||
"xo-lite-under-construction": "XOLite is under construction"
|
"xo-lite-under-construction": "XOLite is under construction"
|
||||||
}
|
}
|
||||||
|
@ -86,6 +86,7 @@
|
|||||||
"loading-hosts": "Chargement des hôtes…",
|
"loading-hosts": "Chargement des hôtes…",
|
||||||
"log-out": "Se déconnecter",
|
"log-out": "Se déconnecter",
|
||||||
"login": "Connexion",
|
"login": "Connexion",
|
||||||
|
"more-actions": "Plus d'actions",
|
||||||
"migrate": "Migrer",
|
"migrate": "Migrer",
|
||||||
"migrate-n-vms": "Migrer 1 VM | Migrer {n} VMs",
|
"migrate-n-vms": "Migrer 1 VM | Migrer {n} VMs",
|
||||||
"n-hosts-awaiting-patch": "{n} hôte attend ce patch | {n} hôtes attendent ce patch",
|
"n-hosts-awaiting-patch": "{n} hôte attend ce patch | {n} hôtes attendent ce patch",
|
||||||
@ -173,6 +174,7 @@
|
|||||||
"vcpus": "vCPUs",
|
"vcpus": "vCPUs",
|
||||||
"vcpus-used": "vCPUs utilisés",
|
"vcpus-used": "vCPUs utilisés",
|
||||||
"version": "Version",
|
"version": "Version",
|
||||||
|
"vm-is-running": "La VM est en cours d'exécution",
|
||||||
"vms": "VMs",
|
"vms": "VMs",
|
||||||
"xo-lite-under-construction": "XOLite est en construction"
|
"xo-lite-under-construction": "XOLite est en construction"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user