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

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
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 @@ -120,7 +119,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
6 changes: 0 additions & 6 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 @@ -97,7 +94,6 @@
"force-reboot": "Force reboot",
"force-shutdown": "Force shutdown",
"fullscreen-leave": "Leave fullscreen",
"gateway": "Gateway",
"n-gb-left": "{n} GB left",
"n-gb-required": "{n} GB required",
"go-back": "Go back",
Expand All @@ -122,7 +118,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 @@ -184,7 +179,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
6 changes: 0 additions & 6 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 @@ -97,7 +94,6 @@
"force-reboot": "Forcer le redémarrage",
"force-shutdown": "Forcer l'arrêt",
"fullscreen-leave": "Quitter plein écran",
"gateway": "Passerelle",
"n-gb-left": "{n} Go libres",
"n-gb-required": "{n} Go requis",
"go-back": "Revenir en arrière",
Expand All @@ -122,7 +118,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 @@ -184,7 +179,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
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
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const classNames = computed(() => [
border-width: 0.1rem;
outline: none;
border-style: solid;
white-space: nowrap;
&.lock {
cursor: default;
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 @@ -88,6 +88,7 @@ const id = computed(() => uniqueId('input-'))
/* IMPLEMENTATION */
.ui-input {
position: relative;
width: 100%;
.before + .input {
padding-inline-start: 4.8rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const value = ref<string>('')
align-items: center;
.label {
white-space: nowrap;
color: var(--color-neutral-txt-secondary);
}
}
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,
}
}
2 changes: 2 additions & 0 deletions @xen-orchestra/web-core/lib/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"dark-mode.auto": "Automatischer Dunkelmodus",

"dashboard": "Dashboard",
"dhcp": "DHCP",
"documentation-name": "{name} Dokumentation",
"fullscreen": "Vollbild",
"hosts": "Hosts",
Expand All @@ -26,6 +27,7 @@
"log-out": "Abmelden",
"master": "Primärer Host",
"n-vms": "1 VM | {n} VMs",
"netmask": "Netzmaske",
"network": "Netzwerk",
"object-not-found": "Objekt {id} wurde nicht gefunden…",
"open-console-in-new-tab": "Konsole in neuem Reiter öffnen",
Expand Down
35 changes: 34 additions & 1 deletion @xen-orchestra/web-core/lib/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,32 +43,61 @@
"dark-mode.auto": "Auto dark mode",

"access-forum": "Access forum",
"dashboard": "Dashboard",
"connected": "Connected",
"dashboard": "Tableau de bord",
"disconnected": "Disconnected",
"disconnected-from-physical-device": "Disconnected from physical device",
"device": "Device",
"edit": "Edit",
"default-locking-mode": "Default locking mode",
"delete": "Delete",
"dhcp": "DHCP",
"dns": "DNS",
"documentation-name": "{name} documentation",
"exit-fullscreen": "Exit fullscreen",
"fullscreen": "Fullscreen",
"gateway": "Gateway",
"hosts": "Hosts",
"ip-addresses": "IP addresses",
"ip-mode": "IP mode",
"learn-more": "Learn more",
"loading-in-progress": "Loading in progress…",
"log-out": "Log out",
"mac-address": "MAC address",
"mac-addresses": "MAC addresses",
"master": "Primary host",
"mbs": "{value} Mb/s",
"mtu": "MTU",
"netmask": "Netmask",
"network-block-device": "Network block device",
"network-information": "Network information",
"n-vms": "1 VM | {n} VMs",
"network": "Network",
"no-data": "No data",
"object-not-found": "Object {id} can't be found…",
"off": "Off",
"on": "On",
"open-console-in-new-tab": "Open console in new tab",
"other": "Other",
"page-not-found": "This page is not to be found…",
"patches": "Patches",
"physical-interface-status": "Physical interface status",
"pif": "PIF",
"pifs": "PIFs",
"pif-status": "Pif status",
"power-on-vm-for-console": "Power on your VM to access its console",
"power-on-host-for-console": "Power on your host to access its console",
"professional-support": "Professional support",
"properties": "Properties",
"receive": "Receive",
"running-vm": "Running VM | Running VMs",
"scan-pifs": "Scan PIFs",
"see-all": "See all",
"send": "Send",
"send-ctrl-alt-del": "Send Ctrl+Alt+Del",
"speed": "Speed",
"stats": "Stats",
"status": "Status",
"storage": "Storage",
"system": "System",

Expand All @@ -81,7 +110,11 @@
"tasks.quick-view.failed": "Failed",
"tasks.quick-view.in-progress": "In progress",

"table-actions": "Table actions",
"tags": "Tags",
"total": "Total",
"total-cpus": "Total CPUs",
"uuid": "Uuid",
"vlan": "VLAN",
"vms": "VMs"
}
1 change: 1 addition & 0 deletions @xen-orchestra/web-core/lib/locales/fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"dark-mode.auto": "حالت خودکار تاریک",

"dashboard": "داشبورد",
"dhcp": "DHCP",
"documentation-name": "اسناد {name}",
"fullscreen": "تمام صفحه",
"learn-more": "بیشتر بدانید",
Expand Down
Loading
Loading