Skip to content

Commit

Permalink
show tabs, but disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Dec 5, 2024
1 parent 08f9747 commit cdb4f05
Showing 1 changed file with 15 additions and 19 deletions.
34 changes: 15 additions & 19 deletions src/app/Events/Events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,9 @@ export const EventTabs: React.FC<TabsProps> = ({ targetSelected }) => {
<Tab eventKey={EventTab.EVENT_TEMPLATE} title="Event Templates">
<EventTemplates />
</Tab>
{targetSelected && (
<Tab eventKey={EventTab.EVENT_TYPE} title="Event types">
<EventTypes />
</Tab>
)}
<Tab isAriaDisabled={!targetSelected} eventKey={EventTab.EVENT_TYPE} title="Event types">
<EventTypes />
</Tab>
</Tabs>
);
};
Expand Down Expand Up @@ -136,20 +134,18 @@ export const AgentTabs: React.FC<TabsProps> = ({ targetSelected }) => {
<Tab eventKey={AgentTab.AGENT_TEMPLATE} title="Probe Templates">
<AgentProbeTemplates agentDetected={agentDetected} />
</Tab>
{targetSelected && (
<Tab
eventKey={AgentTab.AGENT_PROBE}
title="Live Configuration"
isAriaDisabled={!agentDetected}
tooltip={
agentDetected ? undefined : (
<Tooltip content="JMC ByteCode Instrumentation Agent not detected for the selected Target JVM" />
)
}
>
<AgentLiveProbes />
</Tab>
)}
<Tab
eventKey={AgentTab.AGENT_PROBE}
title="Live Configuration"
isAriaDisabled={!targetSelected || !agentDetected}
tooltip={
agentDetected ? undefined : (
<Tooltip content="JMC ByteCode Instrumentation Agent not detected for the selected Target JVM" />
)
}
>
<AgentLiveProbes />
</Tab>
</Tabs>
);
};
Expand Down

0 comments on commit cdb4f05

Please sign in to comment.