@pagerduty/backstage-plugin 0.12.0-next.0 → 0.12.0-next.10
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.
- package/dist/esm/{index-b2126c44.esm.js → index-16ba060f.esm.js} +7 -10
- package/dist/esm/index-16ba060f.esm.js.map +1 -0
- package/dist/esm/index-6d0594e9.esm.js +232 -0
- package/dist/esm/index-6d0594e9.esm.js.map +1 -0
- package/dist/esm/{index-1b356448.esm.js → index-ca158d13.esm.js} +2 -2
- package/dist/esm/{index-1b356448.esm.js.map → index-ca158d13.esm.js.map} +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.esm.js +1 -1
- package/package.json +2 -1
- package/dist/esm/index-b2126c44.esm.js.map +0 -1
- package/dist/esm/index-ee12a947.esm.js +0 -315
- package/dist/esm/index-ee12a947.esm.js.map +0 -1
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Tooltip, Grid } from '@material-ui/core';
|
|
3
|
-
import { Progress, ResponseErrorPanel, Table, Page, Header, Content, ContentHeader } from '@backstage/core-components';
|
|
4
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
5
|
-
import useAsync from 'react-use/lib/useAsync';
|
|
6
|
-
|
|
7
|
-
const exampleServices = {
|
|
8
|
-
results: [
|
|
9
|
-
{
|
|
10
|
-
name: "Ads",
|
|
11
|
-
team: "Intelligence Team",
|
|
12
|
-
escalation_policy: "Intelligence",
|
|
13
|
-
oncall: [
|
|
14
|
-
{
|
|
15
|
-
name: "Carolyn Moore",
|
|
16
|
-
email: "carolyn.moore@example.com",
|
|
17
|
-
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Carolyn"
|
|
18
|
-
}
|
|
19
|
-
],
|
|
20
|
-
mapping: "Ads"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: "Cache",
|
|
24
|
-
team: "Web Team",
|
|
25
|
-
escalation_policy: "Web",
|
|
26
|
-
oncall: [
|
|
27
|
-
{
|
|
28
|
-
name: "Esma Berbero\u011Flu",
|
|
29
|
-
email: "esma.berberoglu@example.com",
|
|
30
|
-
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Esma"
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: "Catalog",
|
|
36
|
-
team: "Web Team",
|
|
37
|
-
escalation_policy: "Web",
|
|
38
|
-
oncall: [
|
|
39
|
-
{
|
|
40
|
-
name: "Isabella Rhodes",
|
|
41
|
-
email: "isabella.rhodes@example.com",
|
|
42
|
-
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Isabella"
|
|
43
|
-
}
|
|
44
|
-
]
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
name: "Checkout",
|
|
48
|
-
team: "Billing Team",
|
|
49
|
-
escalation_policy: "Billing",
|
|
50
|
-
oncall: [
|
|
51
|
-
{
|
|
52
|
-
name: "Derrick Carter",
|
|
53
|
-
email: "derrick.carter@example.com",
|
|
54
|
-
picture: "https://api.dicebear.com/6.x/open-peeps/svg?seed=Derrick"
|
|
55
|
-
}
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
// {
|
|
59
|
-
// gender: 'male',
|
|
60
|
-
// name: {
|
|
61
|
-
// title: 'Mr',
|
|
62
|
-
// first: 'Derrick',
|
|
63
|
-
// last: 'Carter',
|
|
64
|
-
// },
|
|
65
|
-
// email: 'derrick.carter@example.com',
|
|
66
|
-
// picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Derrick',
|
|
67
|
-
// nat: 'IE',
|
|
68
|
-
// },
|
|
69
|
-
// {
|
|
70
|
-
// gender: 'female',
|
|
71
|
-
// name: {
|
|
72
|
-
// title: 'Miss',
|
|
73
|
-
// first: 'Mattie',
|
|
74
|
-
// last: 'Lambert',
|
|
75
|
-
// },
|
|
76
|
-
// email: 'mattie.lambert@example.com',
|
|
77
|
-
// picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Mattie',
|
|
78
|
-
// nat: 'AU',
|
|
79
|
-
// },
|
|
80
|
-
// {
|
|
81
|
-
// gender: 'male',
|
|
82
|
-
// name: {
|
|
83
|
-
// title: 'Mr',
|
|
84
|
-
// first: 'Mijat',
|
|
85
|
-
// last: 'Rakić',
|
|
86
|
-
// },
|
|
87
|
-
// email: 'mijat.rakic@example.com',
|
|
88
|
-
// picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Mijat',
|
|
89
|
-
// nat: 'RS',
|
|
90
|
-
// },
|
|
91
|
-
// {
|
|
92
|
-
// gender: 'male',
|
|
93
|
-
// name: {
|
|
94
|
-
// title: 'Mr',
|
|
95
|
-
// first: 'Javier',
|
|
96
|
-
// last: 'Reid',
|
|
97
|
-
// },
|
|
98
|
-
// email: 'javier.reid@example.com',
|
|
99
|
-
// picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Javier',
|
|
100
|
-
// nat: 'US',
|
|
101
|
-
// },
|
|
102
|
-
// {
|
|
103
|
-
// gender: 'female',
|
|
104
|
-
// name: {
|
|
105
|
-
// title: 'Ms',
|
|
106
|
-
// first: 'Isabella',
|
|
107
|
-
// last: 'Li',
|
|
108
|
-
// },
|
|
109
|
-
// email: 'isabella.li@example.com',
|
|
110
|
-
// picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Isabella',
|
|
111
|
-
// nat: 'CA',
|
|
112
|
-
// },
|
|
113
|
-
// {
|
|
114
|
-
// gender: 'female',
|
|
115
|
-
// name: {
|
|
116
|
-
// title: 'Mrs',
|
|
117
|
-
// first: 'Stephanie',
|
|
118
|
-
// last: 'Garrett',
|
|
119
|
-
// },
|
|
120
|
-
// email: 'stephanie.garrett@example.com',
|
|
121
|
-
// picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Stephanie',
|
|
122
|
-
// nat: 'AU',
|
|
123
|
-
// },
|
|
124
|
-
// {
|
|
125
|
-
// gender: 'female',
|
|
126
|
-
// name: {
|
|
127
|
-
// title: 'Ms',
|
|
128
|
-
// first: 'Antonia',
|
|
129
|
-
// last: 'Núñez',
|
|
130
|
-
// },
|
|
131
|
-
// email: 'antonia.nunez@example.com',
|
|
132
|
-
// picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Antonia',
|
|
133
|
-
// nat: 'ES',
|
|
134
|
-
// },
|
|
135
|
-
// {
|
|
136
|
-
// gender: 'male',
|
|
137
|
-
// name: {
|
|
138
|
-
// title: 'Mr',
|
|
139
|
-
// first: 'Donald',
|
|
140
|
-
// last: 'Young',
|
|
141
|
-
// },
|
|
142
|
-
// email: 'donald.young@example.com',
|
|
143
|
-
// picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Donald',
|
|
144
|
-
// nat: 'US',
|
|
145
|
-
// },
|
|
146
|
-
// {
|
|
147
|
-
// gender: 'male',
|
|
148
|
-
// name: {
|
|
149
|
-
// title: 'Mr',
|
|
150
|
-
// first: 'Iegor',
|
|
151
|
-
// last: 'Holodovskiy',
|
|
152
|
-
// },
|
|
153
|
-
// email: 'iegor.holodovskiy@example.com',
|
|
154
|
-
// picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Iegor',
|
|
155
|
-
// nat: 'UA',
|
|
156
|
-
// },
|
|
157
|
-
// {
|
|
158
|
-
// gender: 'female',
|
|
159
|
-
// name: {
|
|
160
|
-
// title: 'Madame',
|
|
161
|
-
// first: 'Jessica',
|
|
162
|
-
// last: 'David',
|
|
163
|
-
// },
|
|
164
|
-
// email: 'jessica.david@example.com',
|
|
165
|
-
// picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Jessica',
|
|
166
|
-
// nat: 'CH',
|
|
167
|
-
// },
|
|
168
|
-
// {
|
|
169
|
-
// gender: 'female',
|
|
170
|
-
// name: {
|
|
171
|
-
// title: 'Ms',
|
|
172
|
-
// first: 'Eve',
|
|
173
|
-
// last: 'Martinez',
|
|
174
|
-
// },
|
|
175
|
-
// email: 'eve.martinez@example.com',
|
|
176
|
-
// picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Eve',
|
|
177
|
-
// nat: 'FR',
|
|
178
|
-
// },
|
|
179
|
-
// {
|
|
180
|
-
// gender: 'male',
|
|
181
|
-
// name: {
|
|
182
|
-
// title: 'Mr',
|
|
183
|
-
// first: 'Caleb',
|
|
184
|
-
// last: 'Silva',
|
|
185
|
-
// },
|
|
186
|
-
// email: 'caleb.silva@example.com',
|
|
187
|
-
// picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Caleb',
|
|
188
|
-
// nat: 'US',
|
|
189
|
-
// },
|
|
190
|
-
// {
|
|
191
|
-
// gender: 'female',
|
|
192
|
-
// name: {
|
|
193
|
-
// title: 'Miss',
|
|
194
|
-
// first: 'Marcia',
|
|
195
|
-
// last: 'Jenkins',
|
|
196
|
-
// },
|
|
197
|
-
// email: 'marcia.jenkins@example.com',
|
|
198
|
-
// picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Marcia',
|
|
199
|
-
// nat: 'US',
|
|
200
|
-
// },
|
|
201
|
-
// {
|
|
202
|
-
// gender: 'female',
|
|
203
|
-
// name: {
|
|
204
|
-
// title: 'Mrs',
|
|
205
|
-
// first: 'Mackenzie',
|
|
206
|
-
// last: 'Jones',
|
|
207
|
-
// },
|
|
208
|
-
// email: 'mackenzie.jones@example.com',
|
|
209
|
-
// picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Mackenzie',
|
|
210
|
-
// nat: 'NZ',
|
|
211
|
-
// },
|
|
212
|
-
// {
|
|
213
|
-
// gender: 'male',
|
|
214
|
-
// name: {
|
|
215
|
-
// title: 'Mr',
|
|
216
|
-
// first: 'Jeremiah',
|
|
217
|
-
// last: 'Gutierrez',
|
|
218
|
-
// },
|
|
219
|
-
// email: 'jeremiah.gutierrez@example.com',
|
|
220
|
-
// picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Jeremiah',
|
|
221
|
-
// nat: 'AU',
|
|
222
|
-
// },
|
|
223
|
-
// {
|
|
224
|
-
// gender: 'female',
|
|
225
|
-
// name: {
|
|
226
|
-
// title: 'Ms',
|
|
227
|
-
// first: 'Luciara',
|
|
228
|
-
// last: 'Souza',
|
|
229
|
-
// },
|
|
230
|
-
// email: 'luciara.souza@example.com',
|
|
231
|
-
// picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Luciara',
|
|
232
|
-
// nat: 'BR',
|
|
233
|
-
// },
|
|
234
|
-
// {
|
|
235
|
-
// gender: 'male',
|
|
236
|
-
// name: {
|
|
237
|
-
// title: 'Mr',
|
|
238
|
-
// first: 'Valgi',
|
|
239
|
-
// last: 'da Cunha',
|
|
240
|
-
// },
|
|
241
|
-
// email: 'valgi.dacunha@example.com',
|
|
242
|
-
// picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Valgi',
|
|
243
|
-
// nat: 'BR',
|
|
244
|
-
// },
|
|
245
|
-
]
|
|
246
|
-
};
|
|
247
|
-
const useStyles = makeStyles({
|
|
248
|
-
avatar: {
|
|
249
|
-
height: 32,
|
|
250
|
-
width: 32,
|
|
251
|
-
borderRadius: "50%"
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
const DenseTable = ({ services }) => {
|
|
255
|
-
const classes = useStyles();
|
|
256
|
-
const columns = [
|
|
257
|
-
{ title: "Name", field: "name" },
|
|
258
|
-
{ title: "Team", field: "team" },
|
|
259
|
-
{ title: "Escalation Policy", field: "escalation_policy" },
|
|
260
|
-
{ title: "On call", field: "oncall" },
|
|
261
|
-
{ title: "Mapping", field: "mapping" }
|
|
262
|
-
];
|
|
263
|
-
const data = services.map((service) => {
|
|
264
|
-
return {
|
|
265
|
-
name: service.name,
|
|
266
|
-
team: service.team,
|
|
267
|
-
oncall: /* @__PURE__ */ React.createElement(Tooltip, { title: service.oncall[0].name }, /* @__PURE__ */ React.createElement(
|
|
268
|
-
"img",
|
|
269
|
-
{
|
|
270
|
-
src: service.oncall[0].picture,
|
|
271
|
-
className: classes.avatar,
|
|
272
|
-
alt: service.oncall[0].name
|
|
273
|
-
}
|
|
274
|
-
)),
|
|
275
|
-
escalation_policy: service.escalation_policy,
|
|
276
|
-
mapping: (
|
|
277
|
-
// dropdown menu with static options. If service.mapping is defined select that option
|
|
278
|
-
/* @__PURE__ */ React.createElement("select", { title: "Mapping", value: service.mapping }, /* @__PURE__ */ React.createElement("option", { "aria-label": "None", value: "" }), /* @__PURE__ */ React.createElement("option", { value: "Ads" }, "Ads"), /* @__PURE__ */ React.createElement("option", { value: "Cache" }, "Cache"), /* @__PURE__ */ React.createElement("option", { value: "Catalog" }, "Catalog"), /* @__PURE__ */ React.createElement("option", { value: "Checkout" }, "Checkout"))
|
|
279
|
-
)
|
|
280
|
-
};
|
|
281
|
-
});
|
|
282
|
-
return /* @__PURE__ */ React.createElement(
|
|
283
|
-
Table,
|
|
284
|
-
{
|
|
285
|
-
title: "Existing PagerDuty Services",
|
|
286
|
-
options: {
|
|
287
|
-
search: true,
|
|
288
|
-
paging: true,
|
|
289
|
-
pageSize: 10,
|
|
290
|
-
pageSizeOptions: [10, 25, 50],
|
|
291
|
-
sorting: true,
|
|
292
|
-
emptyRowsWhenPaging: false,
|
|
293
|
-
showFirstLastPageButtons: true
|
|
294
|
-
},
|
|
295
|
-
columns,
|
|
296
|
-
data
|
|
297
|
-
}
|
|
298
|
-
);
|
|
299
|
-
};
|
|
300
|
-
const ServiceMappingComponent = () => {
|
|
301
|
-
const { value, loading, error } = useAsync(async () => {
|
|
302
|
-
return exampleServices.results;
|
|
303
|
-
}, []);
|
|
304
|
-
if (loading) {
|
|
305
|
-
return /* @__PURE__ */ React.createElement(Progress, null);
|
|
306
|
-
} else if (error) {
|
|
307
|
-
return /* @__PURE__ */ React.createElement(ResponseErrorPanel, { error });
|
|
308
|
-
}
|
|
309
|
-
return /* @__PURE__ */ React.createElement(DenseTable, { services: value || [] });
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
const AdvancedConfiguration = () => /* @__PURE__ */ React.createElement(Page, { themeId: "tool" }, /* @__PURE__ */ React.createElement(Header, { title: "PagerDuty", subtitle: "Advanced configurations" }), /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(ContentHeader, { title: "Entity Mapping" }), /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 3, direction: "column" }, /* @__PURE__ */ React.createElement(Grid, { item: true }, /* @__PURE__ */ React.createElement(ServiceMappingComponent, null)))));
|
|
313
|
-
|
|
314
|
-
export { AdvancedConfiguration };
|
|
315
|
-
//# sourceMappingURL=index-ee12a947.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-ee12a947.esm.js","sources":["../../src/components/PagerDutyPage/ServiceMapping.tsx","../../src/components/PagerDutyPage/AdvancedConfiguration.tsx"],"sourcesContent":["import React from \"react\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport {\n Table,\n TableColumn,\n Progress,\n ResponseErrorPanel,\n} from \"@backstage/core-components\";\nimport useAsync from \"react-use/lib/useAsync\";\nimport { Tooltip } from \"@material-ui/core\";\n\nexport const exampleServices = {\n results: [\n {\n name: \"Ads\",\n team: \"Intelligence Team\",\n escalation_policy: \"Intelligence\",\n oncall: [\n {\n name: \"Carolyn Moore\",\n email: \"carolyn.moore@example.com\",\n picture: \"https://api.dicebear.com/6.x/open-peeps/svg?seed=Carolyn\",\n },\n ],\n mapping: \"Ads\",\n },\n {\n name: \"Cache\",\n team: \"Web Team\",\n escalation_policy: \"Web\",\n oncall: [\n {\n name: \"Esma Berberoğlu\",\n email: \"esma.berberoglu@example.com\",\n picture: \"https://api.dicebear.com/6.x/open-peeps/svg?seed=Esma\",\n },\n ],\n },\n {\n name: \"Catalog\",\n team: \"Web Team\",\n escalation_policy: \"Web\",\n oncall: [\n {\n name: \"Isabella Rhodes\",\n email: \"isabella.rhodes@example.com\",\n picture: \"https://api.dicebear.com/6.x/open-peeps/svg?seed=Isabella\",\n },\n ],\n },\n {\n name: \"Checkout\",\n team: \"Billing Team\",\n escalation_policy: \"Billing\",\n oncall: [\n {\n name: \"Derrick Carter\",\n email: \"derrick.carter@example.com\",\n picture: \"https://api.dicebear.com/6.x/open-peeps/svg?seed=Derrick\",\n },\n ],\n },\n // {\n // gender: 'male',\n // name: {\n // title: 'Mr',\n // first: 'Derrick',\n // last: 'Carter',\n // },\n // email: 'derrick.carter@example.com',\n // picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Derrick',\n // nat: 'IE',\n // },\n // {\n // gender: 'female',\n // name: {\n // title: 'Miss',\n // first: 'Mattie',\n // last: 'Lambert',\n // },\n // email: 'mattie.lambert@example.com',\n // picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Mattie',\n // nat: 'AU',\n // },\n // {\n // gender: 'male',\n // name: {\n // title: 'Mr',\n // first: 'Mijat',\n // last: 'Rakić',\n // },\n // email: 'mijat.rakic@example.com',\n // picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Mijat',\n // nat: 'RS',\n // },\n // {\n // gender: 'male',\n // name: {\n // title: 'Mr',\n // first: 'Javier',\n // last: 'Reid',\n // },\n // email: 'javier.reid@example.com',\n // picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Javier',\n // nat: 'US',\n // },\n // {\n // gender: 'female',\n // name: {\n // title: 'Ms',\n // first: 'Isabella',\n // last: 'Li',\n // },\n // email: 'isabella.li@example.com',\n // picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Isabella',\n // nat: 'CA',\n // },\n // {\n // gender: 'female',\n // name: {\n // title: 'Mrs',\n // first: 'Stephanie',\n // last: 'Garrett',\n // },\n // email: 'stephanie.garrett@example.com',\n // picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Stephanie',\n // nat: 'AU',\n // },\n // {\n // gender: 'female',\n // name: {\n // title: 'Ms',\n // first: 'Antonia',\n // last: 'Núñez',\n // },\n // email: 'antonia.nunez@example.com',\n // picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Antonia',\n // nat: 'ES',\n // },\n // {\n // gender: 'male',\n // name: {\n // title: 'Mr',\n // first: 'Donald',\n // last: 'Young',\n // },\n // email: 'donald.young@example.com',\n // picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Donald',\n // nat: 'US',\n // },\n // {\n // gender: 'male',\n // name: {\n // title: 'Mr',\n // first: 'Iegor',\n // last: 'Holodovskiy',\n // },\n // email: 'iegor.holodovskiy@example.com',\n // picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Iegor',\n // nat: 'UA',\n // },\n // {\n // gender: 'female',\n // name: {\n // title: 'Madame',\n // first: 'Jessica',\n // last: 'David',\n // },\n // email: 'jessica.david@example.com',\n // picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Jessica',\n // nat: 'CH',\n // },\n // {\n // gender: 'female',\n // name: {\n // title: 'Ms',\n // first: 'Eve',\n // last: 'Martinez',\n // },\n // email: 'eve.martinez@example.com',\n // picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Eve',\n // nat: 'FR',\n // },\n // {\n // gender: 'male',\n // name: {\n // title: 'Mr',\n // first: 'Caleb',\n // last: 'Silva',\n // },\n // email: 'caleb.silva@example.com',\n // picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Caleb',\n // nat: 'US',\n // },\n // {\n // gender: 'female',\n // name: {\n // title: 'Miss',\n // first: 'Marcia',\n // last: 'Jenkins',\n // },\n // email: 'marcia.jenkins@example.com',\n // picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Marcia',\n // nat: 'US',\n // },\n // {\n // gender: 'female',\n // name: {\n // title: 'Mrs',\n // first: 'Mackenzie',\n // last: 'Jones',\n // },\n // email: 'mackenzie.jones@example.com',\n // picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Mackenzie',\n // nat: 'NZ',\n // },\n // {\n // gender: 'male',\n // name: {\n // title: 'Mr',\n // first: 'Jeremiah',\n // last: 'Gutierrez',\n // },\n // email: 'jeremiah.gutierrez@example.com',\n // picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Jeremiah',\n // nat: 'AU',\n // },\n // {\n // gender: 'female',\n // name: {\n // title: 'Ms',\n // first: 'Luciara',\n // last: 'Souza',\n // },\n // email: 'luciara.souza@example.com',\n // picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Luciara',\n // nat: 'BR',\n // },\n // {\n // gender: 'male',\n // name: {\n // title: 'Mr',\n // first: 'Valgi',\n // last: 'da Cunha',\n // },\n // email: 'valgi.dacunha@example.com',\n // picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Valgi',\n // nat: 'BR',\n // },\n ],\n};\n\nconst useStyles = makeStyles({\n avatar: {\n height: 32,\n width: 32,\n borderRadius: \"50%\",\n },\n});\n\ntype Service = {\n name: string; // \"Ads\"\n team: string; // Team A\n escalation_policy: string; // \"Escalation Policy A\"\n oncall: User[]; // \"John Doe\"\n mapping?: string; // \"Ads\"\n};\n\ntype User = {\n name: string; // \"John Doe\"\n email: string; // \"john.doe@email.com\"\n picture: string; // \"https://api.dicebear.com/6.x/open-peeps/svg?seed=John\"\n};\n\ntype DenseTableProps = {\n services: Service[];\n};\n\nexport const DenseTable = ({ services }: DenseTableProps) => {\n const classes = useStyles();\n\n const columns: TableColumn[] = [\n { title: \"Name\", field: \"name\" },\n { title: \"Team\", field: \"team\" },\n { title: \"Escalation Policy\", field: \"escalation_policy\" },\n { title: \"On call\", field: \"oncall\" },\n { title: \"Mapping\", field: \"mapping\" },\n ];\n\n const data = services.map((service) => {\n return {\n name: service.name,\n team: service.team,\n oncall: (\n <Tooltip title={service.oncall[0].name}>\n <img\n src={service.oncall[0].picture}\n className={classes.avatar}\n alt={service.oncall[0].name}\n />\n </Tooltip>\n ),\n escalation_policy: service.escalation_policy,\n mapping: (\n // dropdown menu with static options. If service.mapping is defined select that option\n <select title=\"Mapping\" value={service.mapping}>\n <option aria-label=\"None\" value=\"\" />\n <option value=\"Ads\">Ads</option>\n <option value=\"Cache\">Cache</option>\n <option value=\"Catalog\">Catalog</option>\n <option value=\"Checkout\">Checkout</option>\n </select>\n ),\n };\n });\n\n return (\n <Table\n title=\"Existing PagerDuty Services\"\n options={{\n search: true,\n paging: true,\n pageSize: 10,\n pageSizeOptions: [10, 25, 50],\n sorting: true,\n emptyRowsWhenPaging: false,\n showFirstLastPageButtons: true,\n }}\n columns={columns}\n data={data}\n />\n );\n};\n\nexport const ServiceMappingComponent = () => {\n const { value, loading, error } = useAsync(async (): Promise<Service[]> => {\n // Would use fetch in a real world example\n return exampleServices.results;\n }, []);\n\n if (loading) {\n return <Progress />;\n } else if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return <DenseTable services={value || []} />;\n};\n","import React from \"react\";\nimport { Grid } from \"@material-ui/core\";\nimport {\n Header,\n Page,\n Content,\n ContentHeader,\n} from \"@backstage/core-components\";\nimport { ServiceMappingComponent } from \"./ServiceMapping\";\n\nexport const AdvancedConfiguration = () => (\n <Page themeId=\"tool\">\n <Header title=\"PagerDuty\" subtitle=\"Advanced configurations\" />\n <Content>\n <ContentHeader title=\"Entity Mapping\" />\n <Grid container spacing={3} direction=\"column\">\n <Grid item>\n <ServiceMappingComponent />\n </Grid>\n </Grid>\n </Content>\n </Page>\n);\n"],"names":[],"mappings":";;;;;;AAWO,MAAM,eAAkB,GAAA;AAAA,EAC7B,OAAS,EAAA;AAAA,IACP;AAAA,MACE,IAAM,EAAA,KAAA;AAAA,MACN,IAAM,EAAA,mBAAA;AAAA,MACN,iBAAmB,EAAA,cAAA;AAAA,MACnB,MAAQ,EAAA;AAAA,QACN;AAAA,UACE,IAAM,EAAA,eAAA;AAAA,UACN,KAAO,EAAA,2BAAA;AAAA,UACP,OAAS,EAAA,0DAAA;AAAA,SACX;AAAA,OACF;AAAA,MACA,OAAS,EAAA,KAAA;AAAA,KACX;AAAA,IACA;AAAA,MACE,IAAM,EAAA,OAAA;AAAA,MACN,IAAM,EAAA,UAAA;AAAA,MACN,iBAAmB,EAA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