Skip to content

Commit c0e47ba

Browse files
Menu Tweaks and Rename Notifications to Events (#2639)
- Rename notifications to events. - Add categories to event destinations - Menu changes Co-authored-by: jinapurapu <65002498+jinapurapu@users.noreply.github.com>
1 parent 894f6ce commit c0e47ba

31 files changed

+200
-235
lines changed

portal-ui/src/common/SecureComponent/permissions.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,9 @@ export const IAM_PAGES = {
204204
/* Documentation **/
205205
DOCUMENTATION: "/documentation",
206206
/* TBD ? */
207-
NOTIFICATIONS_ENDPOINTS: "/settings/notification-endpoints",
208-
NOTIFICATIONS_ENDPOINTS_ADD: "/settings/notification-endpoints/add",
209-
NOTIFICATIONS_ENDPOINTS_ADD_SERVICE:
210-
"/settings/notification-endpoints/add/:service",
207+
EVENT_DESTINATIONS: "/settings/event-destinations",
208+
EVENT_DESTINATIONS_ADD: "/settings/event-destinations/add",
209+
EVENT_DESTINATIONS_ADD_SERVICE: "/settings/event-destinations/add/:service",
211210
TIERS: "/settings/tiers",
212211
TIERS_ADD: "/settings/tiers/add",
213212
TIERS_ADD_SERVICE: "/settings/tiers/add/:service",
@@ -412,15 +411,15 @@ export const IAM_PAGES_PERMISSIONS = {
412411
[IAM_PAGES.SETTINGS_VIEW]: [
413412
IAM_SCOPES.ADMIN_CONFIG_UPDATE, // displays configuration list
414413
],
415-
[IAM_PAGES.NOTIFICATIONS_ENDPOINTS_ADD_SERVICE]: [
414+
[IAM_PAGES.EVENT_DESTINATIONS_ADD_SERVICE]: [
416415
IAM_SCOPES.ADMIN_SERVER_INFO,
417416
IAM_SCOPES.ADMIN_CONFIG_UPDATE,
418417
],
419-
[IAM_PAGES.NOTIFICATIONS_ENDPOINTS_ADD]: [
418+
[IAM_PAGES.EVENT_DESTINATIONS_ADD]: [
420419
IAM_SCOPES.ADMIN_SERVER_INFO,
421420
IAM_SCOPES.ADMIN_CONFIG_UPDATE,
422421
],
423-
[IAM_PAGES.NOTIFICATIONS_ENDPOINTS]: [
422+
[IAM_PAGES.EVENT_DESTINATIONS]: [
424423
IAM_SCOPES.ADMIN_SERVER_INFO, // displays notifications endpoints
425424
IAM_SCOPES.ADMIN_CONFIG_UPDATE, // displays create notification button
426425
],

portal-ui/src/screens/Console/Common/ContentBox.tsx

Lines changed: 0 additions & 40 deletions
This file was deleted.

portal-ui/src/screens/Console/Configurations/ConfigurationPanels/ConfigurationForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import React from "react";
1818
import { useLocation } from "react-router-dom";
1919
import Grid from "@mui/material/Grid";
2020
import { configurationElements } from "../utils";
21-
import EditConfiguration from "../../NotificationEndpoints/CustomForms/EditConfiguration";
21+
import EditConfiguration from "../../EventDestinations/CustomForms/EditConfiguration";
2222

2323
const ConfigurationsList = () => {
2424
const { pathname = "" } = useLocation();

portal-ui/src/screens/Console/Console.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ const RegisterOperator = React.lazy(() => import("./Support/RegisterOperator"));
6969

7070
const AddTenant = React.lazy(() => import("./Tenants/AddTenant/AddTenant"));
7171

72-
const NotificationEndpoints = React.lazy(
73-
() => import("./NotificationEndpoints/NotificationEndpoints")
72+
const EventDestinations = React.lazy(
73+
() => import("./EventDestinations/EventDestinations")
7474
);
75-
const AddNotificationEndpoint = React.lazy(
76-
() => import("./NotificationEndpoints/AddNotificationEndpoint")
75+
const AddEventDestination = React.lazy(
76+
() => import("./EventDestinations/AddEventDestination")
7777
);
78-
const NotificationTypeSelector = React.lazy(
79-
() => import("./NotificationEndpoints/NotificationTypeSelector")
78+
const EventTypeSelector = React.lazy(
79+
() => import("./EventDestinations/EventTypeSelector")
8080
);
8181

8282
const ListTiersConfiguration = React.lazy(
@@ -425,16 +425,16 @@ const Console = ({ classes }: IConsoleProps) => {
425425
path: IAM_PAGES.SETTINGS,
426426
},
427427
{
428-
component: AddNotificationEndpoint,
429-
path: IAM_PAGES.NOTIFICATIONS_ENDPOINTS_ADD_SERVICE,
428+
component: AddEventDestination,
429+
path: IAM_PAGES.EVENT_DESTINATIONS_ADD_SERVICE,
430430
},
431431
{
432-
component: NotificationTypeSelector,
433-
path: IAM_PAGES.NOTIFICATIONS_ENDPOINTS_ADD,
432+
component: EventTypeSelector,
433+
path: IAM_PAGES.EVENT_DESTINATIONS_ADD,
434434
},
435435
{
436-
component: NotificationEndpoints,
437-
path: IAM_PAGES.NOTIFICATIONS_ENDPOINTS,
436+
component: EventDestinations,
437+
path: IAM_PAGES.EVENT_DESTINATIONS,
438438
},
439439
{
440440
component: AddTierConfiguration,

portal-ui/src/screens/Console/NotificationEndpoints/AddNotificationEndpoint.tsx renamed to portal-ui/src/screens/Console/EventDestinations/AddEventDestination.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import {
2929
notifyMysql,
3030
notifyPostgres,
3131
removeEmptyFields,
32-
servicesList,
32+
destinationList,
3333
} from "./utils";
3434
import {
3535
modalBasic,
@@ -110,7 +110,7 @@ interface IAddNotificationEndpointProps {
110110
classes: any;
111111
}
112112

113-
const AddNotificationEndpoint = ({
113+
const AddEventDestination = ({
114114
saveAndRefresh,
115115
classes,
116116
}: IAddNotificationEndpointProps) => {
@@ -134,7 +134,7 @@ const AddNotificationEndpoint = ({
134134
.then(() => {
135135
setSaving(false);
136136
dispatch(setServerNeedsRestart(true));
137-
navigate(IAM_PAGES.NOTIFICATIONS_ENDPOINTS);
137+
navigate(IAM_PAGES.EVENT_DESTINATIONS);
138138
})
139139
.catch((err: ErrorResponseHandler) => {
140140
setSaving(false);
@@ -175,7 +175,7 @@ const AddNotificationEndpoint = ({
175175
}
176176
}
177177

178-
const targetElement = servicesList.find(
178+
const targetElement = destinationList.find(
179179
(element) => element.actionTrigger === service
180180
);
181181

@@ -186,7 +186,7 @@ const AddNotificationEndpoint = ({
186186
<Fragment>
187187
<BackLink
188188
label="Notification Endpoint"
189-
onClick={() => navigate(IAM_PAGES.NOTIFICATIONS_ENDPOINTS_ADD)}
189+
onClick={() => navigate(IAM_PAGES.EVENT_DESTINATIONS_ADD)}
190190
/>
191191
</Fragment>
192192
}
@@ -230,7 +230,7 @@ const AddNotificationEndpoint = ({
230230
type="submit"
231231
variant="callAction"
232232
disabled={saving}
233-
label={"Save Notification Target"}
233+
label={"Save Event Destination"}
234234
/>
235235
</Grid>
236236
</div>
@@ -242,4 +242,4 @@ const AddNotificationEndpoint = ({
242242
);
243243
};
244244

245-
export default withStyles(styles)(AddNotificationEndpoint);
245+
export default withStyles(styles)(AddEventDestination);

portal-ui/src/screens/Console/NotificationEndpoints/ConfirmDeleteTargetModal.tsx renamed to portal-ui/src/screens/Console/EventDestinations/ConfirmDeleteDestinationModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import ConfirmDialog from "../Common/ModalWrapper/ConfirmDialog";
33
import { ConfirmModalIcon } from "mds";
44
import { DialogContentText } from "@mui/material";
55

6-
const ConfirmDeleteTargetModal = ({
6+
const ConfirmDeleteDestinationModal = ({
77
onConfirm,
88
onClose,
99
serviceName,
@@ -36,4 +36,4 @@ const ConfirmDeleteTargetModal = ({
3636
);
3737
};
3838

39-
export default ConfirmDeleteTargetModal;
39+
export default ConfirmDeleteDestinationModal;

0 commit comments

Comments
 (0)