@backstage/plugin-org 0.5.4-next.1 → 0.5.4-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 +60 -0
- package/README.md +52 -0
- package/dist/esm/{index-8208bb36.esm.js → index-1d212ad2.esm.js} +2 -2
- package/dist/esm/index-1d212ad2.esm.js.map +1 -0
- package/dist/index.d.ts +38 -13
- package/dist/index.esm.js +75 -40
- package/dist/index.esm.js.map +1 -1
- package/package.json +11 -6
- package/dist/esm/index-8208bb36.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,65 @@
|
|
|
1
1
|
# @backstage/plugin-org
|
|
2
2
|
|
|
3
|
+
## 0.5.4-next.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- cb592bfce7: Provides the ability to hide the relations toggle on the `OwnershipCard` as well as setting a default relation type.
|
|
8
|
+
|
|
9
|
+
To hide the toggle simply include the `hideRelationsToggle` prop like this:
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
<EntityOwnershipCard
|
|
13
|
+
variant="gridItem"
|
|
14
|
+
entityFilterKind={customEntityFilterKind}
|
|
15
|
+
hideRelationsToggle
|
|
16
|
+
/>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
To set the default relation type, add the `relationsType` prop with a value of direct or aggregated, the default if not provided is direct. Here is an example:
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
<EntityOwnershipCard
|
|
23
|
+
variant="gridItem"
|
|
24
|
+
entityFilterKind={customEntityFilterKind}
|
|
25
|
+
relationsType="aggregated"
|
|
26
|
+
/>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
- d014fe2cb4: Introduced a new MyGroupsSidebarItem SidebarItem that links to one or more groups based on the logged in user's membership.
|
|
30
|
+
|
|
31
|
+
To use MyGroupsSidebarItem you'll need to add it to your `Root.tsx` like this:
|
|
32
|
+
|
|
33
|
+
```diff
|
|
34
|
+
// app/src/components/Root/Root.tsx
|
|
35
|
+
+ import { MyGroupsSidebarItem } from '@backstage/plugin-org';
|
|
36
|
+
+ import GroupIcon from '@material-ui/icons/People';
|
|
37
|
+
|
|
38
|
+
<SidebarPage>
|
|
39
|
+
<Sidebar>
|
|
40
|
+
//...
|
|
41
|
+
<SidebarGroup label="Menu" icon={<MenuIcon />}>
|
|
42
|
+
{/* Global nav, not org-specific */}
|
|
43
|
+
//...
|
|
44
|
+
<SidebarItem icon={HomeIcon} to="catalog" text="Home" />
|
|
45
|
+
+ <MyGroupsSidebarItem
|
|
46
|
+
+ singularTitle="My Squad"
|
|
47
|
+
+ pluralTitle="My Squads"
|
|
48
|
+
+ icon={GroupIcon}
|
|
49
|
+
+ />
|
|
50
|
+
//...
|
|
51
|
+
</SidebarGroup>
|
|
52
|
+
</ Sidebar>
|
|
53
|
+
</SidebarPage>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
- 0bada4fc4d: Added the `metadata.description` to the bottom of each member on the MembersListCard
|
|
57
|
+
- 99063c39ae: Minor API report cleanup
|
|
58
|
+
- Updated dependencies
|
|
59
|
+
- @backstage/core-components@0.9.3-next.1
|
|
60
|
+
- @backstage/plugin-catalog-react@1.0.1-next.2
|
|
61
|
+
- @backstage/catalog-model@1.0.1-next.1
|
|
62
|
+
|
|
3
63
|
## 0.5.4-next.1
|
|
4
64
|
|
|
5
65
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -4,3 +4,55 @@
|
|
|
4
4
|
|
|
5
5
|
- Show Group Page
|
|
6
6
|
- Show User Profile
|
|
7
|
+
- Quick access to Groups
|
|
8
|
+
|
|
9
|
+
### Group Page
|
|
10
|
+
|
|
11
|
+
Here's an example of what the Group Page looks like:
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
### User Profile
|
|
16
|
+
|
|
17
|
+
Here's an example of what the User Profile looks like:
|
|
18
|
+
|
|
19
|
+

|
|
20
|
+
|
|
21
|
+
### MyGroupsSidebarItem
|
|
22
|
+
|
|
23
|
+
The MyGroupsSidebarItem provides quick access to the group(s) the logged in user is a member of directly in the sidebar.
|
|
24
|
+
|
|
25
|
+
To use the MyGroupsSidebarItem you'll need to add it to your `Root.tsx` - found at `packages\app\src\components\Root` - like this:
|
|
26
|
+
|
|
27
|
+
```diff
|
|
28
|
+
+ import { MyGroupsSidebarItem } from '@backstage/plugin-org';
|
|
29
|
+
+ import GroupIcon from '@material-ui/icons/People';
|
|
30
|
+
|
|
31
|
+
<SidebarPage>
|
|
32
|
+
<Sidebar>
|
|
33
|
+
//...
|
|
34
|
+
<SidebarGroup label="Menu" icon={<MenuIcon />}>
|
|
35
|
+
{/* Global nav, not org-specific */}
|
|
36
|
+
//...
|
|
37
|
+
<SidebarItem icon={HomeIcon} to="catalog" text="Home" />
|
|
38
|
+
+ <MyGroupsSidebarItem
|
|
39
|
+
+ singularTitle="My Squad"
|
|
40
|
+
+ pluralTitle="My Squads"
|
|
41
|
+
+ icon={GroupIcon}
|
|
42
|
+
+ />
|
|
43
|
+
//...
|
|
44
|
+
</SidebarGroup>
|
|
45
|
+
</ Sidebar>
|
|
46
|
+
</SidebarPage>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Once added MyGroupsSidebarItem will work in three ways:
|
|
50
|
+
|
|
51
|
+
1. The user is not logged in or the logged in user is not a member of any group: the MyGroupsSidebarItem will not display anything in the sidebar
|
|
52
|
+
2. The user is logged in and a member of only one group: the MyGroupsSidebarItem will display a single item in the sidebar like this:
|
|
53
|
+
|
|
54
|
+

|
|
55
|
+
|
|
56
|
+
3. The user is logged in and a member of more than one group: the MyGroupsSidebarItem will display a single items with a sub-menu with all the related groups like this:
|
|
57
|
+
|
|
58
|
+

|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { GroupProfileCard, MembersListCard, OwnershipCard, UserProfileCard } from '../index.esm.js';
|
|
1
|
+
export { GroupProfileCard, MembersListCard, MyGroupsSidebarItem, OwnershipCard, UserProfileCard } from '../index.esm.js';
|
|
2
2
|
import '@backstage/core-plugin-api';
|
|
3
3
|
import '@backstage/catalog-model';
|
|
4
4
|
import '@backstage/plugin-catalog-react';
|
|
@@ -18,4 +18,4 @@ import '@material-ui/icons/Person';
|
|
|
18
18
|
import 'pluralize';
|
|
19
19
|
import 'p-limit';
|
|
20
20
|
import 'qs';
|
|
21
|
-
//# sourceMappingURL=index-
|
|
21
|
+
//# sourceMappingURL=index-1d212ad2.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-1d212ad2.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,41 +2,66 @@
|
|
|
2
2
|
import * as _backstage_core_components from '@backstage/core-components';
|
|
3
3
|
import { InfoCardVariants } from '@backstage/core-components';
|
|
4
4
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
5
|
+
import { IconComponent } from '@backstage/core-plugin-api';
|
|
5
6
|
|
|
7
|
+
/** @public */
|
|
6
8
|
declare const orgPlugin: _backstage_core_plugin_api.BackstagePlugin<{}, {
|
|
7
9
|
catalogIndex: _backstage_core_plugin_api.ExternalRouteRef<undefined, false>;
|
|
8
10
|
}>;
|
|
9
|
-
|
|
11
|
+
/** @public */
|
|
12
|
+
declare const EntityGroupProfileCard: (props: {
|
|
10
13
|
variant?: _backstage_core_components.InfoCardVariants | undefined;
|
|
11
14
|
}) => JSX.Element;
|
|
12
|
-
|
|
15
|
+
/** @public */
|
|
16
|
+
declare const EntityMembersListCard: (props: {
|
|
13
17
|
memberDisplayTitle?: string | undefined;
|
|
14
18
|
pageSize?: number | undefined;
|
|
15
19
|
}) => JSX.Element;
|
|
16
|
-
|
|
20
|
+
/** @public */
|
|
21
|
+
declare const EntityOwnershipCard: (props: {
|
|
17
22
|
variant?: _backstage_core_components.InfoCardVariants | undefined;
|
|
18
23
|
entityFilterKind?: string[] | undefined;
|
|
24
|
+
hideRelationsToggle?: boolean | undefined;
|
|
25
|
+
relationsType?: string | undefined;
|
|
19
26
|
}) => JSX.Element;
|
|
20
|
-
|
|
27
|
+
/** @public */
|
|
28
|
+
declare const EntityUserProfileCard: (props: {
|
|
21
29
|
variant?: _backstage_core_components.InfoCardVariants | undefined;
|
|
22
30
|
}) => JSX.Element;
|
|
23
31
|
|
|
24
|
-
|
|
32
|
+
/** @public */
|
|
33
|
+
declare const MembersListCard: (props: {
|
|
25
34
|
memberDisplayTitle?: string;
|
|
26
35
|
pageSize?: number;
|
|
27
36
|
}) => JSX.Element;
|
|
28
37
|
|
|
29
|
-
|
|
30
|
-
|
|
38
|
+
/** @public */
|
|
39
|
+
declare const GroupProfileCard: (props: {
|
|
40
|
+
variant?: InfoCardVariants;
|
|
31
41
|
}) => JSX.Element;
|
|
32
42
|
|
|
33
|
-
|
|
34
|
-
|
|
43
|
+
/** @public */
|
|
44
|
+
declare const UserProfileCard: (props: {
|
|
45
|
+
variant?: InfoCardVariants;
|
|
35
46
|
}) => JSX.Element;
|
|
36
47
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
48
|
+
/** @public */
|
|
49
|
+
declare const OwnershipCard: (props: {
|
|
50
|
+
variant?: InfoCardVariants;
|
|
51
|
+
entityFilterKind?: string[];
|
|
52
|
+
hideRelationsToggle?: boolean;
|
|
53
|
+
relationsType?: string;
|
|
40
54
|
}) => JSX.Element;
|
|
41
55
|
|
|
42
|
-
|
|
56
|
+
/**
|
|
57
|
+
* MyGroupsSidebarItem can be added to your sidebar providing quick access to groups the logged in user is a member of
|
|
58
|
+
*
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
declare const MyGroupsSidebarItem: (props: {
|
|
62
|
+
singularTitle: string;
|
|
63
|
+
pluralTitle: string;
|
|
64
|
+
icon: IconComponent;
|
|
65
|
+
}) => JSX.Element | null;
|
|
66
|
+
|
|
67
|
+
export { EntityGroupProfileCard, EntityMembersListCard, EntityOwnershipCard, EntityUserProfileCard, GroupProfileCard, MembersListCard, MyGroupsSidebarItem, OwnershipCard, UserProfileCard, orgPlugin, orgPlugin as plugin };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { createExternalRouteRef, createPlugin, createComponentExtension, useApi, alertApiRef, useRouteRef } from '@backstage/core-plugin-api';
|
|
2
|
-
import { stringifyEntityRef, DEFAULT_NAMESPACE, RELATION_PARENT_OF, RELATION_CHILD_OF, ANNOTATION_LOCATION, ANNOTATION_EDIT_URL, RELATION_MEMBER_OF } from '@backstage/catalog-model';
|
|
3
|
-
import { useEntity, catalogApiRef, entityRouteParams, getEntityRelations, EntityRefLinks } from '@backstage/plugin-catalog-react';
|
|
1
|
+
import { createExternalRouteRef, createPlugin, createComponentExtension, useApi, alertApiRef, useRouteRef, identityApiRef } from '@backstage/core-plugin-api';
|
|
2
|
+
import { stringifyEntityRef, DEFAULT_NAMESPACE, RELATION_PARENT_OF, RELATION_CHILD_OF, ANNOTATION_LOCATION, ANNOTATION_EDIT_URL, RELATION_MEMBER_OF, getCompoundEntityRef } from '@backstage/catalog-model';
|
|
3
|
+
import { useEntity, catalogApiRef, entityRouteParams, getEntityRelations, EntityRefLinks, entityRouteRef } from '@backstage/plugin-catalog-react';
|
|
4
4
|
import { makeStyles, createStyles, Grid, Box, Typography, IconButton, List, ListItem, ListItemIcon, Tooltip, ListItemText, ListItemSecondaryAction, Switch } from '@material-ui/core';
|
|
5
5
|
import Pagination from '@material-ui/lab/Pagination';
|
|
6
6
|
import React, { useCallback, useState } from 'react';
|
|
7
7
|
import { generatePath } from 'react-router-dom';
|
|
8
8
|
import useAsync from 'react-use/lib/useAsync';
|
|
9
|
-
import { Progress, ResponseErrorPanel, InfoCard, Avatar, Link } from '@backstage/core-components';
|
|
9
|
+
import { Progress, ResponseErrorPanel, InfoCard, Avatar, Link, SidebarItem, SidebarSubmenu, SidebarSubmenuItem } from '@backstage/core-components';
|
|
10
10
|
import AccountTreeIcon from '@material-ui/icons/AccountTree';
|
|
11
11
|
import EmailIcon from '@material-ui/icons/Email';
|
|
12
12
|
import GroupIcon from '@material-ui/icons/Group';
|
|
@@ -31,25 +31,25 @@ const orgPlugin = createPlugin({
|
|
|
31
31
|
const EntityGroupProfileCard = orgPlugin.provide(createComponentExtension({
|
|
32
32
|
name: "EntityGroupProfileCard",
|
|
33
33
|
component: {
|
|
34
|
-
lazy: () => import('./esm/index-
|
|
34
|
+
lazy: () => import('./esm/index-1d212ad2.esm.js').then((m) => m.GroupProfileCard)
|
|
35
35
|
}
|
|
36
36
|
}));
|
|
37
37
|
const EntityMembersListCard = orgPlugin.provide(createComponentExtension({
|
|
38
38
|
name: "EntityMembersListCard",
|
|
39
39
|
component: {
|
|
40
|
-
lazy: () => import('./esm/index-
|
|
40
|
+
lazy: () => import('./esm/index-1d212ad2.esm.js').then((m) => m.MembersListCard)
|
|
41
41
|
}
|
|
42
42
|
}));
|
|
43
43
|
const EntityOwnershipCard = orgPlugin.provide(createComponentExtension({
|
|
44
44
|
name: "EntityOwnershipCard",
|
|
45
45
|
component: {
|
|
46
|
-
lazy: () => import('./esm/index-
|
|
46
|
+
lazy: () => import('./esm/index-1d212ad2.esm.js').then((m) => m.OwnershipCard)
|
|
47
47
|
}
|
|
48
48
|
}));
|
|
49
49
|
const EntityUserProfileCard = orgPlugin.provide(createComponentExtension({
|
|
50
50
|
name: "EntityUserProfileCard",
|
|
51
51
|
component: {
|
|
52
|
-
lazy: () => import('./esm/index-
|
|
52
|
+
lazy: () => import('./esm/index-1d212ad2.esm.js').then((m) => m.UserProfileCard)
|
|
53
53
|
}
|
|
54
54
|
}));
|
|
55
55
|
|
|
@@ -65,13 +65,13 @@ const useStyles$2 = makeStyles((theme) => createStyles({
|
|
|
65
65
|
minWidth: "0px"
|
|
66
66
|
}
|
|
67
67
|
}));
|
|
68
|
-
const MemberComponent = (
|
|
68
|
+
const MemberComponent = (props) => {
|
|
69
69
|
var _a;
|
|
70
70
|
const classes = useStyles$2();
|
|
71
71
|
const {
|
|
72
|
-
metadata: { name: metaName },
|
|
72
|
+
metadata: { name: metaName, description },
|
|
73
73
|
spec: { profile }
|
|
74
|
-
} = member;
|
|
74
|
+
} = props.member;
|
|
75
75
|
const displayName = (_a = profile == null ? void 0 : profile.displayName) != null ? _a : metaName;
|
|
76
76
|
return /* @__PURE__ */ React.createElement(Grid, {
|
|
77
77
|
item: true,
|
|
@@ -101,15 +101,17 @@ const MemberComponent = ({ member }) => {
|
|
|
101
101
|
}, /* @__PURE__ */ React.createElement(Typography, {
|
|
102
102
|
variant: "h5"
|
|
103
103
|
}, /* @__PURE__ */ React.createElement(Link, {
|
|
104
|
-
to: generatePath(`/catalog/:namespace/user/${metaName}`, entityRouteParams(member))
|
|
104
|
+
to: generatePath(`/catalog/:namespace/user/${metaName}`, entityRouteParams(props.member))
|
|
105
105
|
}, displayName)), (profile == null ? void 0 : profile.email) && /* @__PURE__ */ React.createElement(Link, {
|
|
106
106
|
to: `mailto:${profile.email}`
|
|
107
|
-
}, profile.email)
|
|
107
|
+
}, profile.email), description && /* @__PURE__ */ React.createElement(Typography, {
|
|
108
|
+
variant: "subtitle2"
|
|
109
|
+
}, description)))));
|
|
108
110
|
};
|
|
109
|
-
const MembersListCard = (
|
|
111
|
+
const MembersListCard = (props) => {
|
|
110
112
|
var _a;
|
|
113
|
+
const { memberDisplayTitle = "Members", pageSize = 50 } = props;
|
|
111
114
|
const { entity: groupEntity } = useEntity();
|
|
112
|
-
let { memberDisplayTitle, pageSize } = _props;
|
|
113
115
|
const {
|
|
114
116
|
metadata: { name: groupName, namespace: grpNamespace },
|
|
115
117
|
spec: { profile }
|
|
@@ -121,8 +123,6 @@ const MembersListCard = (_props) => {
|
|
|
121
123
|
const pageChange = (_, pageIndex) => {
|
|
122
124
|
setPage(pageIndex);
|
|
123
125
|
};
|
|
124
|
-
pageSize = pageSize ? pageSize : 50;
|
|
125
|
-
memberDisplayTitle = memberDisplayTitle ? memberDisplayTitle : "Members";
|
|
126
126
|
const {
|
|
127
127
|
loading,
|
|
128
128
|
error,
|
|
@@ -175,17 +175,15 @@ const MembersListCard = (_props) => {
|
|
|
175
175
|
}, /* @__PURE__ */ React.createElement(Typography, null, "This group has no ", memberDisplayTitle.toLocaleLowerCase(), ".")))));
|
|
176
176
|
};
|
|
177
177
|
|
|
178
|
-
const CardTitle$1 = (
|
|
178
|
+
const CardTitle$1 = (props) => /* @__PURE__ */ React.createElement(Box, {
|
|
179
179
|
display: "flex",
|
|
180
180
|
alignItems: "center"
|
|
181
181
|
}, /* @__PURE__ */ React.createElement(GroupIcon, {
|
|
182
182
|
fontSize: "inherit"
|
|
183
183
|
}), /* @__PURE__ */ React.createElement(Box, {
|
|
184
184
|
ml: 1
|
|
185
|
-
}, title));
|
|
186
|
-
const GroupProfileCard = ({
|
|
187
|
-
variant
|
|
188
|
-
}) => {
|
|
185
|
+
}, props.title));
|
|
186
|
+
const GroupProfileCard = (props) => {
|
|
189
187
|
var _a, _b;
|
|
190
188
|
const catalogApi = useApi(catalogApiRef);
|
|
191
189
|
const alertApi = useApi(alertApiRef);
|
|
@@ -229,7 +227,7 @@ const GroupProfileCard = ({
|
|
|
229
227
|
title: displayName
|
|
230
228
|
}),
|
|
231
229
|
subheader: description,
|
|
232
|
-
variant,
|
|
230
|
+
variant: props.variant,
|
|
233
231
|
action: /* @__PURE__ */ React.createElement(React.Fragment, null, allowRefresh && /* @__PURE__ */ React.createElement(IconButton, {
|
|
234
232
|
"aria-label": "Refresh",
|
|
235
233
|
title: "Schedule entity refresh",
|
|
@@ -267,17 +265,15 @@ const GroupProfileCard = ({
|
|
|
267
265
|
}))) : null))));
|
|
268
266
|
};
|
|
269
267
|
|
|
270
|
-
const CardTitle = (
|
|
268
|
+
const CardTitle = (props) => props.title ? /* @__PURE__ */ React.createElement(Box, {
|
|
271
269
|
display: "flex",
|
|
272
270
|
alignItems: "center"
|
|
273
271
|
}, /* @__PURE__ */ React.createElement(PersonIcon, {
|
|
274
272
|
fontSize: "inherit"
|
|
275
273
|
}), /* @__PURE__ */ React.createElement(Box, {
|
|
276
274
|
ml: 1
|
|
277
|
-
}, title)) : null;
|
|
278
|
-
const UserProfileCard = ({
|
|
279
|
-
variant
|
|
280
|
-
}) => {
|
|
275
|
+
}, props.title)) : null;
|
|
276
|
+
const UserProfileCard = (props) => {
|
|
281
277
|
var _a;
|
|
282
278
|
const { entity: user } = useEntity();
|
|
283
279
|
if (!user) {
|
|
@@ -299,7 +295,7 @@ const UserProfileCard = ({
|
|
|
299
295
|
title: displayName
|
|
300
296
|
}),
|
|
301
297
|
subheader: description,
|
|
302
|
-
variant
|
|
298
|
+
variant: props.variant
|
|
303
299
|
}, /* @__PURE__ */ React.createElement(Grid, {
|
|
304
300
|
container: true,
|
|
305
301
|
spacing: 3,
|
|
@@ -541,18 +537,17 @@ const useStyles = makeStyles((theme) => ({
|
|
|
541
537
|
}
|
|
542
538
|
}
|
|
543
539
|
}));
|
|
544
|
-
const OwnershipCard = ({
|
|
545
|
-
variant,
|
|
546
|
-
|
|
547
|
-
}) => {
|
|
540
|
+
const OwnershipCard = (props) => {
|
|
541
|
+
const { variant, entityFilterKind, hideRelationsToggle, relationsType } = props;
|
|
542
|
+
const relationsToggle = hideRelationsToggle === void 0 ? false : hideRelationsToggle;
|
|
548
543
|
const classes = useStyles();
|
|
549
544
|
const { entity } = useEntity();
|
|
550
545
|
const isGroup = entity.kind === "Group";
|
|
551
|
-
const [
|
|
546
|
+
const [getRelationsType, setRelationsType] = useState(relationsType || "direct");
|
|
552
547
|
return /* @__PURE__ */ React.createElement(InfoCard, {
|
|
553
548
|
title: "Ownership",
|
|
554
549
|
variant
|
|
555
|
-
}, /* @__PURE__ */ React.createElement(List, {
|
|
550
|
+
}, !relationsToggle && /* @__PURE__ */ React.createElement(List, {
|
|
556
551
|
dense: true
|
|
557
552
|
}, /* @__PURE__ */ React.createElement(ListItem, {
|
|
558
553
|
className: classes.list
|
|
@@ -563,21 +558,61 @@ const OwnershipCard = ({
|
|
|
563
558
|
}, "Direct Relations", /* @__PURE__ */ React.createElement(Tooltip, {
|
|
564
559
|
placement: "top",
|
|
565
560
|
arrow: true,
|
|
566
|
-
title: `${
|
|
561
|
+
title: `${getRelationsType === "direct" ? "Direct" : "Aggregated"} Relations`
|
|
567
562
|
}, /* @__PURE__ */ React.createElement(Switch, {
|
|
568
563
|
color: "primary",
|
|
569
|
-
checked:
|
|
570
|
-
onChange: () =>
|
|
564
|
+
checked: getRelationsType !== "direct",
|
|
565
|
+
onChange: () => getRelationsType === "direct" ? setRelationsType("aggregated") : setRelationsType("direct"),
|
|
571
566
|
name: "pin",
|
|
572
567
|
inputProps: { "aria-label": "Ownership Type Switch" },
|
|
573
568
|
disabled: !isGroup
|
|
574
569
|
})), "Aggregated Relations"))), /* @__PURE__ */ React.createElement(ComponentsGrid, {
|
|
575
570
|
entity,
|
|
576
|
-
relationsType,
|
|
571
|
+
relationsType: getRelationsType,
|
|
577
572
|
isGroup,
|
|
578
573
|
entityFilterKind
|
|
579
574
|
}));
|
|
580
575
|
};
|
|
581
576
|
|
|
582
|
-
|
|
577
|
+
const MyGroupsSidebarItem = (props) => {
|
|
578
|
+
const { singularTitle, pluralTitle, icon } = props;
|
|
579
|
+
const identityApi = useApi(identityApiRef);
|
|
580
|
+
const catalogApi = useApi(catalogApiRef);
|
|
581
|
+
const catalogEntityRoute = useRouteRef(entityRouteRef);
|
|
582
|
+
const { value: groups } = useAsync(async () => {
|
|
583
|
+
const profile = await identityApi.getBackstageIdentity();
|
|
584
|
+
const response = await catalogApi.getEntities({
|
|
585
|
+
filter: [{ kind: "group", "relations.hasMember": profile.userEntityRef }],
|
|
586
|
+
fields: ["metadata", "kind"]
|
|
587
|
+
});
|
|
588
|
+
return response.items;
|
|
589
|
+
}, []);
|
|
590
|
+
if (!(groups == null ? void 0 : groups.length)) {
|
|
591
|
+
return null;
|
|
592
|
+
}
|
|
593
|
+
if (groups.length === 1) {
|
|
594
|
+
const group = groups[0];
|
|
595
|
+
return /* @__PURE__ */ React.createElement(SidebarItem, {
|
|
596
|
+
text: singularTitle,
|
|
597
|
+
to: catalogEntityRoute(getCompoundEntityRef(group)),
|
|
598
|
+
icon
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
return /* @__PURE__ */ React.createElement(SidebarItem, {
|
|
602
|
+
icon,
|
|
603
|
+
to: "catalog",
|
|
604
|
+
text: pluralTitle
|
|
605
|
+
}, /* @__PURE__ */ React.createElement(SidebarSubmenu, {
|
|
606
|
+
title: pluralTitle
|
|
607
|
+
}, groups == null ? void 0 : groups.map(function groupsMap(group) {
|
|
608
|
+
return /* @__PURE__ */ React.createElement(SidebarSubmenuItem, {
|
|
609
|
+
title: group.metadata.title || group.metadata.name,
|
|
610
|
+
to: catalogEntityRoute(getCompoundEntityRef(group)),
|
|
611
|
+
icon,
|
|
612
|
+
key: group.metadata.name
|
|
613
|
+
});
|
|
614
|
+
})));
|
|
615
|
+
};
|
|
616
|
+
|
|
617
|
+
export { EntityGroupProfileCard, EntityMembersListCard, EntityOwnershipCard, EntityUserProfileCard, GroupProfileCard, MembersListCard, MyGroupsSidebarItem, OwnershipCard, UserProfileCard, orgPlugin, orgPlugin as plugin };
|
|
583
618
|
//# sourceMappingURL=index.esm.js.map
|
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/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"],"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\nexport const orgPlugin = createPlugin({\n id: 'org',\n externalRoutes: {\n catalogIndex: catalogIndexRouteRef,\n },\n});\n\nexport const EntityGroupProfileCard = orgPlugin.provide(\n createComponentExtension({\n name: 'EntityGroupProfileCard',\n component: {\n lazy: () => import('./components').then(m => m.GroupProfileCard),\n },\n }),\n);\nexport const EntityMembersListCard = orgPlugin.provide(\n createComponentExtension({\n name: 'EntityMembersListCard',\n component: {\n lazy: () => import('./components').then(m => m.MembersListCard),\n },\n }),\n);\nexport const EntityOwnershipCard = orgPlugin.provide(\n createComponentExtension({\n name: 'EntityOwnershipCard',\n component: {\n lazy: () => import('./components').then(m => m.OwnershipCard),\n },\n }),\n);\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 */\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 }),\n);\n\nconst MemberComponent = ({ member }: { member: UserEntity }) => {\n const classes = useStyles();\n const {\n metadata: { name: metaName },\n spec: { profile },\n } = 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 pt={2} textAlign=\"center\">\n <Typography variant=\"h5\">\n <Link\n to={generatePath(\n `/catalog/:namespace/user/${metaName}`,\n entityRouteParams(member),\n )}\n >\n {displayName}\n </Link>\n </Typography>\n {profile?.email && (\n <Link to={`mailto:${profile.email}`}>{profile.email}</Link>\n )}\n </Box>\n </Box>\n </Box>\n </Grid>\n );\n};\n\nexport const MembersListCard = (_props: {\n memberDisplayTitle?: string;\n pageSize?: number;\n}) => {\n const { entity: groupEntity } = useEntity<GroupEntity>();\n let { memberDisplayTitle, pageSize } = _props;\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 pageSize = pageSize ? pageSize : 50;\n memberDisplayTitle = memberDisplayTitle ? memberDisplayTitle : 'Members';\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 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 GroupEntity,\n RELATION_CHILD_OF,\n RELATION_PARENT_OF,\n ANNOTATION_LOCATION,\n stringifyEntityRef,\n ANNOTATION_EDIT_URL,\n} from '@backstage/catalog-model';\nimport {\n catalogApiRef,\n EntityRefLinks,\n getEntityRelations,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport {\n Box,\n Grid,\n List,\n ListItem,\n ListItemIcon,\n ListItemText,\n Tooltip,\n IconButton,\n} from '@material-ui/core';\nimport AccountTreeIcon from '@material-ui/icons/AccountTree';\nimport EmailIcon from '@material-ui/icons/Email';\nimport GroupIcon from '@material-ui/icons/Group';\nimport EditIcon from '@material-ui/icons/Edit';\nimport CachedIcon from '@material-ui/icons/Cached';\nimport Alert from '@material-ui/lab/Alert';\nimport React, { useCallback } from 'react';\nimport {\n Avatar,\n InfoCard,\n InfoCardVariants,\n Link,\n} from '@backstage/core-components';\nimport { alertApiRef, useApi } from '@backstage/core-plugin-api';\n\nconst CardTitle = ({ title }: { title: string }) => (\n <Box display=\"flex\" alignItems=\"center\">\n <GroupIcon fontSize=\"inherit\" />\n <Box ml={1}>{title}</Box>\n </Box>\n);\n\nexport const GroupProfileCard = ({\n variant,\n}: {\n variant?: InfoCardVariants;\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 },\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={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 <Link to={emailHref}>{profile.email}</Link>\n </ListItemText>\n </ListItem>\n )}\n\n {parentRelations.length ? (\n <ListItem>\n <ListItemIcon>\n <Tooltip title=\"Parent Group\">\n <AccountTreeIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText>\n <EntityRefLinks\n entityRefs={parentRelations}\n defaultKind=\"Group\"\n />\n </ListItemText>\n </ListItem>\n ) : null}\n\n {childRelations.length ? (\n <ListItem>\n <ListItemIcon>\n <Tooltip title=\"Child Groups\">\n <GroupIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText>\n <EntityRefLinks\n entityRefs={childRelations}\n defaultKind=\"Group\"\n />\n </ListItemText>\n </ListItem>\n ) : null}\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 */\nimport { RELATION_MEMBER_OF, UserEntity } from '@backstage/catalog-model';\nimport {\n EntityRefLinks,\n getEntityRelations,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport {\n Box,\n Grid,\n List,\n ListItem,\n ListItemIcon,\n ListItemText,\n Tooltip,\n} from '@material-ui/core';\nimport EmailIcon from '@material-ui/icons/Email';\nimport GroupIcon from '@material-ui/icons/Group';\nimport PersonIcon from '@material-ui/icons/Person';\nimport Alert from '@material-ui/lab/Alert';\nimport React from 'react';\nimport {\n Avatar,\n InfoCard,\n InfoCardVariants,\n Link,\n} from '@backstage/core-components';\n\nconst CardTitle = ({ title }: { title?: string }) =>\n title ? (\n <Box display=\"flex\" alignItems=\"center\">\n <PersonIcon fontSize=\"inherit\" />\n <Box ml={1}>{title}</Box>\n </Box>\n ) : null;\n\nexport const UserProfileCard = ({\n variant,\n}: {\n variant?: InfoCardVariants;\n}) => {\n const { entity: user } = useEntity<UserEntity>();\n if (!user) {\n return <Alert severity=\"error\">User not found</Alert>;\n }\n\n const {\n metadata: { name: metaName, description },\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={variant}\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 </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 stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n CatalogApi,\n catalogApiRef,\n getEntityRelations,\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 => owner.split('/')[1]);\n const filters = {\n kind,\n type,\n owners,\n user: 'all',\n };\n const queryParams = qs.stringify({\n filters,\n });\n\n return queryParams;\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 name: 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 =>\n x.kind === ownedEntity.kind &&\n x.type === (ownedEntity.spec?.type ?? ownedEntity.kind),\n );\n if (match) {\n match.count += 1;\n } else {\n acc.push({\n kind: ownedEntity.kind,\n type: ownedEntity.spec?.type?.toString() ?? ownedEntity.kind,\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 name: topOwnedEntity.type.toLocaleUpperCase('en-US'),\n queryParams: getQueryParams(owners, topOwnedEntity),\n })) as Array<{\n counter: number;\n type: string;\n name: 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 name,\n url,\n}: {\n counter: number;\n type: string;\n name: string;\n url: string;\n}) => {\n const classes = useStyles({ type });\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(name, counter)}\n </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.name}>\n <EntityCountTile\n counter={c.counter}\n type={c.type}\n name={c.name}\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\nexport const OwnershipCard = ({\n variant,\n entityFilterKind,\n}: {\n variant?: InfoCardVariants;\n entityFilterKind?: string[];\n}) => {\n const classes = useStyles();\n const { entity } = useEntity();\n const isGroup = entity.kind === 'Group';\n const [relationsType, setRelationsType] = useState('direct');\n\n return (\n <InfoCard title=\"Ownership\" variant={variant}>\n <List dense>\n <ListItem className={classes.list}>\n <ListItemText className={classes.listItemText} />\n <ListItemSecondaryAction className={classes.listItemSecondaryAction}>\n Direct Relations\n <Tooltip\n placement=\"top\"\n arrow\n title={`${\n relationsType === 'direct' ? 'Direct' : 'Aggregated'\n } Relations`}\n >\n <Switch\n color=\"primary\"\n checked={relationsType !== 'direct'}\n onChange={() =>\n relationsType === '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 <ComponentsGrid\n entity={entity}\n relationsType={relationsType}\n isGroup={isGroup}\n entityFilterKind={entityFilterKind}\n />\n </InfoCard>\n );\n};\n"],"names":["useStyles","CardTitle"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkBO,MAAM,uBAAuB,sBAAuB,CAAA;AAAA,EACzD,EAAI,EAAA,eAAA;AACN,CAAC,CAAA;;ACCM,MAAM,YAAY,YAAa,CAAA;AAAA,EACpC,EAAI,EAAA,KAAA;AAAA,EACJ,cAAgB,EAAA;AAAA,IACd,YAAc,EAAA,oBAAA;AAAA,GAChB;AACF,CAAC,EAAA;AAEY,MAAA,sBAAA,GAAyB,SAAU,CAAA,OAAA,CAC9C,wBAAyB,CAAA;AAAA,EACvB,IAAM,EAAA,wBAAA;AAAA,EACN,SAAW,EAAA;AAAA,IACT,MAAM,MAAM,OAAO,+BAAgB,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,gBAAgB,CAAA;AAAA,GACjE;AACF,CAAC,CACH,EAAA;AAC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ACF,mBACC,KAAA,CAAA,aAAA,CAAA,cAAA,EAAA;AAAA,IACC,MAAA;AAAA,IACA,aAAA;AAAA,IACA,OAAA;AAAA,IACA,gBAAA;AAAA,GACF,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/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 }),\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 pt={2} textAlign=\"center\">\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 to={`mailto:${profile.email}`}>{profile.email}</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 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 GroupEntity,\n RELATION_CHILD_OF,\n RELATION_PARENT_OF,\n ANNOTATION_LOCATION,\n stringifyEntityRef,\n ANNOTATION_EDIT_URL,\n} from '@backstage/catalog-model';\nimport {\n catalogApiRef,\n EntityRefLinks,\n getEntityRelations,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport {\n Box,\n Grid,\n List,\n ListItem,\n ListItemIcon,\n ListItemText,\n Tooltip,\n IconButton,\n} from '@material-ui/core';\nimport AccountTreeIcon from '@material-ui/icons/AccountTree';\nimport EmailIcon from '@material-ui/icons/Email';\nimport GroupIcon from '@material-ui/icons/Group';\nimport EditIcon from '@material-ui/icons/Edit';\nimport CachedIcon from '@material-ui/icons/Cached';\nimport Alert from '@material-ui/lab/Alert';\nimport React, { useCallback } from 'react';\nimport {\n Avatar,\n InfoCard,\n InfoCardVariants,\n Link,\n} from '@backstage/core-components';\nimport { alertApiRef, useApi } from '@backstage/core-plugin-api';\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: { variant?: InfoCardVariants }) => {\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 },\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 <Link to={emailHref}>{profile.email}</Link>\n </ListItemText>\n </ListItem>\n )}\n\n {parentRelations.length ? (\n <ListItem>\n <ListItemIcon>\n <Tooltip title=\"Parent Group\">\n <AccountTreeIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText>\n <EntityRefLinks\n entityRefs={parentRelations}\n defaultKind=\"Group\"\n />\n </ListItemText>\n </ListItem>\n ) : null}\n\n {childRelations.length ? (\n <ListItem>\n <ListItemIcon>\n <Tooltip title=\"Child Groups\">\n <GroupIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText>\n <EntityRefLinks\n entityRefs={childRelations}\n defaultKind=\"Group\"\n />\n </ListItemText>\n </ListItem>\n ) : null}\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 { RELATION_MEMBER_OF, UserEntity } from '@backstage/catalog-model';\nimport {\n EntityRefLinks,\n getEntityRelations,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport {\n Box,\n Grid,\n List,\n ListItem,\n ListItemIcon,\n ListItemText,\n Tooltip,\n} from '@material-ui/core';\nimport EmailIcon from '@material-ui/icons/Email';\nimport GroupIcon from '@material-ui/icons/Group';\nimport PersonIcon from '@material-ui/icons/Person';\nimport Alert from '@material-ui/lab/Alert';\nimport React from 'react';\nimport {\n Avatar,\n InfoCard,\n InfoCardVariants,\n Link,\n} from '@backstage/core-components';\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: { variant?: InfoCardVariants }) => {\n const { entity: user } = useEntity<UserEntity>();\n if (!user) {\n return <Alert severity=\"error\">User not found</Alert>;\n }\n\n const {\n metadata: { name: metaName, description },\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 >\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 </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 stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n CatalogApi,\n catalogApiRef,\n getEntityRelations,\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 => owner.split('/')[1]);\n const filters = {\n kind,\n type,\n owners,\n user: 'all',\n };\n const queryParams = qs.stringify({\n filters,\n });\n\n return queryParams;\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 name: 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 =>\n x.kind === ownedEntity.kind &&\n x.type === (ownedEntity.spec?.type ?? ownedEntity.kind),\n );\n if (match) {\n match.count += 1;\n } else {\n acc.push({\n kind: ownedEntity.kind,\n type: ownedEntity.spec?.type?.toString() ?? ownedEntity.kind,\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 name: topOwnedEntity.type.toLocaleUpperCase('en-US'),\n queryParams: getQueryParams(owners, topOwnedEntity),\n })) as Array<{\n counter: number;\n type: string;\n name: 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 name,\n url,\n}: {\n counter: number;\n type: string;\n name: string;\n url: string;\n}) => {\n const classes = useStyles({ type });\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(name, counter)}\n </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.name}>\n <EntityCountTile\n counter={c.counter}\n type={c.type}\n name={c.name}\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 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}) => {\n const { singularTitle, pluralTitle, icon } = 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: [{ kind: 'group', 'relations.hasMember': profile.userEntityRef }],\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} to=\"catalog\" 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 to={catalogEntityRoute(getCompoundEntityRef(group))}\n icon={icon}\n key={group.metadata.name}\n />\n );\n })}\n </SidebarSubmenu>\n </SidebarItem>\n );\n};\n"],"names":["useStyles","CardTitle"],"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;AAGY,MAAA,sBAAA,GAAyB,SAAU,CAAA,OAAA,CAC9C,wBAAyB,CAAA;AAAA,EACvB,IAAM,EAAA,wBAAA;AAAA,EACN,SAAW,EAAA;AAAA,IACT,MAAM,MAAM,OAAO,+BAAgB,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,gBAAgB,CAAA;AAAA,GACjE;AACF,CAAC,CACH,EAAA;AAGa,MAAA,qBAAA,GAAwB,SAAU,CAAA,OAAA,CAC7C,wBAAyB,CAAA;AAAA,EACvB,IAAM,EAAA,uBAAA;AAAA,EACN,SAAW,EAAA;AAAA,IACT,MAAM,MAAM,OAAO,+BAAgB,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,eAAe,CAAA;AAAA,GAChE;AACF,CAAC,CACH,EAAA;AAGa,MAAA,mBAAA,GAAsB,SAAU,CAAA,OAAA,CAC3C,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AAAA,GAEJ;AAGA,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,WAAA,EAAA;AAAA,IAAY,IAAA;AAAA,IAAY,EAAG,EAAA,SAAA;AAAA,IAAU,IAAM,EAAA,WAAA;AAAA,GAAA,kBACzC,KAAA,CAAA,aAAA,CAAA,cAAA,EAAA;AAAA,IAAe,KAAO,EAAA,WAAA;AAAA,GACpB,EAAA,MAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,MAAA,CAAQ,GAAI,CAAA,SAAA,SAAA,CAAmB,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,EAAI,EAAA,kBAAA,CAAmB,oBAAqB,CAAA,KAAK,CAAC,CAAA;AAAA,MAClD,IAAA;AAAA,MACA,GAAA,EAAK,MAAM,QAAS,CAAA,IAAA;AAAA,KACtB,CAAA,CAAA;AAAA,IAGN,CACF,CAAA,CAAA;AAEJ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.5.4-next.
|
|
4
|
+
"version": "0.5.4-next.2",
|
|
5
5
|
"main": "dist/index.esm.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
"backstage": {
|
|
14
14
|
"role": "frontend-plugin"
|
|
15
15
|
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/backstage/backstage",
|
|
19
|
+
"directory": "plugins/org"
|
|
20
|
+
},
|
|
16
21
|
"scripts": {
|
|
17
22
|
"build": "backstage-cli package build",
|
|
18
23
|
"start": "backstage-cli package start",
|
|
@@ -24,10 +29,10 @@
|
|
|
24
29
|
"clean": "backstage-cli package clean"
|
|
25
30
|
},
|
|
26
31
|
"dependencies": {
|
|
27
|
-
"@backstage/catalog-model": "^1.0.1-next.
|
|
28
|
-
"@backstage/core-components": "^0.9.3-next.
|
|
32
|
+
"@backstage/catalog-model": "^1.0.1-next.1",
|
|
33
|
+
"@backstage/core-components": "^0.9.3-next.1",
|
|
29
34
|
"@backstage/core-plugin-api": "^1.0.0",
|
|
30
|
-
"@backstage/plugin-catalog-react": "^1.0.1-next.
|
|
35
|
+
"@backstage/plugin-catalog-react": "^1.0.1-next.2",
|
|
31
36
|
"@backstage/theme": "^0.2.15",
|
|
32
37
|
"@material-ui/core": "^4.12.2",
|
|
33
38
|
"@material-ui/icons": "^4.9.1",
|
|
@@ -44,7 +49,7 @@
|
|
|
44
49
|
},
|
|
45
50
|
"devDependencies": {
|
|
46
51
|
"@backstage/catalog-client": "^1.0.1-next.0",
|
|
47
|
-
"@backstage/cli": "^0.17.0-next.
|
|
52
|
+
"@backstage/cli": "^0.17.0-next.2",
|
|
48
53
|
"@backstage/core-app-api": "^1.0.1-next.0",
|
|
49
54
|
"@backstage/dev-utils": "^1.0.1-next.0",
|
|
50
55
|
"@backstage/test-utils": "^1.0.1-next.1",
|
|
@@ -59,5 +64,5 @@
|
|
|
59
64
|
"files": [
|
|
60
65
|
"dist"
|
|
61
66
|
],
|
|
62
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "0857aaef2040e1d6c0b8b2063f4c94c810d0a96a"
|
|
63
68
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-8208bb36.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
|