diff --git a/public/app/features/alerting/unified/components/amroutes/AmRoutesExpandedForm.tsx b/public/app/features/alerting/unified/components/amroutes/AmRoutesExpandedForm.tsx index 5a4e64b7696..1aa1871891c 100644 --- a/public/app/features/alerting/unified/components/amroutes/AmRoutesExpandedForm.tsx +++ b/public/app/features/alerting/unified/components/amroutes/AmRoutesExpandedForm.tsx @@ -54,21 +54,21 @@ export const AmRoutesExpandedForm: FC = ({ onCancel, {({ fields, append, remove }) => ( <> -
Matchers
+
Matching labels
{fields.map((field, index) => { const localPath = `matchers[${index}]`; - return ( = ({ onCancel, diff --git a/public/app/features/alerting/unified/components/amroutes/AmRoutesExpandedRead.tsx b/public/app/features/alerting/unified/components/amroutes/AmRoutesExpandedRead.tsx index 17462080798..4c918b98c63 100644 --- a/public/app/features/alerting/unified/components/amroutes/AmRoutesExpandedRead.tsx +++ b/public/app/features/alerting/unified/components/amroutes/AmRoutesExpandedRead.tsx @@ -38,30 +38,34 @@ export const AmRoutesExpandedRead: FC = ({ onChange,
{repeatInterval}
Nested policies
- { - setIsAddMode(false); - setSubroutes((subroutes) => { - const newSubroutes = [...subroutes]; - newSubroutes.pop(); - - return newSubroutes; - }); - }} - onChange={(newRoutes) => { - onChange({ - ...routes, - routes: newRoutes, - }); - - if (isAddMode) { + {!!subroutes.length ? ( + { setIsAddMode(false); - } - }} - receivers={receivers} - routes={subroutes} - /> + setSubroutes((subroutes) => { + const newSubroutes = [...subroutes]; + newSubroutes.pop(); + + return newSubroutes; + }); + }} + onChange={(newRoutes) => { + onChange({ + ...routes, + routes: newRoutes, + }); + + if (isAddMode) { + setIsAddMode(false); + } + }} + receivers={receivers} + routes={subroutes} + /> + ) : ( +

No nested policies configured.

+ )} {!isAddMode && (