From e0370869c881a1c02c750a616f856cb4b1521749 Mon Sep 17 00:00:00 2001 From: Vehbi Sinan Tunalioglu Date: Sat, 23 Mar 2024 18:30:06 +0800 Subject: [PATCH] feat(website): improve hosts tabulation - Revisited columns order and content - Added external link - Added tags column --- website/src/components/app/-app.tsx | 42 ++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/website/src/components/app/-app.tsx b/website/src/components/app/-app.tsx index a71d70a..6dd1529 100644 --- a/website/src/components/app/-app.tsx +++ b/website/src/components/app/-app.tsx @@ -1,7 +1,9 @@ import { Card, CardBody, CardHeader } from '@nextui-org/card'; +import { Chip } from '@nextui-org/chip'; import { Listbox, ListboxItem, ListboxSection } from '@nextui-org/listbox'; import { Table, TableBody, TableCell, TableColumn, TableHeader, TableRow } from '@nextui-org/table'; import Image from 'next/image'; +import Link from 'next/link'; import { Just, Maybe, Nothing } from 'purify-ts/Maybe'; import { useState } from 'react'; import { LhpData } from './-data'; @@ -54,17 +56,17 @@ export function Sidebar({ data, onHostSelect, onTabulateRequest, onFlushRequest onHostSelect(host)}>
{`logo {`logo {host.host.name} @@ -107,9 +109,9 @@ export function TabulateHosts({ hosts, onHostSelect }: { hosts: LhpData[]; onHos > Hostname - Architecture - Distribution Cloud + Distribution + Arch CPU @@ -122,6 +124,7 @@ export function TabulateHosts({ hosts, onHostSelect }: { hosts: LhpData[]; onHos Docker + Tags {(host) => ( @@ -129,27 +132,35 @@ export function TabulateHosts({ hosts, onHostSelect }: { hosts: LhpData[]; onHos
{`logo {`logo onHostSelect(host)}> {host.host.name} + {host.host.url && ( + + 🔗 + + )}
- {host.kernel.machine} + + {host.cloud.name} + {host.cloud.hostRegion && {host.cloud.hostRegion}} + {host.distribution.description} - {host.cloud.name} + {host.kernel.machine} {host.hardware.cpuCount} {host.hardware.ramTotal} {host.hardware.diskRoot} @@ -158,6 +169,13 @@ export function TabulateHosts({ hosts, onHostSelect }: { hosts: LhpData[]; onHos ? '❌' : `${host.dockerContainers.filter((x) => x.running).length} / ${host.dockerContainers.length}`} + + {(host.host.tags || []).map((x) => ( + + {x} + + ))} + )}