@xen-orchestra/web-core 0.28.0 → 0.30.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.
- package/lib/assets/css/typography/_utils.pcss +11 -0
- package/lib/assets/no-result.svg +276 -80
- package/lib/components/console/VtsRemoteConsole.vue +6 -2
- package/lib/components/data-table/VtsDataTable.vue +11 -6
- package/lib/components/progress-bar/VtsProgressBar.vue +54 -0
- package/lib/components/progress-bar-group/VtsProgressBarGroup.vue +76 -0
- package/lib/components/quick-info-card/VtsQuickInfoCard.vue +2 -2
- package/lib/components/quick-info-row/VtsQuickInfoRow.vue +1 -1
- package/lib/components/select/VtsSelect.vue +1 -1
- package/lib/components/state-hero/VtsStateHero.vue +107 -47
- package/lib/components/task/VtsQuickTaskList.vue +1 -1
- package/lib/components/ui/card/UiCard.vue +6 -1
- package/lib/components/ui/collapsible-list/UiCollapsibleList.vue +1 -2
- package/lib/components/ui/data-ruler/UiDataRuler.vue +54 -6
- package/lib/components/ui/progress-bar/UiProgressBar.vue +14 -70
- package/lib/composables/tree-filter.composable.ts +4 -2
- package/lib/icons/index.ts +1 -1
- package/lib/icons/object-icons.ts +33 -2
- package/lib/locales/cs.json +1 -1
- package/lib/locales/de.json +1 -1
- package/lib/locales/en.json +24 -2
- package/lib/locales/es.json +1 -1
- package/lib/locales/fa.json +1 -1
- package/lib/locales/fr.json +24 -2
- package/lib/locales/it.json +1 -1
- package/lib/locales/nl.json +1 -1
- package/lib/locales/sv.json +1 -1
- package/lib/packages/progress/use-progress-group.ts +1 -1
- package/lib/utils/progress.util.ts +72 -0
- package/lib/utils/size.util.ts +6 -0
- package/package.json +1 -1
- package/lib/components/state-hero/VtsAllDoneHero.vue +0 -16
- package/lib/components/state-hero/VtsAllGoodHero.vue +0 -16
- package/lib/components/state-hero/VtsComingSoonHero.vue +0 -16
- package/lib/components/state-hero/VtsErrorNoDataHero.vue +0 -14
- package/lib/components/state-hero/VtsLoadingHero.vue +0 -57
- package/lib/components/state-hero/VtsNoDataHero.vue +0 -14
- package/lib/components/state-hero/VtsNoSelectionHero.vue +0 -16
- package/lib/components/state-hero/VtsObjectNotFoundHero.vue +0 -17
- package/lib/components/state-hero/VtsOfflineHero.vue +0 -16
- package/lib/components/state-hero/VtsPageNotFoundHero.vue +0 -33
package/lib/locales/en.json
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"alarms": "Alarms",
|
|
28
28
|
"all-done": "All done!",
|
|
29
29
|
"all-good": "All good!",
|
|
30
|
+
"all-quiet-launchpad": "All quiet on the launchpad",
|
|
30
31
|
"allow-self-signed-ssl": "You may need to allow self-signed SSL certificates in your browser",
|
|
31
32
|
"api-error-details": "API Error details",
|
|
32
33
|
"appearance": "Appearance",
|
|
@@ -105,7 +106,9 @@
|
|
|
105
106
|
"console": "Console",
|
|
106
107
|
"console-actions": "Console actions",
|
|
107
108
|
"console-clipboard": "Console clipboard",
|
|
109
|
+
"console-offline": "Console offline",
|
|
108
110
|
"console-unavailable": "Console unavailable",
|
|
111
|
+
"console-unavailable-reason": "The console is currently unavailable because the {type} is powered off.",
|
|
109
112
|
"control-domain-memory": "Control domain memory",
|
|
110
113
|
"copy": "Copy",
|
|
111
114
|
"copy-all": "Copy all",
|
|
@@ -153,6 +156,7 @@
|
|
|
153
156
|
"cpus": "CPUs",
|
|
154
157
|
"crash-dump-storage-repository": "Crash dump storage repository",
|
|
155
158
|
"create": "Create",
|
|
159
|
+
"created-by": "Created by",
|
|
156
160
|
"created-on": "Created on",
|
|
157
161
|
"cron-pattern": "Cron pattern",
|
|
158
162
|
"custom-config": "Custom config",
|
|
@@ -193,6 +197,7 @@
|
|
|
193
197
|
"edit-config": "Edit config",
|
|
194
198
|
"enabled": "Enabled",
|
|
195
199
|
"end-of-life": "End of life",
|
|
200
|
+
"engines-off": "Engines off, orbit stable",
|
|
196
201
|
"eol": "EOL",
|
|
197
202
|
"error": "Error",
|
|
198
203
|
"error-no-data": "Error, can't collect data.",
|
|
@@ -236,6 +241,7 @@
|
|
|
236
241
|
"go-back": "Go back",
|
|
237
242
|
"gpus": "GPUs",
|
|
238
243
|
"graphics-display": "Graphics & Display",
|
|
244
|
+
"guest-tools": "Guest tools",
|
|
239
245
|
"gzip": "gzip",
|
|
240
246
|
"hardware": "Hardware",
|
|
241
247
|
"hardware-specifications": "Hardware specifications",
|
|
@@ -243,8 +249,11 @@
|
|
|
243
249
|
"here": "Here",
|
|
244
250
|
"high-availability": "High availability (HA)",
|
|
245
251
|
"host": "Host",
|
|
252
|
+
"host-currently-shutdown": "This host is currently shut down, so we can’t retrieve any data.",
|
|
246
253
|
"host-description": "Host description",
|
|
247
254
|
"host-internal-networks": "Host internal networks",
|
|
255
|
+
"host-not-running": "Host not running",
|
|
256
|
+
"host-off": "Host is powered off",
|
|
248
257
|
"host-status.halted": "Stopped",
|
|
249
258
|
"host-status.running": "Running",
|
|
250
259
|
"host-status.unknown": "Unknown",
|
|
@@ -260,6 +269,7 @@
|
|
|
260
269
|
"hyper-threading": "Hyper threading (SMT)",
|
|
261
270
|
"id": "ID",
|
|
262
271
|
"in-last-three-jobs": "In their last three jobs",
|
|
272
|
+
"in-progress": "In progress",
|
|
263
273
|
"install-settings": "Install settings",
|
|
264
274
|
"interfaces": "Interface | Interface | Interfaces",
|
|
265
275
|
"interrupted": "Interrupted",
|
|
@@ -321,6 +331,7 @@
|
|
|
321
331
|
"language": "Language",
|
|
322
332
|
"last": "Last",
|
|
323
333
|
"last-n-runs": "Last {n} runs",
|
|
334
|
+
"last-run-number": "Last run #{n}",
|
|
324
335
|
"last-week": "Last week",
|
|
325
336
|
"learn-more": "Learn more",
|
|
326
337
|
"license-socket": "License socket",
|
|
@@ -328,8 +339,8 @@
|
|
|
328
339
|
"licensing": "Licensing",
|
|
329
340
|
"load-average": "Load average",
|
|
330
341
|
"load-now": "Load now",
|
|
342
|
+
"loading": "Loading…",
|
|
331
343
|
"loading-hosts": "Loading hosts…",
|
|
332
|
-
"loading-in-progress": "Loading in progress…",
|
|
333
344
|
"locking-mode": "Locking mode",
|
|
334
345
|
"locking-mode-default": "Default locking mode",
|
|
335
346
|
"log-out": "Log out",
|
|
@@ -364,7 +375,6 @@
|
|
|
364
375
|
"n-hosts": "1 host | {n} hosts",
|
|
365
376
|
"n-hosts-awaiting-patch": "{n} host is awaiting this patch | {n} hosts are awaiting this patch",
|
|
366
377
|
"n-missing": "{n} missing",
|
|
367
|
-
"n-more": "{n} more",
|
|
368
378
|
"n-percent": "{n}%",
|
|
369
379
|
"n-vms": "1 VM | {n} VMs",
|
|
370
380
|
"name": "Name",
|
|
@@ -390,11 +400,14 @@
|
|
|
390
400
|
"news-name": "{name} news",
|
|
391
401
|
"nic-type": "NIC type",
|
|
392
402
|
"no-alarm-triggered": "No alarm triggered",
|
|
403
|
+
"no-alarms-detected": "No alarms detected",
|
|
393
404
|
"no-backup-available": "No backup available",
|
|
394
405
|
"no-config": "No configuration",
|
|
395
406
|
"no-data": "No data",
|
|
407
|
+
"no-data-to-calculate": "No data to calculate",
|
|
396
408
|
"no-network-detected": "No network detected",
|
|
397
409
|
"no-pif-detected": "No PIF detected",
|
|
410
|
+
"no-pools-detected": "No pools detected",
|
|
398
411
|
"no-result": "No result",
|
|
399
412
|
"no-results": "No results",
|
|
400
413
|
"no-selected-vm-can-be-exported": "No selected VM can be exported",
|
|
@@ -402,6 +415,7 @@
|
|
|
402
415
|
"no-server-detected": "No server detected",
|
|
403
416
|
"no-tasks": "No tasks",
|
|
404
417
|
"no-vif-detected": "No VIF detected",
|
|
418
|
+
"no-vm-detected": "No VM detected",
|
|
405
419
|
"none": "None",
|
|
406
420
|
"not-found": "Not found",
|
|
407
421
|
"not-running": "Not running",
|
|
@@ -424,6 +438,7 @@
|
|
|
424
438
|
"password": "Password",
|
|
425
439
|
"password-invalid": "Password invalid",
|
|
426
440
|
"patches": "Patches",
|
|
441
|
+
"patches-up-to-date": "Patches up to date",
|
|
427
442
|
"pause": "Pause",
|
|
428
443
|
"physical-interface-status": "Physical interface status",
|
|
429
444
|
"pick-template": "Pick template",
|
|
@@ -493,6 +508,7 @@
|
|
|
493
508
|
"secure-boot": "Secure boot",
|
|
494
509
|
"see-all": "See all",
|
|
495
510
|
"see-less": "See less",
|
|
511
|
+
"see-n-more": "See {n} more",
|
|
496
512
|
"select-compression": "Select a compression",
|
|
497
513
|
"select-destination-host": "Select a destination host",
|
|
498
514
|
"select-host": "Select host",
|
|
@@ -525,8 +541,11 @@
|
|
|
525
541
|
"stacked-cpu-usage": "Stacked CPU usage",
|
|
526
542
|
"stacked-ram-usage": "Stacked RAM usage",
|
|
527
543
|
"start": "Start",
|
|
544
|
+
"start-console": "Start your {type} to access the console and resume operations!",
|
|
528
545
|
"start-delay": "Start delay",
|
|
546
|
+
"start-host": "Start the host to resume operations, or check back later once it’s powered on.",
|
|
529
547
|
"start-on-host": "Start on specific host",
|
|
548
|
+
"start-vm": "Start it to access its console, and configuration details.",
|
|
530
549
|
"started": "Started",
|
|
531
550
|
"state": "State",
|
|
532
551
|
"static": "Static",
|
|
@@ -613,6 +632,9 @@
|
|
|
613
632
|
"vm-is-running": "The VM is running",
|
|
614
633
|
"vm-limit-topology": "VM limit topology",
|
|
615
634
|
"vm-management": "VM management",
|
|
635
|
+
"vm-not-running": "VM not running",
|
|
636
|
+
"vm-off": "This virtual machine is powered off.",
|
|
637
|
+
"vm-shutdown": "VM is currently shut down",
|
|
616
638
|
"vm-status.halted": "Halted",
|
|
617
639
|
"vm-status.paused": "Paused",
|
|
618
640
|
"vm-status.running": "Running",
|
package/lib/locales/es.json
CHANGED
|
@@ -306,7 +306,7 @@
|
|
|
306
306
|
"load-average": "Carga media del sistema",
|
|
307
307
|
"load-now": "Cargar ahora",
|
|
308
308
|
"loading-hosts": "Cargando servidores…",
|
|
309
|
-
"loading
|
|
309
|
+
"loading": "Cargando…",
|
|
310
310
|
"locking-mode": "Modo de bloqueo",
|
|
311
311
|
"locking-mode-default": "Modo de bloqueo por defecto",
|
|
312
312
|
"log-out": "Desconectarse",
|
package/lib/locales/fa.json
CHANGED
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
"load-average": "میانگین مصرف",
|
|
266
266
|
"load-now": "اکنون بارگذاری کنید",
|
|
267
267
|
"loading-hosts": "در حال بارگذاری میزبان ها…",
|
|
268
|
-
"loading
|
|
268
|
+
"loading": "بارگیری در حال انجام است…",
|
|
269
269
|
"locking-mode": "حالت قفل کردن",
|
|
270
270
|
"locking-mode-default": "حالت قفل کردن پیشفرض",
|
|
271
271
|
"log-out": "خروج",
|
package/lib/locales/fr.json
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"alarms": "Alarmes",
|
|
28
28
|
"all-done": "Tout est terminé !",
|
|
29
29
|
"all-good": "Tout va bien !",
|
|
30
|
+
"all-quiet-launchpad": "Tout est calme sur la rampe de lancement",
|
|
30
31
|
"allow-self-signed-ssl": "Vous devrez peut-être autoriser les certificats SSL auto-signés depuis votre navigateur",
|
|
31
32
|
"api-error-details": "Details de l'erreur API",
|
|
32
33
|
"appearance": "Apparence",
|
|
@@ -105,7 +106,9 @@
|
|
|
105
106
|
"console": "Console",
|
|
106
107
|
"console-actions": "Actions de la console",
|
|
107
108
|
"console-clipboard": "Presse-papiers de la console",
|
|
109
|
+
"console-offline": "Console hors ligne",
|
|
108
110
|
"console-unavailable": "Console indisponible",
|
|
111
|
+
"console-unavailable-reason": "La console est actuellement indisponible car {type} est éteint.",
|
|
109
112
|
"control-domain-memory": "Mémoire du domaine de contrôle",
|
|
110
113
|
"copy": "Copier",
|
|
111
114
|
"copy-all": "Copier tout",
|
|
@@ -153,6 +156,7 @@
|
|
|
153
156
|
"cpus": "CPUs",
|
|
154
157
|
"crash-dump-storage-repository": "Dépôt de stockage des log de crash",
|
|
155
158
|
"create": "Créer",
|
|
159
|
+
"created-by": "Créé par",
|
|
156
160
|
"created-on": "Créé le",
|
|
157
161
|
"cron-pattern": "Pattern cron",
|
|
158
162
|
"custom-config": "Configuration personnalisée",
|
|
@@ -193,6 +197,7 @@
|
|
|
193
197
|
"edit-config": "Modifier config",
|
|
194
198
|
"enabled": "Activé",
|
|
195
199
|
"end-of-life": "Fin de vie",
|
|
200
|
+
"engines-off": "Moteurs arrêtés, orbite stable",
|
|
196
201
|
"eol": "EOL",
|
|
197
202
|
"error": "Erreur",
|
|
198
203
|
"error-no-data": "Erreur, impossible de collecter les données.",
|
|
@@ -236,6 +241,7 @@
|
|
|
236
241
|
"go-back": "Revenir en arrière",
|
|
237
242
|
"gpus": "GPUs",
|
|
238
243
|
"graphics-display": "Graphique & Affichage",
|
|
244
|
+
"guest-tools": "Guest Tools",
|
|
239
245
|
"gzip": "gzip",
|
|
240
246
|
"hardware": "Matériel",
|
|
241
247
|
"hardware-specifications": "Spécifications matérielles",
|
|
@@ -243,8 +249,11 @@
|
|
|
243
249
|
"here": "Ici",
|
|
244
250
|
"high-availability": "Haute Disponibilité (HA)",
|
|
245
251
|
"host": "Hôte",
|
|
252
|
+
"host-currently-shutdown": "Cet hôte est actuellement à l’arrêt, nous ne pouvons donc pas récupérer de données.",
|
|
246
253
|
"host-description": "Description de l'hôte",
|
|
247
254
|
"host-internal-networks": "Réseaux internes de l'hôte",
|
|
255
|
+
"host-not-running": "Hôte non démarré",
|
|
256
|
+
"host-off": "L’hôte est éteint",
|
|
248
257
|
"host-status.halted": "Arrêté",
|
|
249
258
|
"host-status.running": "Démarré",
|
|
250
259
|
"host-status.unknown": "Inconnu",
|
|
@@ -260,6 +269,7 @@
|
|
|
260
269
|
"hyper-threading": "Hyper-threading (SMT)",
|
|
261
270
|
"id": "ID",
|
|
262
271
|
"in-last-three-jobs": "Dans leurs trois derniers jobs",
|
|
272
|
+
"in-progress": "En cours",
|
|
263
273
|
"install-settings": "Paramètres d'installation",
|
|
264
274
|
"interfaces": "Interface | Interface | Interfaces",
|
|
265
275
|
"interrupted": "Interrompu",
|
|
@@ -321,6 +331,7 @@
|
|
|
321
331
|
"language": "Langue",
|
|
322
332
|
"last": "Dernier",
|
|
323
333
|
"last-n-runs": "{n} derniers runs",
|
|
334
|
+
"last-run-number": "Dernière exécution #{n}",
|
|
324
335
|
"last-week": "Semaine dernière",
|
|
325
336
|
"learn-more": "En savoir plus",
|
|
326
337
|
"license-socket": "Licence socket",
|
|
@@ -328,8 +339,8 @@
|
|
|
328
339
|
"licensing": "Licences",
|
|
329
340
|
"load-average": "Charge système",
|
|
330
341
|
"load-now": "Charger maintenant",
|
|
342
|
+
"loading": "Chargement…",
|
|
331
343
|
"loading-hosts": "Chargement des hôtes…",
|
|
332
|
-
"loading-in-progress": "Chargement en cours…",
|
|
333
344
|
"locking-mode": "Mode de verrouillage",
|
|
334
345
|
"locking-mode-default": "Mode de verrouillage par défaut",
|
|
335
346
|
"log-out": "Se déconnecter",
|
|
@@ -364,7 +375,6 @@
|
|
|
364
375
|
"n-hosts": "1 hôte | {n} hôtes",
|
|
365
376
|
"n-hosts-awaiting-patch": "{n} hôte attend ce patch | {n} hôtes attendent ce patch",
|
|
366
377
|
"n-missing": "{n} manquant | {n} manquants",
|
|
367
|
-
"n-more": "{n} de plus",
|
|
368
378
|
"n-percent": "{n} %",
|
|
369
379
|
"n-vms": "1 VM | {n} VMs",
|
|
370
380
|
"name": "Nom",
|
|
@@ -390,11 +400,14 @@
|
|
|
390
400
|
"news-name": "Actualités {name}",
|
|
391
401
|
"nic-type": "Type de carte réseau (NIC)",
|
|
392
402
|
"no-alarm-triggered": "Aucune alarme déclenchée",
|
|
403
|
+
"no-alarms-detected": "Aucune alarme détectée",
|
|
393
404
|
"no-backup-available": "Aucune sauvegarde disponible",
|
|
394
405
|
"no-config": "Aucune configuration",
|
|
395
406
|
"no-data": "Aucune donnée",
|
|
407
|
+
"no-data-to-calculate": "Aucune donnée à calculer",
|
|
396
408
|
"no-network-detected": "Aucun réseau détecté",
|
|
397
409
|
"no-pif-detected": "Aucun PIF détecté",
|
|
410
|
+
"no-pools-detected": "Aucun pool détecté",
|
|
398
411
|
"no-result": "Aucun résultat",
|
|
399
412
|
"no-results": "Aucun résultat",
|
|
400
413
|
"no-selected-vm-can-be-exported": "Aucune VM sélectionnée ne peut être exportée",
|
|
@@ -402,6 +415,7 @@
|
|
|
402
415
|
"no-server-detected": "Aucun serveur détecté",
|
|
403
416
|
"no-tasks": "Aucune tâche",
|
|
404
417
|
"no-vif-detected": "Aucun VIF détecté",
|
|
418
|
+
"no-vm-detected": "Aucune VM détectée",
|
|
405
419
|
"none": "Aucun",
|
|
406
420
|
"not-found": "Non trouvé",
|
|
407
421
|
"not-running": "Pas en cours d'exécution",
|
|
@@ -424,6 +438,7 @@
|
|
|
424
438
|
"password": "Mot de passe",
|
|
425
439
|
"password-invalid": "Mot de passe incorrect",
|
|
426
440
|
"patches": "Patches",
|
|
441
|
+
"patches-up-to-date": "Patches à jour",
|
|
427
442
|
"pause": "Pause",
|
|
428
443
|
"physical-interface-status": "Statut de l'interface physique",
|
|
429
444
|
"pick-template": "Choisir un modèle",
|
|
@@ -493,6 +508,7 @@
|
|
|
493
508
|
"secure-boot": "Démarrage sécurisé",
|
|
494
509
|
"see-all": "Voir tout",
|
|
495
510
|
"see-less": "Voir moins",
|
|
511
|
+
"see-n-more": "Voir {n} de plus",
|
|
496
512
|
"select-compression": "Sélectionnez une compression",
|
|
497
513
|
"select-destination-host": "Sélectionnez un hôte de destination",
|
|
498
514
|
"select-host": "Sélectionnez un hôte",
|
|
@@ -525,8 +541,11 @@
|
|
|
525
541
|
"stacked-cpu-usage": "Utilisation CPU empilée",
|
|
526
542
|
"stacked-ram-usage": "Utilisation RAM empilée",
|
|
527
543
|
"start": "Démarrer",
|
|
544
|
+
"start-console": "Démarrez votre {type} pour accéder à la console et reprendre les opérations !",
|
|
528
545
|
"start-delay": "Départ différé",
|
|
546
|
+
"start-host": "Démarrez l’hôte pour reprendre les opérations, ou revenez plus tard une fois qu’il sera allumé.",
|
|
529
547
|
"start-on-host": "Démarrer sur un hôte spécifique",
|
|
548
|
+
"start-vm": "Démarrez-la pour accéder à sa console et à ses paramètres de configuration.",
|
|
530
549
|
"started": "Démarré",
|
|
531
550
|
"state": "État",
|
|
532
551
|
"static": "Statique",
|
|
@@ -613,6 +632,9 @@
|
|
|
613
632
|
"vm-is-running": "La VM est en cours d'exécution",
|
|
614
633
|
"vm-limit-topology": "Limite de topologie physique des VMs",
|
|
615
634
|
"vm-management": "Gestion de la VM",
|
|
635
|
+
"vm-not-running": "VM non démarrée",
|
|
636
|
+
"vm-off": "Cette machine virtuelle est éteinte.",
|
|
637
|
+
"vm-shutdown": "La VM est actuellement arrêtée",
|
|
616
638
|
"vm-status.halted": "Éteinte",
|
|
617
639
|
"vm-status.paused": "En pause",
|
|
618
640
|
"vm-status.running": "Démarrée",
|
package/lib/locales/it.json
CHANGED
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
"learn-more": "Scopri di più",
|
|
263
263
|
"load-average": "Carico medio",
|
|
264
264
|
"load-now": "Carica adesso",
|
|
265
|
-
"loading
|
|
265
|
+
"loading": "Caricamento in corso…",
|
|
266
266
|
"log-out": "Esci",
|
|
267
267
|
"login": "Login",
|
|
268
268
|
"mac-address": "MAC address",
|
package/lib/locales/nl.json
CHANGED
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
"load-average": "Gemiddelde belasting",
|
|
314
314
|
"load-now": "Nu laden",
|
|
315
315
|
"loading-hosts": "Hosts laden…",
|
|
316
|
-
"loading
|
|
316
|
+
"loading": "Bezig met laden…",
|
|
317
317
|
"locking-mode": "Vergrendelmodus",
|
|
318
318
|
"locking-mode-default": "Standaard vergrendelingsmodus",
|
|
319
319
|
"log-out": "Uitloggen",
|
package/lib/locales/sv.json
CHANGED
|
@@ -294,7 +294,7 @@
|
|
|
294
294
|
"load-average": "Genomsnittslast",
|
|
295
295
|
"load-now": "Ladda nu",
|
|
296
296
|
"loading-hosts": "Ladda hostar…",
|
|
297
|
-
"loading
|
|
297
|
+
"loading": "Laddning pågår…",
|
|
298
298
|
"locking-mode": "Låsläge",
|
|
299
299
|
"locking-mode-default": "Standard låsläge",
|
|
300
300
|
"log-out": "Logga ut",
|
|
@@ -37,7 +37,7 @@ export function useProgressGroup<TSource>(
|
|
|
37
37
|
)
|
|
38
38
|
|
|
39
39
|
const highestPercentageCap = computed(() =>
|
|
40
|
-
progressItems.value.reduce((highestCap, item) => Math.max(highestCap, item.percentageCap.value),
|
|
40
|
+
progressItems.value.reduce((highestCap, item) => Math.max(highestCap, item.percentageCap.value), 100)
|
|
41
41
|
)
|
|
42
42
|
|
|
43
43
|
const normalizedProgressItems = useArrayMap(progressItems, item => {
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ProgressBarLegendType,
|
|
3
|
+
ProgressBarThresholdPayload,
|
|
4
|
+
} from '@core/components/progress-bar/VtsProgressBar.vue'
|
|
5
|
+
import type { ProgressBarLegend } from '@core/components/ui/progress-bar/UiProgressBar.vue'
|
|
6
|
+
import type { Progress } from '@core/packages/progress/types.ts'
|
|
7
|
+
import type { ThresholdConfig } from '@core/packages/threshold/type.ts'
|
|
8
|
+
import { formatSize } from '@core/utils/size.util.ts'
|
|
9
|
+
import { computed, type ComputedRef, type MaybeRefOrGetter, type Reactive, toValue } from 'vue'
|
|
10
|
+
import { useI18n } from 'vue-i18n'
|
|
11
|
+
|
|
12
|
+
export function defaultProgressThresholds(tooltip?: string): ThresholdConfig<ProgressBarThresholdPayload> {
|
|
13
|
+
return {
|
|
14
|
+
80: { accent: 'warning', tooltip },
|
|
15
|
+
90: { accent: 'danger', tooltip },
|
|
16
|
+
default: {},
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function cpuProgressThresholds(tooltip?: string): ThresholdConfig<ProgressBarThresholdPayload> {
|
|
21
|
+
return {
|
|
22
|
+
100: { accent: 'warning', tooltip },
|
|
23
|
+
300: { accent: 'danger', tooltip },
|
|
24
|
+
default: {},
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function useProgressToLegend(
|
|
29
|
+
rawType: MaybeRefOrGetter<ProgressBarLegendType | undefined>
|
|
30
|
+
): (label: string, progress: Progress | Reactive<Progress>) => ProgressBarLegend | undefined
|
|
31
|
+
|
|
32
|
+
export function useProgressToLegend(
|
|
33
|
+
rawType: MaybeRefOrGetter<ProgressBarLegendType | undefined>,
|
|
34
|
+
label: string,
|
|
35
|
+
progress: Progress | Reactive<Progress>
|
|
36
|
+
): ComputedRef<ProgressBarLegend | undefined>
|
|
37
|
+
|
|
38
|
+
export function useProgressToLegend(
|
|
39
|
+
rawType: MaybeRefOrGetter<ProgressBarLegendType | undefined>,
|
|
40
|
+
label?: string,
|
|
41
|
+
progress?: Progress | Reactive<Progress>
|
|
42
|
+
) {
|
|
43
|
+
const { n } = useI18n()
|
|
44
|
+
|
|
45
|
+
const type = computed(() => toValue(rawType))
|
|
46
|
+
|
|
47
|
+
function toLegend(label: string, progress: Progress | Reactive<Progress>): ProgressBarLegend | undefined {
|
|
48
|
+
switch (type.value) {
|
|
49
|
+
case 'percent':
|
|
50
|
+
return { label, value: n(toValue(progress.percentage) / 100, { maximumFractionDigits: 1, style: 'percent' }) }
|
|
51
|
+
case 'bytes':
|
|
52
|
+
return { label, value: formatSize(toValue(progress.current), 0) }
|
|
53
|
+
case 'bytes-with-total':
|
|
54
|
+
return {
|
|
55
|
+
label,
|
|
56
|
+
value: `${formatSize(toValue(progress.current), 0)} / ${formatSize(toValue(progress.total), 1)}`,
|
|
57
|
+
}
|
|
58
|
+
case 'value':
|
|
59
|
+
return { label, value: n(toValue(progress.current)) }
|
|
60
|
+
case 'value-with-total':
|
|
61
|
+
return { label, value: `${n(toValue(progress.current))} / ${n(toValue(progress.total))}` }
|
|
62
|
+
default:
|
|
63
|
+
return undefined
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (label && progress) {
|
|
68
|
+
return computed(() => toLegend(label, progress))
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return toLegend
|
|
72
|
+
}
|
package/lib/utils/size.util.ts
CHANGED
|
@@ -39,3 +39,9 @@ export const formatSizeParse = (size: number | undefined, unit?: string) => {
|
|
|
39
39
|
|
|
40
40
|
return result
|
|
41
41
|
}
|
|
42
|
+
|
|
43
|
+
export function formatSize(bytes: number, decimals: number): string {
|
|
44
|
+
const { value, prefix } = formatSizeRaw(bytes, decimals)
|
|
45
|
+
|
|
46
|
+
return `${value} ${prefix}`
|
|
47
|
+
}
|
package/package.json
CHANGED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<VtsStateHero :type class="vts-all-done-hero" image="all-done">
|
|
3
|
-
{{ t('all-done') }}
|
|
4
|
-
</VtsStateHero>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script lang="ts" setup>
|
|
8
|
-
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
9
|
-
import { useI18n } from 'vue-i18n'
|
|
10
|
-
|
|
11
|
-
defineProps<{
|
|
12
|
-
type: StateHeroType
|
|
13
|
-
}>()
|
|
14
|
-
|
|
15
|
-
const { t } = useI18n()
|
|
16
|
-
</script>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<VtsStateHero :type class="vts-all-good-hero" image="all-good">
|
|
3
|
-
{{ t('all-good') }}
|
|
4
|
-
</VtsStateHero>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script lang="ts" setup>
|
|
8
|
-
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
9
|
-
import { useI18n } from 'vue-i18n'
|
|
10
|
-
|
|
11
|
-
defineProps<{
|
|
12
|
-
type: StateHeroType
|
|
13
|
-
}>()
|
|
14
|
-
|
|
15
|
-
const { t } = useI18n()
|
|
16
|
-
</script>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<VtsStateHero :type class="vts-coming-soon-hero" image="under-construction">
|
|
3
|
-
{{ t('coming-soon') }}
|
|
4
|
-
</VtsStateHero>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script lang="ts" setup>
|
|
8
|
-
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
9
|
-
import { useI18n } from 'vue-i18n'
|
|
10
|
-
|
|
11
|
-
defineProps<{
|
|
12
|
-
type: StateHeroType
|
|
13
|
-
}>()
|
|
14
|
-
|
|
15
|
-
const { t } = useI18n()
|
|
16
|
-
</script>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<VtsStateHero class="vts-error-hero" image="error" :type>{{ t('error-no-data') }}</VtsStateHero>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script lang="ts" setup>
|
|
6
|
-
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
7
|
-
import { useI18n } from 'vue-i18n'
|
|
8
|
-
|
|
9
|
-
defineProps<{
|
|
10
|
-
type: StateHeroType
|
|
11
|
-
}>()
|
|
12
|
-
|
|
13
|
-
const { t } = useI18n()
|
|
14
|
-
</script>
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="vts-loading-hero">
|
|
3
|
-
<VtsStateHero :type busy>
|
|
4
|
-
{{ t('loading-in-progress') }}
|
|
5
|
-
</VtsStateHero>
|
|
6
|
-
<div v-if="slots.title || slots.text" class="content">
|
|
7
|
-
<div v-if="slots.title" class="title" :class="className">
|
|
8
|
-
<slot name="title" />
|
|
9
|
-
</div>
|
|
10
|
-
<div v-if="slots.text" class="text typo-body-bold">
|
|
11
|
-
<slot name="text" />
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script lang="ts" setup>
|
|
18
|
-
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
19
|
-
import { computed } from 'vue'
|
|
20
|
-
import { useI18n } from 'vue-i18n'
|
|
21
|
-
|
|
22
|
-
const { type } = defineProps<{
|
|
23
|
-
type: StateHeroType
|
|
24
|
-
}>()
|
|
25
|
-
|
|
26
|
-
const slots = defineSlots<{
|
|
27
|
-
title?(): any
|
|
28
|
-
text?(): any
|
|
29
|
-
}>()
|
|
30
|
-
|
|
31
|
-
const { t } = useI18n()
|
|
32
|
-
|
|
33
|
-
const className = computed(() => (type === 'page' ? 'typo-h1' : 'typo-h2'))
|
|
34
|
-
</script>
|
|
35
|
-
|
|
36
|
-
<style lang="postcss" scoped>
|
|
37
|
-
.vts-loading-hero {
|
|
38
|
-
display: flex;
|
|
39
|
-
flex-direction: column;
|
|
40
|
-
gap: 1.6rem;
|
|
41
|
-
|
|
42
|
-
.content {
|
|
43
|
-
display: flex;
|
|
44
|
-
flex-direction: column;
|
|
45
|
-
gap: 2.4rem;
|
|
46
|
-
text-align: center;
|
|
47
|
-
|
|
48
|
-
.title {
|
|
49
|
-
color: var(--color-neutral-txt-primary);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.text {
|
|
53
|
-
color: var(--color-neutral-txt-secondary);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
</style>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<VtsStateHero class="vts-no-data-hero" image="no-data" :type>{{ t('no-data') }}</VtsStateHero>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script lang="ts" setup>
|
|
6
|
-
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
7
|
-
import { useI18n } from 'vue-i18n'
|
|
8
|
-
|
|
9
|
-
defineProps<{
|
|
10
|
-
type: StateHeroType
|
|
11
|
-
}>()
|
|
12
|
-
|
|
13
|
-
const { t } = useI18n()
|
|
14
|
-
</script>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<VtsStateHero :type class="vts-no-selection-hero" image="no-selection">
|
|
3
|
-
{{ t('select-to-see-details') }}
|
|
4
|
-
</VtsStateHero>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script lang="ts" setup>
|
|
8
|
-
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
9
|
-
import { useI18n } from 'vue-i18n'
|
|
10
|
-
|
|
11
|
-
defineProps<{
|
|
12
|
-
type: StateHeroType
|
|
13
|
-
}>()
|
|
14
|
-
|
|
15
|
-
const { t } = useI18n()
|
|
16
|
-
</script>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<VtsStateHero class="vts-object-not-found-hero" image="no-result" :type>
|
|
3
|
-
{{ t('object-not-found', { id }) }}
|
|
4
|
-
</VtsStateHero>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script lang="ts" setup>
|
|
8
|
-
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
9
|
-
import { useI18n } from 'vue-i18n'
|
|
10
|
-
|
|
11
|
-
defineProps<{
|
|
12
|
-
id: string
|
|
13
|
-
type: StateHeroType
|
|
14
|
-
}>()
|
|
15
|
-
|
|
16
|
-
const { t } = useI18n()
|
|
17
|
-
</script>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<VtsStateHero :type class="vts-offline-hero" image="offline">
|
|
3
|
-
{{ t('offline') }}
|
|
4
|
-
</VtsStateHero>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script lang="ts" setup>
|
|
8
|
-
import VtsStateHero, { type StateHeroType } from '@core/components/state-hero/VtsStateHero.vue'
|
|
9
|
-
import { useI18n } from 'vue-i18n'
|
|
10
|
-
|
|
11
|
-
defineProps<{
|
|
12
|
-
type: StateHeroType
|
|
13
|
-
}>()
|
|
14
|
-
|
|
15
|
-
const { t } = useI18n()
|
|
16
|
-
</script>
|