From 984f1441aaf900417ba71c84c7bf80d623e92e3d Mon Sep 17 00:00:00 2001 From: Joris-K Date: Wed, 22 Jan 2025 13:37:39 +0100 Subject: [PATCH] implement component vtsCardRowKeyValue in sidepanel --- .../pool/network/PoolNetworksSidePanel.vue | 161 +++++++++--------- .../components/card/VtsCardRowKeyValue.vue | 2 +- 2 files changed, 81 insertions(+), 82 deletions(-) diff --git a/@xen-orchestra/lite/src/components/pool/network/PoolNetworksSidePanel.vue b/@xen-orchestra/lite/src/components/pool/network/PoolNetworksSidePanel.vue index 97961251098..6c72281b9e5 100644 --- a/@xen-orchestra/lite/src/components/pool/network/PoolNetworksSidePanel.vue +++ b/@xen-orchestra/lite/src/components/pool/network/PoolNetworksSidePanel.vue @@ -28,77 +28,89 @@ {{ network.name_label }} -
+
-
-
{{ $t('uuid') }}
-
{{ formatValue(network.uuid) }}
- -
+ + + + + -
-
{{ $t('description') }}
-
{{ formatValue(network.name_description) }}
- -
+ + + + + -
-
{{ $t('vlan') }}
-
{{ formatValue(getNetworkVlan(network)) }}
- -
+ + + + + -
-
{{ $t('mtu') }}
-
{{ formatValue(network.MTU) }}
- -
+ + + + + -
-
{{ $t('network-block-device') }}
-
{{ formatValue(network.purpose[0]) }}
- -
+ + + + + -
-
{{ $t('locking-mode-default') }}
-
{{ formatValue(network.default_locking_mode) }}
-
+ + + +
@@ -134,6 +146,7 @@ import PifRow from '@/components/pif/PifRow.vue' import type { XenApiNetwork } from '@/libs/xen-api/xen-api.types' import { useNetworkStore } from '@/stores/xen-api/network.store' import { usePifStore } from '@/stores/xen-api/pif.store' +import VtsCardRowKeyValue from '@core/components/card/VtsCardRowKeyValue.vue' import VtsNoSelectionHero from '@core/components/state-hero/VtsNoSelectionHero.vue' import UiButton from '@core/components/ui/button/UiButton.vue' import UiButtonIcon from '@core/components/ui/button-icon/UiButtonIcon.vue' @@ -176,28 +189,14 @@ const { copy, copied } = useClipboard() .content { display: flex; - align-items: center; - gap: 0.8rem; - - .title { - color: var(--color-neutral-txt-secondary); - min-width: 14rem; - } - - .value { - color: var(--color-neutral-txt-primary); - width: 20rem; - } + flex-direction: column; + gap: 0.4rem; } .text-left { text-align: left; } - .text-right { - text-align: right; - } - .simple-table { border-spacing: 0; padding: 0.4rem; diff --git a/@xen-orchestra/web-core/lib/components/card/VtsCardRowKeyValue.vue b/@xen-orchestra/web-core/lib/components/card/VtsCardRowKeyValue.vue index 513e358fd97..468c2fbe927 100644 --- a/@xen-orchestra/web-core/lib/components/card/VtsCardRowKeyValue.vue +++ b/@xen-orchestra/web-core/lib/components/card/VtsCardRowKeyValue.vue @@ -29,7 +29,7 @@ const slots = defineSlots<{ gap: 0.8rem; .key { - min-width: 12rem; + min-width: 14rem; overflow-wrap: break-word; color: var(--color-neutral-txt-secondary); }