feat: make agent instance name a navigable link in data table
Instance names in the AgentHealth data table are now clickable amber links that navigate to the agent instance page (/agents/:appId/:id). Row click still opens the detail slide-in panel. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -98,6 +98,17 @@
|
|||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.instanceLink {
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--amber);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.instanceLink:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
color: var(--amber-deep);
|
||||||
|
}
|
||||||
|
|
||||||
.instanceMeta {
|
.instanceMeta {
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useState, useMemo } from 'react';
|
import { useState, useMemo } from 'react';
|
||||||
import { useParams } from 'react-router';
|
import { useParams, useNavigate } from 'react-router';
|
||||||
import {
|
import {
|
||||||
StatCard, StatusDot, Badge, MonoText, ProgressBar,
|
StatCard, StatusDot, Badge, MonoText, ProgressBar,
|
||||||
GroupCard, DataTable, LineChart, EventFeed, DetailPanel,
|
GroupCard, DataTable, LineChart, EventFeed, DetailPanel,
|
||||||
@@ -240,6 +240,7 @@ function mapLogLevel(level: string): LogEntry['level'] {
|
|||||||
|
|
||||||
export default function AgentHealth() {
|
export default function AgentHealth() {
|
||||||
const { appId } = useParams();
|
const { appId } = useParams();
|
||||||
|
const navigate = useNavigate();
|
||||||
const { data: agents } = useAgents(undefined, appId);
|
const { data: agents } = useAgents(undefined, appId);
|
||||||
const [eventSortAsc, setEventSortAsc] = useState(false);
|
const [eventSortAsc, setEventSortAsc] = useState(false);
|
||||||
const [eventRefreshTo, setEventRefreshTo] = useState<string | undefined>();
|
const [eventRefreshTo, setEventRefreshTo] = useState<string | undefined>();
|
||||||
@@ -311,7 +312,16 @@ export default function AgentHealth() {
|
|||||||
key: 'name',
|
key: 'name',
|
||||||
header: 'Instance',
|
header: 'Instance',
|
||||||
render: (_val, row) => (
|
render: (_val, row) => (
|
||||||
<MonoText size="sm" className={styles.instanceName}>{row.name ?? row.id}</MonoText>
|
<MonoText
|
||||||
|
size="sm"
|
||||||
|
className={styles.instanceLink}
|
||||||
|
onClick={(e: React.MouseEvent) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
navigate(`/agents/${row.application}/${row.id}`);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{row.name ?? row.id}
|
||||||
|
</MonoText>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user