feat(ui): make app/route/agent clickable in exchange header for navigation
Some checks failed
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m2s
CI / docker (push) Successful in 54s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Has been cancelled

This commit is contained in:
hsiegeln
2026-03-28 15:14:48 +01:00
parent c8fcee9d09
commit 7ee57ca975
2 changed files with 35 additions and 6 deletions

View File

@@ -41,6 +41,29 @@
flex-shrink: 0;
}
.linkBtn {
display: inline-flex;
align-items: center;
gap: 0.25rem;
background: none;
border: none;
padding: 2px 4px;
margin: -2px 0;
border-radius: var(--radius-sm);
cursor: pointer;
font: inherit;
font-size: 0.75rem;
transition: background 0.1s, color 0.1s;
}
.linkBtn:hover {
background: var(--bg-hover);
}
.linkBtn:hover .icon {
color: var(--amber);
}
.agentLabel {
font-size: 0.625rem;
font-weight: 600;

View File

@@ -57,15 +57,21 @@ export function ExchangeHeader({ detail }: ExchangeHeaderProps) {
</>
)}
<span className={styles.separator} />
<span className={styles.app}>{detail.applicationName}</span>
<GitBranch size={12} className={styles.icon} />
<span className={styles.route}>{detail.routeId}</span>
<button className={styles.linkBtn} onClick={() => navigate(`/exchanges/${detail.applicationName}`)} title="Show all exchanges for this application">
<span className={styles.app}>{detail.applicationName}</span>
</button>
<button className={styles.linkBtn} onClick={() => navigate(`/exchanges/${detail.applicationName}/${detail.routeId}`)} title="Show all exchanges for this route">
<span className={styles.route}>{detail.routeId}</span>
<GitBranch size={12} className={styles.icon} />
</button>
{detail.agentId && (
<>
<span className={styles.separator} />
<Server size={12} className={styles.icon} />
<span className={styles.app}>{detail.applicationName}</span>
<MonoText size="xs">{detail.agentId}</MonoText>
<button className={styles.linkBtn} onClick={() => navigate(`/runtime/${detail.applicationName}/${detail.agentId}`)} title="Go to agent details">
<span className={styles.app}>{detail.applicationName}</span>
<MonoText size="xs">{detail.agentId}</MonoText>
<Server size={12} className={styles.icon} />
</button>
</>
)}
<span className={styles.duration}>{formatDuration(detail.durationMs)}</span>