@pagerduty/backstage-plugin 0.12.1-next.97 → 0.12.1-next.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/api/client.esm.js +151 -0
  2. package/dist/api/client.esm.js.map +1 -0
  3. package/dist/components/ChangeEvents/ChangeEventEmptyState.esm.js +17 -0
  4. package/dist/components/ChangeEvents/ChangeEventEmptyState.esm.js.map +1 -0
  5. package/dist/components/ChangeEvents/ChangeEventForbiddenState.esm.js +17 -0
  6. package/dist/components/ChangeEvents/ChangeEventForbiddenState.esm.js.map +1 -0
  7. package/dist/components/ChangeEvents/ChangeEventListItem.esm.js +70 -0
  8. package/dist/components/ChangeEvents/ChangeEventListItem.esm.js.map +1 -0
  9. package/dist/components/ChangeEvents/ChangeEvents.esm.js +45 -0
  10. package/dist/components/ChangeEvents/ChangeEvents.esm.js.map +1 -0
  11. package/dist/components/EntityPagerDutyCard/index.esm.js +29 -0
  12. package/dist/components/EntityPagerDutyCard/index.esm.js.map +1 -0
  13. package/dist/components/EntityPagerDutySmallCard/index.esm.js +29 -0
  14. package/dist/components/EntityPagerDutySmallCard/index.esm.js.map +1 -0
  15. package/dist/components/Errors/ForbiddenError.esm.js +24 -0
  16. package/dist/components/Errors/ForbiddenError.esm.js.map +1 -0
  17. package/dist/components/Errors/MissingTokenError.esm.js +24 -0
  18. package/dist/components/Errors/MissingTokenError.esm.js.map +1 -0
  19. package/dist/components/Errors/ServiceNotFoundError.esm.js +24 -0
  20. package/dist/components/Errors/ServiceNotFoundError.esm.js.map +1 -0
  21. package/dist/components/Escalation/EscalationPolicy.esm.js +64 -0
  22. package/dist/components/Escalation/EscalationPolicy.esm.js.map +1 -0
  23. package/dist/components/Escalation/EscalationUser.esm.js +98 -0
  24. package/dist/components/Escalation/EscalationUser.esm.js.map +1 -0
  25. package/dist/components/Escalation/EscalationUsersEmptyState.esm.js +20 -0
  26. package/dist/components/Escalation/EscalationUsersEmptyState.esm.js.map +1 -0
  27. package/dist/components/Escalation/EscalationUsersForbiddenState.esm.js +20 -0
  28. package/dist/components/Escalation/EscalationUsersForbiddenState.esm.js.map +1 -0
  29. package/dist/components/HomePagePagerDutyCard/Content.esm.js +9 -0
  30. package/dist/components/HomePagePagerDutyCard/Content.esm.js.map +1 -0
  31. package/dist/components/HomePagePagerDutyCard/index.esm.js +2 -0
  32. package/dist/components/HomePagePagerDutyCard/index.esm.js.map +1 -0
  33. package/dist/components/Incident/IncidentEmptyState.esm.js +27 -0
  34. package/dist/components/Incident/IncidentEmptyState.esm.js.map +1 -0
  35. package/dist/components/Incident/IncidentForbiddenState.esm.js +17 -0
  36. package/dist/components/Incident/IncidentForbiddenState.esm.js.map +1 -0
  37. package/dist/components/Incident/IncidentListItem.esm.js +114 -0
  38. package/dist/components/Incident/IncidentListItem.esm.js.map +1 -0
  39. package/dist/components/Incident/Incidents.esm.js +41 -0
  40. package/dist/components/Incident/Incidents.esm.js.map +1 -0
  41. package/dist/components/PagerDutyCard/index.esm.js +193 -0
  42. package/dist/components/PagerDutyCard/index.esm.js.map +1 -0
  43. package/dist/components/PagerDutyCardCommon/InsightsCard.esm.js +35 -0
  44. package/dist/components/PagerDutyCardCommon/InsightsCard.esm.js.map +1 -0
  45. package/dist/components/PagerDutyCardCommon/OpenServiceButton.esm.js +42 -0
  46. package/dist/components/PagerDutyCardCommon/OpenServiceButton.esm.js.map +1 -0
  47. package/dist/components/PagerDutyCardCommon/ServiceStandardsCard.esm.js +95 -0
  48. package/dist/components/PagerDutyCardCommon/ServiceStandardsCard.esm.js.map +1 -0
  49. package/dist/components/PagerDutyCardCommon/StatusCard.esm.js +102 -0
  50. package/dist/components/PagerDutyCardCommon/StatusCard.esm.js.map +1 -0
  51. package/dist/components/PagerDutyCardCommon/TriggerIncidentButton.esm.js +59 -0
  52. package/dist/components/PagerDutyCardCommon/TriggerIncidentButton.esm.js.map +1 -0
  53. package/dist/components/PagerDutySmallCard/index.esm.js +209 -0
  54. package/dist/components/PagerDutySmallCard/index.esm.js.map +1 -0
  55. package/dist/components/TriggerButton/index.esm.js +48 -0
  56. package/dist/components/TriggerButton/index.esm.js.map +1 -0
  57. package/dist/components/TriggerDialog/TriggerDialog.esm.js +94 -0
  58. package/dist/components/TriggerDialog/TriggerDialog.esm.js.map +1 -0
  59. package/dist/components/constants.esm.js +5 -0
  60. package/dist/components/constants.esm.js.map +1 -0
  61. package/dist/components/pagerDutyEntity.esm.js +13 -0
  62. package/dist/components/pagerDutyEntity.esm.js.map +1 -0
  63. package/dist/deprecated.esm.js +10 -0
  64. package/dist/deprecated.esm.js.map +1 -0
  65. package/dist/hooks/index.esm.js +10 -0
  66. package/dist/hooks/index.esm.js.map +1 -0
  67. package/dist/index.d.ts +9 -24
  68. package/dist/index.esm.js +6 -30
  69. package/dist/index.esm.js.map +1 -1
  70. package/dist/plugin.esm.js +71 -0
  71. package/dist/plugin.esm.js.map +1 -0
  72. package/package.json +19 -24
  73. package/dist/esm/index-84a03966.esm.js +0 -1626
  74. package/dist/esm/index-84a03966.esm.js.map +0 -1
  75. package/dist/esm/index-be994860.esm.js +0 -37
  76. package/dist/esm/index-be994860.esm.js.map +0 -1
  77. package/dist/esm/index-df69ef10.esm.js +0 -292
  78. package/dist/esm/index-df69ef10.esm.js.map +0 -1
@@ -1,292 +0,0 @@
1
- import React, { useState, useMemo } from 'react';
2
- import { Typography, Box, DialogTitle, DialogContent, DialogActions, Tooltip, IconButton, Grid } from '@material-ui/core';
3
- import { Page, Header, Content } from '@backstage/core-components';
4
- import EditIcon from '@mui/icons-material/Edit';
5
- import { useApi } from '@backstage/core-plugin-api';
6
- import { p as pagerDutyApiRef } from './index-84a03966.esm.js';
7
- import { QueryClient, QueryClientProvider, useQuery, useMutation } from '@tanstack/react-query';
8
- import { useMaterialReactTable, MRT_EditActionButtons, MaterialReactTable } from 'material-react-table';
9
- import { catalogApiRef } from '@backstage/plugin-catalog-react';
10
- import OpenInBrowserIcon from '@material-ui/icons/OpenInBrowser';
11
- import '@backstage/errors';
12
- import '@backstage/plugin-home-react';
13
- import 'luxon';
14
- import '../assets/emptystate.svg';
15
- import 'react-use/lib/useAsyncFn';
16
- import '@material-ui/lab';
17
- import '../assets/forbiddenstate.svg';
18
- import '@material-ui/core/Avatar';
19
- import '@material-ui/icons/Notifications';
20
- import 'react-use/lib/useAsync';
21
- import '@material-ui/icons/Link';
22
- import '../assets/PD-Green.svg';
23
- import '../assets/PD-White.svg';
24
- import 'validate-color';
25
- import '@material-ui/icons/Info';
26
- import '@material-ui/icons/CheckCircle';
27
- import '@material-ui/icons/RadioButtonUnchecked';
28
- import '@material-ui/core/styles';
29
- import 'react-use';
30
- import '@material-ui/lab/Alert/Alert';
31
- import '@backstage/catalog-model';
32
- import '@material-ui/icons/AddAlert';
33
- import '@material-ui/icons/ExpandMore';
34
-
35
- function getColorFromStatus(status) {
36
- switch (status) {
37
- case "InSync":
38
- return "green";
39
- case "OutOfSync":
40
- return "red";
41
- case "NotMapped":
42
- return "orange";
43
- default:
44
- return "gray";
45
- }
46
- }
47
- function makeReadable(status) {
48
- switch (status) {
49
- case "InSync":
50
- return "In Sync";
51
- case "OutOfSync":
52
- return "Out of Sync";
53
- case "NotMapped":
54
- return "Not Mapped";
55
- default:
56
- return "Refresh to Update";
57
- }
58
- }
59
- const ServiceMappingComponent = () => {
60
- const [entityMappings, setEntityMappings] = useState([]);
61
- const [catalogEntities, setCatalogEntities] = useState([]);
62
- const pagerDutyApi = useApi(pagerDutyApiRef);
63
- const catalogApi = useApi(catalogApiRef);
64
- function getCatalogEntityOptions() {
65
- const options = [];
66
- options.push({ value: "", label: "None" });
67
- catalogEntities.forEach((entity) => {
68
- const foundEntity = entityMappings.find(
69
- (item) => item.entityRef === entity.id
70
- );
71
- if (!foundEntity) {
72
- options.push({
73
- value: entity.id,
74
- label: entity.name
75
- });
76
- }
77
- });
78
- return options;
79
- }
80
- function useGetMappings() {
81
- return useQuery({
82
- queryKey: ["mappings"],
83
- queryFn: async () => {
84
- const { mappings: foundMappings } = await pagerDutyApi.getEntityMappings();
85
- setEntityMappings(foundMappings);
86
- return foundMappings;
87
- },
88
- refetchOnWindowFocus: false
89
- });
90
- }
91
- function useGetCatalogEntities() {
92
- return useQuery({
93
- queryKey: ["catalogEntities"],
94
- queryFn: async () => {
95
- const result = await catalogApi.getEntities({
96
- filter: { kind: "Component" }
97
- });
98
- const entities = [];
99
- result.items.forEach((entity) => {
100
- var _a, _b, _c, _d, _e, _f;
101
- entities.push({
102
- name: (_a = entity.metadata) == null ? void 0 : _a.name,
103
- id: (_c = (_b = entity.metadata) == null ? void 0 : _b.uid) != null ? _c : "",
104
- system: JSON.stringify((_d = entity.spec) == null ? void 0 : _d.system) || "",
105
- owner: JSON.stringify((_e = entity.spec) == null ? void 0 : _e.owner) || "",
106
- lifecycle: JSON.stringify((_f = entity.spec) == null ? void 0 : _f.lifecycle) || ""
107
- });
108
- });
109
- setCatalogEntities(entities);
110
- return entities;
111
- },
112
- refetchOnMount: false,
113
- refetchOnWindowFocus: false
114
- });
115
- }
116
- function useUpdateMapping() {
117
- return useMutation({
118
- mutationFn: async (mapping) => {
119
- return await pagerDutyApi.storeServiceMapping(
120
- mapping.serviceId,
121
- mapping.entityRef
122
- );
123
- }
124
- // client side optimistic update
125
- // onMutate: (newMappingInfo: PagerDutyEntityMapping) => {
126
- // queryClient.setQueryData(["updateMappings"], (prevMappings: any) =>
127
- // prevMappings?.map((prevMapping: PagerDutyEntityMapping) => {
128
- // if (prevMapping.serviceId === newMappingInfo.serviceId) {
129
- // newMappingInfo.entityName =
130
- // fetchedCatalogEntities.find(
131
- // (entity) => entity.id === newMappingInfo.entityRef
132
- // )?.name || "";
133
- // return newMappingInfo;
134
- // }
135
- // return prevMapping;
136
- // })
137
- // );
138
- // },
139
- });
140
- }
141
- const DenseTable = () => {
142
- const [validationErrors, setValidationErrors] = useState({});
143
- const columns = useMemo(
144
- () => [
145
- {
146
- accessorKey: "serviceId",
147
- header: "Service ID",
148
- visibleInShowHideMenu: false,
149
- enableEditing: false,
150
- Edit: () => null,
151
- Cell: ({ cell }) => /* @__PURE__ */ React.createElement(Typography, { variant: "body1", style: { fontWeight: 600 } }, cell.getValue())
152
- },
153
- {
154
- accessorKey: "serviceName",
155
- header: "PagerDuty Service",
156
- enableEditing: false
157
- },
158
- {
159
- accessorKey: "team",
160
- header: "Team",
161
- enableEditing: false
162
- },
163
- {
164
- accessorKey: "escalationPolicy",
165
- header: "Escalation Policy",
166
- enableEditing: false
167
- },
168
- {
169
- accessorKey: "entityRef",
170
- header: "Mapping",
171
- visibleInShowHideMenu: false,
172
- editVariant: "select",
173
- editSelectOptions: getCatalogEntityOptions(),
174
- muiEditTextFieldProps: {
175
- select: true,
176
- error: !!(validationErrors == null ? void 0 : validationErrors.state),
177
- helperText: validationErrors == null ? void 0 : validationErrors.state
178
- }
179
- },
180
- {
181
- accessorKey: "entityName",
182
- header: "Mapped Entity Name",
183
- enableEditing: false,
184
- Edit: () => null
185
- },
186
- {
187
- accessorKey: "status",
188
- header: "Status",
189
- enableEditing: false,
190
- Edit: () => null,
191
- Cell: ({ cell }) => /* @__PURE__ */ React.createElement(
192
- Box,
193
- {
194
- component: "span",
195
- bgcolor: getColorFromStatus(cell.getValue()),
196
- borderRadius: "0.25rem",
197
- color: "white",
198
- p: "0.25rem"
199
- },
200
- makeReadable(cell.getValue())
201
- )
202
- },
203
- {
204
- accessorKey: "serviceUrl",
205
- header: "Service URL",
206
- visibleInShowHideMenu: false,
207
- enableEditing: false,
208
- Edit: () => null
209
- }
210
- ],
211
- [validationErrors]
212
- );
213
- const {
214
- data: fetchedMappings = [],
215
- isError: isLoadingMappingsError,
216
- isFetching: isFetchingMappings,
217
- isLoading: isLoadingMappings
218
- } = useGetMappings();
219
- const {
220
- data: fetchedCatalogEntities = [],
221
- isError: isLoadingCatalogEntitiesError,
222
- isFetching: isFetchingCatalogEntities,
223
- isLoading: isLoadingCatalogEntities
224
- } = useGetCatalogEntities();
225
- const { mutateAsync: updateMapping, isPending: isUpdatingMapping } = useUpdateMapping();
226
- const handleSaveMapping = async ({ values, table }) => {
227
- var _a;
228
- setValidationErrors({});
229
- values.entityName = ((_a = fetchedCatalogEntities.find(
230
- (entity) => entity.id === values.entityRef
231
- )) == null ? void 0 : _a.name) || "";
232
- values.status = "RefreshToUpdate";
233
- await updateMapping(values);
234
- table.setEditingRow(null);
235
- };
236
- const openInBrowser = (url) => {
237
- window.open(url, "_blank", "noreferrer");
238
- };
239
- const dataTable = useMaterialReactTable({
240
- columns,
241
- data: fetchedMappings,
242
- editDisplayMode: "modal",
243
- // default ('row', 'cell', 'table', and 'custom' are also available)
244
- enableEditing: true,
245
- positionActionsColumn: "last",
246
- enableStickyHeader: true,
247
- enableFilters: true,
248
- getRowId: (row) => row.serviceId,
249
- muiToolbarAlertBannerProps: isLoadingMappingsError ? {
250
- color: "error",
251
- children: "Error loading data"
252
- } : void 0,
253
- muiTableContainerProps: {
254
- sx: {
255
- minHeight: "500px"
256
- }
257
- },
258
- onEditingRowCancel: () => setValidationErrors({}),
259
- onEditingRowSave: handleSaveMapping,
260
- // optionally customize modal content
261
- renderEditRowDialogContent: ({ table, row, internalEditComponents }) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(DialogTitle, null, "Edit Mapping"), /* @__PURE__ */ React.createElement(DialogContent, null, internalEditComponents, " "), /* @__PURE__ */ React.createElement(DialogActions, null, /* @__PURE__ */ React.createElement(MRT_EditActionButtons, { variant: "text", table, row }))),
262
- renderRowActions: ({ row, table }) => /* @__PURE__ */ React.createElement(Box, { sx: { display: "flex" } }, /* @__PURE__ */ React.createElement(Tooltip, { title: "Edit" }, /* @__PURE__ */ React.createElement(IconButton, { onClick: () => table.setEditingRow(row) }, /* @__PURE__ */ React.createElement(EditIcon, null))), /* @__PURE__ */ React.createElement(Tooltip, { title: "Open in PagerDuty" }, /* @__PURE__ */ React.createElement(
263
- IconButton,
264
- {
265
- onClick: () => openInBrowser(row.getValue("serviceUrl"))
266
- },
267
- /* @__PURE__ */ React.createElement(OpenInBrowserIcon, null)
268
- ))),
269
- state: {
270
- isLoading: isLoadingMappings || isLoadingCatalogEntities,
271
- isSaving: isUpdatingMapping,
272
- showAlertBanner: isLoadingMappingsError || isLoadingCatalogEntitiesError,
273
- showProgressBars: isFetchingMappings || isFetchingCatalogEntities,
274
- columnVisibility: {
275
- serviceId: false,
276
- entityRef: false,
277
- serviceUrl: false
278
- }
279
- }
280
- });
281
- return /* @__PURE__ */ React.createElement(MaterialReactTable, { table: dataTable });
282
- };
283
- const queryClient = new QueryClient();
284
- return /* @__PURE__ */ React.createElement(QueryClientProvider, { client: queryClient }, /* @__PURE__ */ React.createElement(DenseTable, null));
285
- };
286
-
287
- const PagerDutyPage = () => {
288
- return /* @__PURE__ */ React.createElement(Page, { themeId: "home" }, /* @__PURE__ */ React.createElement(Header, { title: "PagerDuty", subtitle: "Advanced configurations" }), /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 3, direction: "column" }, /* @__PURE__ */ React.createElement(Grid, { item: true }, /* @__PURE__ */ React.createElement(Typography, { variant: "h4" }, "Service to Entity mapping"), /* @__PURE__ */ React.createElement(Typography, { variant: "body1" }, "Easily map your services to entities in Backstage without the need to add anotations to all your projects."), /* @__PURE__ */ React.createElement(Typography, { variant: "body1" }, /* @__PURE__ */ React.createElement("b", null, "Warning: "), "Only 1:1 mapping is allowed at this time.")), /* @__PURE__ */ React.createElement(Grid, { item: true }, /* @__PURE__ */ React.createElement(ServiceMappingComponent, null)))));
289
- };
290
-
291
- export { PagerDutyPage };
292
- //# sourceMappingURL=index-df69ef10.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-df69ef10.esm.js","sources":["../../src/components/PagerDutyPage/ServiceMappingComponent.tsx","../../src/components/PagerDutyPage/index.tsx"],"sourcesContent":["import React, { useMemo, useState } from \"react\";\nimport {\n Box,\n DialogActions,\n DialogContent,\n DialogTitle,\n IconButton,\n Tooltip,\n Typography,\n} from \"@material-ui/core\";\nimport EditIcon from \"@mui/icons-material/Edit\";\nimport { PagerDutyEntityMapping } from \"@pagerduty/backstage-plugin-common\";\nimport { useApi } from \"@backstage/core-plugin-api\";\nimport { pagerDutyApiRef } from \"../../api\";\nimport {\n QueryClient,\n QueryClientProvider,\n useMutation,\n useQuery,\n} from \"@tanstack/react-query\";\nimport {\n MRT_ColumnDef,\n MRT_EditActionButtons,\n MRT_TableOptions,\n MaterialReactTable,\n useMaterialReactTable,\n} from \"material-react-table\";\nimport { catalogApiRef } from \"@backstage/plugin-catalog-react\";\nimport OpenInBrowser from \"@material-ui/icons/OpenInBrowser\";\n\ntype Service = {\n name: string; // \"Ads\"\n id: string; // \"QWe1j283n12j132\"\n system: string; // \"Production\"\n owner: string; // \"Mapped\"\n lifecycle: string; // \"Ads\"\n};\n\nfunction getColorFromStatus(status?: string) {\n switch (status) {\n case \"InSync\":\n return \"green\";\n case \"OutOfSync\":\n return \"red\";\n case \"NotMapped\":\n return \"orange\";\n default:\n return \"gray\";\n }\n}\n\nfunction makeReadable(status?: string) {\n switch (status) {\n case \"InSync\":\n return \"In Sync\";\n case \"OutOfSync\":\n return \"Out of Sync\";\n case \"NotMapped\":\n return \"Not Mapped\";\n default:\n return \"Refresh to Update\";\n }\n}\n\nexport const ServiceMappingComponent = () => {\n const [entityMappings, setEntityMappings] = useState<\n PagerDutyEntityMapping[]\n >([]);\n const [catalogEntities, setCatalogEntities] = useState<Service[]>([]);\n // const [entityOptions, setEntityOptions] = useState<CatalogEntityOptions[]>([]);\n\n const pagerDutyApi = useApi(pagerDutyApiRef);\n const catalogApi = useApi(catalogApiRef);\n\n // function fetchCatalogEntities() {\n // catalogApi\n // .getEntities({\n // filter: { kind: \"Component\" },\n // })\n // .then((result) => {\n // const entities: Service[] = [];\n // result.items.forEach((entity: any) => {\n // entities.push({\n // name: entity.metadata?.name,\n // id: entity.metadata?.uid ?? \"\",\n // system: JSON.stringify(entity.spec?.system) || \"\",\n // owner: JSON.stringify(entity.spec?.owner) || \"\",\n // lifecycle: JSON.stringify(entity.spec?.lifecycle) || \"\",\n // });\n // });\n\n // setCatalogEntities(entities);\n // });\n // }\n\n type CatalogEntityOptions = {\n value: string;\n label: string;\n };\n\n function getCatalogEntityOptions(): CatalogEntityOptions[] {\n const options: CatalogEntityOptions[] = [];\n // if (entityOptions.length === 0) {\n // initialize with empty object\n options.push({ value: \"\", label: \"None\" });\n // }\n\n catalogEntities.forEach((entity) => {\n // find entity with entity.id in entityMappings array\n const foundEntity = entityMappings.find(\n (item) => item.entityRef === entity.id\n );\n\n if (!foundEntity) {\n options.push({\n value: entity.id,\n label: entity.name,\n });\n }\n });\n\n // setEntityOptions(options);\n\n return options;\n }\n\n // READ hook (get mappings from api)\n function useGetMappings() {\n return useQuery<PagerDutyEntityMapping[]>({\n queryKey: [\"mappings\"],\n queryFn: async () => {\n // send api request here\n const { mappings: foundMappings } =\n await pagerDutyApi.getEntityMappings();\n\n setEntityMappings(foundMappings);\n\n return foundMappings;\n },\n refetchOnWindowFocus: false,\n });\n }\n\n // READ hook (get catalog entities from api)\n function useGetCatalogEntities() {\n return useQuery<Service[]>({\n queryKey: [\"catalogEntities\"],\n queryFn: async () => {\n // send api request here\n const result = await catalogApi.getEntities({\n filter: { kind: \"Component\" },\n });\n\n const entities: Service[] = [];\n result.items.forEach((entity: any) => {\n entities.push({\n name: entity.metadata?.name,\n id: entity.metadata?.uid ?? \"\",\n system: JSON.stringify(entity.spec?.system) || \"\",\n owner: JSON.stringify(entity.spec?.owner) || \"\",\n lifecycle: JSON.stringify(entity.spec?.lifecycle) || \"\",\n });\n });\n\n setCatalogEntities(entities);\n\n return entities;\n },\n refetchOnMount: false,\n refetchOnWindowFocus: false,\n });\n }\n\n // UPDATE hook (put mapping in api)\n function useUpdateMapping() {\n // const queryClient = useQueryClient();\n return useMutation({\n mutationFn: async (mapping: PagerDutyEntityMapping) => {\n return await pagerDutyApi.storeServiceMapping(\n mapping.serviceId,\n mapping.entityRef\n );\n },\n // client side optimistic update\n // onMutate: (newMappingInfo: PagerDutyEntityMapping) => {\n // queryClient.setQueryData([\"updateMappings\"], (prevMappings: any) =>\n // prevMappings?.map((prevMapping: PagerDutyEntityMapping) => {\n // if (prevMapping.serviceId === newMappingInfo.serviceId) {\n // newMappingInfo.entityName =\n // fetchedCatalogEntities.find(\n // (entity) => entity.id === newMappingInfo.entityRef\n // )?.name || \"\";\n\n // return newMappingInfo;\n // }\n // return prevMapping;\n // })\n // );\n // },\n });\n }\n\n const DenseTable = () => {\n const [validationErrors, setValidationErrors] = useState<\n Record<string, string | undefined>\n >({});\n\n const columns = useMemo<MRT_ColumnDef<PagerDutyEntityMapping>[]>(\n () => [\n {\n accessorKey: \"serviceId\",\n header: \"Service ID\",\n visibleInShowHideMenu: false,\n enableEditing: false,\n Edit: () => null,\n Cell: ({ cell }) => (\n <Typography variant=\"body1\" style={{ fontWeight: 600 }}>\n {cell.getValue<string>()}\n </Typography>\n ),\n },\n {\n accessorKey: \"serviceName\",\n header: \"PagerDuty Service\",\n enableEditing: false,\n },\n {\n accessorKey: \"team\",\n header: \"Team\",\n enableEditing: false,\n },\n {\n accessorKey: \"escalationPolicy\",\n header: \"Escalation Policy\",\n enableEditing: false,\n },\n {\n accessorKey: \"entityRef\",\n header: \"Mapping\",\n visibleInShowHideMenu: false,\n editVariant: \"select\",\n editSelectOptions: getCatalogEntityOptions(),\n muiEditTextFieldProps: {\n select: true,\n error: !!validationErrors?.state,\n helperText: validationErrors?.state,\n },\n },\n {\n accessorKey: \"entityName\",\n header: \"Mapped Entity Name\",\n enableEditing: false,\n Edit: () => null,\n },\n {\n accessorKey: \"status\",\n header: \"Status\",\n enableEditing: false,\n Edit: () => null,\n Cell: ({ cell }) => (\n <Box\n component=\"span\"\n bgcolor={getColorFromStatus(cell.getValue<string>())}\n borderRadius=\"0.25rem\"\n color=\"white\"\n p=\"0.25rem\"\n >\n {makeReadable(cell.getValue<string>())}\n </Box>\n ),\n },\n {\n accessorKey: \"serviceUrl\",\n header: \"Service URL\",\n visibleInShowHideMenu: false,\n enableEditing: false,\n Edit: () => null,\n },\n ],\n [validationErrors]\n );\n\n // call READ hook\n const {\n data: fetchedMappings = [],\n isError: isLoadingMappingsError,\n isFetching: isFetchingMappings,\n isLoading: isLoadingMappings,\n } = useGetMappings();\n\n // call READ hook\n const {\n data: fetchedCatalogEntities = [],\n isError: isLoadingCatalogEntitiesError,\n isFetching: isFetchingCatalogEntities,\n isLoading: isLoadingCatalogEntities,\n } = useGetCatalogEntities();\n\n // call UPDATE hook\n const { mutateAsync: updateMapping, isPending: isUpdatingMapping } =\n useUpdateMapping();\n\n // UPDATE action\n const handleSaveMapping: MRT_TableOptions<PagerDutyEntityMapping>[\"onEditingRowSave\"] =\n async ({ values, table }) => {\n setValidationErrors({});\n values.entityName =\n fetchedCatalogEntities.find(\n (entity) => entity.id === values.entityRef\n )?.name || \"\";\n values.status = \"RefreshToUpdate\";\n await updateMapping(values);\n table.setEditingRow(null); // exit editing mode\n };\n\n const openInBrowser = (url: string) => {\n window.open(url, \"_blank\", \"noreferrer\");\n };\n\n const dataTable = useMaterialReactTable({\n columns,\n data: fetchedMappings,\n editDisplayMode: \"modal\", // default ('row', 'cell', 'table', and 'custom' are also available)\n enableEditing: true,\n positionActionsColumn: \"last\",\n enableStickyHeader: true,\n enableFilters: true,\n getRowId: (row) => row.serviceId,\n muiToolbarAlertBannerProps: isLoadingMappingsError\n ? {\n color: \"error\",\n children: \"Error loading data\",\n }\n : undefined,\n muiTableContainerProps: {\n sx: {\n minHeight: \"500px\",\n },\n },\n onEditingRowCancel: () => setValidationErrors({}),\n onEditingRowSave: handleSaveMapping,\n // optionally customize modal content\n renderEditRowDialogContent: ({ table, row, internalEditComponents }) => (\n <>\n <DialogTitle>Edit Mapping</DialogTitle>\n <DialogContent>{internalEditComponents} </DialogContent>\n <DialogActions>\n <MRT_EditActionButtons variant=\"text\" table={table} row={row} />\n </DialogActions>\n </>\n ),\n renderRowActions: ({ row, table }) => (\n <Box sx={{ display: \"flex\" }}>\n <Tooltip title=\"Edit\">\n <IconButton onClick={() => table.setEditingRow(row)}>\n <EditIcon />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"Open in PagerDuty\">\n <IconButton\n onClick={() => openInBrowser(row.getValue(\"serviceUrl\"))}\n >\n <OpenInBrowser />\n </IconButton>\n </Tooltip>\n </Box>\n ),\n state: {\n isLoading: isLoadingMappings || isLoadingCatalogEntities,\n isSaving: isUpdatingMapping,\n showAlertBanner:\n isLoadingMappingsError || isLoadingCatalogEntitiesError,\n showProgressBars: isFetchingMappings || isFetchingCatalogEntities,\n columnVisibility: {\n serviceId: false,\n entityRef: false,\n serviceUrl: false,\n },\n },\n });\n\n return <MaterialReactTable table={dataTable} />;\n };\n\n const queryClient = new QueryClient();\n\n return (\n <QueryClientProvider client={queryClient}>\n <DenseTable />\n </QueryClientProvider>\n );\n};\n","import React from \"react\";\nimport { Grid, Typography } from \"@material-ui/core\";\nimport { Header, Page, Content } from \"@backstage/core-components\";\nimport { ServiceMappingComponent } from \"./ServiceMappingComponent\";\n\n/** @public */\nexport const PagerDutyPage = () => {\n return (\n <Page themeId=\"home\">\n <Header title=\"PagerDuty\" subtitle=\"Advanced configurations\" />\n <Content>\n <Grid container spacing={3} direction=\"column\">\n <Grid item>\n <Typography variant=\"h4\">Service to Entity mapping</Typography>\n <Typography variant=\"body1\">\n Easily map your services to entities in Backstage without the need to add anotations to all your projects.\n </Typography>\n <Typography variant=\"body1\">\n <b>Warning: </b>Only 1:1 mapping is allowed at this time.\n </Typography>\n </Grid>\n <Grid item>\n <ServiceMappingComponent />\n </Grid>\n </Grid>\n </Content>\n </Page>\n );\n};\n"],"names":["OpenInBrowser"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,SAAS,mBAAmB,MAAiB,EAAA;AAC3C,EAAA,QAAQ,MAAQ;AAAA,IACd,KAAK,QAAA;AAC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