@backstage/plugin-org 0.6.1 → 0.6.2-next.2
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/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,39 @@
|
|
|
1
1
|
# @backstage/plugin-org
|
|
2
2
|
|
|
3
|
-
## 0.6.
|
|
3
|
+
## 0.6.2-next.2
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/core-plugin-api@1.2.0-next.2
|
|
9
|
+
- @backstage/core-components@0.12.1-next.2
|
|
10
|
+
- @backstage/plugin-catalog-react@1.2.2-next.2
|
|
11
|
+
- @backstage/catalog-model@1.1.4-next.1
|
|
12
|
+
- @backstage/theme@0.2.16
|
|
13
|
+
|
|
14
|
+
## 0.6.2-next.1
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 67cedfe42e: Update `UserProfileCard` and `GroupProfileCard` to not render links unless the `showLinks` prop is set. The primary component for rendering links are the `EntityLinksCard` from plugin-catalog.
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
- @backstage/core-components@0.12.1-next.1
|
|
21
|
+
- @backstage/core-plugin-api@1.1.1-next.1
|
|
22
|
+
- @backstage/plugin-catalog-react@1.2.2-next.1
|
|
23
|
+
- @backstage/catalog-model@1.1.4-next.1
|
|
24
|
+
- @backstage/theme@0.2.16
|
|
25
|
+
|
|
26
|
+
## 0.6.1-next.0
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- 3280711113: Updated dependency `msw` to `^0.49.0`.
|
|
31
|
+
- Updated dependencies
|
|
32
|
+
- @backstage/core-components@0.12.1-next.0
|
|
33
|
+
- @backstage/core-plugin-api@1.1.1-next.0
|
|
34
|
+
- @backstage/plugin-catalog-react@1.2.2-next.0
|
|
35
|
+
- @backstage/catalog-model@1.1.4-next.0
|
|
36
|
+
- @backstage/theme@0.2.16
|
|
8
37
|
|
|
9
38
|
## 0.6.0
|
|
10
39
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-f8d8884f.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.esm.js
CHANGED
|
@@ -33,7 +33,7 @@ const EntityGroupProfileCard = orgPlugin.provide(
|
|
|
33
33
|
createComponentExtension({
|
|
34
34
|
name: "EntityGroupProfileCard",
|
|
35
35
|
component: {
|
|
36
|
-
lazy: () => import('./esm/index-
|
|
36
|
+
lazy: () => import('./esm/index-f8d8884f.esm.js').then((m) => m.GroupProfileCard)
|
|
37
37
|
}
|
|
38
38
|
})
|
|
39
39
|
);
|
|
@@ -41,7 +41,7 @@ const EntityMembersListCard = orgPlugin.provide(
|
|
|
41
41
|
createComponentExtension({
|
|
42
42
|
name: "EntityMembersListCard",
|
|
43
43
|
component: {
|
|
44
|
-
lazy: () => import('./esm/index-
|
|
44
|
+
lazy: () => import('./esm/index-f8d8884f.esm.js').then((m) => m.MembersListCard)
|
|
45
45
|
}
|
|
46
46
|
})
|
|
47
47
|
);
|
|
@@ -49,7 +49,7 @@ const EntityOwnershipCard = orgPlugin.provide(
|
|
|
49
49
|
createComponentExtension({
|
|
50
50
|
name: "EntityOwnershipCard",
|
|
51
51
|
component: {
|
|
52
|
-
lazy: () => import('./esm/index-
|
|
52
|
+
lazy: () => import('./esm/index-f8d8884f.esm.js').then((m) => m.OwnershipCard)
|
|
53
53
|
}
|
|
54
54
|
})
|
|
55
55
|
);
|
|
@@ -57,7 +57,7 @@ const EntityUserProfileCard = orgPlugin.provide(
|
|
|
57
57
|
createComponentExtension({
|
|
58
58
|
name: "EntityUserProfileCard",
|
|
59
59
|
component: {
|
|
60
|
-
lazy: () => import('./esm/index-
|
|
60
|
+
lazy: () => import('./esm/index-f8d8884f.esm.js').then((m) => m.UserProfileCard)
|
|
61
61
|
}
|
|
62
62
|
})
|
|
63
63
|
);
|
|
@@ -95,47 +95,49 @@ const MemberComponent = (props) => {
|
|
|
95
95
|
spec: { profile }
|
|
96
96
|
} = props.member;
|
|
97
97
|
const displayName = (_a = profile == null ? void 0 : profile.displayName) != null ? _a : metaName;
|
|
98
|
-
return /* @__PURE__ */ React.createElement(Grid, {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
className: classes.card
|
|
107
|
-
}, /* @__PURE__ */ React.createElement(Box, {
|
|
108
|
-
display: "flex",
|
|
109
|
-
flexDirection: "column",
|
|
110
|
-
m: 3,
|
|
111
|
-
alignItems: "center",
|
|
112
|
-
justifyContent: "center"
|
|
113
|
-
}, /* @__PURE__ */ React.createElement(Avatar, {
|
|
114
|
-
displayName,
|
|
115
|
-
picture: profile == null ? void 0 : profile.picture,
|
|
116
|
-
customStyles: {
|
|
117
|
-
position: "absolute",
|
|
118
|
-
top: "-2rem"
|
|
119
|
-
}
|
|
120
|
-
}), /* @__PURE__ */ React.createElement(Box, {
|
|
121
|
-
pt: 2,
|
|
122
|
-
sx: {
|
|
123
|
-
maxWidth: "100%"
|
|
98
|
+
return /* @__PURE__ */ React.createElement(Grid, { item: true, container: true, xs: 12, sm: 6, md: 4, xl: 2 }, /* @__PURE__ */ React.createElement(Box, { className: classes.card }, /* @__PURE__ */ React.createElement(
|
|
99
|
+
Box,
|
|
100
|
+
{
|
|
101
|
+
display: "flex",
|
|
102
|
+
flexDirection: "column",
|
|
103
|
+
m: 3,
|
|
104
|
+
alignItems: "center",
|
|
105
|
+
justifyContent: "center"
|
|
124
106
|
},
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
107
|
+
/* @__PURE__ */ React.createElement(
|
|
108
|
+
Avatar,
|
|
109
|
+
{
|
|
110
|
+
displayName,
|
|
111
|
+
picture: profile == null ? void 0 : profile.picture,
|
|
112
|
+
customStyles: {
|
|
113
|
+
position: "absolute",
|
|
114
|
+
top: "-2rem"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
),
|
|
118
|
+
/* @__PURE__ */ React.createElement(
|
|
119
|
+
Box,
|
|
120
|
+
{
|
|
121
|
+
pt: 2,
|
|
122
|
+
sx: {
|
|
123
|
+
maxWidth: "100%"
|
|
124
|
+
},
|
|
125
|
+
textAlign: "center"
|
|
126
|
+
},
|
|
127
|
+
/* @__PURE__ */ React.createElement(Typography, { variant: "h5" }, /* @__PURE__ */ React.createElement(
|
|
128
|
+
Link,
|
|
129
|
+
{
|
|
130
|
+
to: generatePath(
|
|
131
|
+
`/catalog/:namespace/user/${metaName}`,
|
|
132
|
+
entityRouteParams(props.member)
|
|
133
|
+
)
|
|
134
|
+
},
|
|
135
|
+
displayName
|
|
136
|
+
)),
|
|
137
|
+
(profile == null ? void 0 : profile.email) && /* @__PURE__ */ React.createElement(Link, { className: classes.email, to: `mailto:${profile.email}` }, profile.email),
|
|
138
|
+
description && /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2" }, description)
|
|
132
139
|
)
|
|
133
|
-
|
|
134
|
-
className: classes.email,
|
|
135
|
-
to: `mailto:${profile.email}`
|
|
136
|
-
}, profile.email), description && /* @__PURE__ */ React.createElement(Typography, {
|
|
137
|
-
variant: "subtitle2"
|
|
138
|
-
}, description)))));
|
|
140
|
+
)));
|
|
139
141
|
};
|
|
140
142
|
const MembersListCard = (props) => {
|
|
141
143
|
var _a;
|
|
@@ -174,46 +176,36 @@ const MembersListCard = (props) => {
|
|
|
174
176
|
if (loading) {
|
|
175
177
|
return /* @__PURE__ */ React.createElement(Progress, null);
|
|
176
178
|
} else if (error) {
|
|
177
|
-
return /* @__PURE__ */ React.createElement(ResponseErrorPanel, {
|
|
178
|
-
error
|
|
179
|
-
});
|
|
179
|
+
return /* @__PURE__ */ React.createElement(ResponseErrorPanel, { error });
|
|
180
180
|
}
|
|
181
181
|
const nbPages = Math.ceil(((members == null ? void 0 : members.length) || 0) / pageSize);
|
|
182
182
|
const paginationLabel = nbPages < 2 ? "" : `, page ${page} of ${nbPages}`;
|
|
183
|
-
const pagination = /* @__PURE__ */ React.createElement(
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
member,
|
|
201
|
-
|
|
202
|
-
})) : /* @__PURE__ */ React.createElement(Box, {
|
|
203
|
-
p: 2
|
|
204
|
-
}, /* @__PURE__ */ React.createElement(Typography, null, "This group has no ", memberDisplayTitle.toLocaleLowerCase(), ".")))));
|
|
183
|
+
const pagination = /* @__PURE__ */ React.createElement(
|
|
184
|
+
Pagination,
|
|
185
|
+
{
|
|
186
|
+
count: nbPages,
|
|
187
|
+
page,
|
|
188
|
+
onChange: pageChange,
|
|
189
|
+
showFirstButton: true,
|
|
190
|
+
showLastButton: true
|
|
191
|
+
}
|
|
192
|
+
);
|
|
193
|
+
return /* @__PURE__ */ React.createElement(Grid, { item: true }, /* @__PURE__ */ React.createElement(
|
|
194
|
+
InfoCard,
|
|
195
|
+
{
|
|
196
|
+
title: `${memberDisplayTitle} (${(members == null ? void 0 : members.length) || 0}${paginationLabel})`,
|
|
197
|
+
subheader: `of ${displayName}`,
|
|
198
|
+
...nbPages <= 1 ? {} : { actions: pagination }
|
|
199
|
+
},
|
|
200
|
+
/* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 3 }, members && members.length > 0 ? members.slice(pageSize * (page - 1), pageSize * page).map((member) => /* @__PURE__ */ React.createElement(MemberComponent, { member, key: member.metadata.uid })) : /* @__PURE__ */ React.createElement(Box, { p: 2 }, /* @__PURE__ */ React.createElement(Typography, null, "This group has no ", memberDisplayTitle.toLocaleLowerCase(), ".")))
|
|
201
|
+
));
|
|
205
202
|
};
|
|
206
203
|
|
|
207
204
|
const WebLink = ({
|
|
208
205
|
href,
|
|
209
206
|
Icon,
|
|
210
207
|
text
|
|
211
|
-
}) => /* @__PURE__ */ React.createElement(ListItem, {
|
|
212
|
-
button: true,
|
|
213
|
-
component: "a",
|
|
214
|
-
key: href,
|
|
215
|
-
href
|
|
216
|
-
}, /* @__PURE__ */ React.createElement(ListItemIcon, null, Icon ? /* @__PURE__ */ React.createElement(Icon, null) : /* @__PURE__ */ React.createElement(LanguageIcon, null)), /* @__PURE__ */ React.createElement(ListItemText, null, text));
|
|
208
|
+
}) => /* @__PURE__ */ React.createElement(ListItem, { button: true, component: "a", key: href, href }, /* @__PURE__ */ React.createElement(ListItemIcon, null, Icon ? /* @__PURE__ */ React.createElement(Icon, null) : /* @__PURE__ */ React.createElement(LanguageIcon, null)), /* @__PURE__ */ React.createElement(ListItemText, null, text));
|
|
217
209
|
const LinksGroup = ({ links }) => {
|
|
218
210
|
const app = useApp();
|
|
219
211
|
const iconResolver = (key) => {
|
|
@@ -224,23 +216,19 @@ const LinksGroup = ({ links }) => {
|
|
|
224
216
|
return null;
|
|
225
217
|
}
|
|
226
218
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Divider, null), links.map((link) => {
|
|
227
|
-
return /* @__PURE__ */ React.createElement(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
219
|
+
return /* @__PURE__ */ React.createElement(
|
|
220
|
+
WebLink,
|
|
221
|
+
{
|
|
222
|
+
key: link.url,
|
|
223
|
+
href: link.url,
|
|
224
|
+
text: link.title,
|
|
225
|
+
Icon: iconResolver(link.icon)
|
|
226
|
+
}
|
|
227
|
+
);
|
|
233
228
|
}));
|
|
234
229
|
};
|
|
235
230
|
|
|
236
|
-
const CardTitle$1 = (props) => /* @__PURE__ */ React.createElement(Box, {
|
|
237
|
-
display: "flex",
|
|
238
|
-
alignItems: "center"
|
|
239
|
-
}, /* @__PURE__ */ React.createElement(GroupIcon, {
|
|
240
|
-
fontSize: "inherit"
|
|
241
|
-
}), /* @__PURE__ */ React.createElement(Box, {
|
|
242
|
-
ml: 1
|
|
243
|
-
}, props.title));
|
|
231
|
+
const CardTitle$1 = (props) => /* @__PURE__ */ React.createElement(Box, { display: "flex", alignItems: "center" }, /* @__PURE__ */ React.createElement(GroupIcon, { fontSize: "inherit" }), /* @__PURE__ */ React.createElement(Box, { ml: 1 }, props.title));
|
|
244
232
|
const GroupProfileCard = (props) => {
|
|
245
233
|
var _a, _b;
|
|
246
234
|
const catalogApi = useApi(catalogApiRef);
|
|
@@ -251,9 +239,7 @@ const GroupProfileCard = (props) => {
|
|
|
251
239
|
alertApi.post({ message: "Refresh scheduled", severity: "info" });
|
|
252
240
|
}, [catalogApi, alertApi, group]);
|
|
253
241
|
if (!group) {
|
|
254
|
-
return /* @__PURE__ */ React.createElement(Alert, {
|
|
255
|
-
severity: "error"
|
|
256
|
-
}, "Group not found");
|
|
242
|
+
return /* @__PURE__ */ React.createElement(Alert, { severity: "error" }, "Group not found");
|
|
257
243
|
}
|
|
258
244
|
const {
|
|
259
245
|
metadata: { name, description, annotations, links },
|
|
@@ -270,85 +256,72 @@ const GroupProfileCard = (props) => {
|
|
|
270
256
|
const entityMetadataEditUrl = (_a = group.metadata.annotations) == null ? void 0 : _a[ANNOTATION_EDIT_URL];
|
|
271
257
|
const displayName = (_b = profile == null ? void 0 : profile.displayName) != null ? _b : name;
|
|
272
258
|
const emailHref = (profile == null ? void 0 : profile.email) ? `mailto:${profile.email}` : "#";
|
|
273
|
-
const infoCardAction = entityMetadataEditUrl ? /* @__PURE__ */ React.createElement(
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
}, /* @__PURE__ */ React.createElement(EditIcon, null));
|
|
283
|
-
return /* @__PURE__ */ React.createElement(
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
xs: 12,
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
title: "
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
secondary: "Child Groups"
|
|
332
|
-
})), (props == null ? void 0 : props.showLinks) && /* @__PURE__ */ React.createElement(LinksGroup, {
|
|
333
|
-
links
|
|
334
|
-
})))));
|
|
259
|
+
const infoCardAction = entityMetadataEditUrl ? /* @__PURE__ */ React.createElement(
|
|
260
|
+
IconButton,
|
|
261
|
+
{
|
|
262
|
+
"aria-label": "Edit",
|
|
263
|
+
title: "Edit Metadata",
|
|
264
|
+
component: Link,
|
|
265
|
+
to: entityMetadataEditUrl
|
|
266
|
+
},
|
|
267
|
+
/* @__PURE__ */ React.createElement(EditIcon, null)
|
|
268
|
+
) : /* @__PURE__ */ React.createElement(IconButton, { "aria-label": "Edit", disabled: true, title: "Edit Metadata" }, /* @__PURE__ */ React.createElement(EditIcon, null));
|
|
269
|
+
return /* @__PURE__ */ React.createElement(
|
|
270
|
+
InfoCard,
|
|
271
|
+
{
|
|
272
|
+
title: /* @__PURE__ */ React.createElement(CardTitle$1, { title: displayName }),
|
|
273
|
+
subheader: description,
|
|
274
|
+
variant: props.variant,
|
|
275
|
+
action: /* @__PURE__ */ React.createElement(React.Fragment, null, allowRefresh && /* @__PURE__ */ React.createElement(
|
|
276
|
+
IconButton,
|
|
277
|
+
{
|
|
278
|
+
"aria-label": "Refresh",
|
|
279
|
+
title: "Schedule entity refresh",
|
|
280
|
+
onClick: refreshEntity
|
|
281
|
+
},
|
|
282
|
+
/* @__PURE__ */ React.createElement(CachedIcon, null)
|
|
283
|
+
), infoCardAction)
|
|
284
|
+
},
|
|
285
|
+
/* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 3 }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12, sm: 2, xl: 1 }, /* @__PURE__ */ React.createElement(Avatar, { displayName, picture: profile == null ? void 0 : profile.picture })), /* @__PURE__ */ React.createElement(Grid, { item: true, md: 10, xl: 11 }, /* @__PURE__ */ React.createElement(List, null, (profile == null ? void 0 : profile.email) && /* @__PURE__ */ React.createElement(ListItem, null, /* @__PURE__ */ React.createElement(ListItemIcon, null, /* @__PURE__ */ React.createElement(Tooltip, { title: "Email" }, /* @__PURE__ */ React.createElement(EmailIcon, null))), /* @__PURE__ */ React.createElement(
|
|
286
|
+
ListItemText,
|
|
287
|
+
{
|
|
288
|
+
primary: /* @__PURE__ */ React.createElement(Link, { to: emailHref }, profile.email),
|
|
289
|
+
secondary: "Email"
|
|
290
|
+
}
|
|
291
|
+
)), /* @__PURE__ */ React.createElement(ListItem, null, /* @__PURE__ */ React.createElement(ListItemIcon, null, /* @__PURE__ */ React.createElement(Tooltip, { title: "Parent Group" }, /* @__PURE__ */ React.createElement(AccountTreeIcon, null))), /* @__PURE__ */ React.createElement(
|
|
292
|
+
ListItemText,
|
|
293
|
+
{
|
|
294
|
+
primary: parentRelations.length ? /* @__PURE__ */ React.createElement(
|
|
295
|
+
EntityRefLinks,
|
|
296
|
+
{
|
|
297
|
+
entityRefs: parentRelations,
|
|
298
|
+
defaultKind: "Group"
|
|
299
|
+
}
|
|
300
|
+
) : "N/A",
|
|
301
|
+
secondary: "Parent Group"
|
|
302
|
+
}
|
|
303
|
+
)), /* @__PURE__ */ React.createElement(ListItem, null, /* @__PURE__ */ React.createElement(ListItemIcon, null, /* @__PURE__ */ React.createElement(Tooltip, { title: "Child Groups" }, /* @__PURE__ */ React.createElement(GroupIcon, null))), /* @__PURE__ */ React.createElement(
|
|
304
|
+
ListItemText,
|
|
305
|
+
{
|
|
306
|
+
primary: childRelations.length ? /* @__PURE__ */ React.createElement(
|
|
307
|
+
EntityRefLinks,
|
|
308
|
+
{
|
|
309
|
+
entityRefs: childRelations,
|
|
310
|
+
defaultKind: "Group"
|
|
311
|
+
}
|
|
312
|
+
) : "N/A",
|
|
313
|
+
secondary: "Child Groups"
|
|
314
|
+
}
|
|
315
|
+
)), (props == null ? void 0 : props.showLinks) && /* @__PURE__ */ React.createElement(LinksGroup, { links }))))
|
|
316
|
+
);
|
|
335
317
|
};
|
|
336
318
|
|
|
337
|
-
const CardTitle = (props) => props.title ? /* @__PURE__ */ React.createElement(Box, {
|
|
338
|
-
display: "flex",
|
|
339
|
-
alignItems: "center"
|
|
340
|
-
}, /* @__PURE__ */ React.createElement(PersonIcon, {
|
|
341
|
-
fontSize: "inherit"
|
|
342
|
-
}), /* @__PURE__ */ React.createElement(Box, {
|
|
343
|
-
ml: 1
|
|
344
|
-
}, props.title)) : null;
|
|
319
|
+
const CardTitle = (props) => props.title ? /* @__PURE__ */ React.createElement(Box, { display: "flex", alignItems: "center" }, /* @__PURE__ */ React.createElement(PersonIcon, { fontSize: "inherit" }), /* @__PURE__ */ React.createElement(Box, { ml: 1 }, props.title)) : null;
|
|
345
320
|
const UserProfileCard = (props) => {
|
|
346
321
|
var _a, _b;
|
|
347
322
|
const { entity: user } = useEntity();
|
|
348
323
|
if (!user) {
|
|
349
|
-
return /* @__PURE__ */ React.createElement(Alert, {
|
|
350
|
-
severity: "error"
|
|
351
|
-
}, "User not found");
|
|
324
|
+
return /* @__PURE__ */ React.createElement(Alert, { severity: "error" }, "User not found");
|
|
352
325
|
}
|
|
353
326
|
const entityMetadataEditUrl = (_a = user.metadata.annotations) == null ? void 0 : _a[ANNOTATION_EDIT_URL];
|
|
354
327
|
const {
|
|
@@ -360,46 +333,31 @@ const UserProfileCard = (props) => {
|
|
|
360
333
|
const memberOfRelations = getEntityRelations(user, RELATION_MEMBER_OF, {
|
|
361
334
|
kind: "Group"
|
|
362
335
|
});
|
|
363
|
-
return /* @__PURE__ */ React.createElement(
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
item: true,
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
item: true,
|
|
389
|
-
md: 10,
|
|
390
|
-
xl: 11
|
|
391
|
-
}, /* @__PURE__ */ React.createElement(List, null, (profile == null ? void 0 : profile.email) && /* @__PURE__ */ React.createElement(ListItem, null, /* @__PURE__ */ React.createElement(ListItemIcon, null, /* @__PURE__ */ React.createElement(Tooltip, {
|
|
392
|
-
title: "Email"
|
|
393
|
-
}, /* @__PURE__ */ React.createElement(EmailIcon, null))), /* @__PURE__ */ React.createElement(ListItemText, null, /* @__PURE__ */ React.createElement(Link, {
|
|
394
|
-
to: emailHref != null ? emailHref : ""
|
|
395
|
-
}, profile.email))), /* @__PURE__ */ React.createElement(ListItem, null, /* @__PURE__ */ React.createElement(ListItemIcon, null, /* @__PURE__ */ React.createElement(Tooltip, {
|
|
396
|
-
title: "Member of"
|
|
397
|
-
}, /* @__PURE__ */ React.createElement(GroupIcon, null))), /* @__PURE__ */ React.createElement(ListItemText, null, /* @__PURE__ */ React.createElement(EntityRefLinks, {
|
|
398
|
-
entityRefs: memberOfRelations,
|
|
399
|
-
defaultKind: "Group"
|
|
400
|
-
}))), (props == null ? void 0 : props.showLinks) && /* @__PURE__ */ React.createElement(LinksGroup, {
|
|
401
|
-
links
|
|
402
|
-
})))));
|
|
336
|
+
return /* @__PURE__ */ React.createElement(
|
|
337
|
+
InfoCard,
|
|
338
|
+
{
|
|
339
|
+
title: /* @__PURE__ */ React.createElement(CardTitle, { title: displayName }),
|
|
340
|
+
subheader: description,
|
|
341
|
+
variant: props.variant,
|
|
342
|
+
action: /* @__PURE__ */ React.createElement(React.Fragment, null, entityMetadataEditUrl && /* @__PURE__ */ React.createElement(
|
|
343
|
+
IconButton,
|
|
344
|
+
{
|
|
345
|
+
"aria-label": "Edit",
|
|
346
|
+
title: "Edit Metadata",
|
|
347
|
+
component: Link,
|
|
348
|
+
to: entityMetadataEditUrl
|
|
349
|
+
},
|
|
350
|
+
/* @__PURE__ */ React.createElement(EditIcon, null)
|
|
351
|
+
))
|
|
352
|
+
},
|
|
353
|
+
/* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 3, alignItems: "flex-start" }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12, sm: 2, xl: 1 }, /* @__PURE__ */ React.createElement(Avatar, { displayName, picture: profile == null ? void 0 : profile.picture })), /* @__PURE__ */ React.createElement(Grid, { item: true, md: 10, xl: 11 }, /* @__PURE__ */ React.createElement(List, null, (profile == null ? void 0 : profile.email) && /* @__PURE__ */ React.createElement(ListItem, null, /* @__PURE__ */ React.createElement(ListItemIcon, null, /* @__PURE__ */ React.createElement(Tooltip, { title: "Email" }, /* @__PURE__ */ React.createElement(EmailIcon, null))), /* @__PURE__ */ React.createElement(ListItemText, null, /* @__PURE__ */ React.createElement(Link, { to: emailHref != null ? emailHref : "" }, profile.email))), /* @__PURE__ */ React.createElement(ListItem, null, /* @__PURE__ */ React.createElement(ListItemIcon, null, /* @__PURE__ */ React.createElement(Tooltip, { title: "Member of" }, /* @__PURE__ */ React.createElement(GroupIcon, null))), /* @__PURE__ */ React.createElement(ListItemText, null, /* @__PURE__ */ React.createElement(
|
|
354
|
+
EntityRefLinks,
|
|
355
|
+
{
|
|
356
|
+
entityRefs: memberOfRelations,
|
|
357
|
+
defaultKind: "Group"
|
|
358
|
+
}
|
|
359
|
+
))), (props == null ? void 0 : props.showLinks) && /* @__PURE__ */ React.createElement(LinksGroup, { links }))))
|
|
360
|
+
);
|
|
403
361
|
};
|
|
404
362
|
|
|
405
363
|
const limiter = limiterFactory(10);
|
|
@@ -565,23 +523,18 @@ const EntityCountTile = ({
|
|
|
565
523
|
}) => {
|
|
566
524
|
const classes = useStyles$1({ type: type != null ? type : kind });
|
|
567
525
|
const rawTitle = type != null ? type : kind;
|
|
568
|
-
return /* @__PURE__ */ React.createElement(Link, {
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
className: classes.bold,
|
|
578
|
-
variant: "
|
|
579
|
-
|
|
580
|
-
className: classes.bold,
|
|
581
|
-
variant: "h6"
|
|
582
|
-
}, pluralize(rawTitle.toLocaleUpperCase("en-US"), counter)), type && /* @__PURE__ */ React.createElement(Typography, {
|
|
583
|
-
variant: "subtitle1"
|
|
584
|
-
}, kind)));
|
|
526
|
+
return /* @__PURE__ */ React.createElement(Link, { to: url, variant: "body2" }, /* @__PURE__ */ React.createElement(
|
|
527
|
+
Box,
|
|
528
|
+
{
|
|
529
|
+
className: `${classes.card} ${classes.entityTypeBox}`,
|
|
530
|
+
display: "flex",
|
|
531
|
+
flexDirection: "column",
|
|
532
|
+
alignItems: "center"
|
|
533
|
+
},
|
|
534
|
+
/* @__PURE__ */ React.createElement(Typography, { className: classes.bold, variant: "h6" }, counter),
|
|
535
|
+
/* @__PURE__ */ React.createElement(Typography, { className: classes.bold, variant: "h6" }, pluralize(rawTitle.toLocaleUpperCase("en-US"), counter)),
|
|
536
|
+
type && /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle1" }, kind)
|
|
537
|
+
));
|
|
585
538
|
};
|
|
586
539
|
const ComponentsGrid = ({
|
|
587
540
|
entity,
|
|
@@ -599,26 +552,19 @@ const ComponentsGrid = ({
|
|
|
599
552
|
if (loading) {
|
|
600
553
|
return /* @__PURE__ */ React.createElement(Progress, null);
|
|
601
554
|
} else if (error) {
|
|
602
|
-
return /* @__PURE__ */ React.createElement(ResponseErrorPanel, {
|
|
603
|
-
error
|
|
604
|
-
});
|
|
555
|
+
return /* @__PURE__ */ React.createElement(ResponseErrorPanel, { error });
|
|
605
556
|
}
|
|
606
|
-
return /* @__PURE__ */ React.createElement(Grid, {
|
|
607
|
-
container: true
|
|
608
|
-
}, componentsWithCounters == null ? void 0 : componentsWithCounters.map((c) => {
|
|
557
|
+
return /* @__PURE__ */ React.createElement(Grid, { container: true }, componentsWithCounters == null ? void 0 : componentsWithCounters.map((c) => {
|
|
609
558
|
var _a;
|
|
610
|
-
return /* @__PURE__ */ React.createElement(Grid, {
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
type: c.type,
|
|
620
|
-
url: `${catalogLink()}/?${c.queryParams}`
|
|
621
|
-
}));
|
|
559
|
+
return /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 6, md: 6, lg: 4, key: (_a = c.type) != null ? _a : c.kind }, /* @__PURE__ */ React.createElement(
|
|
560
|
+
EntityCountTile,
|
|
561
|
+
{
|
|
562
|
+
counter: c.counter,
|
|
563
|
+
kind: c.kind,
|
|
564
|
+
type: c.type,
|
|
565
|
+
url: `${catalogLink()}/?${c.queryParams}`
|
|
566
|
+
}
|
|
567
|
+
));
|
|
622
568
|
}));
|
|
623
569
|
};
|
|
624
570
|
|
|
@@ -653,34 +599,41 @@ const OwnershipCard = (props) => {
|
|
|
653
599
|
const [getRelationsType, setRelationsType] = useState(
|
|
654
600
|
relationsType || "direct"
|
|
655
601
|
);
|
|
656
|
-
return /* @__PURE__ */ React.createElement(InfoCard, {
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
602
|
+
return /* @__PURE__ */ React.createElement(InfoCard, { title: "Ownership", variant }, !relationsToggle && /* @__PURE__ */ React.createElement(List, { dense: true }, /* @__PURE__ */ React.createElement(ListItem, { className: classes.list }, /* @__PURE__ */ React.createElement(ListItemText, { className: classes.listItemText }), /* @__PURE__ */ React.createElement(
|
|
603
|
+
ListItemSecondaryAction,
|
|
604
|
+
{
|
|
605
|
+
className: classes.listItemSecondaryAction
|
|
606
|
+
},
|
|
607
|
+
"Direct Relations",
|
|
608
|
+
/* @__PURE__ */ React.createElement(
|
|
609
|
+
Tooltip,
|
|
610
|
+
{
|
|
611
|
+
placement: "top",
|
|
612
|
+
arrow: true,
|
|
613
|
+
title: `${getRelationsType === "direct" ? "Direct" : "Aggregated"} Relations`
|
|
614
|
+
},
|
|
615
|
+
/* @__PURE__ */ React.createElement(
|
|
616
|
+
Switch,
|
|
617
|
+
{
|
|
618
|
+
color: "primary",
|
|
619
|
+
checked: getRelationsType !== "direct",
|
|
620
|
+
onChange: () => getRelationsType === "direct" ? setRelationsType("aggregated") : setRelationsType("direct"),
|
|
621
|
+
name: "pin",
|
|
622
|
+
inputProps: { "aria-label": "Ownership Type Switch" },
|
|
623
|
+
disabled: !isGroup
|
|
624
|
+
}
|
|
625
|
+
)
|
|
626
|
+
),
|
|
627
|
+
"Aggregated Relations"
|
|
628
|
+
))), /* @__PURE__ */ React.createElement(
|
|
629
|
+
ComponentsGrid,
|
|
630
|
+
{
|
|
631
|
+
entity,
|
|
632
|
+
relationsType: getRelationsType,
|
|
633
|
+
isGroup,
|
|
634
|
+
entityFilterKind
|
|
635
|
+
}
|
|
636
|
+
));
|
|
684
637
|
};
|
|
685
638
|
|
|
686
639
|
const MyGroupsSidebarItem = (props) => {
|
|
@@ -707,25 +660,26 @@ const MyGroupsSidebarItem = (props) => {
|
|
|
707
660
|
}
|
|
708
661
|
if (groups.length === 1) {
|
|
709
662
|
const group = groups[0];
|
|
710
|
-
return /* @__PURE__ */ React.createElement(
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
663
|
+
return /* @__PURE__ */ React.createElement(
|
|
664
|
+
SidebarItem,
|
|
665
|
+
{
|
|
666
|
+
text: singularTitle,
|
|
667
|
+
to: catalogEntityRoute(getCompoundEntityRef(group)),
|
|
668
|
+
icon
|
|
669
|
+
}
|
|
670
|
+
);
|
|
715
671
|
}
|
|
716
|
-
return /* @__PURE__ */ React.createElement(SidebarItem, {
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
key: stringifyEntityRef(group)
|
|
728
|
-
});
|
|
672
|
+
return /* @__PURE__ */ React.createElement(SidebarItem, { icon, text: pluralTitle }, /* @__PURE__ */ React.createElement(SidebarSubmenu, { title: pluralTitle }, groups == null ? void 0 : groups.map(function groupsMap(group) {
|
|
673
|
+
return /* @__PURE__ */ React.createElement(
|
|
674
|
+
SidebarSubmenuItem,
|
|
675
|
+
{
|
|
676
|
+
title: group.metadata.title || group.metadata.name,
|
|
677
|
+
subtitle: group.metadata.namespace !== DEFAULT_NAMESPACE ? group.metadata.namespace : void 0,
|
|
678
|
+
to: catalogEntityRoute(getCompoundEntityRef(group)),
|
|
679
|
+
icon,
|
|
680
|
+
key: stringifyEntityRef(group)
|
|
681
|
+
}
|
|
682
|
+
);
|
|
729
683
|
})));
|
|
730
684
|
};
|
|
731
685
|
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/routes.ts","../src/plugin.ts","../src/components/Cards/Group/MembersList/MembersListCard.tsx","../src/components/Cards/Meta/LinksGroup.tsx","../src/components/Cards/Group/GroupProfile/GroupProfileCard.tsx","../src/components/Cards/User/UserProfileCard/UserProfileCard.tsx","../src/components/Cards/OwnershipCard/useGetEntities.ts","../src/components/Cards/OwnershipCard/ComponentsGrid.tsx","../src/components/Cards/OwnershipCard/OwnershipCard.tsx","../src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createExternalRouteRef } from '@backstage/core-plugin-api';\n\nexport const catalogIndexRouteRef = createExternalRouteRef({\n id: 'catalog-index',\n});\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n createComponentExtension,\n createPlugin,\n} from '@backstage/core-plugin-api';\nimport { catalogIndexRouteRef } from './routes';\n\n/** @public */\nexport const orgPlugin = createPlugin({\n id: 'org',\n externalRoutes: {\n catalogIndex: catalogIndexRouteRef,\n },\n});\n\n/** @public */\nexport const EntityGroupProfileCard = orgPlugin.provide(\n createComponentExtension({\n name: 'EntityGroupProfileCard',\n component: {\n lazy: () => import('./components').then(m => m.GroupProfileCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityMembersListCard = orgPlugin.provide(\n createComponentExtension({\n name: 'EntityMembersListCard',\n component: {\n lazy: () => import('./components').then(m => m.MembersListCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityOwnershipCard = orgPlugin.provide(\n createComponentExtension({\n name: 'EntityOwnershipCard',\n component: {\n lazy: () => import('./components').then(m => m.OwnershipCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityUserProfileCard = orgPlugin.provide(\n createComponentExtension({\n name: 'EntityUserProfileCard',\n component: {\n lazy: () => import('./components').then(m => m.UserProfileCard),\n },\n }),\n);\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n DEFAULT_NAMESPACE,\n GroupEntity,\n UserEntity,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n catalogApiRef,\n entityRouteParams,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport {\n Box,\n createStyles,\n Grid,\n makeStyles,\n Theme,\n Typography,\n} from '@material-ui/core';\nimport Pagination from '@material-ui/lab/Pagination';\nimport React from 'react';\nimport { generatePath } from 'react-router-dom';\nimport useAsync from 'react-use/lib/useAsync';\n\nimport {\n Avatar,\n InfoCard,\n Progress,\n ResponseErrorPanel,\n Link,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n card: {\n border: `1px solid ${theme.palette.divider}`,\n boxShadow: theme.shadows[2],\n borderRadius: '4px',\n overflow: 'visible',\n position: 'relative',\n margin: theme.spacing(4, 1, 1),\n flex: '1',\n minWidth: '0px',\n },\n email: {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n display: 'inline-block',\n maxWidth: '100%',\n '&:hover': {\n overflow: 'visible',\n whiteSpace: 'normal',\n },\n },\n }),\n);\n\nconst MemberComponent = (props: { member: UserEntity }) => {\n const classes = useStyles();\n const {\n metadata: { name: metaName, description },\n spec: { profile },\n } = props.member;\n const displayName = profile?.displayName ?? metaName;\n\n return (\n <Grid item container xs={12} sm={6} md={4} xl={2}>\n <Box className={classes.card}>\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n m={3}\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n <Avatar\n displayName={displayName}\n picture={profile?.picture}\n customStyles={{\n position: 'absolute',\n top: '-2rem',\n }}\n />\n <Box\n pt={2}\n sx={{\n maxWidth: '100%',\n }}\n textAlign=\"center\"\n >\n <Typography variant=\"h5\">\n <Link\n to={generatePath(\n `/catalog/:namespace/user/${metaName}`,\n entityRouteParams(props.member),\n )}\n >\n {displayName}\n </Link>\n </Typography>\n {profile?.email && (\n <Link className={classes.email} to={`mailto:${profile.email}`}>\n {profile.email}\n </Link>\n )}\n {description && (\n <Typography variant=\"subtitle2\">{description}</Typography>\n )}\n </Box>\n </Box>\n </Box>\n </Grid>\n );\n};\n\n/** @public */\nexport const MembersListCard = (props: {\n memberDisplayTitle?: string;\n pageSize?: number;\n}) => {\n const { memberDisplayTitle = 'Members', pageSize = 50 } = props;\n\n const { entity: groupEntity } = useEntity<GroupEntity>();\n const {\n metadata: { name: groupName, namespace: grpNamespace },\n spec: { profile },\n } = groupEntity;\n const catalogApi = useApi(catalogApiRef);\n\n const displayName = profile?.displayName ?? groupName;\n\n const groupNamespace = grpNamespace || DEFAULT_NAMESPACE;\n\n const [page, setPage] = React.useState(1);\n const pageChange = (_: React.ChangeEvent<unknown>, pageIndex: number) => {\n setPage(pageIndex);\n };\n\n const {\n loading,\n error,\n value: members,\n } = useAsync(async () => {\n const membersList = await catalogApi.getEntities({\n filter: {\n kind: 'User',\n 'relations.memberof': [\n stringifyEntityRef({\n kind: 'group',\n namespace: groupNamespace.toLocaleLowerCase('en-US'),\n name: groupName.toLocaleLowerCase('en-US'),\n }),\n ],\n },\n });\n\n return membersList.items as UserEntity[];\n }, [catalogApi, groupEntity]);\n\n if (loading) {\n return <Progress />;\n } else if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n const nbPages = Math.ceil((members?.length || 0) / pageSize);\n const paginationLabel = nbPages < 2 ? '' : `, page ${page} of ${nbPages}`;\n\n const pagination = (\n <Pagination\n count={nbPages}\n page={page}\n onChange={pageChange}\n showFirstButton\n showLastButton\n />\n );\n\n return (\n <Grid item>\n <InfoCard\n title={`${memberDisplayTitle} (${\n members?.length || 0\n }${paginationLabel})`}\n subheader={`of ${displayName}`}\n {...(nbPages <= 1 ? {} : { actions: pagination })}\n >\n <Grid container spacing={3}>\n {members && members.length > 0 ? (\n members\n .slice(pageSize * (page - 1), pageSize * page)\n .map(member => (\n <MemberComponent member={member} key={member.metadata.uid} />\n ))\n ) : (\n <Box p={2}>\n <Typography>\n This group has no {memberDisplayTitle.toLocaleLowerCase()}.\n </Typography>\n </Box>\n )}\n </Grid>\n </InfoCard>\n </Grid>\n );\n};\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { EntityLink } from '@backstage/catalog-model';\nimport { IconComponent, useApp } from '@backstage/core-plugin-api';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport {\n ListItem,\n ListItemIcon,\n ListItemText,\n Divider,\n} from '@material-ui/core';\nimport React from 'react';\n\nconst WebLink = ({\n href,\n Icon,\n text,\n}: {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}) => (\n <ListItem button component=\"a\" key={href} href={href}>\n <ListItemIcon>{Icon ? <Icon /> : <LanguageIcon />}</ListItemIcon>\n <ListItemText>{text}</ListItemText>\n </ListItem>\n);\n\nexport const LinksGroup = ({ links }: { links?: EntityLink[] }) => {\n const app = useApp();\n const iconResolver = (key?: string): IconComponent =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n\n if (links === undefined) {\n return null;\n }\n\n return (\n <>\n <Divider />\n {links.map(link => {\n return (\n <WebLink\n key={link.url}\n href={link.url}\n text={link.title}\n Icon={iconResolver(link.icon)}\n />\n );\n })}\n </>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n ANNOTATION_EDIT_URL,\n ANNOTATION_LOCATION,\n GroupEntity,\n RELATION_CHILD_OF,\n RELATION_PARENT_OF,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n Avatar,\n InfoCard,\n InfoCardVariants,\n Link,\n} from '@backstage/core-components';\nimport {\n Box,\n Grid,\n IconButton,\n List,\n ListItem,\n ListItemIcon,\n ListItemText,\n Tooltip,\n} from '@material-ui/core';\nimport {\n EntityRefLinks,\n catalogApiRef,\n getEntityRelations,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport React, { useCallback } from 'react';\nimport { alertApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport AccountTreeIcon from '@material-ui/icons/AccountTree';\nimport Alert from '@material-ui/lab/Alert';\nimport CachedIcon from '@material-ui/icons/Cached';\nimport EditIcon from '@material-ui/icons/Edit';\nimport EmailIcon from '@material-ui/icons/Email';\nimport GroupIcon from '@material-ui/icons/Group';\nimport { LinksGroup } from '../../Meta';\n\nconst CardTitle = (props: { title: string }) => (\n <Box display=\"flex\" alignItems=\"center\">\n <GroupIcon fontSize=\"inherit\" />\n <Box ml={1}>{props.title}</Box>\n </Box>\n);\n\n/** @public */\nexport const GroupProfileCard = (props: {\n variant?: InfoCardVariants;\n showLinks?: boolean;\n}) => {\n const catalogApi = useApi(catalogApiRef);\n const alertApi = useApi(alertApiRef);\n const { entity: group } = useEntity<GroupEntity>();\n\n const refreshEntity = useCallback(async () => {\n await catalogApi.refreshEntity(stringifyEntityRef(group));\n alertApi.post({ message: 'Refresh scheduled', severity: 'info' });\n }, [catalogApi, alertApi, group]);\n\n if (!group) {\n return <Alert severity=\"error\">Group not found</Alert>;\n }\n\n const {\n metadata: { name, description, annotations, links },\n spec: { profile },\n } = group;\n\n const childRelations = getEntityRelations(group, RELATION_PARENT_OF, {\n kind: 'Group',\n });\n const parentRelations = getEntityRelations(group, RELATION_CHILD_OF, {\n kind: 'group',\n });\n\n const entityLocation = annotations?.[ANNOTATION_LOCATION];\n const allowRefresh =\n entityLocation?.startsWith('url:') || entityLocation?.startsWith('file:');\n\n const entityMetadataEditUrl =\n group.metadata.annotations?.[ANNOTATION_EDIT_URL];\n\n const displayName = profile?.displayName ?? name;\n const emailHref = profile?.email ? `mailto:${profile.email}` : '#';\n const infoCardAction = entityMetadataEditUrl ? (\n <IconButton\n aria-label=\"Edit\"\n title=\"Edit Metadata\"\n component={Link}\n to={entityMetadataEditUrl}\n >\n <EditIcon />\n </IconButton>\n ) : (\n <IconButton aria-label=\"Edit\" disabled title=\"Edit Metadata\">\n <EditIcon />\n </IconButton>\n );\n\n return (\n <InfoCard\n title={<CardTitle title={displayName} />}\n subheader={description}\n variant={props.variant}\n action={\n <>\n {allowRefresh && (\n <IconButton\n aria-label=\"Refresh\"\n title=\"Schedule entity refresh\"\n onClick={refreshEntity}\n >\n <CachedIcon />\n </IconButton>\n )}\n {infoCardAction}\n </>\n }\n >\n <Grid container spacing={3}>\n <Grid item xs={12} sm={2} xl={1}>\n <Avatar displayName={displayName} picture={profile?.picture} />\n </Grid>\n <Grid item md={10} xl={11}>\n <List>\n {profile?.email && (\n <ListItem>\n <ListItemIcon>\n <Tooltip title=\"Email\">\n <EmailIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText\n primary={<Link to={emailHref}>{profile.email}</Link>}\n secondary=\"Email\"\n />\n </ListItem>\n )}\n <ListItem>\n <ListItemIcon>\n <Tooltip title=\"Parent Group\">\n <AccountTreeIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText\n primary={\n parentRelations.length ? (\n <EntityRefLinks\n entityRefs={parentRelations}\n defaultKind=\"Group\"\n />\n ) : (\n 'N/A'\n )\n }\n secondary=\"Parent Group\"\n />\n </ListItem>\n <ListItem>\n <ListItemIcon>\n <Tooltip title=\"Child Groups\">\n <GroupIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText\n primary={\n childRelations.length ? (\n <EntityRefLinks\n entityRefs={childRelations}\n defaultKind=\"Group\"\n />\n ) : (\n 'N/A'\n )\n }\n secondary=\"Child Groups\"\n />\n </ListItem>\n {props?.showLinks && <LinksGroup links={links} />}\n </List>\n </Grid>\n </Grid>\n </InfoCard>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n ANNOTATION_EDIT_URL,\n RELATION_MEMBER_OF,\n UserEntity,\n} from '@backstage/catalog-model';\nimport {\n Avatar,\n InfoCard,\n InfoCardVariants,\n Link,\n} from '@backstage/core-components';\nimport {\n Box,\n Grid,\n IconButton,\n List,\n ListItem,\n ListItemIcon,\n ListItemText,\n Tooltip,\n} from '@material-ui/core';\nimport {\n EntityRefLinks,\n getEntityRelations,\n useEntity,\n} from '@backstage/plugin-catalog-react';\n\nimport Alert from '@material-ui/lab/Alert';\nimport EditIcon from '@material-ui/icons/Edit';\nimport EmailIcon from '@material-ui/icons/Email';\nimport GroupIcon from '@material-ui/icons/Group';\nimport { LinksGroup } from '../../Meta';\nimport PersonIcon from '@material-ui/icons/Person';\nimport React from 'react';\n\nconst CardTitle = (props: { title?: string }) =>\n props.title ? (\n <Box display=\"flex\" alignItems=\"center\">\n <PersonIcon fontSize=\"inherit\" />\n <Box ml={1}>{props.title}</Box>\n </Box>\n ) : null;\n\n/** @public */\nexport const UserProfileCard = (props: {\n variant?: InfoCardVariants;\n showLinks?: boolean;\n}) => {\n const { entity: user } = useEntity<UserEntity>();\n if (!user) {\n return <Alert severity=\"error\">User not found</Alert>;\n }\n\n const entityMetadataEditUrl =\n user.metadata.annotations?.[ANNOTATION_EDIT_URL];\n\n const {\n metadata: { name: metaName, description, links },\n spec: { profile },\n } = user;\n const displayName = profile?.displayName ?? metaName;\n const emailHref = profile?.email ? `mailto:${profile.email}` : undefined;\n const memberOfRelations = getEntityRelations(user, RELATION_MEMBER_OF, {\n kind: 'Group',\n });\n\n return (\n <InfoCard\n title={<CardTitle title={displayName} />}\n subheader={description}\n variant={props.variant}\n action={\n <>\n {entityMetadataEditUrl && (\n <IconButton\n aria-label=\"Edit\"\n title=\"Edit Metadata\"\n component={Link}\n to={entityMetadataEditUrl}\n >\n <EditIcon />\n </IconButton>\n )}\n </>\n }\n >\n <Grid container spacing={3} alignItems=\"flex-start\">\n <Grid item xs={12} sm={2} xl={1}>\n <Avatar displayName={displayName} picture={profile?.picture} />\n </Grid>\n\n <Grid item md={10} xl={11}>\n <List>\n {profile?.email && (\n <ListItem>\n <ListItemIcon>\n <Tooltip title=\"Email\">\n <EmailIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText>\n <Link to={emailHref ?? ''}>{profile.email}</Link>\n </ListItemText>\n </ListItem>\n )}\n\n <ListItem>\n <ListItemIcon>\n <Tooltip title=\"Member of\">\n <GroupIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText>\n <EntityRefLinks\n entityRefs={memberOfRelations}\n defaultKind=\"Group\"\n />\n </ListItemText>\n </ListItem>\n\n {props?.showLinks && <LinksGroup links={links} />}\n </List>\n </Grid>\n </Grid>\n </InfoCard>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Entity,\n RELATION_MEMBER_OF,\n RELATION_PARENT_OF,\n parseEntityRef,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n CatalogApi,\n catalogApiRef,\n getEntityRelations,\n humanizeEntityRef,\n} from '@backstage/plugin-catalog-react';\nimport limiterFactory from 'p-limit';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/lib/useAsync';\nimport qs from 'qs';\n\nconst limiter = limiterFactory(10);\n\ntype EntityTypeProps = {\n kind: string;\n type?: string;\n count: number;\n};\n\nconst getQueryParams = (\n ownersEntityRef: string[],\n selectedEntity: EntityTypeProps,\n): string => {\n const { kind, type } = selectedEntity;\n const owners = ownersEntityRef.map(owner =>\n humanizeEntityRef(parseEntityRef(owner), { defaultKind: 'group' }),\n );\n const filters = {\n kind: kind.toLocaleLowerCase('en-US'),\n type,\n owners,\n user: 'all',\n };\n return qs.stringify({ filters }, { arrayFormat: 'repeat' });\n};\n\nconst getOwnersEntityRef = (owner: Entity): string[] => {\n let owners = [stringifyEntityRef(owner)];\n if (owner.kind === 'User') {\n const ownerGroups = getEntityRelations(owner, RELATION_MEMBER_OF, {\n kind: 'Group',\n });\n const ownerGroupsName = ownerGroups.map(ownerGroup =>\n stringifyEntityRef({\n kind: ownerGroup.kind,\n namespace: ownerGroup.namespace,\n name: ownerGroup.name,\n }),\n );\n owners = [...owners, ...ownerGroupsName];\n }\n return owners;\n};\n\nconst getAggregatedOwnersEntityRef = async (\n parentGroup: Entity,\n catalogApi: CatalogApi,\n): Promise<string[]> => {\n const requestedEntities: Entity[] = [];\n const outstandingEntities = new Map<string, Promise<Entity | undefined>>();\n const processedEntities = new Set<string>();\n requestedEntities.push(parentGroup);\n let currentEntity = parentGroup;\n\n while (requestedEntities.length > 0) {\n const childRelations = getEntityRelations(\n currentEntity,\n RELATION_PARENT_OF,\n {\n kind: 'Group',\n },\n );\n\n await Promise.all(\n childRelations.map(childGroup =>\n limiter(async () => {\n const promise = catalogApi.getEntityByRef(childGroup);\n outstandingEntities.set(childGroup.name, promise);\n try {\n const processedEntity = await promise;\n if (processedEntity) {\n requestedEntities.push(processedEntity);\n }\n } finally {\n outstandingEntities.delete(childGroup.name);\n }\n }),\n ),\n );\n requestedEntities.shift();\n processedEntities.add(\n stringifyEntityRef({\n kind: currentEntity.kind,\n namespace: currentEntity.metadata.namespace,\n name: currentEntity.metadata.name,\n }),\n );\n // always set currentEntity to the first element of array requestedEntities\n currentEntity = requestedEntities[0];\n }\n\n return Array.from(processedEntities);\n};\n\nexport function useGetEntities(\n entity: Entity,\n relationsType: string,\n isGroup: boolean,\n entityFilterKind?: string[],\n): {\n componentsWithCounters:\n | {\n counter: number;\n type: string;\n kind: string;\n queryParams: string;\n }[]\n | undefined;\n loading: boolean;\n error?: Error;\n} {\n const catalogApi = useApi(catalogApiRef);\n const kinds = entityFilterKind ?? ['Component', 'API', 'System'];\n\n const {\n loading,\n error,\n value: componentsWithCounters,\n } = useAsync(async () => {\n const owners =\n relationsType === 'aggregated' && isGroup\n ? await getAggregatedOwnersEntityRef(entity, catalogApi)\n : getOwnersEntityRef(entity);\n const ownedEntitiesList = await catalogApi.getEntities({\n filter: [\n {\n kind: kinds,\n 'relations.ownedBy': owners,\n },\n ],\n fields: [\n 'kind',\n 'metadata.name',\n 'metadata.namespace',\n 'spec.type',\n 'relations',\n ],\n });\n\n const counts = ownedEntitiesList.items.reduce(\n (acc: EntityTypeProps[], ownedEntity) => {\n const match = acc.find(\n x => x.kind === ownedEntity.kind && x.type === ownedEntity.spec?.type,\n );\n if (match) {\n match.count += 1;\n } else {\n acc.push({\n kind: ownedEntity.kind,\n type: ownedEntity.spec?.type?.toString(),\n count: 1,\n });\n }\n return acc;\n },\n [],\n );\n\n // Return top N (six) entities to be displayed in ownership boxes\n const topN = counts.sort((a, b) => b.count - a.count).slice(0, 6);\n\n return topN.map(topOwnedEntity => ({\n counter: topOwnedEntity.count,\n type: topOwnedEntity.type,\n kind: topOwnedEntity.kind,\n queryParams: getQueryParams(owners, topOwnedEntity),\n })) as Array<{\n counter: number;\n type: string;\n kind: string;\n queryParams: string;\n }>;\n }, [catalogApi, entity, relationsType]);\n\n return {\n componentsWithCounters,\n loading,\n error,\n };\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity } from '@backstage/catalog-model';\nimport { Link, Progress, ResponseErrorPanel } from '@backstage/core-components';\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport { BackstageTheme } from '@backstage/theme';\nimport {\n Box,\n createStyles,\n Grid,\n makeStyles,\n Typography,\n} from '@material-ui/core';\nimport React from 'react';\nimport pluralize from 'pluralize';\nimport { catalogIndexRouteRef } from '../../../routes';\nimport { useGetEntities } from './useGetEntities';\n\nconst useStyles = makeStyles((theme: BackstageTheme) =>\n createStyles({\n card: {\n border: `1px solid ${theme.palette.divider}`,\n boxShadow: theme.shadows[2],\n borderRadius: '4px',\n padding: theme.spacing(2),\n color: '#fff',\n transition: `${theme.transitions.duration.standard}ms`,\n '&:hover': {\n boxShadow: theme.shadows[4],\n },\n },\n bold: {\n fontWeight: theme.typography.fontWeightBold,\n },\n entityTypeBox: {\n background: (props: { type: string }) =>\n theme.getPageTheme({ themeId: props.type }).backgroundImage,\n },\n }),\n);\n\nconst EntityCountTile = ({\n counter,\n type,\n kind,\n url,\n}: {\n counter: number;\n type?: string;\n kind: string;\n url: string;\n}) => {\n const classes = useStyles({ type: type ?? kind });\n\n const rawTitle = type ?? kind;\n\n return (\n <Link to={url} variant=\"body2\">\n <Box\n className={`${classes.card} ${classes.entityTypeBox}`}\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n >\n <Typography className={classes.bold} variant=\"h6\">\n {counter}\n </Typography>\n <Typography className={classes.bold} variant=\"h6\">\n {pluralize(rawTitle.toLocaleUpperCase('en-US'), counter)}\n </Typography>\n {type && <Typography variant=\"subtitle1\">{kind}</Typography>}\n </Box>\n </Link>\n );\n};\n\nexport const ComponentsGrid = ({\n entity,\n relationsType,\n isGroup,\n entityFilterKind,\n}: {\n entity: Entity;\n relationsType: string;\n isGroup: boolean;\n entityFilterKind?: string[];\n}) => {\n const catalogLink = useRouteRef(catalogIndexRouteRef);\n const { componentsWithCounters, loading, error } = useGetEntities(\n entity,\n relationsType,\n isGroup,\n entityFilterKind,\n );\n\n if (loading) {\n return <Progress />;\n } else if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return (\n <Grid container>\n {componentsWithCounters?.map(c => (\n <Grid item xs={6} md={6} lg={4} key={c.type ?? c.kind}>\n <EntityCountTile\n counter={c.counter}\n kind={c.kind}\n type={c.type}\n url={`${catalogLink()}/?${c.queryParams}`}\n />\n </Grid>\n ))}\n </Grid>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { InfoCard, InfoCardVariants } from '@backstage/core-components';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport {\n List,\n ListItem,\n ListItemSecondaryAction,\n ListItemText,\n makeStyles,\n Switch,\n Tooltip,\n} from '@material-ui/core';\nimport React, { useState } from 'react';\nimport { ComponentsGrid } from './ComponentsGrid';\n\nconst useStyles = makeStyles(theme => ({\n list: {\n [theme.breakpoints.down('xs')]: {\n padding: `0 0 12px`,\n },\n },\n listItemText: {\n [theme.breakpoints.down('xs')]: {\n paddingRight: 0,\n paddingLeft: 0,\n },\n },\n listItemSecondaryAction: {\n [theme.breakpoints.down('xs')]: {\n width: '100%',\n top: 'auto',\n right: 'auto',\n position: 'relative',\n transform: 'unset',\n },\n },\n}));\n\n/** @public */\nexport const OwnershipCard = (props: {\n variant?: InfoCardVariants;\n entityFilterKind?: string[];\n hideRelationsToggle?: boolean;\n relationsType?: string;\n}) => {\n const { variant, entityFilterKind, hideRelationsToggle, relationsType } =\n props;\n const relationsToggle =\n hideRelationsToggle === undefined ? false : hideRelationsToggle;\n const classes = useStyles();\n const { entity } = useEntity();\n const isGroup = entity.kind === 'Group';\n const [getRelationsType, setRelationsType] = useState(\n relationsType || 'direct',\n );\n\n return (\n <InfoCard title=\"Ownership\" variant={variant}>\n {!relationsToggle && (\n <List dense>\n <ListItem className={classes.list}>\n <ListItemText className={classes.listItemText} />\n <ListItemSecondaryAction\n className={classes.listItemSecondaryAction}\n >\n Direct Relations\n <Tooltip\n placement=\"top\"\n arrow\n title={`${\n getRelationsType === 'direct' ? 'Direct' : 'Aggregated'\n } Relations`}\n >\n <Switch\n color=\"primary\"\n checked={getRelationsType !== 'direct'}\n onChange={() =>\n getRelationsType === 'direct'\n ? setRelationsType('aggregated')\n : setRelationsType('direct')\n }\n name=\"pin\"\n inputProps={{ 'aria-label': 'Ownership Type Switch' }}\n disabled={!isGroup}\n />\n </Tooltip>\n Aggregated Relations\n </ListItemSecondaryAction>\n </ListItem>\n </List>\n )}\n <ComponentsGrid\n entity={entity}\n relationsType={getRelationsType}\n isGroup={isGroup}\n entityFilterKind={entityFilterKind}\n />\n </InfoCard>\n );\n};\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport {\n DEFAULT_NAMESPACE,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n SidebarItem,\n SidebarSubmenu,\n SidebarSubmenuItem,\n} from '@backstage/core-components';\nimport {\n IconComponent,\n identityApiRef,\n useApi,\n useRouteRef,\n} from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/lib/useAsync';\nimport {\n catalogApiRef,\n CatalogApi,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport { getCompoundEntityRef } from '@backstage/catalog-model';\n\n/**\n * MyGroupsSidebarItem can be added to your sidebar providing quick access to groups the logged in user is a member of\n *\n * @public\n */\nexport const MyGroupsSidebarItem = (props: {\n singularTitle: string;\n pluralTitle: string;\n icon: IconComponent;\n filter?: Record<string, string | symbol | (string | symbol)[]>;\n}) => {\n const { singularTitle, pluralTitle, icon, filter } = props;\n\n const identityApi = useApi(identityApiRef);\n const catalogApi: CatalogApi = useApi(catalogApiRef);\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n\n const { value: groups } = useAsync(async () => {\n const profile = await identityApi.getBackstageIdentity();\n\n const response = await catalogApi.getEntities({\n filter: [\n {\n kind: 'group',\n 'relations.hasMember': profile.userEntityRef,\n ...(filter ?? {}),\n },\n ],\n fields: ['metadata', 'kind'],\n });\n\n return response.items;\n }, []);\n\n // Not a member of any groups\n if (!groups?.length) {\n return null;\n }\n\n // Only member of one group\n if (groups.length === 1) {\n const group = groups[0];\n return (\n <SidebarItem\n text={singularTitle}\n to={catalogEntityRoute(getCompoundEntityRef(group))}\n icon={icon}\n />\n );\n }\n\n // Member of more than one group\n return (\n <SidebarItem icon={icon} text={pluralTitle}>\n <SidebarSubmenu title={pluralTitle}>\n {groups?.map(function groupsMap(group) {\n return (\n <SidebarSubmenuItem\n title={group.metadata.title || group.metadata.name}\n subtitle={\n group.metadata.namespace !== DEFAULT_NAMESPACE\n ? group.metadata.namespace\n : undefined\n }\n to={catalogEntityRoute(getCompoundEntityRef(group))}\n icon={icon}\n key={stringifyEntityRef(group)}\n />\n );\n })}\n </SidebarSubmenu>\n </SidebarItem>\n );\n};\n"],"names":["useStyles","CardTitle","_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAkBO,MAAM,uBAAuB,sBAAuB,CAAA;AAAA,EACzD,EAAI,EAAA,eAAA;AACN,CAAC,CAAA;;ACEM,MAA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,EAAA;AACnB,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAGA,EAAI,IAAA,MAAA,CAAO,WAAW,CAAG,EAAA;AACvB,IAAA,MAAM,QAAQ,MAAO,CAAA,CAAA,CAAA,CAAA;AACrB,IAAA,uBACG,KAAA,CAAA,aAAA,CAAA,WAAA,EAAA;AAAA,MACC,IAAM,EAAA,aAAA;AAAA,MACN,EAAI,EAAA,kBAAA,CAAmB,oBAAqB,CAAA,KAAK,CAAC,CAAA;AAAA,MAClD,IAAA;AAAA,KACF,CAAA,CAAA;AAAA,GAEJ;AAGA,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,WAAA,EAAA;AAAA,IAAY,IAAA;AAAA,IAAY,IAAM,EAAA,WAAA;AAAA,GAAA,kBAC5B,KAAA,CAAA,aAAA,CAAA,cAAA,EAAA;AAAA,IAAe,KAAO,EAAA,WAAA;AAAA,GAAA,EACpB,MAAQ,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,MAAA,CAAA,GAAA,CAAI,SAAS,SAAA,CAAU,KAAO,EAAA;AACrC,IAAA,uBACG,KAAA,CAAA,aAAA,CAAA,kBAAA,EAAA;AAAA,MACC,KAAO,EAAA,KAAA,CAAM,QAAS,CAAA,KAAA,IAAS,MAAM,QAAS,CAAA,IAAA;AAAA,MAC9C,UACE,KAAM,CAAA,QAAA,CAAS,cAAc,iBACzB,GAAA,KAAA,CAAM,SAAS,SACf,GAAA,KAAA,CAAA;AAAA,MAEN,EAAI,EAAA,kBAAA,CAAmB,oBAAqB,CAAA,KAAK,CAAC,CAAA;AAAA,MAClD,IAAA;AAAA,MACA,GAAA,EAAK,mBAAmB,KAAK,CAAA;AAAA,KAC/B,CAAA,CAAA;AAAA,IAGN,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/routes.ts","../src/plugin.ts","../src/components/Cards/Group/MembersList/MembersListCard.tsx","../src/components/Cards/Meta/LinksGroup.tsx","../src/components/Cards/Group/GroupProfile/GroupProfileCard.tsx","../src/components/Cards/User/UserProfileCard/UserProfileCard.tsx","../src/components/Cards/OwnershipCard/useGetEntities.ts","../src/components/Cards/OwnershipCard/ComponentsGrid.tsx","../src/components/Cards/OwnershipCard/OwnershipCard.tsx","../src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createExternalRouteRef } from '@backstage/core-plugin-api';\n\nexport const catalogIndexRouteRef = createExternalRouteRef({\n id: 'catalog-index',\n});\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n createComponentExtension,\n createPlugin,\n} from '@backstage/core-plugin-api';\nimport { catalogIndexRouteRef } from './routes';\n\n/** @public */\nexport const orgPlugin = createPlugin({\n id: 'org',\n externalRoutes: {\n catalogIndex: catalogIndexRouteRef,\n },\n});\n\n/** @public */\nexport const EntityGroupProfileCard = orgPlugin.provide(\n createComponentExtension({\n name: 'EntityGroupProfileCard',\n component: {\n lazy: () => import('./components').then(m => m.GroupProfileCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityMembersListCard = orgPlugin.provide(\n createComponentExtension({\n name: 'EntityMembersListCard',\n component: {\n lazy: () => import('./components').then(m => m.MembersListCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityOwnershipCard = orgPlugin.provide(\n createComponentExtension({\n name: 'EntityOwnershipCard',\n component: {\n lazy: () => import('./components').then(m => m.OwnershipCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityUserProfileCard = orgPlugin.provide(\n createComponentExtension({\n name: 'EntityUserProfileCard',\n component: {\n lazy: () => import('./components').then(m => m.UserProfileCard),\n },\n }),\n);\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n DEFAULT_NAMESPACE,\n GroupEntity,\n UserEntity,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n catalogApiRef,\n entityRouteParams,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport {\n Box,\n createStyles,\n Grid,\n makeStyles,\n Theme,\n Typography,\n} from '@material-ui/core';\nimport Pagination from '@material-ui/lab/Pagination';\nimport React from 'react';\nimport { generatePath } from 'react-router-dom';\nimport useAsync from 'react-use/lib/useAsync';\n\nimport {\n Avatar,\n InfoCard,\n Progress,\n ResponseErrorPanel,\n Link,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n card: {\n border: `1px solid ${theme.palette.divider}`,\n boxShadow: theme.shadows[2],\n borderRadius: '4px',\n overflow: 'visible',\n position: 'relative',\n margin: theme.spacing(4, 1, 1),\n flex: '1',\n minWidth: '0px',\n },\n email: {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n display: 'inline-block',\n maxWidth: '100%',\n '&:hover': {\n overflow: 'visible',\n whiteSpace: 'normal',\n },\n },\n }),\n);\n\nconst MemberComponent = (props: { member: UserEntity }) => {\n const classes = useStyles();\n const {\n metadata: { name: metaName, description },\n spec: { profile },\n } = props.member;\n const displayName = profile?.displayName ?? metaName;\n\n return (\n <Grid item container xs={12} sm={6} md={4} xl={2}>\n <Box className={classes.card}>\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n m={3}\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n <Avatar\n displayName={displayName}\n picture={profile?.picture}\n customStyles={{\n position: 'absolute',\n top: '-2rem',\n }}\n />\n <Box\n pt={2}\n sx={{\n maxWidth: '100%',\n }}\n textAlign=\"center\"\n >\n <Typography variant=\"h5\">\n <Link\n to={generatePath(\n `/catalog/:namespace/user/${metaName}`,\n entityRouteParams(props.member),\n )}\n >\n {displayName}\n </Link>\n </Typography>\n {profile?.email && (\n <Link className={classes.email} to={`mailto:${profile.email}`}>\n {profile.email}\n </Link>\n )}\n {description && (\n <Typography variant=\"subtitle2\">{description}</Typography>\n )}\n </Box>\n </Box>\n </Box>\n </Grid>\n );\n};\n\n/** @public */\nexport const MembersListCard = (props: {\n memberDisplayTitle?: string;\n pageSize?: number;\n}) => {\n const { memberDisplayTitle = 'Members', pageSize = 50 } = props;\n\n const { entity: groupEntity } = useEntity<GroupEntity>();\n const {\n metadata: { name: groupName, namespace: grpNamespace },\n spec: { profile },\n } = groupEntity;\n const catalogApi = useApi(catalogApiRef);\n\n const displayName = profile?.displayName ?? groupName;\n\n const groupNamespace = grpNamespace || DEFAULT_NAMESPACE;\n\n const [page, setPage] = React.useState(1);\n const pageChange = (_: React.ChangeEvent<unknown>, pageIndex: number) => {\n setPage(pageIndex);\n };\n\n const {\n loading,\n error,\n value: members,\n } = useAsync(async () => {\n const membersList = await catalogApi.getEntities({\n filter: {\n kind: 'User',\n 'relations.memberof': [\n stringifyEntityRef({\n kind: 'group',\n namespace: groupNamespace.toLocaleLowerCase('en-US'),\n name: groupName.toLocaleLowerCase('en-US'),\n }),\n ],\n },\n });\n\n return membersList.items as UserEntity[];\n }, [catalogApi, groupEntity]);\n\n if (loading) {\n return <Progress />;\n } else if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n const nbPages = Math.ceil((members?.length || 0) / pageSize);\n const paginationLabel = nbPages < 2 ? '' : `, page ${page} of ${nbPages}`;\n\n const pagination = (\n <Pagination\n count={nbPages}\n page={page}\n onChange={pageChange}\n showFirstButton\n showLastButton\n />\n );\n\n return (\n <Grid item>\n <InfoCard\n title={`${memberDisplayTitle} (${\n members?.length || 0\n }${paginationLabel})`}\n subheader={`of ${displayName}`}\n {...(nbPages <= 1 ? {} : { actions: pagination })}\n >\n <Grid container spacing={3}>\n {members && members.length > 0 ? (\n members\n .slice(pageSize * (page - 1), pageSize * page)\n .map(member => (\n <MemberComponent member={member} key={member.metadata.uid} />\n ))\n ) : (\n <Box p={2}>\n <Typography>\n This group has no {memberDisplayTitle.toLocaleLowerCase()}.\n </Typography>\n </Box>\n )}\n </Grid>\n </InfoCard>\n </Grid>\n );\n};\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { EntityLink } from '@backstage/catalog-model';\nimport { IconComponent, useApp } from '@backstage/core-plugin-api';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport {\n ListItem,\n ListItemIcon,\n ListItemText,\n Divider,\n} from '@material-ui/core';\nimport React from 'react';\n\nconst WebLink = ({\n href,\n Icon,\n text,\n}: {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}) => (\n <ListItem button component=\"a\" key={href} href={href}>\n <ListItemIcon>{Icon ? <Icon /> : <LanguageIcon />}</ListItemIcon>\n <ListItemText>{text}</ListItemText>\n </ListItem>\n);\n\nexport const LinksGroup = ({ links }: { links?: EntityLink[] }) => {\n const app = useApp();\n const iconResolver = (key?: string): IconComponent =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n\n if (links === undefined) {\n return null;\n }\n\n return (\n <>\n <Divider />\n {links.map(link => {\n return (\n <WebLink\n key={link.url}\n href={link.url}\n text={link.title}\n Icon={iconResolver(link.icon)}\n />\n );\n })}\n </>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n ANNOTATION_EDIT_URL,\n ANNOTATION_LOCATION,\n GroupEntity,\n RELATION_CHILD_OF,\n RELATION_PARENT_OF,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n Avatar,\n InfoCard,\n InfoCardVariants,\n Link,\n} from '@backstage/core-components';\nimport {\n Box,\n Grid,\n IconButton,\n List,\n ListItem,\n ListItemIcon,\n ListItemText,\n Tooltip,\n} from '@material-ui/core';\nimport {\n EntityRefLinks,\n catalogApiRef,\n getEntityRelations,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport React, { useCallback } from 'react';\nimport { alertApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport AccountTreeIcon from '@material-ui/icons/AccountTree';\nimport Alert from '@material-ui/lab/Alert';\nimport CachedIcon from '@material-ui/icons/Cached';\nimport EditIcon from '@material-ui/icons/Edit';\nimport EmailIcon from '@material-ui/icons/Email';\nimport GroupIcon from '@material-ui/icons/Group';\nimport { LinksGroup } from '../../Meta';\n\nconst CardTitle = (props: { title: string }) => (\n <Box display=\"flex\" alignItems=\"center\">\n <GroupIcon fontSize=\"inherit\" />\n <Box ml={1}>{props.title}</Box>\n </Box>\n);\n\n/** @public */\nexport const GroupProfileCard = (props: {\n variant?: InfoCardVariants;\n showLinks?: boolean;\n}) => {\n const catalogApi = useApi(catalogApiRef);\n const alertApi = useApi(alertApiRef);\n const { entity: group } = useEntity<GroupEntity>();\n\n const refreshEntity = useCallback(async () => {\n await catalogApi.refreshEntity(stringifyEntityRef(group));\n alertApi.post({ message: 'Refresh scheduled', severity: 'info' });\n }, [catalogApi, alertApi, group]);\n\n if (!group) {\n return <Alert severity=\"error\">Group not found</Alert>;\n }\n\n const {\n metadata: { name, description, annotations, links },\n spec: { profile },\n } = group;\n\n const childRelations = getEntityRelations(group, RELATION_PARENT_OF, {\n kind: 'Group',\n });\n const parentRelations = getEntityRelations(group, RELATION_CHILD_OF, {\n kind: 'group',\n });\n\n const entityLocation = annotations?.[ANNOTATION_LOCATION];\n const allowRefresh =\n entityLocation?.startsWith('url:') || entityLocation?.startsWith('file:');\n\n const entityMetadataEditUrl =\n group.metadata.annotations?.[ANNOTATION_EDIT_URL];\n\n const displayName = profile?.displayName ?? name;\n const emailHref = profile?.email ? `mailto:${profile.email}` : '#';\n const infoCardAction = entityMetadataEditUrl ? (\n <IconButton\n aria-label=\"Edit\"\n title=\"Edit Metadata\"\n component={Link}\n to={entityMetadataEditUrl}\n >\n <EditIcon />\n </IconButton>\n ) : (\n <IconButton aria-label=\"Edit\" disabled title=\"Edit Metadata\">\n <EditIcon />\n </IconButton>\n );\n\n return (\n <InfoCard\n title={<CardTitle title={displayName} />}\n subheader={description}\n variant={props.variant}\n action={\n <>\n {allowRefresh && (\n <IconButton\n aria-label=\"Refresh\"\n title=\"Schedule entity refresh\"\n onClick={refreshEntity}\n >\n <CachedIcon />\n </IconButton>\n )}\n {infoCardAction}\n </>\n }\n >\n <Grid container spacing={3}>\n <Grid item xs={12} sm={2} xl={1}>\n <Avatar displayName={displayName} picture={profile?.picture} />\n </Grid>\n <Grid item md={10} xl={11}>\n <List>\n {profile?.email && (\n <ListItem>\n <ListItemIcon>\n <Tooltip title=\"Email\">\n <EmailIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText\n primary={<Link to={emailHref}>{profile.email}</Link>}\n secondary=\"Email\"\n />\n </ListItem>\n )}\n <ListItem>\n <ListItemIcon>\n <Tooltip title=\"Parent Group\">\n <AccountTreeIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText\n primary={\n parentRelations.length ? (\n <EntityRefLinks\n entityRefs={parentRelations}\n defaultKind=\"Group\"\n />\n ) : (\n 'N/A'\n )\n }\n secondary=\"Parent Group\"\n />\n </ListItem>\n <ListItem>\n <ListItemIcon>\n <Tooltip title=\"Child Groups\">\n <GroupIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText\n primary={\n childRelations.length ? (\n <EntityRefLinks\n entityRefs={childRelations}\n defaultKind=\"Group\"\n />\n ) : (\n 'N/A'\n )\n }\n secondary=\"Child Groups\"\n />\n </ListItem>\n {props?.showLinks && <LinksGroup links={links} />}\n </List>\n </Grid>\n </Grid>\n </InfoCard>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n ANNOTATION_EDIT_URL,\n RELATION_MEMBER_OF,\n UserEntity,\n} from '@backstage/catalog-model';\nimport {\n Avatar,\n InfoCard,\n InfoCardVariants,\n Link,\n} from '@backstage/core-components';\nimport {\n Box,\n Grid,\n IconButton,\n List,\n ListItem,\n ListItemIcon,\n ListItemText,\n Tooltip,\n} from '@material-ui/core';\nimport {\n EntityRefLinks,\n getEntityRelations,\n useEntity,\n} from '@backstage/plugin-catalog-react';\n\nimport Alert from '@material-ui/lab/Alert';\nimport EditIcon from '@material-ui/icons/Edit';\nimport EmailIcon from '@material-ui/icons/Email';\nimport GroupIcon from '@material-ui/icons/Group';\nimport { LinksGroup } from '../../Meta';\nimport PersonIcon from '@material-ui/icons/Person';\nimport React from 'react';\n\nconst CardTitle = (props: { title?: string }) =>\n props.title ? (\n <Box display=\"flex\" alignItems=\"center\">\n <PersonIcon fontSize=\"inherit\" />\n <Box ml={1}>{props.title}</Box>\n </Box>\n ) : null;\n\n/** @public */\nexport const UserProfileCard = (props: {\n variant?: InfoCardVariants;\n showLinks?: boolean;\n}) => {\n const { entity: user } = useEntity<UserEntity>();\n if (!user) {\n return <Alert severity=\"error\">User not found</Alert>;\n }\n\n const entityMetadataEditUrl =\n user.metadata.annotations?.[ANNOTATION_EDIT_URL];\n\n const {\n metadata: { name: metaName, description, links },\n spec: { profile },\n } = user;\n const displayName = profile?.displayName ?? metaName;\n const emailHref = profile?.email ? `mailto:${profile.email}` : undefined;\n const memberOfRelations = getEntityRelations(user, RELATION_MEMBER_OF, {\n kind: 'Group',\n });\n\n return (\n <InfoCard\n title={<CardTitle title={displayName} />}\n subheader={description}\n variant={props.variant}\n action={\n <>\n {entityMetadataEditUrl && (\n <IconButton\n aria-label=\"Edit\"\n title=\"Edit Metadata\"\n component={Link}\n to={entityMetadataEditUrl}\n >\n <EditIcon />\n </IconButton>\n )}\n </>\n }\n >\n <Grid container spacing={3} alignItems=\"flex-start\">\n <Grid item xs={12} sm={2} xl={1}>\n <Avatar displayName={displayName} picture={profile?.picture} />\n </Grid>\n\n <Grid item md={10} xl={11}>\n <List>\n {profile?.email && (\n <ListItem>\n <ListItemIcon>\n <Tooltip title=\"Email\">\n <EmailIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText>\n <Link to={emailHref ?? ''}>{profile.email}</Link>\n </ListItemText>\n </ListItem>\n )}\n\n <ListItem>\n <ListItemIcon>\n <Tooltip title=\"Member of\">\n <GroupIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText>\n <EntityRefLinks\n entityRefs={memberOfRelations}\n defaultKind=\"Group\"\n />\n </ListItemText>\n </ListItem>\n\n {props?.showLinks && <LinksGroup links={links} />}\n </List>\n </Grid>\n </Grid>\n </InfoCard>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Entity,\n RELATION_MEMBER_OF,\n RELATION_PARENT_OF,\n parseEntityRef,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n CatalogApi,\n catalogApiRef,\n getEntityRelations,\n humanizeEntityRef,\n} from '@backstage/plugin-catalog-react';\nimport limiterFactory from 'p-limit';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/lib/useAsync';\nimport qs from 'qs';\n\nconst limiter = limiterFactory(10);\n\ntype EntityTypeProps = {\n kind: string;\n type?: string;\n count: number;\n};\n\nconst getQueryParams = (\n ownersEntityRef: string[],\n selectedEntity: EntityTypeProps,\n): string => {\n const { kind, type } = selectedEntity;\n const owners = ownersEntityRef.map(owner =>\n humanizeEntityRef(parseEntityRef(owner), { defaultKind: 'group' }),\n );\n const filters = {\n kind: kind.toLocaleLowerCase('en-US'),\n type,\n owners,\n user: 'all',\n };\n return qs.stringify({ filters }, { arrayFormat: 'repeat' });\n};\n\nconst getOwnersEntityRef = (owner: Entity): string[] => {\n let owners = [stringifyEntityRef(owner)];\n if (owner.kind === 'User') {\n const ownerGroups = getEntityRelations(owner, RELATION_MEMBER_OF, {\n kind: 'Group',\n });\n const ownerGroupsName = ownerGroups.map(ownerGroup =>\n stringifyEntityRef({\n kind: ownerGroup.kind,\n namespace: ownerGroup.namespace,\n name: ownerGroup.name,\n }),\n );\n owners = [...owners, ...ownerGroupsName];\n }\n return owners;\n};\n\nconst getAggregatedOwnersEntityRef = async (\n parentGroup: Entity,\n catalogApi: CatalogApi,\n): Promise<string[]> => {\n const requestedEntities: Entity[] = [];\n const outstandingEntities = new Map<string, Promise<Entity | undefined>>();\n const processedEntities = new Set<string>();\n requestedEntities.push(parentGroup);\n let currentEntity = parentGroup;\n\n while (requestedEntities.length > 0) {\n const childRelations = getEntityRelations(\n currentEntity,\n RELATION_PARENT_OF,\n {\n kind: 'Group',\n },\n );\n\n await Promise.all(\n childRelations.map(childGroup =>\n limiter(async () => {\n const promise = catalogApi.getEntityByRef(childGroup);\n outstandingEntities.set(childGroup.name, promise);\n try {\n const processedEntity = await promise;\n if (processedEntity) {\n requestedEntities.push(processedEntity);\n }\n } finally {\n outstandingEntities.delete(childGroup.name);\n }\n }),\n ),\n );\n requestedEntities.shift();\n processedEntities.add(\n stringifyEntityRef({\n kind: currentEntity.kind,\n namespace: currentEntity.metadata.namespace,\n name: currentEntity.metadata.name,\n }),\n );\n // always set currentEntity to the first element of array requestedEntities\n currentEntity = requestedEntities[0];\n }\n\n return Array.from(processedEntities);\n};\n\nexport function useGetEntities(\n entity: Entity,\n relationsType: string,\n isGroup: boolean,\n entityFilterKind?: string[],\n): {\n componentsWithCounters:\n | {\n counter: number;\n type: string;\n kind: string;\n queryParams: string;\n }[]\n | undefined;\n loading: boolean;\n error?: Error;\n} {\n const catalogApi = useApi(catalogApiRef);\n const kinds = entityFilterKind ?? ['Component', 'API', 'System'];\n\n const {\n loading,\n error,\n value: componentsWithCounters,\n } = useAsync(async () => {\n const owners =\n relationsType === 'aggregated' && isGroup\n ? await getAggregatedOwnersEntityRef(entity, catalogApi)\n : getOwnersEntityRef(entity);\n const ownedEntitiesList = await catalogApi.getEntities({\n filter: [\n {\n kind: kinds,\n 'relations.ownedBy': owners,\n },\n ],\n fields: [\n 'kind',\n 'metadata.name',\n 'metadata.namespace',\n 'spec.type',\n 'relations',\n ],\n });\n\n const counts = ownedEntitiesList.items.reduce(\n (acc: EntityTypeProps[], ownedEntity) => {\n const match = acc.find(\n x => x.kind === ownedEntity.kind && x.type === ownedEntity.spec?.type,\n );\n if (match) {\n match.count += 1;\n } else {\n acc.push({\n kind: ownedEntity.kind,\n type: ownedEntity.spec?.type?.toString(),\n count: 1,\n });\n }\n return acc;\n },\n [],\n );\n\n // Return top N (six) entities to be displayed in ownership boxes\n const topN = counts.sort((a, b) => b.count - a.count).slice(0, 6);\n\n return topN.map(topOwnedEntity => ({\n counter: topOwnedEntity.count,\n type: topOwnedEntity.type,\n kind: topOwnedEntity.kind,\n queryParams: getQueryParams(owners, topOwnedEntity),\n })) as Array<{\n counter: number;\n type: string;\n kind: string;\n queryParams: string;\n }>;\n }, [catalogApi, entity, relationsType]);\n\n return {\n componentsWithCounters,\n loading,\n error,\n };\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity } from '@backstage/catalog-model';\nimport { Link, Progress, ResponseErrorPanel } from '@backstage/core-components';\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport { BackstageTheme } from '@backstage/theme';\nimport {\n Box,\n createStyles,\n Grid,\n makeStyles,\n Typography,\n} from '@material-ui/core';\nimport React from 'react';\nimport pluralize from 'pluralize';\nimport { catalogIndexRouteRef } from '../../../routes';\nimport { useGetEntities } from './useGetEntities';\n\nconst useStyles = makeStyles((theme: BackstageTheme) =>\n createStyles({\n card: {\n border: `1px solid ${theme.palette.divider}`,\n boxShadow: theme.shadows[2],\n borderRadius: '4px',\n padding: theme.spacing(2),\n color: '#fff',\n transition: `${theme.transitions.duration.standard}ms`,\n '&:hover': {\n boxShadow: theme.shadows[4],\n },\n },\n bold: {\n fontWeight: theme.typography.fontWeightBold,\n },\n entityTypeBox: {\n background: (props: { type: string }) =>\n theme.getPageTheme({ themeId: props.type }).backgroundImage,\n },\n }),\n);\n\nconst EntityCountTile = ({\n counter,\n type,\n kind,\n url,\n}: {\n counter: number;\n type?: string;\n kind: string;\n url: string;\n}) => {\n const classes = useStyles({ type: type ?? kind });\n\n const rawTitle = type ?? kind;\n\n return (\n <Link to={url} variant=\"body2\">\n <Box\n className={`${classes.card} ${classes.entityTypeBox}`}\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n >\n <Typography className={classes.bold} variant=\"h6\">\n {counter}\n </Typography>\n <Typography className={classes.bold} variant=\"h6\">\n {pluralize(rawTitle.toLocaleUpperCase('en-US'), counter)}\n </Typography>\n {type && <Typography variant=\"subtitle1\">{kind}</Typography>}\n </Box>\n </Link>\n );\n};\n\nexport const ComponentsGrid = ({\n entity,\n relationsType,\n isGroup,\n entityFilterKind,\n}: {\n entity: Entity;\n relationsType: string;\n isGroup: boolean;\n entityFilterKind?: string[];\n}) => {\n const catalogLink = useRouteRef(catalogIndexRouteRef);\n const { componentsWithCounters, loading, error } = useGetEntities(\n entity,\n relationsType,\n isGroup,\n entityFilterKind,\n );\n\n if (loading) {\n return <Progress />;\n } else if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return (\n <Grid container>\n {componentsWithCounters?.map(c => (\n <Grid item xs={6} md={6} lg={4} key={c.type ?? c.kind}>\n <EntityCountTile\n counter={c.counter}\n kind={c.kind}\n type={c.type}\n url={`${catalogLink()}/?${c.queryParams}`}\n />\n </Grid>\n ))}\n </Grid>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { InfoCard, InfoCardVariants } from '@backstage/core-components';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport {\n List,\n ListItem,\n ListItemSecondaryAction,\n ListItemText,\n makeStyles,\n Switch,\n Tooltip,\n} from '@material-ui/core';\nimport React, { useState } from 'react';\nimport { ComponentsGrid } from './ComponentsGrid';\n\nconst useStyles = makeStyles(theme => ({\n list: {\n [theme.breakpoints.down('xs')]: {\n padding: `0 0 12px`,\n },\n },\n listItemText: {\n [theme.breakpoints.down('xs')]: {\n paddingRight: 0,\n paddingLeft: 0,\n },\n },\n listItemSecondaryAction: {\n [theme.breakpoints.down('xs')]: {\n width: '100%',\n top: 'auto',\n right: 'auto',\n position: 'relative',\n transform: 'unset',\n },\n },\n}));\n\n/** @public */\nexport const OwnershipCard = (props: {\n variant?: InfoCardVariants;\n entityFilterKind?: string[];\n hideRelationsToggle?: boolean;\n relationsType?: string;\n}) => {\n const { variant, entityFilterKind, hideRelationsToggle, relationsType } =\n props;\n const relationsToggle =\n hideRelationsToggle === undefined ? false : hideRelationsToggle;\n const classes = useStyles();\n const { entity } = useEntity();\n const isGroup = entity.kind === 'Group';\n const [getRelationsType, setRelationsType] = useState(\n relationsType || 'direct',\n );\n\n return (\n <InfoCard title=\"Ownership\" variant={variant}>\n {!relationsToggle && (\n <List dense>\n <ListItem className={classes.list}>\n <ListItemText className={classes.listItemText} />\n <ListItemSecondaryAction\n className={classes.listItemSecondaryAction}\n >\n Direct Relations\n <Tooltip\n placement=\"top\"\n arrow\n title={`${\n getRelationsType === 'direct' ? 'Direct' : 'Aggregated'\n } Relations`}\n >\n <Switch\n color=\"primary\"\n checked={getRelationsType !== 'direct'}\n onChange={() =>\n getRelationsType === 'direct'\n ? setRelationsType('aggregated')\n : setRelationsType('direct')\n }\n name=\"pin\"\n inputProps={{ 'aria-label': 'Ownership Type Switch' }}\n disabled={!isGroup}\n />\n </Tooltip>\n Aggregated Relations\n </ListItemSecondaryAction>\n </ListItem>\n </List>\n )}\n <ComponentsGrid\n entity={entity}\n relationsType={getRelationsType}\n isGroup={isGroup}\n entityFilterKind={entityFilterKind}\n />\n </InfoCard>\n );\n};\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport {\n DEFAULT_NAMESPACE,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n SidebarItem,\n SidebarSubmenu,\n SidebarSubmenuItem,\n} from '@backstage/core-components';\nimport {\n IconComponent,\n identityApiRef,\n useApi,\n useRouteRef,\n} from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/lib/useAsync';\nimport {\n catalogApiRef,\n CatalogApi,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport { getCompoundEntityRef } from '@backstage/catalog-model';\n\n/**\n * MyGroupsSidebarItem can be added to your sidebar providing quick access to groups the logged in user is a member of\n *\n * @public\n */\nexport const MyGroupsSidebarItem = (props: {\n singularTitle: string;\n pluralTitle: string;\n icon: IconComponent;\n filter?: Record<string, string | symbol | (string | symbol)[]>;\n}) => {\n const { singularTitle, pluralTitle, icon, filter } = props;\n\n const identityApi = useApi(identityApiRef);\n const catalogApi: CatalogApi = useApi(catalogApiRef);\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n\n const { value: groups } = useAsync(async () => {\n const profile = await identityApi.getBackstageIdentity();\n\n const response = await catalogApi.getEntities({\n filter: [\n {\n kind: 'group',\n 'relations.hasMember': profile.userEntityRef,\n ...(filter ?? {}),\n },\n ],\n fields: ['metadata', 'kind'],\n });\n\n return response.items;\n }, []);\n\n // Not a member of any groups\n if (!groups?.length) {\n return null;\n }\n\n // Only member of one group\n if (groups.length === 1) {\n const group = groups[0];\n return (\n <SidebarItem\n text={singularTitle}\n to={catalogEntityRoute(getCompoundEntityRef(group))}\n icon={icon}\n />\n );\n }\n\n // Member of more than one group\n return (\n <SidebarItem icon={icon} text={pluralTitle}>\n <SidebarSubmenu title={pluralTitle}>\n {groups?.map(function groupsMap(group) {\n return (\n <SidebarSubmenuItem\n title={group.metadata.title || group.metadata.name}\n subtitle={\n group.metadata.namespace !== DEFAULT_NAMESPACE\n ? group.metadata.namespace\n : undefined\n }\n to={catalogEntityRoute(getCompoundEntityRef(group))}\n icon={icon}\n key={stringifyEntityRef(group)}\n />\n );\n })}\n </SidebarSubmenu>\n </SidebarItem>\n );\n};\n"],"names":["useStyles","CardTitle","_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAkBO,MAAM,uBAAuB,sBAAuB,CAAA;AAAA,EACzD,EAAI,EAAA,eAAA;AACN,CAAC,CAAA;;ACEM,MAAM,YAAY,YAAa,CAAA;AAAA,EACpC,EAAI,EAAA,KAAA;AAAA,EACJ,cAAgB,EAAA;AAAA,IACd,YAAc,EAAA,oBAAA;AAAA,GAChB;AACF,CAAC,EAAA;AAGM,MAAM,yBAAyB,SAAU,CAAA,OAAA;AAAA,EAC9C,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,wBAAA;AAAA,IAC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1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-org",
|
|
3
3
|
"description": "A Backstage plugin that helps you create entity pages for your organization",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.2-next.2",
|
|
5
5
|
"main": "dist/index.esm.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"clean": "backstage-cli package clean"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@backstage/catalog-model": "^1.1.
|
|
32
|
-
"@backstage/core-components": "^0.12.
|
|
33
|
-
"@backstage/core-plugin-api": "^1.
|
|
34
|
-
"@backstage/plugin-catalog-react": "^1.2.
|
|
31
|
+
"@backstage/catalog-model": "^1.1.4-next.1",
|
|
32
|
+
"@backstage/core-components": "^0.12.1-next.2",
|
|
33
|
+
"@backstage/core-plugin-api": "^1.2.0-next.2",
|
|
34
|
+
"@backstage/plugin-catalog-react": "^1.2.2-next.2",
|
|
35
35
|
"@backstage/theme": "^0.2.16",
|
|
36
36
|
"@material-ui/core": "^4.12.2",
|
|
37
37
|
"@material-ui/icons": "^4.9.1",
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@backstage/catalog-client": "^1.1
|
|
51
|
-
"@backstage/cli": "^0.21.
|
|
52
|
-
"@backstage/core-app-api": "^1.2.
|
|
53
|
-
"@backstage/dev-utils": "^1.0.
|
|
54
|
-
"@backstage/test-utils": "^1.2.2",
|
|
50
|
+
"@backstage/catalog-client": "^1.2.0-next.1",
|
|
51
|
+
"@backstage/cli": "^0.21.2-next.2",
|
|
52
|
+
"@backstage/core-app-api": "^1.2.1-next.2",
|
|
53
|
+
"@backstage/dev-utils": "^1.0.9-next.2",
|
|
54
|
+
"@backstage/test-utils": "^1.2.3-next.2",
|
|
55
55
|
"@testing-library/jest-dom": "^5.10.1",
|
|
56
56
|
"@testing-library/react": "^12.1.3",
|
|
57
57
|
"@testing-library/user-event": "^14.0.0",
|
|
58
58
|
"@types/node": "^16.11.26",
|
|
59
59
|
"cross-fetch": "^3.1.5",
|
|
60
|
-
"msw": "^0.
|
|
60
|
+
"msw": "^0.49.0"
|
|
61
61
|
},
|
|
62
62
|
"files": [
|
|
63
63
|
"dist"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-f02f82c8.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
|