Add agent runs tab to detail page
This commit is contained in:
@@ -311,7 +311,12 @@ export function AgentDetail() {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const canonicalTab = activeView === "configuration" ? "configuration" : "dashboard";
|
const canonicalTab =
|
||||||
|
activeView === "configuration"
|
||||||
|
? "configuration"
|
||||||
|
: activeView === "runs"
|
||||||
|
? "runs"
|
||||||
|
: "dashboard";
|
||||||
if (routeAgentRef !== canonicalAgentRef || urlTab !== canonicalTab) {
|
if (routeAgentRef !== canonicalAgentRef || urlTab !== canonicalTab) {
|
||||||
navigate(`/agents/${canonicalAgentRef}/${canonicalTab}`, { replace: true });
|
navigate(`/agents/${canonicalAgentRef}/${canonicalTab}`, { replace: true });
|
||||||
return;
|
return;
|
||||||
@@ -558,15 +563,16 @@ export function AgentDetail() {
|
|||||||
|
|
||||||
{!urlRunId && (
|
{!urlRunId && (
|
||||||
<Tabs
|
<Tabs
|
||||||
value={activeView === "configuration" ? "configuration" : "dashboard"}
|
value={activeView}
|
||||||
onValueChange={(value) => navigate(`/agents/${canonicalAgentRef}/${value}`)}
|
onValueChange={(value) => navigate(`/agents/${canonicalAgentRef}/${value}`)}
|
||||||
>
|
>
|
||||||
<PageTabBar
|
<PageTabBar
|
||||||
items={[
|
items={[
|
||||||
{ value: "dashboard", label: "Dashboard" },
|
{ value: "dashboard", label: "Dashboard" },
|
||||||
{ value: "configuration", label: "Configuration" },
|
{ value: "configuration", label: "Configuration" },
|
||||||
|
{ value: "runs", label: "Runs" },
|
||||||
]}
|
]}
|
||||||
value={activeView === "configuration" ? "configuration" : "dashboard"}
|
value={activeView}
|
||||||
onValueChange={(value) => navigate(`/agents/${canonicalAgentRef}/${value}`)}
|
onValueChange={(value) => navigate(`/agents/${canonicalAgentRef}/${value}`)}
|
||||||
/>
|
/>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|||||||
Reference in New Issue
Block a user