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): add dashboard view #8398

Draft
wants to merge 3 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
2 changes: 1 addition & 1 deletion @xen-orchestra/lite/src/components/RelativeTime.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
</template>

<script lang="ts" setup>
import useRelativeTime from '@/composables/relative-time.composable'
import { parseDateTime } from '@/libs/utils'
import useRelativeTime from '@core/composables/relative-time.composable'
import { useNow } from '@vueuse/core'
import { computed } from 'vue'

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<template>
<UiCard class="vts-quick-info-card">
<UiCardTitle>{{ $t('quick-info') }}</UiCardTitle>
<VtsLoadingHero :disabled="isReady" type="card">
<div class="info-container">
<slot />
</div>
</VtsLoadingHero>
</UiCard>
</template>

<script lang="ts" setup>
import VtsLoadingHero from '@core/components/state-hero/VtsLoadingHero.vue'
import UiCard from '@core/components/ui/card/UiCard.vue'
import UiCardTitle from '@core/components/ui/card-title/UiCardTitle.vue'

defineProps<{
isReady: boolean
}>()
</script>

<style lang="postcss" scoped>
.vts-quick-info-card {
.info-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
gap: 2.4rem;
}
}
</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<template>
<div class="vts-quick-info-column">
<slot />
</div>
</template>

<style lang="postcss" scoped>
.vts-quick-info-column {
display: flex;
flex-direction: column;
gap: 0.8rem;
}
</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<template>
<div class="vts-quick-info-row">
<span class="typo-body-bold">
<slot name="title">
{{ title }}
</slot>
</span>
<span class="typo-body-regular">
<slot name="value">
{{ value }}
</slot>
</span>
</div>
</template>

<script lang="ts" setup>
defineProps<{
title?: string
value?: string
}>()

defineSlots<{
title?(): any
value?(): any
}>()
</script>

<style lang="postcss" scoped>
.vts-quick-info-row {
display: flex;
align-items: center;
gap: 1rem;
}
</style>
7 changes: 7 additions & 0 deletions @xen-orchestra/web-core/lib/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"core.sidebar.unlock": "Odemknout postranní panel",
"core.sort.ascending": "Seřadit vzestupně",
"core.sort.descending": "Seřadit sestupně",
"cores-with-sockets": "",
"cpu-provisioning": "přednastavení procesoru",
"cpu-provisioning-warning": "Počet přidělených virt. procesorů překračuje počet přítomných fyzických procesorů. Může mít dopad na výkon systému",
"cpu-usage": "Využití procesoru",
Expand Down Expand Up @@ -163,6 +164,7 @@
"gateway": "Brána",
"go-back": "Přejít zpět",
"gzip": "gzip",
"hardware": "",
"here": "Zde",
"host": "Hostitel",
"host-description": "Popis hostitele",
Expand All @@ -180,6 +182,7 @@
"invalid-field": "Neplatný obsah kolonky",
"ip-addresses": "IP adresy",
"ip-mode": "Režim IP",
"is-primary-host": "",
"job.vm-copy.bad-power-state": "Je třeba, aby virt. stroj byl zastavený",
"job.vm-copy.in-progress": "Probíhá kopírování…",
"job.vm-copy.missing-vms": "Žádný virt. stroj ke zkopírování",
Expand Down Expand Up @@ -306,6 +309,7 @@
"power-state": "Stav napájení",
"professional-support": "Profesionální podpora",
"property": "Vlastnost",
"ram": "",
"ram-usage": "Využití operační paměti",
"reboot": "Restartovat",
"receive": "Přijmout",
Expand Down Expand Up @@ -350,6 +354,7 @@
"stacked-ram-usage": "Celkem využítí opearční paměti",
"start": "Spustit",
"start-on-host": "Spustit na konkrétním hostiteli",
"started": "",
"static": "Statické",
"static-ip": "Statická IP adresa",
"stats": "Statistiky",
Expand Down Expand Up @@ -380,9 +385,11 @@
"top-#": "Nej {n}",
"total": "Celkem",
"total-cpus": "Celkem procesorů",
"total-free": "",
"total-free:": "Celkem volno:",
"total-memory": "Celková operační paměť",
"total-storage-repository": "Celkové úložiště repozitáře",
"total-used": "",
"total-used:": "Celkem využito:",
"unknown": "Neznámé",
"unlocked": "Odemčeno",
Expand Down
7 changes: 7 additions & 0 deletions @xen-orchestra/web-core/lib/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"core.group": "Gruppe",
"core.select.all": "Alles auswählen",
"core.select.none": "Alle abwählen",
"cores-with-sockets": "",
"cpu-provisioning": "Zugewiesene Prozessoren",
"cpu-provisioning-warning": "Die Anzahl der zugewiesenen vCPUs überschreitet die physikalisch vorhandenen CPUs. Die Systemperformance kann darunter leiden.",
"cpu-usage": "Prozessorauslastung",
Expand Down Expand Up @@ -109,11 +110,13 @@
"gateway": "Gateway",
"go-back": "Zurück",
"gzip": "gzip",
"hardware": "",
"here": "Hier",
"host.active": "Aktiv",
"host.inactive": "Inaktiv",
"hosts": "Hosts",
"invalid-field": "Ungültiges Feld",
"is-primary-host": "",
"keep-me-logged": "Angemeldet bleiben",
"keep-page-open": "Fenster bis zum Ende der Installation nicht Aktualisieren oder Schließen.",
"language": "Sprache",
Expand Down Expand Up @@ -167,6 +170,7 @@
"power-on-vm-for-console": "Konsole ist nach Start der VM verfügbar",
"power-state": "Energiezustand",
"property": "Feld",
"ram": "",
"ram-usage": "Arbeitsspeicherbelegung",
"reboot": "Neustart",
"reformat": "Reformat",
Expand Down Expand Up @@ -201,6 +205,7 @@
"stacked-ram-usage": "Arbeitsspeicherbelegung gestapelt",
"start": "Starten",
"start-on-host": "Auf bestimmtem Host starten",
"started": "",
"static-ip": "Statische IP",
"stats": "Statistiken",
"status": "Status",
Expand All @@ -221,7 +226,9 @@
"this-vm-cant-be-migrated": "Diese VM kann nicht migriert werden",
"top-#": "Top {n}",
"total-cpus": "Gesamt CPUs",
"total-free": "",
"total-free:": "Gesamt frei :",
"total-used": "",
"total-used:": "Gesamt benutzt :",
"unreachable-hosts": "Hosts nicht erreichbar",
"unreachable-hosts-reload-page": "Abgeschlossen, bitte lade die Seite neu",
Expand Down
13 changes: 13 additions & 0 deletions @xen-orchestra/web-core/lib/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"core.sort.ascending": "Sort ascending",
"core.sort.descending": "Sort descending",
"core.textarea.exceeds-max-characters": "Field value must be {max} characters or less.",
"cores-with-sockets": "Cores (sockets)",
"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",
Expand Down Expand Up @@ -168,10 +169,14 @@
"gateway": "Gateway",
"go-back": "Go back",
"gzip": "gzip",
"hardware": "Hardware",
"here": "Here",
"host": "Host",
"host-description": "Host description",
"host-internal-networks": "Host internal networks",
"host-status.halted": "Stopped",
"host-status.running": "Running",
"host-status.unknown": "Unknown",
"host-unknown": "Host unknown",
"host.active": "Active",
"host.inactive": "Inactive",
Expand All @@ -184,8 +189,10 @@
"id": "Id",
"in-last-three-jobs": "In their last three jobs",
"invalid-field": "Invalid field",
"ip-address": "IP address",
"ip-addresses": "IP addresses",
"ip-mode": "IP mode",
"is-primary-host": "{name} is primary host",
"job.vm-copy.bad-power-state": "VM must be halted",
"job.vm-copy.in-progress": "Copy in progress…",
"job.vm-copy.missing-vms": "No VM to copy",
Expand Down Expand Up @@ -318,6 +325,8 @@
"professional-support": "Professional support",
"properties": "Properties",
"property": "Property",
"quick-info": "Quick info",
"ram": "RAM",
"ram-usage": "RAM usage",
"reboot": "Reboot",
"receive": "Receive",
Expand Down Expand Up @@ -362,6 +371,8 @@
"stacked-ram-usage": "Stacked RAM usage",
"start": "Start",
"start-on-host": "Start on specific host",
"started": "Started",
"state": "State",
"static": "Static",
"static-ip": "Static IP",
"stats": "Stats",
Expand Down Expand Up @@ -393,9 +404,11 @@
"top-#": "Top {n}",
"total": "Total",
"total-cpus": "Total CPUs",
"total-free": "Total free",
"total-free:": "Total free:",
"total-memory": "Total memory",
"total-storage-repository": "Total storage repository",
"total-used": "Total used",
"total-used:": "Total used:",
"unknown": "Unknown",
"unlocked": "Unlocked",
Expand Down
7 changes: 7 additions & 0 deletions @xen-orchestra/web-core/lib/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"core.sidebar.unlock": "Desbloquear la barra lateral",
"core.sort.ascending": "Ordenar",
"core.sort.descending": "Ordenar descendentemente",
"cores-with-sockets": "",
"cpu-provisioning": "Aprovisionamiento de CPU",
"cpu-provisioning-warning": "La cantidad de vCPU asignadas excede la cantidad de CPU físicas disponibles. El rendimiento del sistema puede verse afectado",
"cpu-usage": "Uso del CPU",
Expand Down Expand Up @@ -163,6 +164,7 @@
"gateway": "Puerta de enlace",
"go-back": "Regresa",
"gzip": "gzip",
"hardware": "",
"here": "Aquí",
"host": "Servidor",
"host-description": "Descripción servidor",
Expand All @@ -180,6 +182,7 @@
"invalid-field": "Campo inválido",
"ip-addresses": "Dirección IP",
"ip-mode": "modo IP",
"is-primary-host": "",
"job.vm-copy.bad-power-state": "La máquina virtual debe estar apagada",
"job.vm-copy.in-progress": "Copiando…",
"job.vm-copy.missing-vms": "No hay máquinas virtuales para copiar",
Expand Down Expand Up @@ -306,6 +309,7 @@
"power-state": "Estado alimentación electrica",
"professional-support": "Soporte profesional",
"property": "Propriedad",
"ram": "",
"ram-usage": "Uso RAM",
"reboot": "Reiniciar",
"receive": "Recibir",
Expand Down Expand Up @@ -350,6 +354,7 @@
"stacked-ram-usage": "Uso RAM apilado",
"start": "Iniciar",
"start-on-host": "Iniciar en un servidor específico",
"started": "",
"static": "Estatico",
"static-ip": "IP estático",
"stats": "Stats",
Expand Down Expand Up @@ -380,9 +385,11 @@
"top-#": "{n} principales",
"total": "Total",
"total-cpus": "CPUs Totales",
"total-free": "",
"total-free:": "Total libre :",
"total-memory": "Memoria total",
"total-storage-repository": "Total reposito de almacenamiento",
"total-used": "",
"total-used:": "Total usado :",
"unknown": "Desconocido",
"unlocked": "Desbloqueado",
Expand Down
7 changes: 7 additions & 0 deletions @xen-orchestra/web-core/lib/locales/fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"core.sidebar.unlock": "از حالت قفل خارج کردن نوار کناری",
"core.sort.ascending": "مرتب سازی صعودی",
"core.sort.descending": "مرتب سازی نزولی",
"cores-with-sockets": "",
"cpu-provisioning": "تامین CPU",
"cpu-provisioning-warning": "تعداد CPU های مجازی اختصاص داده شده بیش از تعداد CPUهای فیزیکی موجود است. عملکرد سیستم ممکن است تحت تأثیر قرار بگیرد",
"cpu-usage": "استفاده از CPU",
Expand Down Expand Up @@ -120,9 +121,11 @@
"gateway": "دروازه",
"go-back": "برگشت به عقب",
"gzip": "gzip",
"hardware": "",
"here": "اینجا",
"hosts": "میزبان ها",
"invalid-field": "فیلد نامعتبر",
"is-primary-host": "",
"keep-me-logged": "من را وارد سیستم نگه دار",
"keep-page-open": "قبل از پایان استقرار، برگه را ریفرش نکنید یا از آن خارج نشوید.",
"language": "زبان",
Expand Down Expand Up @@ -176,6 +179,7 @@
"power-on-vm-for-console": "ماشین مجازی خود را روشن کنید تا به کنسول آن دسترسی داشته باشید",
"power-state": "وضعیت برق",
"property": "ویژگی",
"ram": "",
"ram-usage": "استفاده از RAM",
"reboot": "راه اندازی مجدد",
"reformat": "قالب بندی مجدد",
Expand Down Expand Up @@ -210,6 +214,7 @@
"stacked-ram-usage": "استفاده از RAM انباشته",
"start": "شروع",
"start-on-host": "روی هاست خاصی شروع کنید",
"started": "",
"static-ip": "IP ثابت",
"stats": "آمار",
"status": "وضعیت",
Expand All @@ -229,7 +234,9 @@
"this-vm-cant-be-migrated": "این ماشین مجازی قابل انتقال نیست",
"top-#": "{n} برتر",
"total-cpus": "کل CPU ها",
"total-free": "",
"total-free:": "کل آزاد:",
"total-used": "",
"total-used:": "کل استفاده شده:",
"unreachable-hosts": "میزبان های غیرقابل دسترس",
"unreachable-hosts-reload-page": "انجام شد، صفحه را دوباره بارگیری کنید",
Expand Down
Loading
Loading