@backstage/plugin-org 0.5.4-next.0 → 0.5.4-next.3
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 +79 -0
- package/README.md +52 -0
- package/dist/esm/{index-f4bbe36c.esm.js → index-1d212ad2.esm.js} +4 -3
- package/dist/esm/index-1d212ad2.esm.js.map +1 -0
- package/dist/index.d.ts +38 -13
- package/dist/index.esm.js +254 -107
- package/dist/index.esm.js.map +1 -1
- package/package.json +18 -12
- package/dist/esm/index-f4bbe36c.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,84 @@
|
|
|
1
1
|
# @backstage/plugin-org
|
|
2
2
|
|
|
3
|
+
## 0.5.4-next.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 24254fd433: build(deps): bump `@testing-library/user-event` from 13.5.0 to 14.0.0
|
|
8
|
+
- 230ad0826f: Bump to using `@types/node` v16
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @backstage/core-components@0.9.3-next.2
|
|
11
|
+
- @backstage/core-plugin-api@1.0.1-next.0
|
|
12
|
+
- @backstage/plugin-catalog-react@1.0.1-next.3
|
|
13
|
+
|
|
14
|
+
## 0.5.4-next.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- cb592bfce7: Provides the ability to hide the relations toggle on the `OwnershipCard` as well as setting a default relation type.
|
|
19
|
+
|
|
20
|
+
To hide the toggle simply include the `hideRelationsToggle` prop like this:
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
<EntityOwnershipCard
|
|
24
|
+
variant="gridItem"
|
|
25
|
+
entityFilterKind={customEntityFilterKind}
|
|
26
|
+
hideRelationsToggle
|
|
27
|
+
/>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
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:
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
<EntityOwnershipCard
|
|
34
|
+
variant="gridItem"
|
|
35
|
+
entityFilterKind={customEntityFilterKind}
|
|
36
|
+
relationsType="aggregated"
|
|
37
|
+
/>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
- d014fe2cb4: Introduced a new MyGroupsSidebarItem SidebarItem that links to one or more groups based on the logged in user's membership.
|
|
41
|
+
|
|
42
|
+
To use MyGroupsSidebarItem you'll need to add it to your `Root.tsx` like this:
|
|
43
|
+
|
|
44
|
+
```diff
|
|
45
|
+
// app/src/components/Root/Root.tsx
|
|
46
|
+
+ import { MyGroupsSidebarItem } from '@backstage/plugin-org';
|
|
47
|
+
+ import GroupIcon from '@material-ui/icons/People';
|
|
48
|
+
|
|
49
|
+
<SidebarPage>
|
|
50
|
+
<Sidebar>
|
|
51
|
+
//...
|
|
52
|
+
<SidebarGroup label="Menu" icon={<MenuIcon />}>
|
|
53
|
+
{/* Global nav, not org-specific */}
|
|
54
|
+
//...
|
|
55
|
+
<SidebarItem icon={HomeIcon} to="catalog" text="Home" />
|
|
56
|
+
+ <MyGroupsSidebarItem
|
|
57
|
+
+ singularTitle="My Squad"
|
|
58
|
+
+ pluralTitle="My Squads"
|
|
59
|
+
+ icon={GroupIcon}
|
|
60
|
+
+ />
|
|
61
|
+
//...
|
|
62
|
+
</SidebarGroup>
|
|
63
|
+
</ Sidebar>
|
|
64
|
+
</SidebarPage>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
- 0bada4fc4d: Added the `metadata.description` to the bottom of each member on the MembersListCard
|
|
68
|
+
- 99063c39ae: Minor API report cleanup
|
|
69
|
+
- Updated dependencies
|
|
70
|
+
- @backstage/core-components@0.9.3-next.1
|
|
71
|
+
- @backstage/plugin-catalog-react@1.0.1-next.2
|
|
72
|
+
- @backstage/catalog-model@1.0.1-next.1
|
|
73
|
+
|
|
74
|
+
## 0.5.4-next.1
|
|
75
|
+
|
|
76
|
+
### Patch Changes
|
|
77
|
+
|
|
78
|
+
- 111995470d: add aggregated ownership type for kind group in OwnershipCard
|
|
79
|
+
- Updated dependencies
|
|
80
|
+
- @backstage/plugin-catalog-react@1.0.1-next.1
|
|
81
|
+
|
|
3
82
|
## 0.5.4-next.0
|
|
4
83
|
|
|
5
84
|
### 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';
|
|
@@ -15,6 +15,7 @@ import '@material-ui/icons/Edit';
|
|
|
15
15
|
import '@material-ui/icons/Cached';
|
|
16
16
|
import '@material-ui/lab/Alert';
|
|
17
17
|
import '@material-ui/icons/Person';
|
|
18
|
-
import 'qs';
|
|
19
18
|
import 'pluralize';
|
|
20
|
-
|
|
19
|
+
import 'p-limit';
|
|
20
|
+
import 'qs';
|
|
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,
|
|
4
|
-
import { makeStyles, createStyles, Grid, Box, Typography, IconButton, List, ListItem, ListItemIcon, Tooltip, ListItemText } from '@material-ui/core';
|
|
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
|
+
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
|
-
import React, { useCallback } from 'react';
|
|
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';
|
|
@@ -14,8 +14,9 @@ import EditIcon from '@material-ui/icons/Edit';
|
|
|
14
14
|
import CachedIcon from '@material-ui/icons/Cached';
|
|
15
15
|
import Alert from '@material-ui/lab/Alert';
|
|
16
16
|
import PersonIcon from '@material-ui/icons/Person';
|
|
17
|
-
import qs from 'qs';
|
|
18
17
|
import pluralize from 'pluralize';
|
|
18
|
+
import limiterFactory from 'p-limit';
|
|
19
|
+
import qs from 'qs';
|
|
19
20
|
|
|
20
21
|
const catalogIndexRouteRef = createExternalRouteRef({
|
|
21
22
|
id: "catalog-index"
|
|
@@ -30,29 +31,29 @@ const orgPlugin = createPlugin({
|
|
|
30
31
|
const EntityGroupProfileCard = orgPlugin.provide(createComponentExtension({
|
|
31
32
|
name: "EntityGroupProfileCard",
|
|
32
33
|
component: {
|
|
33
|
-
lazy: () => import('./esm/index-
|
|
34
|
+
lazy: () => import('./esm/index-1d212ad2.esm.js').then((m) => m.GroupProfileCard)
|
|
34
35
|
}
|
|
35
36
|
}));
|
|
36
37
|
const EntityMembersListCard = orgPlugin.provide(createComponentExtension({
|
|
37
38
|
name: "EntityMembersListCard",
|
|
38
39
|
component: {
|
|
39
|
-
lazy: () => import('./esm/index-
|
|
40
|
+
lazy: () => import('./esm/index-1d212ad2.esm.js').then((m) => m.MembersListCard)
|
|
40
41
|
}
|
|
41
42
|
}));
|
|
42
43
|
const EntityOwnershipCard = orgPlugin.provide(createComponentExtension({
|
|
43
44
|
name: "EntityOwnershipCard",
|
|
44
45
|
component: {
|
|
45
|
-
lazy: () => import('./esm/index-
|
|
46
|
+
lazy: () => import('./esm/index-1d212ad2.esm.js').then((m) => m.OwnershipCard)
|
|
46
47
|
}
|
|
47
48
|
}));
|
|
48
49
|
const EntityUserProfileCard = orgPlugin.provide(createComponentExtension({
|
|
49
50
|
name: "EntityUserProfileCard",
|
|
50
51
|
component: {
|
|
51
|
-
lazy: () => import('./esm/index-
|
|
52
|
+
lazy: () => import('./esm/index-1d212ad2.esm.js').then((m) => m.UserProfileCard)
|
|
52
53
|
}
|
|
53
54
|
}));
|
|
54
55
|
|
|
55
|
-
const useStyles$
|
|
56
|
+
const useStyles$2 = makeStyles((theme) => createStyles({
|
|
56
57
|
card: {
|
|
57
58
|
border: `1px solid ${theme.palette.divider}`,
|
|
58
59
|
boxShadow: theme.shadows[2],
|
|
@@ -64,13 +65,13 @@ const useStyles$1 = makeStyles((theme) => createStyles({
|
|
|
64
65
|
minWidth: "0px"
|
|
65
66
|
}
|
|
66
67
|
}));
|
|
67
|
-
const MemberComponent = (
|
|
68
|
+
const MemberComponent = (props) => {
|
|
68
69
|
var _a;
|
|
69
|
-
const classes = useStyles$
|
|
70
|
+
const classes = useStyles$2();
|
|
70
71
|
const {
|
|
71
|
-
metadata: { name: metaName },
|
|
72
|
+
metadata: { name: metaName, description },
|
|
72
73
|
spec: { profile }
|
|
73
|
-
} = member;
|
|
74
|
+
} = props.member;
|
|
74
75
|
const displayName = (_a = profile == null ? void 0 : profile.displayName) != null ? _a : metaName;
|
|
75
76
|
return /* @__PURE__ */ React.createElement(Grid, {
|
|
76
77
|
item: true,
|
|
@@ -100,15 +101,17 @@ const MemberComponent = ({ member }) => {
|
|
|
100
101
|
}, /* @__PURE__ */ React.createElement(Typography, {
|
|
101
102
|
variant: "h5"
|
|
102
103
|
}, /* @__PURE__ */ React.createElement(Link, {
|
|
103
|
-
to: generatePath(`/catalog/:namespace/user/${metaName}`, entityRouteParams(member))
|
|
104
|
+
to: generatePath(`/catalog/:namespace/user/${metaName}`, entityRouteParams(props.member))
|
|
104
105
|
}, displayName)), (profile == null ? void 0 : profile.email) && /* @__PURE__ */ React.createElement(Link, {
|
|
105
106
|
to: `mailto:${profile.email}`
|
|
106
|
-
}, profile.email)
|
|
107
|
+
}, profile.email), description && /* @__PURE__ */ React.createElement(Typography, {
|
|
108
|
+
variant: "subtitle2"
|
|
109
|
+
}, description)))));
|
|
107
110
|
};
|
|
108
|
-
const MembersListCard = (
|
|
111
|
+
const MembersListCard = (props) => {
|
|
109
112
|
var _a;
|
|
113
|
+
const { memberDisplayTitle = "Members", pageSize = 50 } = props;
|
|
110
114
|
const { entity: groupEntity } = useEntity();
|
|
111
|
-
let { memberDisplayTitle, pageSize } = _props;
|
|
112
115
|
const {
|
|
113
116
|
metadata: { name: groupName, namespace: grpNamespace },
|
|
114
117
|
spec: { profile }
|
|
@@ -120,8 +123,6 @@ const MembersListCard = (_props) => {
|
|
|
120
123
|
const pageChange = (_, pageIndex) => {
|
|
121
124
|
setPage(pageIndex);
|
|
122
125
|
};
|
|
123
|
-
pageSize = pageSize ? pageSize : 50;
|
|
124
|
-
memberDisplayTitle = memberDisplayTitle ? memberDisplayTitle : "Members";
|
|
125
126
|
const {
|
|
126
127
|
loading,
|
|
127
128
|
error,
|
|
@@ -174,17 +175,15 @@ const MembersListCard = (_props) => {
|
|
|
174
175
|
}, /* @__PURE__ */ React.createElement(Typography, null, "This group has no ", memberDisplayTitle.toLocaleLowerCase(), ".")))));
|
|
175
176
|
};
|
|
176
177
|
|
|
177
|
-
const CardTitle$1 = (
|
|
178
|
+
const CardTitle$1 = (props) => /* @__PURE__ */ React.createElement(Box, {
|
|
178
179
|
display: "flex",
|
|
179
180
|
alignItems: "center"
|
|
180
181
|
}, /* @__PURE__ */ React.createElement(GroupIcon, {
|
|
181
182
|
fontSize: "inherit"
|
|
182
183
|
}), /* @__PURE__ */ React.createElement(Box, {
|
|
183
184
|
ml: 1
|
|
184
|
-
}, title));
|
|
185
|
-
const GroupProfileCard = ({
|
|
186
|
-
variant
|
|
187
|
-
}) => {
|
|
185
|
+
}, props.title));
|
|
186
|
+
const GroupProfileCard = (props) => {
|
|
188
187
|
var _a, _b;
|
|
189
188
|
const catalogApi = useApi(catalogApiRef);
|
|
190
189
|
const alertApi = useApi(alertApiRef);
|
|
@@ -228,7 +227,7 @@ const GroupProfileCard = ({
|
|
|
228
227
|
title: displayName
|
|
229
228
|
}),
|
|
230
229
|
subheader: description,
|
|
231
|
-
variant,
|
|
230
|
+
variant: props.variant,
|
|
232
231
|
action: /* @__PURE__ */ React.createElement(React.Fragment, null, allowRefresh && /* @__PURE__ */ React.createElement(IconButton, {
|
|
233
232
|
"aria-label": "Refresh",
|
|
234
233
|
title: "Schedule entity refresh",
|
|
@@ -266,17 +265,15 @@ const GroupProfileCard = ({
|
|
|
266
265
|
}))) : null))));
|
|
267
266
|
};
|
|
268
267
|
|
|
269
|
-
const CardTitle = (
|
|
268
|
+
const CardTitle = (props) => props.title ? /* @__PURE__ */ React.createElement(Box, {
|
|
270
269
|
display: "flex",
|
|
271
270
|
alignItems: "center"
|
|
272
271
|
}, /* @__PURE__ */ React.createElement(PersonIcon, {
|
|
273
272
|
fontSize: "inherit"
|
|
274
273
|
}), /* @__PURE__ */ React.createElement(Box, {
|
|
275
274
|
ml: 1
|
|
276
|
-
}, title)) : null;
|
|
277
|
-
const UserProfileCard = ({
|
|
278
|
-
variant
|
|
279
|
-
}) => {
|
|
275
|
+
}, props.title)) : null;
|
|
276
|
+
const UserProfileCard = (props) => {
|
|
280
277
|
var _a;
|
|
281
278
|
const { entity: user } = useEntity();
|
|
282
279
|
if (!user) {
|
|
@@ -298,7 +295,7 @@ const UserProfileCard = ({
|
|
|
298
295
|
title: displayName
|
|
299
296
|
}),
|
|
300
297
|
subheader: description,
|
|
301
|
-
variant
|
|
298
|
+
variant: props.variant
|
|
302
299
|
}, /* @__PURE__ */ React.createElement(Grid, {
|
|
303
300
|
container: true,
|
|
304
301
|
spacing: 3,
|
|
@@ -327,86 +324,84 @@ const UserProfileCard = ({
|
|
|
327
324
|
})))))));
|
|
328
325
|
};
|
|
329
326
|
|
|
330
|
-
const
|
|
331
|
-
|
|
332
|
-
border: `1px solid ${theme.palette.divider}`,
|
|
333
|
-
boxShadow: theme.shadows[2],
|
|
334
|
-
borderRadius: "4px",
|
|
335
|
-
padding: theme.spacing(2),
|
|
336
|
-
color: "#fff",
|
|
337
|
-
transition: `${theme.transitions.duration.standard}ms`,
|
|
338
|
-
"&:hover": {
|
|
339
|
-
boxShadow: theme.shadows[4]
|
|
340
|
-
}
|
|
341
|
-
},
|
|
342
|
-
bold: {
|
|
343
|
-
fontWeight: theme.typography.fontWeightBold
|
|
344
|
-
},
|
|
345
|
-
entityTypeBox: {
|
|
346
|
-
background: (props) => theme.getPageTheme({ themeId: props.type }).backgroundImage
|
|
347
|
-
}
|
|
348
|
-
}));
|
|
349
|
-
const EntityCountTile = ({
|
|
350
|
-
counter,
|
|
351
|
-
type,
|
|
352
|
-
name,
|
|
353
|
-
url
|
|
354
|
-
}) => {
|
|
355
|
-
const classes = useStyles({ type });
|
|
356
|
-
return /* @__PURE__ */ React.createElement(Link, {
|
|
357
|
-
to: url,
|
|
358
|
-
variant: "body2"
|
|
359
|
-
}, /* @__PURE__ */ React.createElement(Box, {
|
|
360
|
-
className: `${classes.card} ${classes.entityTypeBox}`,
|
|
361
|
-
display: "flex",
|
|
362
|
-
flexDirection: "column",
|
|
363
|
-
alignItems: "center"
|
|
364
|
-
}, /* @__PURE__ */ React.createElement(Typography, {
|
|
365
|
-
className: classes.bold,
|
|
366
|
-
variant: "h6"
|
|
367
|
-
}, counter), /* @__PURE__ */ React.createElement(Typography, {
|
|
368
|
-
className: classes.bold,
|
|
369
|
-
variant: "h6"
|
|
370
|
-
}, pluralize(name, counter))));
|
|
371
|
-
};
|
|
372
|
-
const getQueryParams = (owner, selectedEntity) => {
|
|
373
|
-
var _a;
|
|
374
|
-
const ownerName = humanizeEntityRef(owner, { defaultKind: "group" });
|
|
327
|
+
const limiter = limiterFactory(10);
|
|
328
|
+
const getQueryParams = (ownersEntityRef, selectedEntity) => {
|
|
375
329
|
const { kind, type } = selectedEntity;
|
|
330
|
+
const owners = ownersEntityRef.map((owner) => owner.split("/")[1]);
|
|
376
331
|
const filters = {
|
|
377
332
|
kind,
|
|
378
333
|
type,
|
|
379
|
-
owners
|
|
334
|
+
owners,
|
|
380
335
|
user: "all"
|
|
381
336
|
};
|
|
382
|
-
if (owner.kind === "User") {
|
|
383
|
-
const user = owner;
|
|
384
|
-
filters.owners = [...filters.owners, ...(_a = user.spec.memberOf) != null ? _a : []];
|
|
385
|
-
}
|
|
386
337
|
const queryParams = qs.stringify({
|
|
387
338
|
filters
|
|
388
|
-
}, {
|
|
389
|
-
arrayFormat: "repeat"
|
|
390
339
|
});
|
|
391
340
|
return queryParams;
|
|
392
341
|
};
|
|
393
|
-
const
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
342
|
+
const getOwnersEntityRef = (owner) => {
|
|
343
|
+
let owners = [stringifyEntityRef(owner)];
|
|
344
|
+
if (owner.kind === "User") {
|
|
345
|
+
const ownerGroups = getEntityRelations(owner, RELATION_MEMBER_OF, {
|
|
346
|
+
kind: "Group"
|
|
347
|
+
});
|
|
348
|
+
const ownerGroupsName = ownerGroups.map((ownerGroup) => stringifyEntityRef({
|
|
349
|
+
kind: ownerGroup.kind,
|
|
350
|
+
namespace: ownerGroup.namespace,
|
|
351
|
+
name: ownerGroup.name
|
|
352
|
+
}));
|
|
353
|
+
owners = [...owners, ...ownerGroupsName];
|
|
354
|
+
}
|
|
355
|
+
return owners;
|
|
356
|
+
};
|
|
357
|
+
const getAggregatedOwnersEntityRef = async (parentGroup, catalogApi) => {
|
|
358
|
+
const requestedEntities = [];
|
|
359
|
+
const outstandingEntities = /* @__PURE__ */ new Map();
|
|
360
|
+
const processedEntities = /* @__PURE__ */ new Set();
|
|
361
|
+
requestedEntities.push(parentGroup);
|
|
362
|
+
let currentEntity = parentGroup;
|
|
363
|
+
while (requestedEntities.length > 0) {
|
|
364
|
+
const childRelations = getEntityRelations(currentEntity, RELATION_PARENT_OF, {
|
|
365
|
+
kind: "Group"
|
|
366
|
+
});
|
|
367
|
+
await Promise.all(childRelations.map((childGroup) => limiter(async () => {
|
|
368
|
+
const promise = catalogApi.getEntityByRef(childGroup);
|
|
369
|
+
outstandingEntities.set(childGroup.name, promise);
|
|
370
|
+
try {
|
|
371
|
+
const processedEntity = await promise;
|
|
372
|
+
if (processedEntity) {
|
|
373
|
+
requestedEntities.push(processedEntity);
|
|
374
|
+
}
|
|
375
|
+
} finally {
|
|
376
|
+
outstandingEntities.delete(childGroup.name);
|
|
377
|
+
}
|
|
378
|
+
})));
|
|
379
|
+
requestedEntities.shift();
|
|
380
|
+
processedEntities.add(stringifyEntityRef({
|
|
381
|
+
kind: currentEntity.kind,
|
|
382
|
+
namespace: currentEntity.metadata.namespace,
|
|
383
|
+
name: currentEntity.metadata.name
|
|
384
|
+
}));
|
|
385
|
+
currentEntity = requestedEntities[0];
|
|
386
|
+
}
|
|
387
|
+
return Array.from(processedEntities);
|
|
388
|
+
};
|
|
389
|
+
function useGetEntities(entity, relationsType, isGroup, entityFilterKind) {
|
|
398
390
|
const catalogApi = useApi(catalogApiRef);
|
|
399
|
-
const
|
|
391
|
+
const kinds = entityFilterKind != null ? entityFilterKind : ["Component", "API", "System"];
|
|
400
392
|
const {
|
|
401
393
|
loading,
|
|
402
394
|
error,
|
|
403
395
|
value: componentsWithCounters
|
|
404
396
|
} = useAsync(async () => {
|
|
405
|
-
const
|
|
406
|
-
const
|
|
407
|
-
filter:
|
|
408
|
-
|
|
409
|
-
|
|
397
|
+
const owners = relationsType === "aggregated" && isGroup ? await getAggregatedOwnersEntityRef(entity, catalogApi) : getOwnersEntityRef(entity);
|
|
398
|
+
const ownedEntitiesList = await catalogApi.getEntities({
|
|
399
|
+
filter: [
|
|
400
|
+
{
|
|
401
|
+
kind: kinds,
|
|
402
|
+
"relations.ownedBy": owners
|
|
403
|
+
}
|
|
404
|
+
],
|
|
410
405
|
fields: [
|
|
411
406
|
"kind",
|
|
412
407
|
"metadata.name",
|
|
@@ -415,8 +410,7 @@ const OwnershipCard = ({
|
|
|
415
410
|
"relations"
|
|
416
411
|
]
|
|
417
412
|
});
|
|
418
|
-
const
|
|
419
|
-
const counts = ownedEntitiesList.reduce((acc, ownedEntity) => {
|
|
413
|
+
const counts = ownedEntitiesList.items.reduce((acc, ownedEntity) => {
|
|
420
414
|
var _a, _b, _c;
|
|
421
415
|
const match = acc.find((x) => {
|
|
422
416
|
var _a2, _b2;
|
|
@@ -438,9 +432,66 @@ const OwnershipCard = ({
|
|
|
438
432
|
counter: topOwnedEntity.count,
|
|
439
433
|
type: topOwnedEntity.type,
|
|
440
434
|
name: topOwnedEntity.type.toLocaleUpperCase("en-US"),
|
|
441
|
-
queryParams: getQueryParams(
|
|
435
|
+
queryParams: getQueryParams(owners, topOwnedEntity)
|
|
442
436
|
}));
|
|
443
|
-
}, [catalogApi, entity]);
|
|
437
|
+
}, [catalogApi, entity, relationsType]);
|
|
438
|
+
return {
|
|
439
|
+
componentsWithCounters,
|
|
440
|
+
loading,
|
|
441
|
+
error
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
const useStyles$1 = makeStyles((theme) => createStyles({
|
|
446
|
+
card: {
|
|
447
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
448
|
+
boxShadow: theme.shadows[2],
|
|
449
|
+
borderRadius: "4px",
|
|
450
|
+
padding: theme.spacing(2),
|
|
451
|
+
color: "#fff",
|
|
452
|
+
transition: `${theme.transitions.duration.standard}ms`,
|
|
453
|
+
"&:hover": {
|
|
454
|
+
boxShadow: theme.shadows[4]
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
bold: {
|
|
458
|
+
fontWeight: theme.typography.fontWeightBold
|
|
459
|
+
},
|
|
460
|
+
entityTypeBox: {
|
|
461
|
+
background: (props) => theme.getPageTheme({ themeId: props.type }).backgroundImage
|
|
462
|
+
}
|
|
463
|
+
}));
|
|
464
|
+
const EntityCountTile = ({
|
|
465
|
+
counter,
|
|
466
|
+
type,
|
|
467
|
+
name,
|
|
468
|
+
url
|
|
469
|
+
}) => {
|
|
470
|
+
const classes = useStyles$1({ type });
|
|
471
|
+
return /* @__PURE__ */ React.createElement(Link, {
|
|
472
|
+
to: url,
|
|
473
|
+
variant: "body2"
|
|
474
|
+
}, /* @__PURE__ */ React.createElement(Box, {
|
|
475
|
+
className: `${classes.card} ${classes.entityTypeBox}`,
|
|
476
|
+
display: "flex",
|
|
477
|
+
flexDirection: "column",
|
|
478
|
+
alignItems: "center"
|
|
479
|
+
}, /* @__PURE__ */ React.createElement(Typography, {
|
|
480
|
+
className: classes.bold,
|
|
481
|
+
variant: "h6"
|
|
482
|
+
}, counter), /* @__PURE__ */ React.createElement(Typography, {
|
|
483
|
+
className: classes.bold,
|
|
484
|
+
variant: "h6"
|
|
485
|
+
}, pluralize(name, counter))));
|
|
486
|
+
};
|
|
487
|
+
const ComponentsGrid = ({
|
|
488
|
+
entity,
|
|
489
|
+
relationsType,
|
|
490
|
+
isGroup,
|
|
491
|
+
entityFilterKind
|
|
492
|
+
}) => {
|
|
493
|
+
const catalogLink = useRouteRef(catalogIndexRouteRef);
|
|
494
|
+
const { componentsWithCounters, loading, error } = useGetEntities(entity, relationsType, isGroup, entityFilterKind);
|
|
444
495
|
if (loading) {
|
|
445
496
|
return /* @__PURE__ */ React.createElement(Progress, null);
|
|
446
497
|
} else if (error) {
|
|
@@ -448,10 +499,7 @@ const OwnershipCard = ({
|
|
|
448
499
|
error
|
|
449
500
|
});
|
|
450
501
|
}
|
|
451
|
-
return /* @__PURE__ */ React.createElement(
|
|
452
|
-
title: "Ownership",
|
|
453
|
-
variant
|
|
454
|
-
}, /* @__PURE__ */ React.createElement(Grid, {
|
|
502
|
+
return /* @__PURE__ */ React.createElement(Grid, {
|
|
455
503
|
container: true
|
|
456
504
|
}, componentsWithCounters == null ? void 0 : componentsWithCounters.map((c) => /* @__PURE__ */ React.createElement(Grid, {
|
|
457
505
|
item: true,
|
|
@@ -464,8 +512,107 @@ const OwnershipCard = ({
|
|
|
464
512
|
type: c.type,
|
|
465
513
|
name: c.name,
|
|
466
514
|
url: `${catalogLink()}/?${c.queryParams}`
|
|
467
|
-
}))))
|
|
515
|
+
}))));
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
const useStyles = makeStyles((theme) => ({
|
|
519
|
+
list: {
|
|
520
|
+
[theme.breakpoints.down("xs")]: {
|
|
521
|
+
padding: `0 0 12px`
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
listItemText: {
|
|
525
|
+
[theme.breakpoints.down("xs")]: {
|
|
526
|
+
paddingRight: 0,
|
|
527
|
+
paddingLeft: 0
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
listItemSecondaryAction: {
|
|
531
|
+
[theme.breakpoints.down("xs")]: {
|
|
532
|
+
width: "100%",
|
|
533
|
+
top: "auto",
|
|
534
|
+
right: "auto",
|
|
535
|
+
position: "relative",
|
|
536
|
+
transform: "unset"
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}));
|
|
540
|
+
const OwnershipCard = (props) => {
|
|
541
|
+
const { variant, entityFilterKind, hideRelationsToggle, relationsType } = props;
|
|
542
|
+
const relationsToggle = hideRelationsToggle === void 0 ? false : hideRelationsToggle;
|
|
543
|
+
const classes = useStyles();
|
|
544
|
+
const { entity } = useEntity();
|
|
545
|
+
const isGroup = entity.kind === "Group";
|
|
546
|
+
const [getRelationsType, setRelationsType] = useState(relationsType || "direct");
|
|
547
|
+
return /* @__PURE__ */ React.createElement(InfoCard, {
|
|
548
|
+
title: "Ownership",
|
|
549
|
+
variant
|
|
550
|
+
}, !relationsToggle && /* @__PURE__ */ React.createElement(List, {
|
|
551
|
+
dense: true
|
|
552
|
+
}, /* @__PURE__ */ React.createElement(ListItem, {
|
|
553
|
+
className: classes.list
|
|
554
|
+
}, /* @__PURE__ */ React.createElement(ListItemText, {
|
|
555
|
+
className: classes.listItemText
|
|
556
|
+
}), /* @__PURE__ */ React.createElement(ListItemSecondaryAction, {
|
|
557
|
+
className: classes.listItemSecondaryAction
|
|
558
|
+
}, "Direct Relations", /* @__PURE__ */ React.createElement(Tooltip, {
|
|
559
|
+
placement: "top",
|
|
560
|
+
arrow: true,
|
|
561
|
+
title: `${getRelationsType === "direct" ? "Direct" : "Aggregated"} Relations`
|
|
562
|
+
}, /* @__PURE__ */ React.createElement(Switch, {
|
|
563
|
+
color: "primary",
|
|
564
|
+
checked: getRelationsType !== "direct",
|
|
565
|
+
onChange: () => getRelationsType === "direct" ? setRelationsType("aggregated") : setRelationsType("direct"),
|
|
566
|
+
name: "pin",
|
|
567
|
+
inputProps: { "aria-label": "Ownership Type Switch" },
|
|
568
|
+
disabled: !isGroup
|
|
569
|
+
})), "Aggregated Relations"))), /* @__PURE__ */ React.createElement(ComponentsGrid, {
|
|
570
|
+
entity,
|
|
571
|
+
relationsType: getRelationsType,
|
|
572
|
+
isGroup,
|
|
573
|
+
entityFilterKind
|
|
574
|
+
}));
|
|
575
|
+
};
|
|
576
|
+
|
|
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
|
+
})));
|
|
468
615
|
};
|
|
469
616
|
|
|
470
|
-
export { EntityGroupProfileCard, EntityMembersListCard, EntityOwnershipCard, EntityUserProfileCard, GroupProfileCard, MembersListCard, OwnershipCard, UserProfileCard, orgPlugin, orgPlugin as plugin };
|
|
617
|
+
export { EntityGroupProfileCard, EntityMembersListCard, EntityOwnershipCard, EntityUserProfileCard, GroupProfileCard, MembersListCard, MyGroupsSidebarItem, OwnershipCard, UserProfileCard, orgPlugin, orgPlugin as plugin };
|
|
471
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/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 { Entity, UserEntity } from '@backstage/catalog-model';\nimport {\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n} from '@backstage/core-components';\nimport { useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n catalogApiRef,\n humanizeEntityRef,\n isOwnerOf,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport { BackstageTheme } from '@backstage/theme';\nimport {\n Box,\n createStyles,\n Grid,\n makeStyles,\n Typography,\n} from '@material-ui/core';\nimport qs from 'qs';\nimport React from 'react';\nimport pluralize from 'pluralize';\nimport useAsync from 'react-use/lib/useAsync';\nimport { catalogIndexRouteRef } from '../../../routes';\n\ntype EntityTypeProps = {\n kind: string;\n type: string;\n count: number;\n};\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\nconst getQueryParams = (\n owner: Entity,\n selectedEntity: EntityTypeProps,\n): string => {\n const ownerName = humanizeEntityRef(owner, { defaultKind: 'group' });\n const { kind, type } = selectedEntity;\n const filters = {\n kind,\n type,\n owners: [ownerName],\n user: 'all',\n };\n if (owner.kind === 'User') {\n const user = owner as UserEntity;\n filters.owners = [...filters.owners, ...(user.spec.memberOf ?? [])];\n }\n const queryParams = qs.stringify(\n {\n filters,\n },\n {\n arrayFormat: 'repeat',\n },\n );\n\n return queryParams;\n};\n\nexport const OwnershipCard = ({\n variant,\n entityFilterKind,\n}: {\n variant?: InfoCardVariants;\n entityFilterKind?: string[];\n}) => {\n const { entity } = useEntity();\n const catalogApi = useApi(catalogApiRef);\n const catalogLink = useRouteRef(catalogIndexRouteRef);\n\n const {\n loading,\n error,\n value: componentsWithCounters,\n } = useAsync(async () => {\n const kinds = entityFilterKind ?? ['Component', 'API'];\n const entitiesList = await catalogApi.getEntities({\n filter: {\n kind: kinds,\n },\n fields: [\n 'kind',\n 'metadata.name',\n 'metadata.namespace',\n 'spec.type',\n 'relations',\n ],\n });\n\n const ownedEntitiesList = entitiesList.items.filter(component =>\n isOwnerOf(entity, component),\n );\n\n const counts = ownedEntitiesList.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(entity, topOwnedEntity),\n })) as Array<{\n counter: number;\n type: string;\n name: string;\n queryParams: string;\n }>;\n }, [catalogApi, entity]);\n\n if (loading) {\n return <Progress />;\n } else if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n return (\n <InfoCard title=\"Ownership\" variant={variant}>\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 </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,CA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AAA;AAChB,IAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,kBAAA,EAAA;AAAA,MAAmB,KAAA;AAAA,KAAc,CAAA,CAAA;AAAA,GAC3C;AAEA,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA;AAAA,IAAS,KAAM,EAAA,WAAA;AAAA,IAAY,OAAA;AAAA,GAAA,kBACzB,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAK,SAAS,EAAA,IAAA;AAAA,GACZ,EAAA,sBAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,sBAAA,CAAwB,GAAI,CAAA,CAAA,CAAA,qBAC1B,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAK,IAAI,EAAA,IAAA;AAAA,IAAC,EAAI,EAAA,CAAA;AAAA,IAAG,EAAI,EAAA,CAAA;AAAA,IAAG,EAAI,EAAA,CAAA;AAAA,IAAG,KAAK,CAAE,CAAA,IAAA;AAAA,GAAA,kBACpC,KAAA,CAAA,aAAA,CAAA,eAAA,EAAA;AAAA,IACC,SAAS,CAAE,CAAA,OAAA;AAAA,IACX,MAAM,CAAE,CAAA,IAAA;AAAA,IACR,MAAM,CAAE,CAAA,IAAA;AAAA,IACR,GAAK,EAAA,CAAA,EAAG,WAAY,EAAA,CAAA,EAAA,EAAM,CAAE,CAAA,WAAA,CAAA,CAAA;AAAA,GAC9B,CACF,EAEJ,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":";;;;;;;;;;;;;;;;;;;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AM,IAAI,EAAE,aAAa;AACzB,MAAM,EAAE,EAAE,kBAAkB,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;AACzD,MAAM,IAAI;AACV,KAAK,CAAC,CAAC;AACP,GAAG;AACH,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,WAAW,EAAE;AAC1D,IAAI,IAAI;AACR,IAAI,EAAE,EAAE,SAAS;AACjB,IAAI,IAAI,EAAE,WAAW;AACrB,GAAG,kBAAkB,KAAK,CAAC,aAAa,CAAC,cAAc,EAAE;AACzD,IAAI,KAAK,EAAE,WAAW;AACtB,GAAG,EAAE,MAAM,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,SAAS,CAAC,KAAK,EAAE;AACpE,IAAI,uBAAuB,KAAK,CAAC,aAAa,CAAC,kBAAkB,EAAE;AACnE,MAAM,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI;AACxD,MAAM,EAAE,EAAE,kBAAkB,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;AACzD,MAAM,IAAI;AACV,MAAM,GAAG,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAI;AAC9B,KAAK,CAAC,CAAC;AACP,GAAG,CAAC,CAAC,CAAC,CAAC;AACP;;;;"}
|
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.3",
|
|
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,14 +29,15 @@
|
|
|
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.
|
|
29
|
-
"@backstage/core-plugin-api": "^1.0.0",
|
|
30
|
-
"@backstage/plugin-catalog-react": "^1.0.1-next.
|
|
32
|
+
"@backstage/catalog-model": "^1.0.1-next.1",
|
|
33
|
+
"@backstage/core-components": "^0.9.3-next.2",
|
|
34
|
+
"@backstage/core-plugin-api": "^1.0.1-next.0",
|
|
35
|
+
"@backstage/plugin-catalog-react": "^1.0.1-next.3",
|
|
31
36
|
"@backstage/theme": "^0.2.15",
|
|
32
37
|
"@material-ui/core": "^4.12.2",
|
|
33
38
|
"@material-ui/icons": "^4.9.1",
|
|
34
39
|
"@material-ui/lab": "4.0.0-alpha.57",
|
|
40
|
+
"p-limit": "^3.1.0",
|
|
35
41
|
"pluralize": "^8.0.0",
|
|
36
42
|
"qs": "^6.10.1",
|
|
37
43
|
"react-router": "6.0.0-beta.0",
|
|
@@ -43,20 +49,20 @@
|
|
|
43
49
|
},
|
|
44
50
|
"devDependencies": {
|
|
45
51
|
"@backstage/catalog-client": "^1.0.1-next.0",
|
|
46
|
-
"@backstage/cli": "^0.
|
|
47
|
-
"@backstage/core-app-api": "^1.0.1-next.
|
|
48
|
-
"@backstage/dev-utils": "^1.0.1-next.
|
|
49
|
-
"@backstage/test-utils": "^1.0.1-next.
|
|
52
|
+
"@backstage/cli": "^0.17.0-next.3",
|
|
53
|
+
"@backstage/core-app-api": "^1.0.1-next.1",
|
|
54
|
+
"@backstage/dev-utils": "^1.0.1-next.1",
|
|
55
|
+
"@backstage/test-utils": "^1.0.1-next.2",
|
|
50
56
|
"@testing-library/jest-dom": "^5.10.1",
|
|
51
57
|
"@testing-library/react": "^12.1.3",
|
|
52
|
-
"@testing-library/user-event": "^
|
|
58
|
+
"@testing-library/user-event": "^14.0.0",
|
|
53
59
|
"@types/jest": "^26.0.7",
|
|
54
|
-
"@types/node": "^
|
|
60
|
+
"@types/node": "^16.11.26",
|
|
55
61
|
"cross-fetch": "^3.1.5",
|
|
56
62
|
"msw": "^0.35.0"
|
|
57
63
|
},
|
|
58
64
|
"files": [
|
|
59
65
|
"dist"
|
|
60
66
|
],
|
|
61
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "2eca57d93ef1081f4a76a19fc994a8e9e1a19e00"
|
|
62
68
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-f4bbe36c.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
|