Made changes to the host details area to add notes

Reconfigured JWT session timeouts
This commit is contained in:
Muhammad Ibrahim
2025-10-01 08:38:40 +01:00
parent f254b54404
commit 5d8a1e71d6
13 changed files with 1004 additions and 299 deletions

View File

@@ -341,8 +341,9 @@ const Hosts = () => {
},
{ id: "status", label: "Status", visible: true, order: 8 },
{ id: "updates", label: "Updates", visible: true, order: 9 },
{ id: "last_update", label: "Last Update", visible: true, order: 10 },
{ id: "actions", label: "Actions", visible: true, order: 11 },
{ id: "notes", label: "Notes", visible: false, order: 10 },
{ id: "last_update", label: "Last Update", visible: true, order: 11 },
{ id: "actions", label: "Actions", visible: true, order: 12 },
];
const saved = localStorage.getItem("hosts-column-config");
@@ -542,7 +543,8 @@ const Hosts = () => {
searchTerm === "" ||
host.friendly_name.toLowerCase().includes(searchTerm.toLowerCase()) ||
host.ip?.toLowerCase().includes(searchTerm.toLowerCase()) ||
host.os_type?.toLowerCase().includes(searchTerm.toLowerCase());
host.os_type?.toLowerCase().includes(searchTerm.toLowerCase()) ||
host.notes?.toLowerCase().includes(searchTerm.toLowerCase());
// Group filter
const matchesGroup =
@@ -628,6 +630,10 @@ const Hosts = () => {
aValue = new Date(a.last_update);
bValue = new Date(b.last_update);
break;
case "notes":
aValue = (a.notes || "").toLowerCase();
bValue = (b.notes || "").toLowerCase();
break;
default:
aValue = a[sortField];
bValue = b[sortField];
@@ -877,6 +883,20 @@ const Hosts = () => {
{formatRelativeTime(host.last_update)}
</div>
);
case "notes":
return (
<div className="text-sm text-secondary-900 dark:text-white max-w-xs">
{host.notes ? (
<div className="truncate" title={host.notes}>
{host.notes}
</div>
) : (
<span className="text-secondary-400 dark:text-secondary-500 italic">
No notes
</span>
)}
</div>
);
case "actions":
return (
<Link