mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Send tab query param through when returning from template save
This commit is contained in:
committed by
Tom Ratcliffe
parent
933cc3f075
commit
94ad66998f
@@ -22,6 +22,7 @@ import {
|
||||
Box,
|
||||
} from '@grafana/ui';
|
||||
import { useCleanup } from 'app/core/hooks/useCleanup';
|
||||
import { ActiveTab as ContactPointsActiveTabs } from 'app/features/alerting/unified/components/contact-points/ContactPoints';
|
||||
import { AlertManagerCortexConfig, TestTemplateAlert } from 'app/plugins/datasource/alertmanager/types';
|
||||
import { useDispatch } from 'app/types';
|
||||
|
||||
@@ -146,6 +147,7 @@ export const TemplateForm = ({ existing, alertManagerSourceName, config, provena
|
||||
oldConfig: config,
|
||||
successMessage: 'Template saved.',
|
||||
redirectPath: '/alerting/notifications',
|
||||
redirectSearch: `tab=${ContactPointsActiveTabs.NotificationTemplates}`,
|
||||
})
|
||||
);
|
||||
};
|
||||
@@ -176,7 +178,9 @@ export const TemplateForm = ({ existing, alertManagerSourceName, config, provena
|
||||
</Button>
|
||||
<LinkButton
|
||||
disabled={loading}
|
||||
href={makeAMLink('alerting/notifications', alertManagerSourceName)}
|
||||
href={makeAMLink('alerting/notifications', alertManagerSourceName, {
|
||||
tab: ContactPointsActiveTabs.NotificationTemplates,
|
||||
})}
|
||||
variant="secondary"
|
||||
size="sm"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user