@xen-orchestra/web-core 0.11.0 → 0.13.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/components/ui/input/UiInput.vue +1 -0
- package/lib/components/ui/stacked-bar/UiStackedBar.vue +17 -4
- package/lib/composables/table/multi-select.composable.ts +32 -0
- package/lib/locales/cs.json +9 -9
- package/lib/locales/de.json +41 -46
- package/lib/locales/en.json +52 -14
- package/lib/locales/fa.json +5 -4
- package/lib/locales/fr.json +54 -16
- package/lib/utils/size.util.ts +30 -0
- package/package.json +2 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<div class="ui-stacked-bar">
|
|
4
4
|
<StackedBarSegment
|
|
5
|
-
v-for="(segment, index) in
|
|
5
|
+
v-for="(segment, index) in parsedSegments"
|
|
6
6
|
:key="index"
|
|
7
7
|
:accent="segment.accent"
|
|
8
8
|
:percentage="max === 0 ? 0 : (segment.value / max) * 100"
|
|
@@ -12,23 +12,36 @@
|
|
|
12
12
|
|
|
13
13
|
<script lang="ts" setup>
|
|
14
14
|
import StackedBarSegment, { type StackedBarSegmentProps } from '@core/components/ui/stacked-bar/StackedBarSegment.vue'
|
|
15
|
+
import { formatSizeParse } from '@core/utils/size.util'
|
|
15
16
|
import { computed } from 'vue'
|
|
16
17
|
|
|
17
18
|
type Segment = {
|
|
18
19
|
value: number
|
|
19
20
|
accent: StackedBarSegmentProps['accent']
|
|
21
|
+
unit?: string
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
export type StackedBarProps = {
|
|
23
25
|
segments: Segment[]
|
|
24
|
-
maxValue?:
|
|
26
|
+
maxValue?: {
|
|
27
|
+
value?: number
|
|
28
|
+
unit?: string
|
|
29
|
+
}
|
|
25
30
|
}
|
|
26
31
|
|
|
27
32
|
const props = defineProps<StackedBarProps>()
|
|
28
33
|
|
|
29
|
-
const totalValue = computed(() =>
|
|
34
|
+
const totalValue = computed(() =>
|
|
35
|
+
props.segments.reduce((acc, segment) => acc + (formatSizeParse(segment.value, segment.unit) ?? 0), 0)
|
|
36
|
+
)
|
|
30
37
|
|
|
31
|
-
const max = computed(() =>
|
|
38
|
+
const max = computed(() =>
|
|
39
|
+
Math.max(formatSizeParse(props.maxValue?.value, props.maxValue?.unit) ?? 0, totalValue.value)
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
const parsedSegments = computed(() =>
|
|
43
|
+
props.segments.map(segment => ({ ...segment, value: formatSizeParse(segment.value, segment.unit) ?? 0 }))
|
|
44
|
+
)
|
|
32
45
|
</script>
|
|
33
46
|
|
|
34
47
|
<style lang="postcss" scoped>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { computed, ref, unref, type MaybeRef, type Ref } from 'vue'
|
|
2
|
+
|
|
3
|
+
export default function useMultiSelect<T>(usableIds: MaybeRef<T[]>, selectableIds?: MaybeRef<T[]>) {
|
|
4
|
+
const $selected = ref(new Set()) as Ref<Set<T>>
|
|
5
|
+
|
|
6
|
+
const selected = computed({
|
|
7
|
+
get() {
|
|
8
|
+
return unref(usableIds).filter(usableId => $selected.value.has(usableId))
|
|
9
|
+
},
|
|
10
|
+
set(ids: T[]) {
|
|
11
|
+
$selected.value = new Set(ids)
|
|
12
|
+
},
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const areAllSelected = computed({
|
|
16
|
+
get() {
|
|
17
|
+
return (unref(selectableIds) ?? unref(usableIds)).every(id => $selected.value.has(id))
|
|
18
|
+
},
|
|
19
|
+
set(value: boolean) {
|
|
20
|
+
if (value) {
|
|
21
|
+
$selected.value = new Set(unref(selectableIds) ?? unref(usableIds))
|
|
22
|
+
} else {
|
|
23
|
+
$selected.value = new Set()
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
selected,
|
|
30
|
+
areAllSelected,
|
|
31
|
+
}
|
|
32
|
+
}
|
package/lib/locales/cs.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"alarms": "Výstrahy",
|
|
3
3
|
|
|
4
|
+
"bytes.gi": "GiB",
|
|
4
5
|
"bytes.ki": "KiB",
|
|
5
6
|
"bytes.mi": "MiB",
|
|
6
|
-
"bytes.gi": "GiB",
|
|
7
7
|
|
|
8
8
|
"coming-soon": "Už brzy!",
|
|
9
9
|
"console": "Konzole",
|
|
10
10
|
|
|
11
|
+
"core.close": "Zavřít",
|
|
11
12
|
"core.copied": "Zkopírováno",
|
|
12
13
|
"core.copy-id": "Zkopírovat identif.",
|
|
13
|
-
"core.close": "Zavřít",
|
|
14
14
|
"core.current": "Stávající",
|
|
15
15
|
"core.filter": "Filtrovat",
|
|
16
16
|
"core.group": "Skupina",
|
|
17
17
|
"core.hide": "Skrýt",
|
|
18
18
|
"core.open": "Otevřít",
|
|
19
|
-
"core.quick-actions": "Rychlé akce",
|
|
20
|
-
|
|
21
|
-
"core.search": "Hledat",
|
|
22
|
-
|
|
23
19
|
"core.query-search-bar.label": "Vyhledávací engine",
|
|
20
|
+
|
|
24
21
|
"core.query-search-bar.placeholder": "Zadejte svůj dotaz…",
|
|
22
|
+
|
|
25
23
|
"core.query-search-bar.use-query-builder": "Použít nástroj pro sestavování dotazů",
|
|
24
|
+
"core.quick-actions": "Rychlé akce",
|
|
25
|
+
"core.search": "Hledat",
|
|
26
26
|
|
|
27
27
|
"core.select.all": "Vybrat vše",
|
|
28
28
|
"core.select.none": "Zrušit výběr všeho",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"core.sort.ascending": "Seřadit vzestupně",
|
|
36
36
|
"core.sort.descending": "Seřadit sestupně",
|
|
37
37
|
|
|
38
|
-
"dark-mode.enable": "Zapnout tmavý režim",
|
|
39
|
-
"dark-mode.disable": "Vypnout tmavý režim",
|
|
40
38
|
"dark-mode.auto": "Automatický tmavý režim",
|
|
39
|
+
"dark-mode.disable": "Vypnout tmavý režim",
|
|
40
|
+
"dark-mode.enable": "Zapnout tmavý režim",
|
|
41
41
|
|
|
42
42
|
"dashboard": "Přehled",
|
|
43
43
|
"documentation-name": "Dokumentace k {name}",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"object-not-found": "Objekt {id} nebylo možné nalézt…",
|
|
54
54
|
"other": "Ostatní",
|
|
55
55
|
"patches": "Záplaty",
|
|
56
|
-
"power-on-vm-for-console": "Konzole virt. stroje bude přístupná až po jeho zapnutí",
|
|
57
56
|
"power-on-host-for-console": "Konzole virt. stroje bude přístupná až po jeho zapnutí",
|
|
57
|
+
"power-on-vm-for-console": "Konzole virt. stroje bude přístupná až po jeho zapnutí",
|
|
58
58
|
"professional-support": "Profesionální podpora",
|
|
59
59
|
"running-vm": "Spuštěný virt. stroj | Spuštěné virt. stroje",
|
|
60
60
|
"see-all": "Zobrazit vše",
|
package/lib/locales/de.json
CHANGED
|
@@ -1,48 +1,43 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"tasks": "Aufgaben",
|
|
45
|
-
"tasks.quick-view": "Schnellansicht der Aufgaben",
|
|
46
|
-
|
|
47
|
-
"vms": "VMs"
|
|
2
|
+
"alarms": "Alarme",
|
|
3
|
+
"bytes.ki": "KiB",
|
|
4
|
+
"bytes.mi": "MiB",
|
|
5
|
+
"bytes.gi": "GiB",
|
|
6
|
+
"coming-soon": "Bald verfügbar!",
|
|
7
|
+
"console": "Konsole",
|
|
8
|
+
"core.close": "Schließen",
|
|
9
|
+
"core.group": "Gruppe",
|
|
10
|
+
"core.select.all": "Alles auswählen",
|
|
11
|
+
"core.select.none": "Alle abwählen",
|
|
12
|
+
"dark-mode.enable": "Aktivieren Sie den Dunkelmodus",
|
|
13
|
+
"dark-mode.disable": "Deaktivieren Sie den Dunkelmodus",
|
|
14
|
+
"dark-mode.auto": "Automatischer Dunkelmodus",
|
|
15
|
+
"dashboard": "Dashboard",
|
|
16
|
+
"dhcp": "DHCP",
|
|
17
|
+
"documentation-name": "{name} Dokumentation",
|
|
18
|
+
"error-no-data": "Fehler beim Datenabruf.",
|
|
19
|
+
"fullscreen": "Vollbild",
|
|
20
|
+
"gateway": "Gateway",
|
|
21
|
+
"hosts": "Hosts",
|
|
22
|
+
"learn-more": "Mehr erfahren",
|
|
23
|
+
"loading-in-progress": "Ladevorgang läuft…",
|
|
24
|
+
"log-out": "Abmelden",
|
|
25
|
+
"master": "Primärer Host",
|
|
26
|
+
"n-vms": "1 VM | {n} VMs",
|
|
27
|
+
"netmask": "Netzmaske",
|
|
28
|
+
"network": "Netzwerk",
|
|
29
|
+
"object-not-found": "Objekt {id} wurde nicht gefunden…",
|
|
30
|
+
"open-console-in-new-tab": "Konsole in neuem Reiter öffnen",
|
|
31
|
+
"page-not-found": "Diese Seite wurde nicht gefunden…",
|
|
32
|
+
"patches": "Patches",
|
|
33
|
+
"power-on-vm-for-console": "Konsole ist nach Start der VM verfügbar",
|
|
34
|
+
"power-on-host-for-console": "Konsole ist nach Start des Hosts verfügbar",
|
|
35
|
+
"running-vm": "VM eingeschalten | VMs eingeschalten",
|
|
36
|
+
"send-ctrl-alt-del": "Ctrl+Alt+Del senden",
|
|
37
|
+
"stats": "Statistiken",
|
|
38
|
+
"storage": "Speicher",
|
|
39
|
+
"system": "System",
|
|
40
|
+
"tasks": "Aufgaben",
|
|
41
|
+
"tasks.quick-view": "Schnellansicht der Aufgaben",
|
|
42
|
+
"vms": "VMs"
|
|
48
43
|
}
|
package/lib/locales/en.json
CHANGED
|
@@ -1,37 +1,42 @@
|
|
|
1
1
|
{
|
|
2
|
+
"access-forum": "Access forum",
|
|
2
3
|
"alarms": "Alarms",
|
|
3
4
|
|
|
5
|
+
"bytes.gi": "GiB",
|
|
4
6
|
"bytes.ki": "KiB",
|
|
5
7
|
"bytes.mi": "MiB",
|
|
6
|
-
"bytes.gi": "GiB",
|
|
7
8
|
|
|
8
9
|
"coming-soon": "Coming soon!",
|
|
10
|
+
"connected": "Connected",
|
|
9
11
|
"console": "Console",
|
|
10
12
|
"console-actions": "Console actions",
|
|
11
13
|
"console-clipboard": "Console clipboard",
|
|
14
|
+
"copy-info-json": "Copy information into JSON",
|
|
12
15
|
|
|
16
|
+
"core.close": "Close",
|
|
13
17
|
"core.copied": "Copied",
|
|
14
18
|
"core.copy-id": "Copy ID",
|
|
15
|
-
"core.close": "Close",
|
|
16
19
|
"core.current": "Current",
|
|
17
20
|
"core.filter": "Filter",
|
|
18
21
|
"core.group": "Group",
|
|
19
22
|
"core.hide": "Hide",
|
|
20
23
|
"core.open": "Open",
|
|
21
|
-
"core.quick-actions": "Quick actions",
|
|
22
|
-
|
|
23
|
-
"core.search": "Search",
|
|
24
|
-
"core.show-by": "Show by",
|
|
25
24
|
|
|
26
25
|
"core.query-search-bar.label": "Search Engine",
|
|
27
26
|
"core.query-search-bar.placeholder": "Write your query…",
|
|
28
27
|
"core.query-search-bar.use-query-builder": "Use query builder",
|
|
29
28
|
|
|
29
|
+
"core.quick-actions": "Quick actions",
|
|
30
|
+
"core.search": "Search",
|
|
31
|
+
|
|
30
32
|
"core.select.all": "Select all",
|
|
31
|
-
"core.select.none": "Select none",
|
|
32
|
-
"core.select.unselect": "Unselect all",
|
|
33
33
|
"core.select.n-object-of": "{from} - {to} of {total} objects",
|
|
34
34
|
"core.select.n-selected-of": "{count} selected of {total} objects",
|
|
35
|
+
"core.select.none": "Select none",
|
|
36
|
+
"core.select.unselect": "Unselect all",
|
|
37
|
+
|
|
38
|
+
"core.show-by": "Show by",
|
|
39
|
+
|
|
35
40
|
"core.sidebar.close": "Close sidebar",
|
|
36
41
|
"core.sidebar.lock": "Lock sidebar open",
|
|
37
42
|
"core.sidebar.open": "Open sidebar",
|
|
@@ -40,49 +45,79 @@
|
|
|
40
45
|
"core.sort.ascending": "Sort ascending",
|
|
41
46
|
"core.sort.descending": "Sort descending",
|
|
42
47
|
|
|
43
|
-
"dark-mode.enable": "Enable dark mode",
|
|
44
|
-
"dark-mode.disable": "Disable dark mode",
|
|
45
48
|
"dark-mode.auto": "Auto dark mode",
|
|
49
|
+
"dark-mode.disable": "Disable dark mode",
|
|
50
|
+
"dark-mode.enable": "Enable dark mode",
|
|
46
51
|
|
|
47
|
-
"access-forum": "Access forum",
|
|
48
|
-
"connected": "Connected",
|
|
49
52
|
"dashboard": "Dashboard",
|
|
53
|
+
"default-locking-mode": "Default locking mode",
|
|
54
|
+
"delete": "Delete",
|
|
55
|
+
"description": "Description",
|
|
56
|
+
"device": "Device",
|
|
57
|
+
"disabled": "Disabled",
|
|
50
58
|
"disconnected": "Disconnected",
|
|
51
59
|
"disconnected-from-physical-device": "Disconnected from physical device",
|
|
60
|
+
"dns": "DNS",
|
|
52
61
|
"documentation-name": "{name} documentation",
|
|
62
|
+
"edit": "Edit",
|
|
53
63
|
"error-no-data": "Error, can't collect data.",
|
|
54
64
|
"exit-fullscreen": "Exit fullscreen",
|
|
55
65
|
"fullscreen": "Fullscreen",
|
|
56
66
|
"gateway": "Gateway",
|
|
67
|
+
"host-internal-networks": "Host internal networks",
|
|
57
68
|
"hosts": "Hosts",
|
|
69
|
+
"id": "Id",
|
|
70
|
+
"ip-addresses": "IP addresses",
|
|
71
|
+
"ip-mode": "IP mode",
|
|
58
72
|
"learn-more": "Learn more",
|
|
59
73
|
"loading-in-progress": "Loading in progress…",
|
|
74
|
+
"locking-mode": "Locking mode",
|
|
75
|
+
"locking-mode-default": "Default locking mode",
|
|
60
76
|
"log-out": "Log out",
|
|
77
|
+
"mac-addresses": "MAC addresses",
|
|
78
|
+
"management": "Management",
|
|
61
79
|
"master": "Primary host",
|
|
80
|
+
"mtu": "MTU",
|
|
62
81
|
"n-vms": "1 VM | {n} VMs",
|
|
82
|
+
"name": "Name",
|
|
63
83
|
"network": "Network",
|
|
84
|
+
"network-block-device": "Network block device",
|
|
85
|
+
"networks": "Networks",
|
|
86
|
+
"new": "New",
|
|
64
87
|
"no-data": "No data",
|
|
88
|
+
"no-network-detected": "No network detected",
|
|
89
|
+
"no-pif-detected": "No pif detected",
|
|
90
|
+
"no-result": "No result",
|
|
91
|
+
"none": "None",
|
|
65
92
|
"object-not-found": "Object {id} can't be found…",
|
|
93
|
+
"off": "Off",
|
|
94
|
+
"on": "On",
|
|
66
95
|
"open-console-in-new-tab": "Open console in new tab",
|
|
67
96
|
"other": "Other",
|
|
68
97
|
"page-not-found": "This page is not to be found…",
|
|
69
98
|
"partially-connected": "Partially connected",
|
|
70
99
|
"patches": "Patches",
|
|
71
|
-
"
|
|
100
|
+
"pifs": "PIFs",
|
|
101
|
+
"pifs-status": "PIFs status",
|
|
72
102
|
"power-on-host-for-console": "Power on your host to access its console",
|
|
103
|
+
"power-on-vm-for-console": "Power on your VM to access its console",
|
|
73
104
|
"professional-support": "Professional support",
|
|
74
105
|
"receive": "Receive",
|
|
75
106
|
"running-vm": "Running VM | Running VMs",
|
|
107
|
+
"scan-pifs": "Scan PIFs",
|
|
76
108
|
"see-all": "See all",
|
|
77
109
|
"select-to-see-details": "Select an element to see details",
|
|
78
110
|
"send": "Send",
|
|
79
111
|
"send-ctrl-alt-del": "Send Ctrl+Alt+Del",
|
|
80
112
|
"speed": "Speed",
|
|
113
|
+
"static": "Static",
|
|
81
114
|
"stats": "Stats",
|
|
115
|
+
"status": "Status",
|
|
82
116
|
"storage": "Storage",
|
|
83
117
|
"system": "System",
|
|
84
|
-
|
|
118
|
+
"table-actions": "Table actions",
|
|
85
119
|
"tasks": "Tasks",
|
|
120
|
+
|
|
86
121
|
"tasks.n-subtasks": "{n} subtask | {n} subtasks",
|
|
87
122
|
"tasks.no-tasks": "No tasks",
|
|
88
123
|
"tasks.quick-view": "Tasks' quick view",
|
|
@@ -93,5 +128,8 @@
|
|
|
93
128
|
|
|
94
129
|
"total": "Total",
|
|
95
130
|
"total-cpus": "Total CPUs",
|
|
131
|
+
"unknown": "Unknown",
|
|
132
|
+
"unlocked": "Unlocked",
|
|
133
|
+
"vlan": "VLAN",
|
|
96
134
|
"vms": "VMs"
|
|
97
135
|
}
|
package/lib/locales/fa.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"alarms": "هشدارها",
|
|
3
3
|
|
|
4
|
+
"bytes.gi": "GiB",
|
|
4
5
|
"bytes.ki": "KiB",
|
|
5
6
|
"bytes.mi": "MiB",
|
|
6
|
-
"bytes.gi": "GiB",
|
|
7
7
|
|
|
8
8
|
"coming-soon": "به زودی!",
|
|
9
9
|
"console": "کنسول",
|
|
@@ -27,11 +27,12 @@
|
|
|
27
27
|
"core.sort.ascending": "مرتب سازی صعودی",
|
|
28
28
|
"core.sort.descending": "مرتب سازی نزولی",
|
|
29
29
|
|
|
30
|
-
"dark-mode.enable": "فعال کردن حالت تاریک",
|
|
31
|
-
"dark-mode.disable": "غیر فعال کردن حالت تاریک",
|
|
32
30
|
"dark-mode.auto": "حالت خودکار تاریک",
|
|
31
|
+
"dark-mode.disable": "غیر فعال کردن حالت تاریک",
|
|
32
|
+
"dark-mode.enable": "فعال کردن حالت تاریک",
|
|
33
33
|
|
|
34
34
|
"dashboard": "داشبورد",
|
|
35
|
+
"dhcp": "DHCP",
|
|
35
36
|
"documentation-name": "اسناد {name}",
|
|
36
37
|
"error-no-data": "خطا، نمی توان داده ها را جمع آوری کرد.",
|
|
37
38
|
"fullscreen": "تمام صفحه",
|
|
@@ -44,8 +45,8 @@
|
|
|
44
45
|
"open-console-in-new-tab": "باز کردن کنسول در برگه جدید",
|
|
45
46
|
"page-not-found": "این صفحه پیدا نمی شود…",
|
|
46
47
|
"patches": "وصله ها",
|
|
47
|
-
"power-on-vm-for-console": "ماشین مجازی خود را روشن کنید تا به کنسول آن دسترسی داشته باشید",
|
|
48
48
|
"power-on-host-for-console": "هاست خود را برای دسترسی به کنسول آن روشن کنید",
|
|
49
|
+
"power-on-vm-for-console": "ماشین مجازی خود را روشن کنید تا به کنسول آن دسترسی داشته باشید",
|
|
49
50
|
"running-vm": "ماشین های مجازی در حال اجرا | ماشین مجازی در حال اجرا",
|
|
50
51
|
"send-ctrl-alt-del": "ارسال کلیدهای Ctrl+Alt+Del",
|
|
51
52
|
"stats": "آمار",
|
package/lib/locales/fr.json
CHANGED
|
@@ -1,37 +1,42 @@
|
|
|
1
1
|
{
|
|
2
|
+
"access-forum": "Accès au forum",
|
|
2
3
|
"alarms": "Alarmes",
|
|
3
4
|
|
|
5
|
+
"bytes.gi": "Gio",
|
|
4
6
|
"bytes.ki": "Kio",
|
|
5
7
|
"bytes.mi": "Mio",
|
|
6
|
-
"bytes.gi": "Gio",
|
|
7
8
|
|
|
8
9
|
"coming-soon": "Bientôt disponible !",
|
|
10
|
+
"connected": "Connecté",
|
|
9
11
|
"console": "Console",
|
|
10
12
|
"console-actions": "Actions de la console",
|
|
11
13
|
"console-clipboard": "Presse-papiers de la console",
|
|
14
|
+
"copy-info-json": "Copier les informations en JSON",
|
|
12
15
|
|
|
16
|
+
"core.close": "Fermer",
|
|
13
17
|
"core.copied": "Copié",
|
|
14
18
|
"core.copy-id": "Copier l'ID",
|
|
15
|
-
"core.close": "Fermer",
|
|
16
19
|
"core.current": "Actuel",
|
|
17
20
|
"core.filter": "Filtrer",
|
|
18
21
|
"core.group": "Grouper",
|
|
19
22
|
"core.hide": "Masquer",
|
|
20
23
|
"core.open": "Ouvrir",
|
|
21
|
-
"core.quick-actions": "Actions rapides",
|
|
22
|
-
|
|
23
|
-
"core.search": "Rechercher",
|
|
24
|
-
"core.show-by": "Afficher par",
|
|
25
24
|
|
|
26
25
|
"core.query-search-bar.label": "Moteur de recherche",
|
|
27
26
|
"core.query-search-bar.placeholder": "Écrivez votre requête…",
|
|
28
27
|
"core.query-search-bar.use-query-builder": "Utiliser le constructeur de requête",
|
|
29
28
|
|
|
29
|
+
"core.quick-actions": "Actions rapides",
|
|
30
|
+
"core.search": "Rechercher",
|
|
31
|
+
|
|
30
32
|
"core.select.all": "Tout sélectionner",
|
|
31
|
-
"core.select.none": "Tout désélectionner",
|
|
32
|
-
"core.select.unselect": "Tout désélectionner",
|
|
33
33
|
"core.select.n-object-of": "{from} - {to} de {total} objets",
|
|
34
34
|
"core.select.n-selected-of": "{count} objet sélectionné sur {total} | {count} objet sélectionné sur {total} | {count} objets sélectionnés sur {total}",
|
|
35
|
+
"core.select.none": "Tout désélectionner",
|
|
36
|
+
"core.select.unselect": "Tout désélectionner",
|
|
37
|
+
|
|
38
|
+
"core.show-by": "Afficher par",
|
|
39
|
+
|
|
35
40
|
"core.sidebar.close": "Fermer la barre latérale",
|
|
36
41
|
"core.sidebar.lock": "Verrouiller la barre latérale",
|
|
37
42
|
"core.sidebar.open": "Ouvrir la barre latérale",
|
|
@@ -40,49 +45,79 @@
|
|
|
40
45
|
"core.sort.ascending": "Trier par ordre croissant",
|
|
41
46
|
"core.sort.descending": "Trier par ordre décroissant",
|
|
42
47
|
|
|
43
|
-
"dark-mode.enable": "Activer le mode sombre",
|
|
44
|
-
"dark-mode.disable": "Désactiver le mode sombre",
|
|
45
48
|
"dark-mode.auto": "Mode sombre automatique",
|
|
49
|
+
"dark-mode.disable": "Désactiver le mode sombre",
|
|
50
|
+
"dark-mode.enable": "Activer le mode sombre",
|
|
46
51
|
|
|
47
|
-
"access-forum": "Accès au forum",
|
|
48
|
-
"connected": "Connecté",
|
|
49
52
|
"dashboard": "Tableau de bord",
|
|
53
|
+
"default-locking-mode": "Mode de verrouillage par défaut",
|
|
54
|
+
"delete": "Supprimer",
|
|
55
|
+
"description": "Description",
|
|
56
|
+
"device": "Appareil",
|
|
57
|
+
"disabled": "Désactivé",
|
|
50
58
|
"disconnected": "Déconnecté",
|
|
51
59
|
"disconnected-from-physical-device": "Déconnecté de l'appareil physique",
|
|
60
|
+
"dns": "DNS",
|
|
52
61
|
"documentation-name": "Documentation {name}",
|
|
62
|
+
"edit": "Modifier",
|
|
53
63
|
"error-no-data": "Erreur, impossible de collecter les données.",
|
|
54
64
|
"exit-fullscreen": "Quitter le plein écran",
|
|
55
65
|
"fullscreen": "Plein écran",
|
|
56
66
|
"gateway": "Passerelle",
|
|
67
|
+
"host-internal-networks": "Réseaux internes de l'hôte",
|
|
57
68
|
"hosts": "Hôtes",
|
|
69
|
+
"id": "Id",
|
|
70
|
+
"ip-addresses": "IP addresses",
|
|
71
|
+
"ip-mode": "Mode IP",
|
|
58
72
|
"learn-more": "En savoir plus",
|
|
59
73
|
"loading-in-progress": "Chargement en cours…",
|
|
74
|
+
"locking-mode": "Mode verrouillé",
|
|
75
|
+
"locking-mode-default": "Mode verrouillé par défaut",
|
|
60
76
|
"log-out": "Se déconnecter",
|
|
77
|
+
"mac-addresses": "Adresses MAC",
|
|
78
|
+
"management": "Gestion",
|
|
61
79
|
"master": "Hôte primaire",
|
|
80
|
+
"mtu": "MTU",
|
|
62
81
|
"n-vms": "1 VM | {n} VMs",
|
|
82
|
+
"name": "Nom",
|
|
63
83
|
"network": "Réseau",
|
|
84
|
+
"network-block-device": "Dispositif de blocage réseau",
|
|
85
|
+
"networks": "Réseaux",
|
|
86
|
+
"new": "Nouveau",
|
|
64
87
|
"no-data": "Aucune donnée",
|
|
88
|
+
"no-network-detected": "Aucun réseau détecté",
|
|
89
|
+
"no-pif-detected": "Aucun PIF détecté",
|
|
90
|
+
"no-result": "Aucun résultat",
|
|
91
|
+
"none": "Aucun",
|
|
65
92
|
"object-not-found": "L'objet {id} est introuvable…",
|
|
93
|
+
"off": "Éteint",
|
|
94
|
+
"on": "Allumé",
|
|
66
95
|
"open-console-in-new-tab": "Ouvrir la console dans un nouvel onglet",
|
|
67
96
|
"other": "Autre",
|
|
68
97
|
"page-not-found": "Cette page est introuvable…",
|
|
69
98
|
"partially-connected": "Partiellement connecté",
|
|
70
99
|
"patches": "Patches",
|
|
71
|
-
"
|
|
100
|
+
"pifs": "PIFs",
|
|
101
|
+
"pifs-status": "Statut des PIFs",
|
|
72
102
|
"power-on-host-for-console": "Allumez votre hôte pour accéder à sa console",
|
|
73
|
-
"
|
|
103
|
+
"power-on-vm-for-console": "Allumez votre VM pour accéder à sa console",
|
|
104
|
+
"professional-support": "Support professionnel",
|
|
74
105
|
"receive": "Recevoir",
|
|
75
106
|
"running-vm": "VM en cours d'exécution | VMs en cours d'exécution",
|
|
107
|
+
"scan-pifs": "Scan PIFs",
|
|
76
108
|
"see-all": "Voir tout",
|
|
77
|
-
"select-to-see-details": "Sélectionnez un
|
|
109
|
+
"select-to-see-details": "Sélectionnez un élément pour voir les détails",
|
|
78
110
|
"send": "Envoyer",
|
|
79
111
|
"send-ctrl-alt-del": "Envoyer Ctrl+Alt+Suppr",
|
|
80
112
|
"speed": "Vitesse",
|
|
113
|
+
"static": "Statique",
|
|
81
114
|
"stats": "Stats",
|
|
115
|
+
"status": "Statut",
|
|
82
116
|
"storage": "Stockage",
|
|
83
117
|
"system": "Système",
|
|
84
|
-
|
|
118
|
+
"table-actions": "Actions du tableau",
|
|
85
119
|
"tasks": "Tâches",
|
|
120
|
+
|
|
86
121
|
"tasks.n-subtasks": "{n} sous-tâche | {n} sous-tâches",
|
|
87
122
|
"tasks.no-tasks": "Aucune tâche",
|
|
88
123
|
"tasks.quick-view": "Vue rapide des tâches",
|
|
@@ -93,5 +128,8 @@
|
|
|
93
128
|
|
|
94
129
|
"total": "Total",
|
|
95
130
|
"total-cpus": "Total CPUs",
|
|
131
|
+
"unknown": "Inconnu",
|
|
132
|
+
"unlocked": "Débloqué",
|
|
133
|
+
"vlan": "VLAN",
|
|
96
134
|
"vms": "VMs"
|
|
97
135
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { parse, Scale, raw } from 'human-format'
|
|
2
|
+
|
|
3
|
+
const scale = Scale.create(['', 'KiB', 'MiB', 'GiB', 'TiB'], 1024)
|
|
4
|
+
|
|
5
|
+
export const formatSizeRaw = (bytes: number | undefined, decimals: number) => {
|
|
6
|
+
if (bytes === undefined) {
|
|
7
|
+
return undefined
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
return raw(bytes, { maxDecimals: decimals, scale })
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const formatSizeParse = (size: number | undefined, unit?: string) => {
|
|
14
|
+
if (size === undefined) {
|
|
15
|
+
return undefined
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let value = String(size)
|
|
19
|
+
if (unit !== undefined) {
|
|
20
|
+
value += ` ${unit}`
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const result = parse(value, { scale })
|
|
24
|
+
if (isNaN(result)) {
|
|
25
|
+
console.error(`[formatSizeParse]: got ${result}, expected a number`)
|
|
26
|
+
return undefined
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return result
|
|
30
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xen-orchestra/web-core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.13.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"exports": {
|
|
7
7
|
"./*": {
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"@vueuse/shared": "^10.7.1",
|
|
24
24
|
"d3-time-format": "^4.1.0",
|
|
25
25
|
"echarts": "^5.4.3",
|
|
26
|
+
"human-format": "^1.2.1",
|
|
26
27
|
"iterable-backoff": "^0.1.0",
|
|
27
28
|
"lodash-es": "^4.17.21",
|
|
28
29
|
"placement.js": "^1.0.0-beta.5",
|