mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 02:36:17 +01:00
small frontend refactoring / style updates
This commit is contained in:
@@ -40,7 +40,7 @@ export const containerChartCols: ColumnDef<ContainerRecord>[] = [
|
|||||||
accessorFn: (record) => record.name,
|
accessorFn: (record) => record.name,
|
||||||
header: ({ column }) => <HeaderButton column={column} name={t`Name`} Icon={ContainerIcon} />,
|
header: ({ column }) => <HeaderButton column={column} name={t`Name`} Icon={ContainerIcon} />,
|
||||||
cell: ({ getValue }) => {
|
cell: ({ getValue }) => {
|
||||||
return <span className="ms-1.5 xl:w-45 block truncate">{getValue() as string}</span>
|
return <span className="ms-1.5 xl:w-48 block truncate">{getValue() as string}</span>
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -55,7 +55,7 @@ export const containerChartCols: ColumnDef<ContainerRecord>[] = [
|
|||||||
header: ({ column }) => <HeaderButton column={column} name={t`System`} Icon={ServerIcon} />,
|
header: ({ column }) => <HeaderButton column={column} name={t`System`} Icon={ServerIcon} />,
|
||||||
cell: ({ getValue }) => {
|
cell: ({ getValue }) => {
|
||||||
const allSystems = useStore($allSystemsById)
|
const allSystems = useStore($allSystemsById)
|
||||||
return <span className="ms-1.5 xl:w-32 block truncate">{allSystems[getValue() as string]?.name ?? ""}</span>
|
return <span className="ms-1.5 xl:w-34 block truncate">{allSystems[getValue() as string]?.name ?? ""}</span>
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
@@ -131,7 +131,7 @@ export const containerChartCols: ColumnDef<ContainerRecord>[] = [
|
|||||||
accessorFn: (record) => record.image,
|
accessorFn: (record) => record.image,
|
||||||
header: ({ column }) => <HeaderButton column={column} name={t({ message: "Image", context: "Docker image" })} Icon={LayersIcon} />,
|
header: ({ column }) => <HeaderButton column={column} name={t({ message: "Image", context: "Docker image" })} Icon={LayersIcon} />,
|
||||||
cell: ({ getValue }) => {
|
cell: ({ getValue }) => {
|
||||||
return <span className="ms-1.5 xl:w-36 block truncate">{getValue() as string}</span>
|
return <span className="ms-1.5 xl:w-40 block truncate">{getValue() as string}</span>
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ export default function ConfigYaml() {
|
|||||||
</Trans>
|
</Trans>
|
||||||
</p>
|
</p>
|
||||||
<Alert className="my-4 border-destructive text-destructive w-auto table md:pe-6">
|
<Alert className="my-4 border-destructive text-destructive w-auto table md:pe-6">
|
||||||
<AlertCircleIcon className="h-4 w-4 stroke-destructive" />
|
<AlertCircleIcon className="size-4.5 stroke-destructive" />
|
||||||
<AlertTitle>
|
<AlertTitle>
|
||||||
<Trans>Caution - potential data loss</Trans>
|
<Trans>Caution - potential data loss</Trans>
|
||||||
</AlertTitle>
|
</AlertTitle>
|
||||||
|
|||||||
@@ -36,10 +36,6 @@ export const smartColumns: ColumnDef<SmartAttribute>[] = [
|
|||||||
{
|
{
|
||||||
accessorKey: "id",
|
accessorKey: "id",
|
||||||
header: "ID",
|
header: "ID",
|
||||||
cell: ({ getValue }) => {
|
|
||||||
const id = getValue() as number | undefined
|
|
||||||
return <div className="font-mono text-sm">{id?.toString() || ""}</div>
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessorFn: (row) => row.n,
|
accessorFn: (row) => row.n,
|
||||||
@@ -386,8 +382,6 @@ export default function DisksTable({ systemId }: { systemId: string }) {
|
|||||||
function DiskSheet({ disk, smartData, open, onOpenChange }: { disk: DiskInfo | null; smartData?: SmartData; open: boolean; onOpenChange: (open: boolean) => void }) {
|
function DiskSheet({ disk, smartData, open, onOpenChange }: { disk: DiskInfo | null; smartData?: SmartData; open: boolean; onOpenChange: (open: boolean) => void }) {
|
||||||
if (!disk) return null
|
if (!disk) return null
|
||||||
|
|
||||||
const [sorting, setSorting] = React.useState<SortingState>([{ id: "id", desc: false }])
|
|
||||||
|
|
||||||
const smartAttributes = smartData?.a || []
|
const smartAttributes = smartData?.a || []
|
||||||
|
|
||||||
// Find all attributes where when failed is not empty
|
// Find all attributes where when failed is not empty
|
||||||
@@ -411,11 +405,6 @@ function DiskSheet({ disk, smartData, open, onOpenChange }: { disk: DiskInfo | n
|
|||||||
data: smartAttributes,
|
data: smartAttributes,
|
||||||
columns: visibleColumns,
|
columns: visibleColumns,
|
||||||
getCoreRowModel: getCoreRowModel(),
|
getCoreRowModel: getCoreRowModel(),
|
||||||
getSortedRowModel: getSortedRowModel(),
|
|
||||||
onSortingChange: setSorting,
|
|
||||||
state: {
|
|
||||||
sorting,
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -145,7 +145,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@utility container {
|
@utility container {
|
||||||
@apply max-w-360 mx-auto px-4;
|
@apply max-w-370 mx-auto px-4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@utility link {
|
@utility link {
|
||||||
|
|||||||
Reference in New Issue
Block a user