44 selectTemplatesByGroup ,
55 systemNotificationTemplates ,
66} from "api/queries/notifications" ;
7+ import { FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge" ;
78import { Loader } from "components/Loader/Loader" ;
9+ import { SettingsHeader } from "components/SettingsHeader/SettingsHeader" ;
810import { TabLink , Tabs , TabsList } from "components/Tabs/Tabs" ;
911import { useSearchParamsKey } from "hooks/useSearchParamsKey" ;
1012import { useDeploymentSettings } from "modules/management/DeploymentSettingsProvider" ;
@@ -14,9 +16,11 @@ import type { FC } from "react";
1416import { Helmet } from "react-helmet-async" ;
1517import { useQueries } from "react-query" ;
1618import { deploymentGroupHasParent } from "utils/deployOptions" ;
19+ import { docs } from "utils/docs" ;
1720import { pageTitle } from "utils/page" ;
1821import OptionsTable from "../OptionsTable" ;
1922import { NotificationEvents } from "./NotificationEvents" ;
23+ import { Troubleshooting } from "./Troubleshooting" ;
2024
2125export const NotificationsPage : FC = ( ) => {
2226 const { deploymentConfig } = useDeploymentSettings ( ) ;
@@ -40,48 +44,62 @@ export const NotificationsPage: FC = () => {
4044 < Helmet >
4145 < title > { pageTitle ( "Notifications Settings" ) } </ title >
4246 </ Helmet >
43- < Section
44- title = "Notifications"
47+ < SettingsHeader
48+ title = {
49+ < >
50+ Notifications
51+ < span css = { { position : "relative" , top : "-6px" } } >
52+ < FeatureStageBadge
53+ contentType = { "beta" }
54+ size = "lg"
55+ css = { { marginBottom : "5px" , fontSize : "0.75rem" } }
56+ />
57+ </ span >
58+ </ >
59+ }
4560 description = "Control delivery methods for notifications on this deployment."
46- layout = "fluid"
47- featureStage = { "beta" }
48- >
49- < Tabs active = { tabState . value } >
50- < TabsList >
51- < TabLink to = "?tab=events" value = "events" >
52- Events
53- </ TabLink >
54- < TabLink to = "?tab=settings" value = "settings" >
55- Settings
56- </ TabLink >
57- </ TabsList >
58- </ Tabs >
61+ docsHref = { docs ( "/admin/monitoring/notifications" ) }
62+ />
63+ < Tabs active = { tabState . value } >
64+ < TabsList >
65+ < TabLink to = "?tab=events" value = "events" >
66+ Events
67+ </ TabLink >
68+ < TabLink to = "?tab=settings" value = "settings" >
69+ Settings
70+ </ TabLink >
71+ < TabLink to = "?tab=troubleshooting" value = "troubleshooting" >
72+ Troubleshooting
73+ </ TabLink >
74+ </ TabsList >
75+ </ Tabs >
5976
60- < div css = { styles . content } >
61- { ready ? (
62- tabState . value === "events" ? (
63- < NotificationEvents
64- templatesByGroup = { templatesByGroup . data }
65- deploymentConfig = { deploymentConfig . config }
66- defaultMethod = { castNotificationMethod (
67- dispatchMethods . data . default ,
68- ) }
69- availableMethods = { dispatchMethods . data . available . map (
70- castNotificationMethod ,
71- ) }
72- />
73- ) : (
74- < OptionsTable
75- options = { deploymentConfig . options . filter ( ( o ) =>
76- deploymentGroupHasParent ( o . group , "Notifications" ) ,
77- ) }
78- />
79- )
77+ < div css = { styles . content } >
78+ { ready ? (
79+ tabState . value === "events" ? (
80+ < NotificationEvents
81+ templatesByGroup = { templatesByGroup . data }
82+ deploymentConfig = { deploymentConfig . config }
83+ defaultMethod = { castNotificationMethod (
84+ dispatchMethods . data . default ,
85+ ) }
86+ availableMethods = { dispatchMethods . data . available . map (
87+ castNotificationMethod ,
88+ ) }
89+ />
90+ ) : tabState . value === "troubleshooting" ? (
91+ < Troubleshooting />
8092 ) : (
81- < Loader />
82- ) }
83- </ div >
84- </ Section >
93+ < OptionsTable
94+ options = { deploymentConfig . options . filter ( ( o ) =>
95+ deploymentGroupHasParent ( o . group , "Notifications" ) ,
96+ ) }
97+ />
98+ )
99+ ) : (
100+ < Loader />
101+ ) }
102+ </ div >
85103 </ >
86104 ) ;
87105} ;
0 commit comments