Skip to content

Commit

Permalink
Fix breadcrumbs on agent policy sub-tabs (elastic#106844)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpollich authored and vadimkibana committed Aug 8, 2021
1 parent 08fc41a commit dd0d717
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
import React, { memo } from 'react';

import type { AgentPolicy, PackagePolicy } from '../../../../../types';
import { useBreadcrumbs } from '../../../../../hooks';

import { NoPackagePolicies } from './no_package_policies';
import { PackagePoliciesTable } from './package_policies_table';

export const PackagePoliciesView = memo<{ agentPolicy: AgentPolicy }>(({ agentPolicy }) => {
useBreadcrumbs('policy_details', { policyName: agentPolicy.name });

if (agentPolicy.package_policies.length === 0) {
return <NoPackagePolicies policyId={agentPolicy.id} />;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
useConfig,
sendGetAgentStatus,
useAgentPolicyRefresh,
useBreadcrumbs,
} from '../../../../../hooks';
import {
AgentPolicyForm,
Expand All @@ -43,6 +44,7 @@ const FormWrapper = styled.div`

export const SettingsView = memo<{ agentPolicy: AgentPolicy }>(
({ agentPolicy: originalAgentPolicy }) => {
useBreadcrumbs('policy_details', { policyName: originalAgentPolicy.name });
const { notifications } = useStartServices();
const {
agents: { enabled: isFleetEnabled },
Expand Down

0 comments on commit dd0d717

Please sign in to comment.