diff --git a/public/app/features/alerting/unified/components/notification-policies/Policy.tsx b/public/app/features/alerting/unified/components/notification-policies/Policy.tsx index 1266590af80..b6ba61d28c5 100644 --- a/public/app/features/alerting/unified/components/notification-policies/Policy.tsx +++ b/public/app/features/alerting/unified/components/notification-policies/Policy.tsx @@ -34,7 +34,7 @@ import { AlertmanagerAction, useAlertmanagerAbilities, useAlertmanagerAbility } import { INTEGRATION_ICONS } from '../../types/contact-points'; import { normalizeMatchers } from '../../utils/matchers'; import { createContactPointLink, createMuteTimingLink } from '../../utils/misc'; -import { InhertitableProperties, getInheritedProperties } from '../../utils/notification-policies'; +import { InheritableProperties, getInheritedProperties } from '../../utils/notification-policies'; import { Authorize } from '../Authorize'; import { HoverCard } from '../HoverCard'; import { Label } from '../Label'; @@ -53,7 +53,7 @@ interface PolicyComponentProps { contactPointsState?: ReceiversState; readOnly?: boolean; provisioned?: boolean; - inheritedProperties?: Partial; + inheritedProperties?: Partial; routesMatchingFilters?: RouteWithID[]; // routeAlertGroupsMap?: Map; @@ -239,7 +239,7 @@ const Policy = (props: PolicyComponentProps) => { { const childInheritedProperties = getInheritedProperties(currentRoute, child, inheritedProperties); // This child is autogenerated if it's the autogenerated root or if it's a child of an autogenerated policy. const isThisChildAutoGenerated = isAutoGeneratedRootAndSimplifiedEnabled(child) || isAutoGenerated; - /* pass the "readOnly" prop from the parent, because for any child policy , if its parent it's not editable, + /* pass the "readOnly" prop from the parent, because for any child policy , if its parent it's not editable, then the child policy should not be editable either */ const isThisChildReadOnly = readOnly || provisioned || isAutoGenerated; @@ -319,7 +319,7 @@ interface MetadataRowProps { groupBy?: string[]; muteTimings?: string[]; timingOptions?: TimingOptions; - inheritedProperties?: Partial; + inheritedProperties?: Partial; alertManagerSourceName: string; receivers: Receiver[]; matchingAlertGroups?: AlertmanagerGroup[]; @@ -571,19 +571,25 @@ function AutogeneratedRootIndicator() { return Auto-generated policies; } -const InheritedProperties: FC<{ properties: InhertitableProperties }> = ({ properties }) => ( +const InheritedProperties: FC<{ properties: InheritableProperties }> = ({ properties }) => ( - {Object.entries(properties).map(([key, value]) => ( -