4
4
selectTemplatesByGroup ,
5
5
systemNotificationTemplates ,
6
6
} from "api/queries/notifications" ;
7
+ import { FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge" ;
7
8
import { Loader } from "components/Loader/Loader" ;
9
+ import { SettingsHeader } from "components/SettingsHeader/SettingsHeader" ;
8
10
import { TabLink , Tabs , TabsList } from "components/Tabs/Tabs" ;
9
11
import { useSearchParamsKey } from "hooks/useSearchParamsKey" ;
10
12
import { useDeploymentSettings } from "modules/management/DeploymentSettingsProvider" ;
@@ -14,9 +16,11 @@ import type { FC } from "react";
14
16
import { Helmet } from "react-helmet-async" ;
15
17
import { useQueries } from "react-query" ;
16
18
import { deploymentGroupHasParent } from "utils/deployOptions" ;
19
+ import { docs } from "utils/docs" ;
17
20
import { pageTitle } from "utils/page" ;
18
21
import OptionsTable from "../OptionsTable" ;
19
22
import { NotificationEvents } from "./NotificationEvents" ;
23
+ import { Troubleshooting } from "./Troubleshooting" ;
20
24
21
25
export const NotificationsPage : FC = ( ) => {
22
26
const { deploymentConfig } = useDeploymentSettings ( ) ;
@@ -40,48 +44,62 @@ export const NotificationsPage: FC = () => {
40
44
< Helmet >
41
45
< title > { pageTitle ( "Notifications Settings" ) } </ title >
42
46
</ 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
+ }
45
60
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 >
59
76
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 />
80
92
) : (
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 >
85
103
</ >
86
104
) ;
87
105
} ;
0 commit comments