Skip to content

Commit

Permalink
Don't show 'Upgrade available' for agents in hosted policies
Browse files Browse the repository at this point in the history
  • Loading branch information
John Schulz committed Apr 19, 2021
1 parent 4540a94 commit fbbbbfa
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ export const AgentListPage: React.FunctionComponent<{}> = () => {
<EuiFlexItem grow={false} className="eui-textNoWrap">
{safeMetadata(version)}
</EuiFlexItem>
{isAgentUpgradeable(agent, kibanaVersion) ? (
{isAgentSelectable(agent) && isAgentUpgradeable(agent, kibanaVersion) ? (
<EuiFlexItem grow={false}>
<EuiText color="subdued" size="xs" className="eui-textNoWrap">
<EuiIcon size="m" type="alert" color="warning" />
Expand Down Expand Up @@ -593,7 +593,15 @@ export const AgentListPage: React.FunctionComponent<{}> = () => {
emptyPrompt
)
}
items={totalAgents ? agents : []}
items={
totalAgents
? showUpgradeable
? agents.filter(
(agent) => isAgentSelectable(agent) && isAgentUpgradeable(agent, kibanaVersion)
)
: agents
: []
}
itemId="id"
columns={columns}
pagination={{
Expand Down

0 comments on commit fbbbbfa

Please sign in to comment.