@xen-orchestra/web-core 0.48.1 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,51 @@
1
+ <template>
2
+ <UiCard class="vts-operation-card">
3
+ <VtsStateHero format="card" :type size="medium" no-background />
4
+ <div class="container" :class="{ mobile: uiStore.isSmall }">
5
+ <span class="typo-h1 title">
6
+ {{ title }}
7
+ </span>
8
+ <VtsStateHero v-if="type === 'creating'" format="card" type="busy" size="medium" no-background />
9
+ <slot />
10
+ </div>
11
+ </UiCard>
12
+ </template>
13
+
14
+ <script lang="ts" setup>
15
+ import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
16
+ import UiCard from '@core/components/ui/card/UiCard.vue'
17
+ import { useUiStore } from '@core/stores/ui.store.ts'
18
+
19
+ defineProps<{
20
+ title: string
21
+ type: StateHeroType
22
+ }>()
23
+
24
+ defineSlots<{
25
+ default?(): any
26
+ }>()
27
+
28
+ const uiStore = useUiStore()
29
+ </script>
30
+
31
+ <style lang="postcss" scoped>
32
+ .vts-operation-card {
33
+ .title {
34
+ text-align: center;
35
+ color: var(--color-neutral-txt-primary);
36
+ }
37
+
38
+ .container {
39
+ display: flex;
40
+ flex-direction: column;
41
+ align-items: center;
42
+ gap: 4rem;
43
+ margin: 0 auto;
44
+ width: 50%;
45
+
46
+ &.mobile {
47
+ width: 100%;
48
+ }
49
+ }
50
+ }
51
+ </style>
@@ -0,0 +1,38 @@
1
+ <template>
2
+ <VtsOperationCard :title type="error">
3
+ <UiAlert v-if="errorMessage !== undefined || slots['error-message']" accent="danger">
4
+ <slot name="error-message">{{ errorMessage }}</slot>
5
+ </UiAlert>
6
+ <slot name="error-details">
7
+ <UiLogEntryViewer
8
+ v-if="error !== undefined"
9
+ :label="t('api-error-details')"
10
+ accent="danger"
11
+ size="small"
12
+ :content="error"
13
+ />
14
+ </slot>
15
+ <slot name="actions" />
16
+ </VtsOperationCard>
17
+ </template>
18
+
19
+ <script lang="ts" setup>
20
+ import VtsOperationCard from '@core/components/operation-card/VtsOperationCard.vue'
21
+ import UiAlert from '@core/components/ui/alert/UiAlert.vue'
22
+ import UiLogEntryViewer from '@core/components/ui/log-entry-viewer/UiLogEntryViewer.vue'
23
+ import { useI18n } from 'vue-i18n'
24
+
25
+ defineProps<{
26
+ title: string
27
+ errorMessage?: string
28
+ error?: Error
29
+ }>()
30
+
31
+ const slots = defineSlots<{
32
+ 'error-message'?(): any
33
+ 'error-details'?(): any
34
+ actions?(): any
35
+ }>()
36
+
37
+ const { t } = useI18n()
38
+ </script>
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <VtsOperationCard :title type="creating">
3
+ <UiAlert v-if="message !== undefined || slots.message" accent="info">
4
+ <slot name="message">
5
+ {{ message }}
6
+ </slot>
7
+ </UiAlert>
8
+ </VtsOperationCard>
9
+ </template>
10
+
11
+ <script lang="ts" setup>
12
+ import VtsOperationCard from '@core/components/operation-card/VtsOperationCard.vue'
13
+ import UiAlert from '@core/components/ui/alert/UiAlert.vue'
14
+
15
+ defineProps<{
16
+ title: string
17
+ message?: string
18
+ }>()
19
+
20
+ const slots = defineSlots<{
21
+ message?(): any
22
+ }>()
23
+ </script>
@@ -30,6 +30,7 @@ export type StateHeroType =
30
30
  | 'offline'
31
31
  | 'all-good'
32
32
  | 'all-done'
33
+ | 'creating'
33
34
 
34
35
  const { format, type, size } = defineProps<{
35
36
  format: StateHeroFormat
@@ -358,17 +358,16 @@
358
358
  "job-name": "Název úlohy",
359
359
  "job:arg:host-required": "Je zapotřebí hostitele",
360
360
  "job:arg:missing-payload": "Chybí náklad",
361
- "job:arg:name-label-required": "Je zapotřebí popisek názvu",
361
+ "job:arg:name-required": "Je zapotřebí popisek názvu",
362
362
  "job:arg:password-required": "Je zapotřebí heslo",
363
363
  "job:arg:pool-id-required": "Je zapotřebí identifikátor fondu",
364
364
  "job:arg:sr-vdi-required": "Je zapotřebí VDI repozitáře úložiště",
365
365
  "job:arg:template-uuid-required": "Je zapotřebí UUID šablony",
366
366
  "job:arg:username-required": "Je zapotřebí uživatelské jméno",
367
- "job:server-create:in-progress": "Probíhá vytváření…",
367
+ "job:create:in-progress": "Probíhá vytváření…",
368
368
  "job:vm-copy:bad-power-state": "Je třeba, aby virt. stroj byl zastavený",
369
369
  "job:vm-copy:in-progress": "Probíhá kopírování…",
370
370
  "job:vm-copy:missing-vm": "Žádný virt. stroj ke zkopírování",
371
- "job:vm-create:in-progress": "Probíhá vytváření…",
372
371
  "job:vm-create:incomplete-install-mode": "Instalační režim je nekompletní",
373
372
  "job:vm-delete:bad-power-state": "Je třeba, aby virt. stroj byl zastavený",
374
373
  "job:vm-delete:blocked-operation": "Smazání virt. stroje je blokováno",
@@ -351,17 +351,16 @@
351
351
  "job-name": "Job Name",
352
352
  "job:arg:host-required": "Host ist erforderlich",
353
353
  "job:arg:missing-payload": "Nutzlast fehlt",
354
- "job:arg:name-label-required": "Ein Name ist erforderlich",
354
+ "job:arg:name-required": "Ein Name ist erforderlich",
355
355
  "job:arg:password-required": "Passwort erforderlich",
356
356
  "job:arg:pool-id-required": "Pool ID erforderlich",
357
357
  "job:arg:sr-vdi-required": "SR VDI ist erforderlich",
358
358
  "job:arg:template-uuid-required": "Template UUID ist erforderlich",
359
359
  "job:arg:username-required": "Benutzername ist erforderlich",
360
- "job:server-create:in-progress": "Erstellung läuft…",
360
+ "job:create:in-progress": "Erstellung läuft…",
361
361
  "job:vm-copy:bad-power-state": "Die VM muss angehalten werden",
362
362
  "job:vm-copy:in-progress": "Kopiervorgang läuft…",
363
363
  "job:vm-copy:missing-vm": "Keine VM zu kopieren",
364
- "job:vm-create:in-progress": "Erstellung läuft…",
365
364
  "job:vm-create:incomplete-install-mode": "Installationsmodus ist unvollständig",
366
365
  "job:vm-delete:bad-power-state": "Die VM muss gestoppt werden",
367
366
  "job:vm-delete:blocked-operation": "VM Löschung ist gesperrt",
@@ -26,6 +26,9 @@
26
26
  "action:copy-id": "Copy ID",
27
27
  "action:copy-info-json": "Copy information into JSON",
28
28
  "action:create": "Create",
29
+ "action:create-bonded-network": "Create bonded network",
30
+ "action:create-internal-network": "Create internal network",
31
+ "action:create-network": "Create network",
29
32
  "action:delete": "Delete",
30
33
  "action:delete-filter": "Delete filter",
31
34
  "action:delete-group": "Delete group",
@@ -179,6 +182,7 @@
179
182
  "bios-info": "BIOS info",
180
183
  "bond": "Bond",
181
184
  "bond-devices": "Bond devices",
185
+ "bond-mode": "Bond mode",
182
186
  "bond-status": "Bond status",
183
187
  "boot-firmware": "Boot firmware",
184
188
  "build-number": "Build number",
@@ -239,6 +243,7 @@
239
243
  "crash-dump-storage-repository": "Crash dump storage repository",
240
244
  "created-by": "Created by",
241
245
  "created-on": "Created on",
246
+ "creating-new-network": "Creating new network",
242
247
  "creation-date": "Creation date",
243
248
  "cron-pattern": "Cron pattern",
244
249
  "current": "Current",
@@ -335,9 +340,9 @@
335
340
  "hosts-status": "Hosts status",
336
341
  "hyper-threading": "Hyper threading (SMT)",
337
342
  "id": "ID",
338
- "included": "Included",
339
343
  "in-last-three-runs": "In their last 3 runs",
340
344
  "in-progress": "In progress",
345
+ "included": "Included",
341
346
  "info": "Info",
342
347
  "infos": "Infos",
343
348
  "install-settings": "Install settings",
@@ -360,19 +365,22 @@
360
365
  "iso-dvd": "ISO/DVD",
361
366
  "job": "Job",
362
367
  "job-name": "Job name",
368
+ "job:arg:bond-mode-required": "Bond mode is required",
363
369
  "job:arg:host-required": "Host is required",
364
370
  "job:arg:missing-payload": "Payload is missing",
365
- "job:arg:name-label-required": "Name label is required",
371
+ "job:arg:name-required": "Name is required",
366
372
  "job:arg:password-required": "Password is required",
373
+ "job:arg:pif-id-required": "PIF ID is required",
374
+ "job:arg:pif-ids-required": "At least one PIF ID is required",
367
375
  "job:arg:pool-id-required": "Pool ID is required",
368
376
  "job:arg:sr-vdi-required": "SR VDI is required",
369
377
  "job:arg:template-uuid-required": "Template UUID is required",
370
378
  "job:arg:username-required": "Username is required",
371
- "job:server-create:in-progress": "Create in progress…",
379
+ "job:arg:vlan-required": "VLAN is required",
380
+ "job:create:in-progress": "Create in progress…",
372
381
  "job:vm-copy:bad-power-state": "VM must be halted",
373
382
  "job:vm-copy:in-progress": "Copy in progress…",
374
383
  "job:vm-copy:missing-vm": "No VMs to copy",
375
- "job:vm-create:in-progress": "Create in progress…",
376
384
  "job:vm-create:incomplete-install-mode": "Install mode is incomplete",
377
385
  "job:vm-delete:bad-power-state": "VM must be halted",
378
386
  "job:vm-delete:blocked-operation": "VM deletion is blocked",
@@ -436,6 +444,7 @@
436
444
  "last-snapshot": "Last snapshot",
437
445
  "last-week": "Last week",
438
446
  "learn-more": "Learn more",
447
+ "leave-page-safely": "You can safely leave this page.",
439
448
  "lets-go!": "Let's go!",
440
449
  "license-name": "{name} license",
441
450
  "license-socket": "License socket",
@@ -490,6 +499,7 @@
490
499
  "modes": "Modes",
491
500
  "more-actions": "More actions",
492
501
  "mtu": "MTU",
502
+ "mtu-default-value-message": "1500 by default",
493
503
  "multi-creation": "Multi creation",
494
504
  "multi-pathing": "Multi-pathing",
495
505
  "n-cpus": "1 CPU | {n} CPUs",
@@ -510,6 +520,8 @@
510
520
  "network": "Network",
511
521
  "network-block-device": "Network block device",
512
522
  "network-config": "Network config",
523
+ "network-create:warning:mtu-out-of-range": "MTU should be between {min} and {max}",
524
+ "network-create:warning:vlan-out-of-range": "VLAN should be between 0 and {max}",
513
525
  "network-download": "Download",
514
526
  "network-information": "Network information",
515
527
  "network-throughput": "Network throughput",
@@ -518,6 +530,12 @@
518
530
  "networks": "Networks",
519
531
  "new": "New",
520
532
  "new-features-are-coming!": "New features are coming soon!",
533
+ "new-network:add": "Add new network",
534
+ "new-network:add-bonded": "Add new bonded network",
535
+ "new-network:add-internal": "Add new internal network",
536
+ "new-network:creation-in-progress-message": "The task triggered by the new network form will still run and can be tracked from the {tasksPageLink}.",
537
+ "new-network:error-message": "An error occurred while creating the network. Please review your configuration settings (name, type, VLAN), verify host availability, and try again.",
538
+ "new-network:select-interface": "Select an interface",
521
539
  "new-vif": "New VIF",
522
540
  "new-vm": "New VM",
523
541
  "new-vm:add": "Add a new VM",
@@ -812,6 +830,7 @@
812
830
  "task:ended": "@:ended",
813
831
  "task:started": "@:started",
814
832
  "tasks": "Tasks",
833
+ "tasks-page": "Tasks page",
815
834
  "tasks:all": "@:all",
816
835
  "tasks:done": "@:done",
817
836
  "tasks:failed": "@:failed",
@@ -858,6 +877,9 @@
858
877
  "unable-to-connect-to": "Unable to connect to {ip}",
859
878
  "unable-to-connect-to-the-pool": "Unable to connect to the pool",
860
879
  "unable-to-connect-to-xo-server": "Unable to connect to XO server.",
880
+ "unable-to-create-new-bonded-network": "Unable to create new bonded network",
881
+ "unable-to-create-new-internal-network": "Unable to create new internal network",
882
+ "unable-to-create-new-network": "Unable to create new network",
861
883
  "unknown": "Unknown",
862
884
  "unlocked": "Unlocked",
863
885
  "unnamed": "Unnamed",
@@ -353,17 +353,16 @@
353
353
  "job-name": "Nombre del trabajo",
354
354
  "job:arg:host-required": "Se requiere un host",
355
355
  "job:arg:missing-payload": "Falta la carga",
356
- "job:arg:name-label-required": "El nombre de la etiqueta es obligatorio",
356
+ "job:arg:name-required": "El nombre de la etiqueta es obligatorio",
357
357
  "job:arg:password-required": "La contraseña es obligatoria",
358
358
  "job:arg:pool-id-required": "El ID de Pool es obligatorio",
359
359
  "job:arg:sr-vdi-required": "El SR VDI es obligatorio",
360
360
  "job:arg:template-uuid-required": "El UUID de la plantilla es obligatorio",
361
361
  "job:arg:username-required": "Se requiere nombre de usuario",
362
- "job:server-create:in-progress": "Creación en progreso…",
362
+ "job:create:in-progress": "Creación en progreso…",
363
363
  "job:vm-copy:bad-power-state": "La máquina virtual debe estar apagada",
364
364
  "job:vm-copy:in-progress": "Copia en curso…",
365
365
  "job:vm-copy:missing-vm": "No hay máquinas virtuales para copiar",
366
- "job:vm-create:in-progress": "Creación en progreso…",
367
366
  "job:vm-create:incomplete-install-mode": "El modo de instalación está incompleto",
368
367
  "job:vm-delete:bad-power-state": "La máquina virtual debe estar apagada",
369
368
  "job:vm-delete:blocked-operation": "La eliminación de la VM está bloqueada",
@@ -26,6 +26,9 @@
26
26
  "action:copy-id": "Copier l'ID",
27
27
  "action:copy-info-json": "Copier les informations en JSON",
28
28
  "action:create": "Créer",
29
+ "action:create-bonded-network": "Créer un réseau lié",
30
+ "action:create-internal-network": "Créer un réseau interne",
31
+ "action:create-network": "Créer un réseau",
29
32
  "action:delete": "Supprimer",
30
33
  "action:delete-filter": "Supprimer le filtre",
31
34
  "action:delete-group": "Supprimer le groupe",
@@ -179,6 +182,7 @@
179
182
  "bios-info": "Information du BIOS",
180
183
  "bond": "Bond",
181
184
  "bond-devices": "Devices du bond",
185
+ "bond-mode": "Mode de liaison",
182
186
  "bond-status": "Statut du bond",
183
187
  "boot-firmware": "Firmware de démarrage",
184
188
  "build-number": "Numéro de build",
@@ -239,6 +243,7 @@
239
243
  "crash-dump-storage-repository": "Dépôt de stockage des log de crash",
240
244
  "created-by": "Créé par",
241
245
  "created-on": "Créé le",
246
+ "creating-new-network": "Création du nouveau réseau",
242
247
  "creation-date": "Date de création",
243
248
  "cron-pattern": "Pattern cron",
244
249
  "current": "Actuel",
@@ -335,9 +340,9 @@
335
340
  "hosts-status": "Statut des hôtes",
336
341
  "hyper-threading": "Hyper-threading (SMT)",
337
342
  "id": "ID",
338
- "included": "Inclus",
339
343
  "in-last-three-runs": "Dans leurs trois derniers runs",
340
344
  "in-progress": "En cours",
345
+ "included": "Inclus",
341
346
  "info": "Info",
342
347
  "infos": "Infos",
343
348
  "install-settings": "Paramètres d'installation",
@@ -360,19 +365,22 @@
360
365
  "iso-dvd": "ISO/DVD",
361
366
  "job": "Job",
362
367
  "job-name": "Nom du job",
368
+ "job:arg:bond-mode-required": "Le mode de liaison est obligatoire",
363
369
  "job:arg:host-required": "L'hôte est requis",
364
370
  "job:arg:missing-payload": "Aucune donnée fournie pour l'execution du job",
365
- "job:arg:name-label-required": "Le nom est obligatoire",
371
+ "job:arg:name-required": "Le nom est obligatoire",
366
372
  "job:arg:password-required": "Le mot de passe est obligatoire",
373
+ "job:arg:pif-id-required": "L'ID de PIF est obligatoire",
374
+ "job:arg:pif-ids-required": "Au moins un ID de PIF est obligatoire",
367
375
  "job:arg:pool-id-required": "L'ID de pool est obligatoire",
368
376
  "job:arg:sr-vdi-required": "Le VDI doit avoir un SR",
369
377
  "job:arg:template-uuid-required": "L'UUID de template est obligatoire",
370
378
  "job:arg:username-required": "Le nom d'utilisateur est obligatoire",
371
- "job:server-create:in-progress": "Création en cours…",
379
+ "job:arg:vlan-required": "Le VLAN est obligatoire",
380
+ "job:create:in-progress": "Création en cours…",
372
381
  "job:vm-copy:bad-power-state": "La VM doit être arrêtée",
373
382
  "job:vm-copy:in-progress": "Copie en cours…",
374
383
  "job:vm-copy:missing-vm": "Aucune VM à copier",
375
- "job:vm-create:in-progress": "Création en cours…",
376
384
  "job:vm-create:incomplete-install-mode": "Le mode d’installation est incomplet",
377
385
  "job:vm-delete:bad-power-state": "La VM doit être arrêtée",
378
386
  "job:vm-delete:blocked-operation": "La suppression de la VM est bloquée",
@@ -436,6 +444,7 @@
436
444
  "last-snapshot": "Dernier instantané",
437
445
  "last-week": "Semaine dernière",
438
446
  "learn-more": "En savoir plus",
447
+ "leave-page-safely": "Vous pouvez quitter la page en toute sécurité.",
439
448
  "lets-go!": "Allons-y !",
440
449
  "license-name": "Licence {name}",
441
450
  "license-socket": "Licence socket",
@@ -490,6 +499,7 @@
490
499
  "modes": "Modes",
491
500
  "more-actions": "Plus d'actions",
492
501
  "mtu": "MTU",
502
+ "mtu-default-value-message": "1500 par défaut",
493
503
  "multi-creation": "Création multiple",
494
504
  "multi-pathing": "Multi-pathing",
495
505
  "n-cpus": "0 CPU | 1 CPU | {n} CPUs",
@@ -510,6 +520,8 @@
510
520
  "network": "Réseau",
511
521
  "network-block-device": "Protocole NBD (Network Block Device)",
512
522
  "network-config": "Configuration réseau",
523
+ "network-create:warning:mtu-out-of-range": "Le MTU doit être compris entre {min} et {max}",
524
+ "network-create:warning:vlan-out-of-range": "Le VLAN doit être compris entre 0 et {max}",
513
525
  "network-download": "Descendant",
514
526
  "network-information": "Informations du réseau",
515
527
  "network-throughput": "Débit du réseau",
@@ -518,6 +530,12 @@
518
530
  "networks": "Réseaux",
519
531
  "new": "Nouveau",
520
532
  "new-features-are-coming!": "De nouvelles fonctionnalités arrivent bientôt !",
533
+ "new-network:add": "Ajouter un nouveau réseau",
534
+ "new-network:add-bonded": "Ajouter un nouveau réseau lié",
535
+ "new-network:add-internal": "Ajouter un nouveau réseau interne",
536
+ "new-network:creation-in-progress-message": "La tâche déclenchée par le formulaire de nouveau réseau est toujours en cours et peut être suivie depuis la {tasksPageLink}.",
537
+ "new-network:error-message": "Une erreur s'est produite lors de la création du réseau. Veuillez vérifier vos paramètres de configuration (nom, type, VLAN), vérifier la disponibilité de l'hôte et réessayer.",
538
+ "new-network:select-interface": "Sélectionner une interface",
521
539
  "new-vif": "Nouveau VIF",
522
540
  "new-vm": "Nouvelle VM",
523
541
  "new-vm:add": "Ajouter une nouvelle VM",
@@ -812,6 +830,7 @@
812
830
  "task:ended": "Terminée",
813
831
  "task:started": "Démarrée",
814
832
  "tasks": "Tâches",
833
+ "tasks-page": "page des Tâches",
815
834
  "tasks:all": "Toutes",
816
835
  "tasks:done": "Terminées",
817
836
  "tasks:failed": "Échouées",
@@ -858,6 +877,9 @@
858
877
  "unable-to-connect-to": "Impossible de se connecter à {ip}",
859
878
  "unable-to-connect-to-the-pool": "Impossible de se connecter au Pool",
860
879
  "unable-to-connect-to-xo-server": "Impossible de se connecter au serveur XO.",
880
+ "unable-to-create-new-bonded-network": "Impossible de créer un nouveau réseau lié",
881
+ "unable-to-create-new-internal-network": "Impossible de créer un nouveau réseau interne",
882
+ "unable-to-create-new-network": "Impossible de créer un nouveau réseau",
861
883
  "unknown": "Inconnu",
862
884
  "unlocked": "Déverrouillé",
863
885
  "unnamed": "Sans nom",
@@ -358,17 +358,16 @@
358
358
  "job-name": "Taak naam",
359
359
  "job:arg:host-required": "Host is vereist",
360
360
  "job:arg:missing-payload": "Payload ontbreekt",
361
- "job:arg:name-label-required": "Naamlabel is vereist",
361
+ "job:arg:name-required": "Naamlabel is vereist",
362
362
  "job:arg:password-required": "Wachtwoord is vereist",
363
363
  "job:arg:pool-id-required": "Pool-ID is vereist",
364
364
  "job:arg:sr-vdi-required": "SR VDI is vereist",
365
365
  "job:arg:template-uuid-required": "Sjabloon UUID is vereist",
366
366
  "job:arg:username-required": "Gebruikersnaam is vereist",
367
- "job:server-create:in-progress": "Aan het maken…",
367
+ "job:create:in-progress": "Aan het maken…",
368
368
  "job:vm-copy:bad-power-state": "VM moet worden stopgezet",
369
369
  "job:vm-copy:in-progress": "Bezig met kopiëren…",
370
370
  "job:vm-copy:missing-vm": "Geen VM om te kopiëren",
371
- "job:vm-create:in-progress": "Aan het maken…",
372
371
  "job:vm-create:incomplete-install-mode": "Installatiemodus is onvolledig",
373
372
  "job:vm-delete:bad-power-state": "VM moet worden stopgezet",
374
373
  "job:vm-delete:blocked-operation": "VM-verwijdering is geblokkeerd",
@@ -358,17 +358,16 @@
358
358
  "job-name": "Nome do trabalho",
359
359
  "job:arg:host-required": "É necessário um servidor",
360
360
  "job:arg:missing-payload": "Payload está faltando",
361
- "job:arg:name-label-required": "O rótulo do nome esta em falta",
361
+ "job:arg:name-required": "O rótulo do nome esta em falta",
362
362
  "job:arg:password-required": "É necessário utilizar uma palavra-passe.",
363
363
  "job:arg:pool-id-required": "Pool ID é obrigatório",
364
364
  "job:arg:sr-vdi-required": "SR VDI é obrigatório",
365
365
  "job:arg:template-uuid-required": "O modelo UUID é obrigatório",
366
366
  "job:arg:username-required": "Nome do utilizador é obrigatório",
367
- "job:server-create:in-progress": "A criar…",
367
+ "job:create:in-progress": "A criar…",
368
368
  "job:vm-copy:bad-power-state": "A VM deve ser desligada",
369
369
  "job:vm-copy:in-progress": "Cópia em curso…",
370
370
  "job:vm-copy:missing-vm": "Não há máquinas virtuais para copiar",
371
- "job:vm-create:in-progress": "A criar…",
372
371
  "job:vm-create:incomplete-install-mode": "O modo de instalação está incompleto",
373
372
  "job:vm-delete:bad-power-state": "A VM deve ser desligada",
374
373
  "job:vm-delete:blocked-operation": "A eliminação da VM está bloqueada",
@@ -358,17 +358,16 @@
358
358
  "job-name": "Nome do trabalho",
359
359
  "job:arg:host-required": "O servidor é obrigatório",
360
360
  "job:arg:missing-payload": "Falta o Payload",
361
- "job:arg:name-label-required": "O rótulo do nome esta em falta",
361
+ "job:arg:name-required": "O rótulo do nome esta em falta",
362
362
  "job:arg:password-required": "Palavra-passe é Obrigatório",
363
363
  "job:arg:pool-id-required": "Pool ID é obrigatório",
364
364
  "job:arg:sr-vdi-required": "SR VDI é obrigatório",
365
365
  "job:arg:template-uuid-required": "O modelo UUID é obrigatório",
366
366
  "job:arg:username-required": "Nome do utilizador é obrigatório",
367
- "job:server-create:in-progress": "A criar…",
367
+ "job:create:in-progress": "A criar…",
368
368
  "job:vm-copy:bad-power-state": "A VM deve ser desligada",
369
369
  "job:vm-copy:in-progress": "Cópia em curso…",
370
370
  "job:vm-copy:missing-vm": "Não há máquinas virtuais para copiar",
371
- "job:vm-create:in-progress": "A criar…",
372
371
  "job:vm-create:incomplete-install-mode": "O modo de instalação está incompleto",
373
372
  "job:vm-delete:bad-power-state": "A VM deve ser desligada",
374
373
  "job:vm-delete:blocked-operation": "A eliminação da VM está bloqueada",
@@ -352,17 +352,16 @@
352
352
  "job-name": "Jobbnamn",
353
353
  "job:arg:host-required": "Host krävs",
354
354
  "job:arg:missing-payload": "Payload saknas",
355
- "job:arg:name-label-required": "Namn krävs",
355
+ "job:arg:name-required": "Namn krävs",
356
356
  "job:arg:password-required": "Lösenord krävs",
357
357
  "job:arg:pool-id-required": "Pool ID krävs",
358
358
  "job:arg:sr-vdi-required": "SR VDI krävs",
359
359
  "job:arg:template-uuid-required": "Mall UUID krävs",
360
360
  "job:arg:username-required": "Användarnamn krävs",
361
- "job:server-create:in-progress": "Skapande pågår…",
361
+ "job:create:in-progress": "Skapande pågår…",
362
362
  "job:vm-copy:bad-power-state": "VMen måste vara stoppad",
363
363
  "job:vm-copy:in-progress": "Kopiering pågår…",
364
364
  "job:vm-copy:missing-vm": "Ingen VM att kopiera",
365
- "job:vm-create:in-progress": "Skapande pågår…",
366
365
  "job:vm-create:incomplete-install-mode": "Installationsläget är inkomplett",
367
366
  "job:vm-delete:bad-power-state": "VMen måste vara stoppad",
368
367
  "job:vm-delete:blocked-operation": "VM-radering är blockerad",
@@ -358,17 +358,16 @@
358
358
  "job-name": "作业名称",
359
359
  "job:arg:host-required": "主机为必填项",
360
360
  "job:arg:missing-payload": "缺少有效负载",
361
- "job:arg:name-label-required": "名称标签为必填项",
361
+ "job:arg:name-required": "名称标签为必填项",
362
362
  "job:arg:password-required": "密码为必填项",
363
363
  "job:arg:pool-id-required": "资源池ID为必填项",
364
364
  "job:arg:sr-vdi-required": "存储库/虚拟磁盘为必填项",
365
365
  "job:arg:template-uuid-required": "模板UUID为必填项",
366
366
  "job:arg:username-required": "用户名为必填项",
367
- "job:server-create:in-progress": "创建中.…",
367
+ "job:create:in-progress": "创建中.…",
368
368
  "job:vm-copy:bad-power-state": "虚拟机必须处于停止状态",
369
369
  "job:vm-copy:in-progress": "复制中.…",
370
370
  "job:vm-copy:missing-vm": "无虚拟机可复制",
371
- "job:vm-create:in-progress": "创建中.…",
372
371
  "job:vm-create:incomplete-install-mode": "安装模式不完整",
373
372
  "job:vm-delete:bad-power-state": "虚拟机必须处于停止状态",
374
373
  "job:vm-delete:blocked-operation": "虚拟机删除被阻止",
@@ -0,0 +1,102 @@
1
+ # `useFormBindings` composable
2
+
3
+ `useFormBindings` generates reactive `v-model` bindings for each field of a reactive form data object, removing the need to manually write `modelValue`/`onUpdate:modelValue` props for every input.
4
+
5
+ ## Usage
6
+
7
+ ```typescript
8
+ const bindings = useFormBindings(formData)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Argument | Type | Required | Description |
14
+ | -------- | ----------------------------------- | :------: | ----------------------------------------------- |
15
+ | `source` | `T extends Record<string, unknown>` | ✓ | A reactive object holding the form field values |
16
+
17
+ ## Return Value
18
+
19
+ | Property | Type | Description |
20
+ | ----------- | ---------------------------------------------------------- | ----------------------------------------------------- |
21
+ | `useField` | `(key, metadata?) => ComputedRef<ModelBinding & metadata>` | Creates a binding, optionally merged with extra props |
22
+ | `useSelect` | `(id, metadata?) => ComputedRef<{ id } & metadata>` | Creates a binding for a `VtsSelect`-like component |
23
+
24
+ ### `ModelBinding<T>` object
25
+
26
+ Each field binding is a computed object with:
27
+
28
+ | Property | Type | Description |
29
+ | --------------------- | -------------------- | -------------------------------------- |
30
+ | `modelValue` | `T` | The current value of the field |
31
+ | `onUpdate:modelValue` | `(value: T) => void` | Setter — updates the field in `source` |
32
+
33
+ ## `useField(key, metadata?)`
34
+
35
+ Returns the standard `ModelBinding` for the given key. Pass an optional `metadata` factory function to merge additional props into the binding (e.g. label, validation state, disabled state, etc.).
36
+
37
+ ```typescript
38
+ // Without metadata
39
+ const nameBindings = bindings.useField('name')
40
+
41
+ // With metadata
42
+ const nameBindings = bindings.useField('name', () => ({
43
+ label: t('name'),
44
+ required: true,
45
+ }))
46
+ ```
47
+
48
+ ## `useSelect(id, metadata?)`
49
+
50
+ Returns a binding for a select component registered via `useFormSelect`. The `id` comes from the `useFormSelect` return value.
51
+
52
+ ```typescript
53
+ const { id: poolSelectId } = useFormSelect(pools, { ... })
54
+
55
+ const poolSelectBindings = bindings.useSelect(poolSelectId)
56
+
57
+ // With metadata
58
+ const poolSelectBindings = bindings.useSelect(poolSelectId, () => ({
59
+ label: t('pool'),
60
+ }))
61
+ ```
62
+
63
+ ## Example: With metadata (e.g. label + validation)
64
+
65
+ ```vue
66
+ <template>
67
+ <VtsInput v-bind="nameBindings" />
68
+ </template>
69
+
70
+ <script lang="ts" setup>
71
+ import { useFormBindings } from '@core/packages/form-bindings'
72
+ import { reactive } from 'vue'
73
+
74
+ const formData = reactive({ name: '' })
75
+
76
+ const { useField } = useFormBindings(formData)
77
+
78
+ const nameBindings = useField('name', () => ({
79
+ label: 'Name',
80
+ error: formData.name === '' ? 'Name is required' : undefined,
81
+ }))
82
+ </script>
83
+ ```
84
+
85
+ ## Example: With a select component
86
+
87
+ ```typescript
88
+ import { useFormBindings } from '@core/packages/form-bindings'
89
+ import { useFormSelect } from '@core/packages/form-select'
90
+ import { reactive } from 'vue'
91
+
92
+ const formData = reactive({ pool: undefined as string | undefined })
93
+
94
+ const { id: poolSelectId } = useFormSelect(pools, {
95
+ model: toRef(formData, 'pool'),
96
+ option: { label: 'name_label', value: 'id' },
97
+ })
98
+
99
+ const { useSelect } = useFormBindings(formData)
100
+
101
+ const poolSelectBindings = useSelect(poolSelectId)
102
+ ```
@@ -0,0 +1 @@
1
+ export * from './use-form-bindings.ts'