Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(xo-6): host network view #8158

Closed
wants to merge 92 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
50f8ff7
feat(xo-6): implement network view
CzechSebastian Nov 15, 2024
0adef18
feat(xo-6): Add css
CzechSebastian Nov 18, 2024
668330b
feat(xo-6): add behavior
CzechSebastian Nov 18, 2024
495fe62
feat(xo-6): add stores
CzechSebastian Nov 19, 2024
154249c
feat(xo-6): remove locales
CzechSebastian Nov 19, 2024
925e797
feat(xo-6): locales change
CzechSebastian Nov 19, 2024
bde7120
feat(xo-6): locales migration
CzechSebastian Nov 19, 2024
9338269
feat(xo-6): PR feedback
CzechSebastian Nov 20, 2024
b71f572
feat(xo6): feedback
CzechSebastian Nov 21, 2024
4a21fca
feat(xo6): refactor store
CzechSebastian Nov 22, 2024
2fbb52a
feat(xo6): refactor store
CzechSebastian Nov 25, 2024
5866b97
feat(xo-6): remove code not relevant of store
CzechSebastian Nov 27, 2024
c3f4f8b
feat(xo-6): remove code not relevant of store
CzechSebastian Nov 27, 2024
9c90a3b
feat(xo-6): remove locale
CzechSebastian Nov 29, 2024
951f828
feat(xo-6): add locale
CzechSebastian Nov 29, 2024
f83b8ac
feat(xo-6): feedback
CzechSebastian Dec 4, 2024
65ce296
feat(xo-6): implement network view
CzechSebastian Nov 15, 2024
48a0bc6
feat(xo6): Update with checkbox composable
CzechSebastian Nov 25, 2024
d958ac8
feat(xo6): remove duplicated
CzechSebastian Nov 25, 2024
657d745
feat(xo6): wip make pif table component
CzechSebastian Nov 25, 2024
e78cb09
feat(xo-6): display table with filter
CzechSebastian Nov 26, 2024
78dd964
feat(xo-6): css on table
CzechSebastian Nov 26, 2024
a14d113
feat(xo-6):handle fake store
CzechSebastian Nov 28, 2024
548e7e9
feat(xo-6):update info
CzechSebastian Nov 28, 2024
28dd352
feat(xo-6):update with new card key component
CzechSebastian Nov 28, 2024
10e9a7f
feat(web-core): update css alignment, tooltip and ellipsis on text
CzechSebastian Nov 28, 2024
838bdaa
feat(xo-6): add row selection
CzechSebastian Nov 29, 2024
b980f70
feat(web-core): add state for empty panel (wip)
CzechSebastian Nov 29, 2024
1f5f9ba
feat(web-core): wip
CzechSebastian Dec 2, 2024
985c52a
feat(xo-6): add table scrolling bar
CzechSebastian Dec 2, 2024
693b16f
feat(xo-6): add responsiveness for table
CzechSebastian Dec 2, 2024
9aed6d7
feat(xo-6): update headers
CzechSebastian Dec 3, 2024
1a0f83b
feat(xo-6): add no-selection panel
CzechSebastian Dec 3, 2024
7992b00
feat(x0-6): typing
CzechSebastian Dec 5, 2024
7317301
feat(xo-6): remove classes
CzechSebastian Dec 5, 2024
9df1710
feat(xo-6): add store
CzechSebastian Dec 5, 2024
61c8113
feat(xo-6): handle None values
CzechSebastian Dec 5, 2024
0ec8a9b
feat(xo-6): simplify functions
CzechSebastian Dec 5, 2024
1ed06d9
feat(xo-6): handle header width
CzechSebastian Dec 6, 2024
78d54f8
feat(xo-6): update table container
CzechSebastian Dec 11, 2024
9a62bcc
feat(xo-6): remove media queries
CzechSebastian Dec 11, 2024
02b067e
fix(xapi/VM_create): fix destroy on failure
julien-f Dec 11, 2024
1bc0f8f
fix(xapi/VM_destroy): use callAsync when appropriate
julien-f Dec 11, 2024
4a54685
feat(xo-web): add rolling pool reboot and update to the plannable job…
fbeauchamp Dec 13, 2024
04dd9e9
feat(xo-server/rest): ability to manage VDIs using REST API when crea…
MathieuRA Dec 13, 2024
1aef44b
feat(xo-web): merge backups synchronously (#8177)
stephane-m-dev Dec 16, 2024
56a18eb
feat: technical release (#8196)
S3bastianCZ Dec 16, 2024
5a933ed
fix(xo-server): fix 'no object with ...' during VM creation (#8195)
MathieuRA Dec 16, 2024
14da4fb
VMs with this tag `xo:no-health-check` or `xo:no-health-check=REASON…
fbeauchamp Dec 16, 2024
165015e
feat(xo-6): implement network view
CzechSebastian Nov 15, 2024
88683a8
feat(xo-6): Add css
CzechSebastian Nov 18, 2024
70f1294
feat(xo-6): add behavior
CzechSebastian Nov 18, 2024
4807afd
feat(xo-6): add stores
CzechSebastian Nov 19, 2024
d86c616
feat(xo-6): remove locales
CzechSebastian Nov 19, 2024
7184675
feat(xo-6): locales change
CzechSebastian Nov 19, 2024
c09fa34
feat(xo-6): locales migration
CzechSebastian Nov 19, 2024
a5f813f
feat(xo-6): PR feedback
CzechSebastian Nov 20, 2024
53267dc
feat(xo6): feedback
CzechSebastian Nov 21, 2024
d372f9d
feat(xo6): refactor store
CzechSebastian Nov 22, 2024
a4a5562
feat(xo6): refactor store
CzechSebastian Nov 25, 2024
4294764
feat(xo-6): remove code not relevant of store
CzechSebastian Nov 27, 2024
54bdcbc
feat(xo-6): remove code not relevant of store
CzechSebastian Nov 27, 2024
c48330b
feat(xo-6): remove locale
CzechSebastian Nov 29, 2024
ee80e39
feat(xo-6): add locale
CzechSebastian Nov 29, 2024
b096d19
feat(xo-6): feedback
CzechSebastian Dec 4, 2024
0f9c348
feat(xo-6): implement network view
CzechSebastian Nov 15, 2024
2e5c280
feat(xo6): Update with checkbox composable
CzechSebastian Nov 25, 2024
4ca54d7
feat(xo6): remove duplicated
CzechSebastian Nov 25, 2024
cfcb140
feat(xo6): wip make pif table component
CzechSebastian Nov 25, 2024
8a22c62
feat(xo-6): display table with filter
CzechSebastian Nov 26, 2024
1fe584d
feat(xo-6): css on table
CzechSebastian Nov 26, 2024
6044817
feat(xo-6):handle fake store
CzechSebastian Nov 28, 2024
e4a7285
feat(xo-6):update info
CzechSebastian Nov 28, 2024
3377920
feat(xo-6):update with new card key component
CzechSebastian Nov 28, 2024
7979382
feat(web-core): update css alignment, tooltip and ellipsis on text
CzechSebastian Nov 28, 2024
bd05bb7
feat(xo-6): add row selection
CzechSebastian Nov 29, 2024
f1527ff
feat(web-core): add state for empty panel (wip)
CzechSebastian Nov 29, 2024
c24dd5e
feat(web-core): wip
CzechSebastian Dec 2, 2024
fa52f8d
feat(xo-6): add table scrolling bar
CzechSebastian Dec 2, 2024
ebbb3bd
feat(xo-6): add responsiveness for table
CzechSebastian Dec 2, 2024
33a3486
feat(xo-6): update headers
CzechSebastian Dec 3, 2024
2f5f32a
feat(xo-6): add no-selection panel
CzechSebastian Dec 3, 2024
7a7ec5f
feat(x0-6): typing
CzechSebastian Dec 5, 2024
1d10b17
feat(xo-6): remove classes
CzechSebastian Dec 5, 2024
fee24f9
feat(xo-6): add store
CzechSebastian Dec 5, 2024
467d4be
feat(xo-6): handle None values
CzechSebastian Dec 5, 2024
c16dd4f
feat(xo-6): simplify functions
CzechSebastian Dec 5, 2024
73390c5
feat(xo-6): handle header width
CzechSebastian Dec 6, 2024
1844abc
feat(xo-6): update table container
CzechSebastian Dec 11, 2024
7fa96cd
feat(xo-6): remove media queries
CzechSebastian Dec 11, 2024
6db9b7b
Merge remote-tracking branch 'origin/xo-6/host-network-view' into xo-…
CzechSebastian Dec 17, 2024
1708138
feat(xo-6): add copyToClipboard function
CzechSebastian Dec 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion @vates/nbd-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@xen-orchestra/async-map": "^0.1.2",
"@xen-orchestra/log": "^0.7.1",
"promise-toolbox": "^0.21.0",
"xen-api": "^4.5.0"
"xen-api": "^4.6.0"
},
"devDependencies": {
"tap": "^18.7.0",
Expand Down
4 changes: 2 additions & 2 deletions @xen-orchestra/backups-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"bugs": "https://github.com/vatesfr/xen-orchestra/issues",
"dependencies": {
"@xen-orchestra/async-map": "^0.1.2",
"@xen-orchestra/backups": "^0.55.0",
"@xen-orchestra/backups": "^0.56.0",
"@xen-orchestra/fs": "^4.3.0",
"filenamify": "^6.0.0",
"getopts": "^2.2.5",
Expand All @@ -27,7 +27,7 @@
"scripts": {
"postversion": "npm publish --access public"
},
"version": "1.0.26",
"version": "1.0.27",
"license": "AGPL-3.0-or-later",
"author": {
"name": "Vates SAS",
Expand Down
7 changes: 5 additions & 2 deletions @xen-orchestra/backups/_runners/_vmRunners/_Abstract.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,12 @@ export const Abstract = class AbstractVmBackupRunner {

// check if current VM has tags
const tags = this._tags
const intersect = settings.healthCheckVmsWithTags.some(t => tags.includes(t))

if (settings.healthCheckVmsWithTags.length !== 0 && !intersect) {
// accept both 'xo:no-health-check' and 'xo:no-health-check=reason'
const vmAlwaysIgnored = tags.some(t => t.startsWith('xo:no-health-check'))
const intersect = !vmAlwaysIgnored && settings.healthCheckVmsWithTags.some(t => tags.includes(t))

if (vmAlwaysIgnored || (settings.healthCheckVmsWithTags.length !== 0 && !intersect)) {
// create a task to have an info in the logs and reports
return Task.run(
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ export const MixinRemoteWriter = (BaseClass = Object) =>
const { disableMergeWorker } = this._config
// merge worker only compatible with local remotes
const { handler } = this._adapter
const willMergeInWorker = !disableMergeWorker && typeof handler.getRealPath === 'function'

const synchronousMerge = this._settings.mergeBackupsSynchronously
const willMergeInWorker = !synchronousMerge && !disableMergeWorker && typeof handler.getRealPath === 'function'
const { merge } = await this._cleanVm({ remove: true, merge: !willMergeInWorker })
await this.#lock.dispose()

Expand Down
6 changes: 3 additions & 3 deletions @xen-orchestra/backups/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "git",
"url": "https://github.com/vatesfr/xen-orchestra.git"
},
"version": "0.55.0",
"version": "0.56.0",
"engines": {
"node": ">=14.18"
},
Expand Down Expand Up @@ -49,7 +49,7 @@
"uuid": "^9.0.0",
"value-matcher": "^0.2.0",
"vhd-lib": "^4.11.2",
"xen-api": "^4.5.0",
"xen-api": "^4.6.0",
"yazl": "^2.5.1"
},
"devDependencies": {
Expand All @@ -59,7 +59,7 @@
"tmp": "^0.2.1"
},
"peerDependencies": {
"@xen-orchestra/xapi": "^7.8.0"
"@xen-orchestra/xapi": "^7.8.1"
},
"license": "AGPL-3.0-or-later",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion @xen-orchestra/cr-seed-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"preferGlobal": true,
"dependencies": {
"golike-defer": "^0.5.1",
"xen-api": "^4.5.0"
"xen-api": "^4.6.0"
},
"scripts": {
"postversion": "npm publish"
Expand Down
4 changes: 2 additions & 2 deletions @xen-orchestra/immutable-backups/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
"xo-lift-remote-immutability": "./liftProtection.mjs"
},
"license": "AGPL-3.0-or-later",
"version": "1.0.14",
"version": "1.0.15",
"engines": {
"node": ">=14.0.0"
},
"dependencies": {
"@vates/async-each": "^1.0.0",
"@xen-orchestra/backups": "^0.55.0",
"@xen-orchestra/backups": "^0.56.0",
"@xen-orchestra/log": "^0.7.1",
"app-conf": "^3.0.0",
"chokidar": "^3.5.3",
Expand Down
2 changes: 1 addition & 1 deletion @xen-orchestra/lite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@vueuse/core": "^10.7.1",
"@vueuse/math": "^10.7.1",
"@vueuse/shared": "^10.7.1",
"@xen-orchestra/web-core": "^0.7.0",
"@xen-orchestra/web-core": "^0.8.0",
"complex-matcher": "^0.7.1",
"d3-time-format": "^4.1.0",
"decorator-synchronized": "^0.6.0",
Expand Down
1 change: 0 additions & 1 deletion @xen-orchestra/lite/src/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@

"descending": "sestupně",
"description": "Popis",
"dhcp": "DHCP",
"disabled": "Zakázáno",
"display": "Zobrazení",
"dns": "DNS",
Expand Down
2 changes: 0 additions & 2 deletions @xen-orchestra/lite/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@

"descending": "absteigend",
"description": "Beschreibung",
"dhcp": "DHCP",
"disabled": "deaktiviert",
"display": "Display",
"dns": "DNS",
Expand Down Expand Up @@ -118,7 +117,6 @@
"n-hosts-awaiting-patch": "Der Host {n} benötigt dieses Patch | Die Hosts {n} benötigen dieses Patch",
"n-missing": "{n} verbleibend",
"name": "Name",
"netmask": "Netzmaske",
"network-download": "Download",
"network-throughput": "Netzwerkdurchsatz",
"network-upload": "Upload",
Expand Down
5 changes: 0 additions & 5 deletions @xen-orchestra/lite/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"cpu-provisioning": "CPU provisioning",
"cpu-provisioning-warning": "The number of vCPUs allocated exceeds the number of physical CPUs available. System performance could be affected",
"cpu-usage": "CPU usage",
"delete": "Delete",
"delete-vms": "Delete 1 VM | Delete {n} VMs",
"deploy": "Deploy",
"deploy-xoa": "Deploy XOA",
Expand All @@ -59,10 +58,8 @@

"descending": "descending",
"description": "Description",
"dhcp": "DHCP",
"disabled": "Disabled",
"display": "Display",
"dns": "DNS",
"do-you-have-needs": "You have needs and/or expectations? Let us know",
"documentation": "Documentation",
"edit-config": "Edit config",
Expand Down Expand Up @@ -179,7 +176,6 @@
"n-hosts-awaiting-patch": "{n} host is awaiting this patch | {n} hosts are awaiting this patch",
"n-missing": "{n} missing",
"name": "Name",
"netmask": "Netmask",
"network-download": "Download",
"network-throughput": "Network throughput",
"network-upload": "Upload",
Expand Down Expand Up @@ -241,7 +237,6 @@
"start": "Start",
"start-on-host": "Start on specific host",
"static-ip": "Static IP",
"status": "Status",
"storage-usage": "Storage usage",
"support": "Support",
"suspend": "Suspend",
Expand Down
1 change: 0 additions & 1 deletion @xen-orchestra/lite/src/locales/fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@

"descending": "نزولی",
"description": "توصیف",
"dhcp": "DHCP",
"disabled": "غیر فعال",
"display": "نمایش",
"dns": "DNS",
Expand Down
5 changes: 0 additions & 5 deletions @xen-orchestra/lite/src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"cpu-provisioning": "Provisionnement CPU",
"cpu-provisioning-warning": "Le nombre de vCPU alloués dépasse le nombre de CPU physique disponible. Les performances du système pourraient être affectées",
"cpu-usage": "Utilisation CPU",
"delete": "Supprimer",
"delete-vms": "Supprimer 1 VM | Supprimer {n} VMs",
"deploy": "Déployer",
"deploy-xoa": "Déployer XOA",
Expand All @@ -59,8 +58,6 @@

"descending": "descendant",
"description": "Description",
"dhcp": "DHCP",
"dns": "DNS",
"disabled": "Désactivé",
"display": "Affichage",
"do-you-have-needs": "Vous avez des besoins et/ou des attentes ? Faites le nous savoir",
Expand Down Expand Up @@ -179,7 +176,6 @@
"n-hosts-awaiting-patch": "{n} hôte attend ce patch | {n} hôtes attendent ce patch",
"n-missing": "{n} manquant | {n} manquants",
"name": "Nom",
"netmask": "Masque réseau",
"network-download": "Descendant",
"network-throughput": "Débit du réseau",
"network-upload": "Montant",
Expand Down Expand Up @@ -241,7 +237,6 @@
"start": "Démarrer",
"start-on-host": "Démarrer sur un hôte spécifique",
"static-ip": "IP statique",
"status": "Statut",
"storage-usage": "Utilisation du stockage",
"support": "Support",
"suspend": "Suspendre",
Expand Down
8 changes: 4 additions & 4 deletions @xen-orchestra/proxy/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@xen-orchestra/proxy",
"version": "0.29.6",
"version": "0.29.7",
"license": "AGPL-3.0-or-later",
"description": "XO Proxy used to remotely execute backup jobs",
"keywords": [
Expand Down Expand Up @@ -33,13 +33,13 @@
"@vates/disposable": "^0.1.6",
"@vates/task": "^0.6.0",
"@xen-orchestra/async-map": "^0.1.2",
"@xen-orchestra/backups": "^0.55.0",
"@xen-orchestra/backups": "^0.56.0",
"@xen-orchestra/fs": "^4.3.0",
"@xen-orchestra/log": "^0.7.1",
"@xen-orchestra/mixin": "^0.2.0",
"@xen-orchestra/mixins": "^0.16.2",
"@xen-orchestra/self-signed": "^0.2.1",
"@xen-orchestra/xapi": "^7.8.0",
"@xen-orchestra/xapi": "^7.8.1",
"ajv": "^8.0.3",
"app-conf": "^3.0.0",
"async-iterator-to-stream": "^1.1.0",
Expand All @@ -61,7 +61,7 @@
"source-map-support": "^0.5.16",
"stoppable": "^1.0.6",
"xdg-basedir": "^5.1.0",
"xen-api": "^4.5.0",
"xen-api": "^4.6.0",
"xo-common": "^0.8.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ const slots = defineSlots<{
<style lang="postcss" scoped>
.vts-card-row-key-value {
display: flex;
align-items: center;
gap: 0.8rem;

.key {
min-width: 12rem;
max-width: 12rem;
overflow-wrap: break-word;
color: var(--color-neutral-txt-secondary);
}
Expand Down
7 changes: 4 additions & 3 deletions @xen-orchestra/web-core/lib/components/table/ColumnTitle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<MenuList :disabled placement="bottom-start" border>
<template #trigger="{ open, isOpen }">
<th
:class="{ interactive, disabled, focus: isOpen }"
:class="[headerClass, { interactive, disabled, focus: isOpen }]"
class="column-header"
@click="ev => (interactive ? open(ev) : noop())"
>
<div class="content">
<span class="label">
<div class="content text-ellipsis">
<span v-tooltip class="label">
<VtsIcon :icon accent="current" />
<slot />
</span>
Expand Down Expand Up @@ -58,6 +58,7 @@ const props = withDefaults(
icon?: IconDefinition
interactive?: boolean
disabled?: boolean
headerClass?: string
}>(),
{
disabled: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const props = withDefaults(
{ disabled: undefined }
)

const checkboxModel = defineModel<boolean | undefined>({ default: undefined })
const checkboxModel = defineModel<boolean | undefined | string[]>({ default: undefined })

const slots = defineSlots<{
default?(): any
Expand Down
4 changes: 2 additions & 2 deletions @xen-orchestra/web-core/lib/components/ui/info/UiInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
<template>
<div class="ui-info">
<VtsIcon :accent class="icon" :icon="faCircle" :overlay-icon="icon" />
<p class="message">
<p v-tooltip class="message text-ellipsis">
<slot />
</p>
</div>
</template>

<script lang="ts" setup>
import VtsIcon from '@core/components/icon/VtsIcon.vue'
import { vTooltip } from '@core/directives/tooltip.directive'
import {
faCheck,
faCircle,
Expand Down Expand Up @@ -42,7 +43,6 @@ const icon = computed(() => iconByAccent[props.accent])

<style lang="postcss" scoped>
.ui-info {
align-items: start;
display: flex;
gap: 0.8rem;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const slots = defineSlots<{
flex-direction: column;
padding: 0.8rem;
gap: 0.8rem;
cursor: default;
}

&.error {
Expand Down
33 changes: 33 additions & 0 deletions @xen-orchestra/web-core/lib/composables/multi-select.composable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# useMultiSelect composable

```vue
<template>
<table>
<thead>
<tr>
<th>
<input type="checkbox" v-model="areAllSelected" />
</th>
<th>Name</th>
</tr>
</thead>
<tbody>
<tr v-for="item in items">
<td>
<input type="checkbox" :value="item.id" v-model="selected" />
</td>
<td>{{ item.name }}</td>
</tr>
</tbody>
</table>

<!-- You can use something else than a "Select All" checkbox -->
<button @click="areAllSelected = !areAllSelected">Toggle all selected</button>
</template>

<script lang="ts" setup>
import useMultiSelect from './multi-select.composable'

const { selected, areAllSelected } = useMultiSelect()
</script>
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { computed, ref, unref, type MaybeRef, type Ref } from 'vue'

export default function useMultiSelect<T>(usableIds: MaybeRef<T[]>, selectableIds?: MaybeRef<T[]>) {
const $selected = ref(new Set()) as Ref<Set<T>>

const selected = computed({
get() {
return unref(usableIds).filter(usableId => $selected.value.has(usableId))
},
set(ids: T[]) {
$selected.value = new Set(ids)
},
})

const areAllSelected = computed({
get() {
return (unref(selectableIds) ?? unref(usableIds)).every(id => $selected.value.has(id))
},
set(value: boolean) {
if (value) {
$selected.value = new Set(unref(selectableIds) ?? unref(usableIds))
} else {
$selected.value = new Set()
}
},
})

return {
selected,
areAllSelected,
}
}
Loading
Loading