mirror of
https://github.com/tale/headplane.git
synced 2026-08-28 07:57:03 +00:00
fix: format hostinfo in overview correctly
This commit is contained in:
@@ -86,7 +86,7 @@ export default function Page() {
|
|||||||
<thead className="text-gray-500 dark:text-gray-400">
|
<thead className="text-gray-500 dark:text-gray-400">
|
||||||
<tr className="text-left uppercase text-xs font-bold px-0.5">
|
<tr className="text-left uppercase text-xs font-bold px-0.5">
|
||||||
<th className="pb-2">Name</th>
|
<th className="pb-2">Name</th>
|
||||||
<th className="pb-2">
|
<th className="pb-2 w-1/4">
|
||||||
<div className="flex items-center gap-x-1">
|
<div className="flex items-center gap-x-1">
|
||||||
Addresses
|
Addresses
|
||||||
{data.magic ? (
|
{data.magic ? (
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export function getOSInfo(host: HostInfo) {
|
|||||||
const formattedOS = formatOS(OS);
|
const formattedOS = formatOS(OS);
|
||||||
|
|
||||||
// Trim in case OSVersion is empty
|
// Trim in case OSVersion is empty
|
||||||
return `${formattedOS} ${OSVersion}`.trim();
|
return `${formattedOS} ${OSVersion ?? ''}`.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatOS(os?: string) {
|
function formatOS(os?: string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user