feat(xo-lite): add star icon near pool master (#6712)
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
- Display RAM usage chart in pool dashboard (PR [#6604](https://github.com/vatesfr/xen-orchestra/pull/6604))
|
||||
- Ability to change the state of a VM (PRs [#6571](https://github.com/vatesfr/xen-orchestra/pull/6571) [#6608](https://github.com/vatesfr/xen-orchestra/pull/6608))
|
||||
- Display CPU provisioning in pool dashboard (PR [#6601](https://github.com/vatesfr/xen-orchestra/pull/6601))
|
||||
- Add a star icon near the pool master (PR [#6712](https://github.com/vatesfr/xen-orchestra/pull/6712))
|
||||
|
||||
## **0.1.0**
|
||||
|
||||
|
||||
@@ -14,6 +14,12 @@
|
||||
>
|
||||
{{ host.name_label || "(Host)" }}
|
||||
<template #actions>
|
||||
<InfraAction
|
||||
:icon="faStar"
|
||||
class="master-icon"
|
||||
v-if="isPoolMaster"
|
||||
v-tooltip="'Master'"
|
||||
/>
|
||||
<InfraAction
|
||||
:icon="isExpanded ? faAngleDown : faAngleUp"
|
||||
@click="toggle()"
|
||||
@@ -32,6 +38,7 @@ import {
|
||||
faAngleDown,
|
||||
faAngleUp,
|
||||
faServer,
|
||||
faStar,
|
||||
} from "@fortawesome/free-solid-svg-icons";
|
||||
import { useToggle } from "@vueuse/core";
|
||||
import InfraAction from "@/components/infra/InfraAction.vue";
|
||||
@@ -39,6 +46,7 @@ import InfraItemLabel from "@/components/infra/InfraItemLabel.vue";
|
||||
import InfraVmList from "@/components/infra/InfraVmList.vue";
|
||||
import { hasEllipsis } from "@/libs/utils";
|
||||
import { useHostStore } from "@/stores/host.store";
|
||||
import { usePoolStore } from "@/stores/pool.store";
|
||||
import { useUiStore } from "@/stores/ui.store";
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -48,6 +56,11 @@ const props = defineProps<{
|
||||
const hostStore = useHostStore();
|
||||
const host = computed(() => hostStore.getRecord(props.hostOpaqueRef));
|
||||
|
||||
const poolStore = usePoolStore();
|
||||
const isPoolMaster = computed(
|
||||
() => poolStore.pool?.master === props.hostOpaqueRef
|
||||
);
|
||||
|
||||
const uiStore = useUiStore();
|
||||
|
||||
const isCurrentHost = computed(
|
||||
@@ -67,4 +80,8 @@ const isTooltipDisabled = (target: HTMLElement) =>
|
||||
.infra-vm-list:deep(.link) {
|
||||
padding-left: 4.5rem;
|
||||
}
|
||||
|
||||
.master-icon {
|
||||
color: var(--color-orange-world-base);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user