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

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
50f8ff7
feat(xo-6): implement network view
CzechSebastian Nov 15, 2024
0adef18
feat(xo-6): Add css
CzechSebastian Nov 18, 2024
668330b
feat(xo-6): add behavior
CzechSebastian Nov 18, 2024
495fe62
feat(xo-6): add stores
CzechSebastian Nov 19, 2024
154249c
feat(xo-6): remove locales
CzechSebastian Nov 19, 2024
925e797
feat(xo-6): locales change
CzechSebastian Nov 19, 2024
bde7120
feat(xo-6): locales migration
CzechSebastian Nov 19, 2024
9338269
feat(xo-6): PR feedback
CzechSebastian Nov 20, 2024
b71f572
feat(xo6): feedback
CzechSebastian Nov 21, 2024
4a21fca
feat(xo6): refactor store
CzechSebastian Nov 22, 2024
2fbb52a
feat(xo6): refactor store
CzechSebastian Nov 25, 2024
5866b97
feat(xo-6): remove code not relevant of store
CzechSebastian Nov 27, 2024
c3f4f8b
feat(xo-6): remove code not relevant of store
CzechSebastian Nov 27, 2024
9c90a3b
feat(xo-6): remove locale
CzechSebastian Nov 29, 2024
951f828
feat(xo-6): add locale
CzechSebastian Nov 29, 2024
f83b8ac
feat(xo-6): feedback
CzechSebastian Dec 4, 2024
65ce296
feat(xo-6): implement network view
CzechSebastian Nov 15, 2024
48a0bc6
feat(xo6): Update with checkbox composable
CzechSebastian Nov 25, 2024
d958ac8
feat(xo6): remove duplicated
CzechSebastian Nov 25, 2024
657d745
feat(xo6): wip make pif table component
CzechSebastian Nov 25, 2024
e78cb09
feat(xo-6): display table with filter
CzechSebastian Nov 26, 2024
78dd964
feat(xo-6): css on table
CzechSebastian Nov 26, 2024
a14d113
feat(xo-6):handle fake store
CzechSebastian Nov 28, 2024
548e7e9
feat(xo-6):update info
CzechSebastian Nov 28, 2024
28dd352
feat(xo-6):update with new card key component
CzechSebastian Nov 28, 2024
10e9a7f
feat(web-core): update css alignment, tooltip and ellipsis on text
CzechSebastian Nov 28, 2024
838bdaa
feat(xo-6): add row selection
CzechSebastian Nov 29, 2024
b980f70
feat(web-core): add state for empty panel (wip)
CzechSebastian Nov 29, 2024
1f5f9ba
feat(web-core): wip
CzechSebastian Dec 2, 2024
985c52a
feat(xo-6): add table scrolling bar
CzechSebastian Dec 2, 2024
693b16f
feat(xo-6): add responsiveness for table
CzechSebastian Dec 2, 2024
9aed6d7
feat(xo-6): update headers
CzechSebastian Dec 3, 2024
1a0f83b
feat(xo-6): add no-selection panel
CzechSebastian Dec 3, 2024
7992b00
feat(x0-6): typing
CzechSebastian Dec 5, 2024
7317301
feat(xo-6): remove classes
CzechSebastian Dec 5, 2024
9df1710
feat(xo-6): add store
CzechSebastian Dec 5, 2024
61c8113
feat(xo-6): handle None values
CzechSebastian Dec 5, 2024
0ec8a9b
feat(xo-6): simplify functions
CzechSebastian Dec 5, 2024
1ed06d9
feat(xo-6): handle header width
CzechSebastian Dec 6, 2024
78d54f8
feat(xo-6): update table container
CzechSebastian Dec 11, 2024
9a62bcc
feat(xo-6): remove media queries
CzechSebastian Dec 11, 2024
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 @@ -118,7 +117,6 @@
"n-hosts-awaiting-patch": "Der Host {n} benötigt dieses Patch | Die Hosts {n} benötigen dieses Patch",
"n-missing": "{n} verbleibend",
"name": "Name",
"netmask": "Netzmaske",
"network-download": "Download",
"network-throughput": "Netzwerkdurchsatz",
"network-upload": "Upload",
Expand Down
5 changes: 0 additions & 5 deletions @xen-orchestra/lite/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"cpu-provisioning": "CPU provisioning",
"cpu-provisioning-warning": "The number of vCPUs allocated exceeds the number of physical CPUs available. System performance could be affected",
"cpu-usage": "CPU usage",
"delete": "Delete",
"delete-vms": "Delete 1 VM | Delete {n} VMs",
"deploy": "Deploy",
"deploy-xoa": "Deploy XOA",
Expand All @@ -59,10 +58,8 @@

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

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

"descending": "descendant",
"description": "Description",
"dhcp": "DHCP",
"dns": "DNS",
"disabled": "Désactivé",
"display": "Affichage",
"do-you-have-needs": "Vous avez des besoins et/ou des attentes ? Faites le nous savoir",
Expand Down Expand Up @@ -179,7 +176,6 @@
"n-hosts-awaiting-patch": "{n} hôte attend ce patch | {n} hôtes attendent ce patch",
"n-missing": "{n} manquant | {n} manquants",
"name": "Nom",
"netmask": "Masque réseau",
"network-download": "Descendant",
"network-throughput": "Débit du réseau",
"network-upload": "Montant",
Expand Down Expand Up @@ -241,7 +237,6 @@
"start": "Démarrer",
"start-on-host": "Démarrer sur un hôte spécifique",
"static-ip": "IP statique",
"status": "Statut",
"storage-usage": "Utilisation du stockage",
"support": "Support",
"suspend": "Suspendre",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ const slots = defineSlots<{
<style lang="postcss" scoped>
.vts-card-row-key-value {
display: flex;
align-items: center;
gap: 0.8rem;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

return {
selected,
areAllSelected,
}
}
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",
"error-no-data": "Fehler beim Datenabruf.",
"fullscreen": "Vollbild",
Expand All @@ -28,6 +29,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,36 +43,64 @@
"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",
"error-no-data": "Error, can't collect data.",
"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",
"none": "None",
"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",
"select-to-see-details": "Select an element to see details",
"send": "Send",
"send-ctrl-alt-del": "Send Ctrl+Alt+Del",
"speed": "Speed",
"stats": "Stats",
"status": "Status",
"storage": "Storage",
"system": "System",

Expand All @@ -85,7 +113,12 @@
"tasks.quick-view.failed": "Failed",
"tasks.quick-view.in-progress": "In progress",

"table-actions": "Table actions",
"tags": "Tags",
"total": "Total",
"total-cpus": "Total CPUs",
"unknown": "Unknown",
"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}",
"error-no-data": "خطا، نمی توان داده ها را جمع آوری کرد.",
"fullscreen": "تمام صفحه",
Expand Down
Loading
Loading