@pagerduty/backstage-plugin 0.15.9-alpha.0 → 0.15.9-next.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +36 -0
  2. package/dist/alpha.d.ts +8 -0
  3. package/dist/alpha.esm.js +67 -0
  4. package/dist/alpha.esm.js.map +1 -0
  5. package/dist/components/ChangeEvents/ChangeEventListItem.esm.js +37 -34
  6. package/dist/components/ChangeEvents/ChangeEventListItem.esm.js.map +1 -1
  7. package/dist/components/ChangeEvents/ChangeEvents.esm.js +10 -2
  8. package/dist/components/ChangeEvents/ChangeEvents.esm.js.map +1 -1
  9. package/dist/components/EntityPagerDutyCard/index.esm.js +13 -10
  10. package/dist/components/EntityPagerDutyCard/index.esm.js.map +1 -1
  11. package/dist/components/EntityPagerDutySmallCard/index.esm.js +13 -10
  12. package/dist/components/EntityPagerDutySmallCard/index.esm.js.map +1 -1
  13. package/dist/components/Escalation/EscalationPolicy.esm.js +2 -10
  14. package/dist/components/Escalation/EscalationPolicy.esm.js.map +1 -1
  15. package/dist/components/Escalation/EscalationUser.esm.js +15 -25
  16. package/dist/components/Escalation/EscalationUser.esm.js.map +1 -1
  17. package/dist/components/Incident/IncidentListItem.esm.js +17 -15
  18. package/dist/components/Incident/IncidentListItem.esm.js.map +1 -1
  19. package/dist/components/Incident/Incidents.esm.js +10 -2
  20. package/dist/components/Incident/Incidents.esm.js.map +1 -1
  21. package/dist/components/PagerDutyCard/index.esm.js +81 -89
  22. package/dist/components/PagerDutyCard/index.esm.js.map +1 -1
  23. package/dist/components/PagerDutyCardCommon/InsightsCard.esm.js +2 -1
  24. package/dist/components/PagerDutyCardCommon/InsightsCard.esm.js.map +1 -1
  25. package/dist/components/PagerDutyCardCommon/OpenServiceButton.esm.js +24 -29
  26. package/dist/components/PagerDutyCardCommon/OpenServiceButton.esm.js.map +1 -1
  27. package/dist/components/PagerDutyCardCommon/ServiceStandardsCard.esm.js +59 -38
  28. package/dist/components/PagerDutyCardCommon/ServiceStandardsCard.esm.js.map +1 -1
  29. package/dist/components/PagerDutyCardCommon/StatusCard.esm.js +3 -3
  30. package/dist/components/PagerDutyCardCommon/StatusCard.esm.js.map +1 -1
  31. package/dist/components/PagerDutyCardCommon/TriggerIncidentButton.esm.js +24 -29
  32. package/dist/components/PagerDutyCardCommon/TriggerIncidentButton.esm.js.map +1 -1
  33. package/dist/components/PagerDutyPage/MappingTable.esm.js +30 -19
  34. package/dist/components/PagerDutyPage/MappingTable.esm.js.map +1 -1
  35. package/dist/components/PagerDutyPage/index.esm.js +47 -82
  36. package/dist/components/PagerDutyPage/index.esm.js.map +1 -1
  37. package/dist/components/PagerDutySmallCard/index.esm.js +34 -54
  38. package/dist/components/PagerDutySmallCard/index.esm.js.map +1 -1
  39. package/dist/components/TriggerDialog/TriggerDialog.esm.js +12 -8
  40. package/dist/components/TriggerDialog/TriggerDialog.esm.js.map +1 -1
  41. package/dist/index.d.ts +5 -3
  42. package/dist/index.esm.js +1 -0
  43. package/dist/index.esm.js.map +1 -1
  44. package/package.json +31 -7
package/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # PagerDuty Backstage Plugin
2
+
3
+ > The PagerDuty plugin reduces the cognitive load on developers responsible for maintaining services in production.
4
+ Instead of having to go to PagerDuty's console, you can now access the necessary information directly within Backstage.
5
+ This includes finding active incidents or opening a new incident, reviewing recent changes made to the service,
6
+ and checking who is on-call.
7
+
8
+ ## New Frontend System (NFS)
9
+
10
+ This frontend plugin is starting the adoption of the [New Frontend System](https://backstage.io/docs/frontend-system/). This allow us to be present in Portal and keep up to date with Backstage's recommended best practices.
11
+
12
+ ### Migration
13
+
14
+ We're still migrating to the NFS, since it is still in alpha. You can find this version of the plugin on the export `@pagerduty/backstage-plugin/alpha`, which allows you to start using it even in Backstage under the new `createApp` helper from `@backstage/frontend-defaults`.
15
+
16
+ ### Extensions
17
+
18
+ The NFS allows for extendable plugins, which means there are parts of it that users can replace to elevate their experience. We've historically exported two components the `EntityPagerDutyCard` and the `EntityPagerDutySmallCard` to expose some PagerDuty's service information on your Backstage entities. In the NFS, we default to `EntityPagerDutyCard` as an entity card extension, which means you can still make use of the `EntityPagerDutySmallCard` through overrides.
19
+
20
+ ```javascript
21
+ import PagerDutyPlugin from '@pagerduty/backstage-plugin/alpha';
22
+ import { EntityPagerDutySmallCard } from '@pagerduty/backstage-plugin';
23
+
24
+ const OverriddenPagerDutyPlugin = PagerDutyPlugin.withOverrides({
25
+ extensions: [
26
+ PagerDutyPlugin.getExtension('entity-card:pagerduty/EntityPagerDutyCard').override({
27
+ factory: originalFactory =>
28
+ originalFactory({
29
+ params: {
30
+ loader: async () => Promise.resolve(<EntityPagerDutySmallCard />)
31
+ }
32
+ })
33
+ })
34
+ ]
35
+ })
36
+ ```
@@ -0,0 +1,8 @@
1
+ import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
2
+ import { FrontendPlugin } from '@backstage/frontend-plugin-api';
3
+
4
+ declare const rootRouteRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
5
+ /** @alpha */
6
+ declare const _default: FrontendPlugin;
7
+
8
+ export { _default as default, rootRouteRef };
@@ -0,0 +1,67 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import 'react';
3
+ import { createRouteRef, ApiBlueprint, fetchApiRef, configApiRef, discoveryApiRef, PageBlueprint, NavItemBlueprint, createFrontendPlugin } from '@backstage/frontend-plugin-api';
4
+ import { compatWrapper } from '@backstage/core-compat-api';
5
+ import { EntityCardBlueprint } from '@backstage/plugin-catalog-react/alpha';
6
+ import { PagerDutyClient, pagerDutyApiRef } from './api/client.esm.js';
7
+ import '@backstage/plugin-catalog-react';
8
+ import './components/PagerDutyCard/index.esm.js';
9
+ import './components/PagerDutySmallCard/index.esm.js';
10
+ import { PagerDutyIcon } from './components/Icons/index.esm.js';
11
+ import './components/TriggerButton/index.esm.js';
12
+
13
+ const rootRouteRef = createRouteRef();
14
+ const PagerDutyAPI = ApiBlueprint.make({
15
+ params: {
16
+ factory: {
17
+ api: pagerDutyApiRef,
18
+ deps: {
19
+ discoveryApi: discoveryApiRef,
20
+ configApi: configApiRef,
21
+ fetchApi: fetchApiRef
22
+ },
23
+ factory: ({
24
+ configApi,
25
+ discoveryApi,
26
+ fetchApi
27
+ }) => PagerDutyClient.fromConfig(configApi, { discoveryApi, fetchApi })
28
+ }
29
+ }
30
+ });
31
+ const PagerDutyPage = PageBlueprint.make({
32
+ params: {
33
+ defaultPath: "/pagerduty",
34
+ routeRef: rootRouteRef,
35
+ loader: () => import('./components/PagerDutyPage/index.esm.js').then((m) => compatWrapper(/* @__PURE__ */ jsx(m.PagerDutyPage, {})))
36
+ }
37
+ });
38
+ const EntityPagerDutyCard = EntityCardBlueprint.make({
39
+ name: "EntityPagerDutyCard",
40
+ params: {
41
+ filter: "kind:component",
42
+ loader: async () => import('./components/EntityPagerDutyCard/index.esm.js').then((m) => compatWrapper(/* @__PURE__ */ jsx(m.EntityPagerDutyCard, {})))
43
+ }
44
+ });
45
+ const PagerDutyNavBarItem = NavItemBlueprint.make({
46
+ name: "PagerDutyNavBarItem",
47
+ params: {
48
+ title: "PagerDuty",
49
+ icon: () => /* @__PURE__ */ jsx(PagerDutyIcon, {}),
50
+ routeRef: rootRouteRef
51
+ }
52
+ });
53
+ var alpha = createFrontendPlugin({
54
+ pluginId: "pagerduty",
55
+ extensions: [
56
+ EntityPagerDutyCard,
57
+ PagerDutyAPI,
58
+ PagerDutyPage,
59
+ PagerDutyNavBarItem
60
+ ],
61
+ routes: {
62
+ root: rootRouteRef
63
+ }
64
+ });
65
+
66
+ export { alpha as default, rootRouteRef };
67
+ //# sourceMappingURL=alpha.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alpha.esm.js","sources":["../src/alpha.tsx"],"sourcesContent":["/*\n * Copyright 2025 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\";\nimport { \n ApiBlueprint, \n createFrontendPlugin, \n createRouteRef, \n FrontendPlugin, \n PageBlueprint,\n NavItemBlueprint,\n discoveryApiRef,\n configApiRef,\n fetchApiRef,\n ConfigApi,\n DiscoveryApi,\n FetchApi\n} from \"@backstage/frontend-plugin-api\";\nimport { compatWrapper } from \"@backstage/core-compat-api\";\nimport { EntityCardBlueprint } from \"@backstage/plugin-catalog-react/alpha\"\nimport { pagerDutyApiRef, PagerDutyClient } from './api';\nimport { PagerDutyIcon } from './components';\n\nexport const rootRouteRef = createRouteRef();\n\n/** @alpha */\nconst PagerDutyAPI = ApiBlueprint.make({\n params: {\n factory: {\n api: pagerDutyApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n configApi: configApiRef,\n fetchApi: fetchApiRef\n },\n factory: ({ \n configApi, \n discoveryApi, \n fetchApi \n }: { configApi: ConfigApi; discoveryApi: DiscoveryApi; fetchApi: FetchApi }) =>\n PagerDutyClient.fromConfig(configApi, { discoveryApi, fetchApi }),\n }\n }\n});\n\n/** @alpha */\nconst PagerDutyPage = PageBlueprint.make({\n params: {\n defaultPath: '/pagerduty',\n routeRef: rootRouteRef,\n loader: () =>\n import('./components/PagerDutyPage')\n .then(m => compatWrapper(<m.PagerDutyPage />)),\n }\n});\n\n/** @alpha */\nconst EntityPagerDutyCard = EntityCardBlueprint.make({\n name: 'EntityPagerDutyCard',\n params: {\n filter: 'kind:component',\n loader: async () => import('./components/EntityPagerDutyCard') \n .then(m => compatWrapper(<m.EntityPagerDutyCard />)),\n }\n});\n\n/** @alpha */\nconst PagerDutyNavBarItem = NavItemBlueprint.make({\n name: 'PagerDutyNavBarItem',\n params: {\n title: 'PagerDuty',\n icon: () => <PagerDutyIcon />,\n routeRef: rootRouteRef,\n }\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n pluginId: 'pagerduty',\n extensions: [\n EntityPagerDutyCard,\n PagerDutyAPI,\n PagerDutyPage,\n PagerDutyNavBarItem\n ],\n routes: {\n root: rootRouteRef\n }\n}) as FrontendPlugin;\n"],"names":[],"mappings":";;;;;;;;;;;;AAoCO,MAAM,eAAe,cAAA;AAG5B,MAAM,YAAA,GAAe,aAAa,IAAA,CAAK;AAAA,EACrC,MAAA,EAAQ;AAAA,IACN,OAAA,EAAS;AAAA,MACP,GAAA,EAAK,eAAA;AAAA,MACL,IAAA,EAAM;AAAA,QACJ,YAAA,EAAc,eAAA;AAAA,QACd,SAAA,EAAW,YAAA;AAAA,QACX,QAAA,EAAU;AAAA,OACZ;AAAA,MACA,SAAS,CAAC;AAAA,QACR,SAAA;AAAA,QACA,YAAA;AAAA,QACA;AAAA,YAEA,eAAA,CAAgB,UAAA,CAAW,WAAW,EAAE,YAAA,EAAc,UAAU;AAAA;AACpE;AAEJ,CAAC,CAAA;AAGD,MAAM,aAAA,GAAgB,cAAc,IAAA,CAAK;AAAA,EACvC,MAAA,EAAQ;AAAA,IACN,WAAA,EAAa,YAAA;AAAA,IACb,QAAA,EAAU,YAAA;AAAA,IACV,MAAA,EAAQ,MACN,OAAO,yCAA4B,CAAA,CAChC,IAAA,CAAK,CAAA,CAAA,KAAK,aAAA,iBAAc,GAAA,CAAC,CAAA,CAAE,aAAA,EAAF,EAAgB,CAAE,CAAC;AAAA;AAErD,CAAC,CAAA;AAGD,MAAM,mBAAA,GAAsB,oBAAoB,IAAA,CAAK;AAAA,EACnD,IAAA,EAAM,qBAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,MAAA,EAAQ,gBAAA;AAAA,IACR,MAAA,EAAQ,YAAY,OAAO,+CAAkC,CAAA,CAC1D,IAAA,CAAK,CAAA,CAAA,KAAK,aAAA,iBAAc,GAAA,CAAC,CAAA,CAAE,mBAAA,EAAF,EAAsB,CAAE,CAAC;AAAA;AAEzD,CAAC,CAAA;AAGD,MAAM,mBAAA,GAAsB,iBAAiB,IAAA,CAAK;AAAA,EAChD,IAAA,EAAM,qBAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,KAAA,EAAO,WAAA;AAAA,IACP,IAAA,EAAM,sBAAM,GAAA,CAAC,aAAA,EAAA,EAAc,CAAA;AAAA,IAC3B,QAAA,EAAU;AAAA;AAEd,CAAC,CAAA;AAGD,YAAe,oBAAA,CAAqB;AAAA,EAClC,QAAA,EAAU,WAAA;AAAA,EACV,UAAA,EAAY;AAAA,IACV,mBAAA;AAAA,IACA,YAAA;AAAA,IACA,aAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM;AAAA;AAEV,CAAC,CAAA;;;;"}
@@ -1,11 +1,11 @@
1
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import { Link } from '@backstage/core-components';
3
- import { makeStyles, Tooltip, IconButton, ListItem, ListItemText, Typography, ListItemSecondaryAction } from '@material-ui/core';
1
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
+ import { makeStyles, ListItem, ListItemText, Typography, ListItemSecondaryAction } from '@material-ui/core';
3
+ import { TooltipTrigger, ButtonIcon, Tooltip } from '@backstage/ui';
4
4
  import { DateTime, Duration } from 'luxon';
5
5
  import OpenInBrowserIcon from '@material-ui/icons/OpenInBrowser';
6
6
  import LinkIcon from '@material-ui/icons/Link';
7
7
 
8
- const useStyles = makeStyles((theme) => ({
8
+ const useStyles = makeStyles(() => ({
9
9
  denseListIcon: {
10
10
  marginRight: 0,
11
11
  display: "flex",
@@ -15,35 +15,35 @@ const useStyles = makeStyles((theme) => ({
15
15
  },
16
16
  listItemPrimary: {
17
17
  fontWeight: "bold"
18
- },
19
- smallExternalLinkIconStyle: {
20
- color: theme.palette.text.primary
21
- },
22
- smallExternalLinkWithoutMarginIconStyle: {
23
- color: theme.palette.text.primary,
24
- marginRight: "-20px"
25
- },
26
- smallIconStyle: {
27
- color: theme.palette.text.primary,
28
- marginRight: "-20px"
29
18
  }
30
19
  }));
31
20
  const ChangeEventListItem = ({ changeEvent }) => {
32
21
  const classes = useStyles();
33
22
  const duration = (/* @__PURE__ */ new Date()).getTime() - new Date(changeEvent.timestamp).getTime();
34
23
  const changedAt = DateTime.local().minus(Duration.fromMillis(duration)).toRelative({ locale: "en" });
24
+ const handleExternalLinkClick = (url) => {
25
+ window.open(url, "_blank", "noopener,noreferrer");
26
+ };
27
+ const handlePagerDutyClick = () => {
28
+ if (changeEvent.html_url) {
29
+ window.open(changeEvent.html_url, "_blank", "noopener,noreferrer");
30
+ }
31
+ };
35
32
  let externalLinkElem;
36
- if (changeEvent.links.length > 0) {
33
+ if (changeEvent.links.length > 0 && changeEvent.links[0]?.href) {
37
34
  const text = changeEvent.links[0].text;
38
- externalLinkElem = /* @__PURE__ */ jsx(Tooltip, { title: text, placement: "top", children: /* @__PURE__ */ jsx(
39
- IconButton,
40
- {
41
- component: Link,
42
- to: changeEvent.links[0].href,
43
- className: changeEvent.html_url === void 0 ? classes.smallExternalLinkWithoutMarginIconStyle : classes.smallExternalLinkIconStyle,
44
- children: /* @__PURE__ */ jsx(LinkIcon, {})
45
- }
46
- ) });
35
+ const linkHref = changeEvent.links[0].href;
36
+ externalLinkElem = /* @__PURE__ */ jsxs(TooltipTrigger, { children: [
37
+ /* @__PURE__ */ jsx(
38
+ ButtonIcon,
39
+ {
40
+ icon: /* @__PURE__ */ jsx(LinkIcon, {}),
41
+ variant: "tertiary",
42
+ onClick: () => handleExternalLinkClick(linkHref)
43
+ }
44
+ ),
45
+ /* @__PURE__ */ jsx(Tooltip, { children: text })
46
+ ] });
47
47
  }
48
48
  return /* @__PURE__ */ jsxs(ListItem, { dense: true, children: [
49
49
  /* @__PURE__ */ jsx(
@@ -65,15 +65,18 @@ const ChangeEventListItem = ({ changeEvent }) => {
65
65
  ),
66
66
  /* @__PURE__ */ jsxs(ListItemSecondaryAction, { children: [
67
67
  externalLinkElem,
68
- changeEvent.html_url === void 0 ? null : /* @__PURE__ */ jsx(Tooltip, { title: "View in PagerDuty", placement: "top", children: /* @__PURE__ */ jsx(
69
- IconButton,
70
- {
71
- component: Link,
72
- to: changeEvent.html_url,
73
- className: classes.smallIconStyle,
74
- children: /* @__PURE__ */ jsx(OpenInBrowserIcon, {})
75
- }
76
- ) })
68
+ changeEvent.html_url === void 0 ? null : /* @__PURE__ */ jsxs(TooltipTrigger, { children: [
69
+ /* @__PURE__ */ jsx(
70
+ ButtonIcon,
71
+ {
72
+ "aria-label": "view-in-pd-button",
73
+ icon: /* @__PURE__ */ jsx(OpenInBrowserIcon, { className: classes.smallIconStyle }),
74
+ variant: "tertiary",
75
+ onClick: handlePagerDutyClick
76
+ }
77
+ ),
78
+ /* @__PURE__ */ jsx(Tooltip, { children: "View in PagerDuty" })
79
+ ] })
77
80
  ] })
78
81
  ] }, changeEvent.id);
79
82
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ChangeEventListItem.esm.js","sources":["../../../src/components/ChangeEvents/ChangeEventListItem.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\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport { Link } from '@backstage/core-components';\nimport {\n ListItem,\n ListItemSecondaryAction,\n Tooltip,\n ListItemText,\n makeStyles,\n IconButton,\n Typography,\n} from '@material-ui/core';\nimport { DateTime, Duration } from 'luxon';\nimport { PagerDutyChangeEvent } from '@pagerduty/backstage-plugin-common';\nimport OpenInBrowserIcon from '@material-ui/icons/OpenInBrowser';\nimport LinkIcon from '@material-ui/icons/Link';\nimport { BackstageTheme } from '@backstage/theme';\n\nconst useStyles = makeStyles<BackstageTheme>(theme => ({\n denseListIcon: {\n marginRight: 0,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n },\n listItemPrimary: {\n fontWeight: 'bold',\n },\n smallExternalLinkIconStyle: {\n color: theme.palette.text.primary,\n },\n smallExternalLinkWithoutMarginIconStyle: {\n color: theme.palette.text.primary,\n marginRight: '-20px',\n },\n smallIconStyle: {\n color: theme.palette.text.primary,\n marginRight: '-20px',\n },\n}));\n\ntype Props = {\n changeEvent: PagerDutyChangeEvent;\n};\n\nexport const ChangeEventListItem = ({ changeEvent }: Props) => {\n const classes = useStyles();\n const duration =\n new Date().getTime() - new Date(changeEvent.timestamp).getTime();\n const changedAt = DateTime.local()\n .minus(Duration.fromMillis(duration))\n .toRelative({ locale: 'en' });\n\n let externalLinkElem: JSX.Element | undefined;\n if (changeEvent.links.length > 0) {\n const text: string = changeEvent.links[0].text;\n externalLinkElem = (\n <Tooltip title={text} placement=\"top\">\n <IconButton\n component={Link}\n to={changeEvent.links[0].href}\n className={\n changeEvent.html_url === undefined\n ? classes.smallExternalLinkWithoutMarginIconStyle\n : classes.smallExternalLinkIconStyle\n }\n >\n <LinkIcon />\n </IconButton>\n </Tooltip>\n );\n }\n\n return (\n <ListItem dense key={changeEvent.id}>\n <ListItemText\n primary={<>{changeEvent.summary}</>}\n primaryTypographyProps={{\n variant: 'body1',\n className: classes.listItemPrimary,\n }}\n secondary={\n <Typography variant=\"body2\" color=\"textSecondary\">\n Triggered from {changeEvent.source} {changedAt}.\n </Typography>\n }\n />\n <ListItemSecondaryAction>\n {externalLinkElem}\n {changeEvent.html_url === undefined ? null : (\n <Tooltip title=\"View in PagerDuty\" placement=\"top\">\n <IconButton\n component={Link}\n to={changeEvent.html_url}\n className={classes.smallIconStyle}\n >\n <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M,mBAAA,EAAoB,SAAA,EAAU,KAAA,EAC3C,QAAA,kBAAA,GAAA;AAAA,QAAC,UAAA;AAAA,QAAA;AAAA,UACC,SAAA,EAAW,IAAA;AAAA,UACX,IAAI,WAAA,CAAY,QAAA;AAAA,UAChB,WAAW,OAAA,CAAQ,cAAA;AAAA,UAEnB,8BAAC,iBAAA,EAAA,EAAkB;AAAA;AAAA,OACrB,EACF;AAAA,KAAA,EAEJ;AAAA,GAAA,EAAA,EA1BmB,YAAY,EA2BjC,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"ChangeEventListItem.esm.js","sources":["../../../src/components/ChangeEvents/ChangeEventListItem.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 {\n ListItem,\n ListItemSecondaryAction,\n ListItemText,\n makeStyles,\n Typography,\n} from '@material-ui/core';\nimport { ButtonIcon, Tooltip, TooltipTrigger } from '@backstage/ui';\nimport { DateTime, Duration } from 'luxon';\nimport { PagerDutyChangeEvent } from '@pagerduty/backstage-plugin-common';\nimport OpenInBrowserIcon from '@material-ui/icons/OpenInBrowser';\nimport LinkIcon from '@material-ui/icons/Link';\nimport { BackstageTheme } from '@backstage/theme';\n\nconst useStyles = makeStyles<BackstageTheme>(() => ({\n denseListIcon: {\n marginRight: 0,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n },\n listItemPrimary: {\n fontWeight: 'bold',\n },\n}));\n\ntype Props = {\n changeEvent: PagerDutyChangeEvent;\n};\n\nexport const ChangeEventListItem = ({ changeEvent }: Props) => {\n const classes = useStyles();\n const duration =\n new Date().getTime() - new Date(changeEvent.timestamp).getTime();\n const changedAt = DateTime.local()\n .minus(Duration.fromMillis(duration))\n .toRelative({ locale: 'en' });\n\n const handleExternalLinkClick = (url: string) => {\n window.open(url, '_blank', 'noopener,noreferrer');\n };\n\n const handlePagerDutyClick = () => {\n if (changeEvent.html_url) {\n window.open(changeEvent.html_url, '_blank', 'noopener,noreferrer');\n }\n };\n\n let externalLinkElem: JSX.Element | undefined;\n if (changeEvent.links.length > 0 && changeEvent.links[0]?.href) {\n const text: string = changeEvent.links[0].text;\n const linkHref = changeEvent.links[0].href;\n externalLinkElem = (\n <TooltipTrigger>\n <ButtonIcon\n icon={<LinkIcon />}\n variant=\"tertiary\"\n onClick={() => handleExternalLinkClick(linkHref)}\n />\n <Tooltip>{text}</Tooltip>\n </TooltipTrigger>\n );\n }\n\n return (\n <ListItem dense key={changeEvent.id}>\n <ListItemText\n primary={<>{changeEvent.summary}</>}\n primaryTypographyProps={{\n variant: 'body1',\n className: classes.listItemPrimary,\n }}\n secondary={\n <Typography variant=\"body2\" color=\"textSecondary\">\n Triggered from {changeEvent.source} {changedAt}.\n </Typography>\n }\n />\n <ListItemSecondaryAction>\n {externalLinkElem}\n {changeEvent.html_url === undefined ? null : (\n <TooltipTrigger>\n <ButtonIcon\n aria-label=\"view-in-pd-button\"\n icon={<OpenInBrowserIcon className={classes.smallIconStyle} />}\n variant=\"tertiary\"\n onClick={handlePagerDutyClick}\n />\n <Tooltip>View in PagerDuty</Tooltip>\n </TooltipTrigger>\n )}\n </ListItemSecondaryAction>\n </ListItem>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA8BA,MAAM,SAAA,GAAY,WAA2B,OAAO;AAAA,EAClD,aAAA,EAAe;AAAA,IACb,WAAA,EAAa,CAAA;AAAA,IACb,OAAA,EAAS,MAAA;AAAA,IACT,aAAA,EAAe,QAAA;AAAA,IACf,UAAA,EAAY,QAAA;AAAA,IACZ,cAAA,EAAgB;AAAA,G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AAA,OAAA,EAC5B;AAAA,KAAA,EAEJ;AAAA,GAAA,EAAA,EA1BmB,YAAY,EA2BjC,CAAA;AAEJ;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { useEffect } from 'react';
3
- import { List } from '@material-ui/core';
3
+ import { makeStyles, List, createStyles } from '@material-ui/core';
4
4
  import { ChangeEventListItem } from './ChangeEventListItem.esm.js';
5
5
  import { ChangeEventEmptyState } from './ChangeEventEmptyState.esm.js';
6
6
  import { ChangeEventForbiddenState } from './ChangeEventForbiddenState.esm.js';
@@ -10,8 +10,16 @@ import { useApi } from '@backstage/core-plugin-api';
10
10
  import { Progress } from '@backstage/core-components';
11
11
  import { Alert } from '@material-ui/lab';
12
12
 
13
+ const useStyles = makeStyles(
14
+ () => createStyles({
15
+ loadingStyles: {
16
+ height: "253px"
17
+ }
18
+ })
19
+ );
13
20
  const ChangeEvents = ({ serviceId, account, refreshEvents }) => {
14
21
  const api = useApi(pagerDutyApiRef);
22
+ const { loadingStyles } = useStyles();
15
23
  const [{ value: changeEvents, loading, error }, getChangeEvents] = useAsyncFn(
16
24
  async () => {
17
25
  const { change_events } = await api.getChangeEventsByServiceId(
@@ -34,7 +42,7 @@ const ChangeEvents = ({ serviceId, account, refreshEvents }) => {
34
42
  ] });
35
43
  }
36
44
  if (loading) {
37
- return /* @__PURE__ */ jsx(Progress, {});
45
+ return /* @__PURE__ */ jsx("div", { className: loadingStyles, children: /* @__PURE__ */ jsx(Progress, {}) });
38
46
  }
39
47
  if (!changeEvents?.length) {
40
48
  return /* @__PURE__ */ jsx(ChangeEventEmptyState, {});
@@ -1 +1 @@
1
- {"version":3,"file":"ChangeEvents.esm.js","sources":["../../../src/components/ChangeEvents/ChangeEvents.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\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport { useEffect } from 'react';\nimport { List } from '@material-ui/core';\nimport { ChangeEventListItem } from './ChangeEventListItem';\nimport { ChangeEventEmptyState } from './ChangeEventEmptyState';\nimport { ChangeEventForbiddenState } from './ChangeEventForbiddenState';\nimport useAsyncFn from 'react-use/lib/useAsyncFn';\nimport { pagerDutyApiRef } from '../../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { Progress } from '@backstage/core-components';\nimport { Alert } from '@material-ui/lab';\n\ntype Props = {\n serviceId: string;\n account?: string;\n refreshEvents: boolean;\n};\n\nexport const ChangeEvents = ({ serviceId, account, refreshEvents }: Props) => {\n const api = useApi(pagerDutyApiRef);\n\n const [{ value: changeEvents, loading, error }, getChangeEvents] = useAsyncFn(\n async () => {\n const { change_events } = await api.getChangeEventsByServiceId(\n serviceId,\n account,\n );\n return change_events;\n },\n );\n\n useEffect(() => {\n getChangeEvents();\n }, [refreshEvents, getChangeEvents]);\n\n if (error) {\n if (error.message.includes('Forbidden')) {\n return <ChangeEventForbiddenState />;\n }\n\n return (\n <Alert severity=\"error\">\n Error encountered while fetching information. {error.message}\n </Alert>\n );\n }\n\n if (loading) {\n return <Progress />;\n }\n\n if (!changeEvents?.length) {\n return <ChangeEventEmptyState />;\n }\n\n return (\n <List dense>\n {changeEvents!.map((changeEvent, index) => (\n <ChangeEventListItem\n key={changeEvent.id + index}\n changeEvent={changeEvent}\n />\n ))}\n </List>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAkCO,MAAM,eAAe,CAAC,EAAE,SAAA,EAAW,OAAA,EAAS,eAAc,KAAa;AAC5E,EAAA,MAAM,GAAA,GAAM,OAAO,eAAe,CAAA;A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 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 { useEffect } from 'react';\nimport { createStyles, List, makeStyles } from '@material-ui/core';\nimport { ChangeEventListItem } from './ChangeEventListItem';\nimport { ChangeEventEmptyState } from './ChangeEventEmptyState';\nimport { ChangeEventForbiddenState } from './ChangeEventForbiddenState';\nimport useAsyncFn from 'react-use/lib/useAsyncFn';\nimport { pagerDutyApiRef } from '../../api';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { Progress } from '@backstage/core-components';\nimport { Alert } from '@material-ui/lab';\nimport { BackstageTheme } from '@backstage/theme';\n\ntype Props = {\n serviceId: string;\n account?: string;\n refreshEvents: boolean;\n};\n\nconst useStyles = makeStyles<BackstageTheme>(() =>\n createStyles({\n loadingStyles: {\n height: '253px',\n },\n }),\n);\n\nexport const ChangeEvents = ({ serviceId, account, refreshEvents }: Props) => {\n const api = useApi(pagerDutyApiRef);\n const { loadingStyles } = useStyles();\n\n const [{ value: changeEvents, loading, error }, getChangeEvents] = useAsyncFn(\n async () => {\n const { change_events } = await api.getChangeEventsByServiceId(\n serviceId,\n account,\n );\n return change_events;\n },\n );\n\n useEffect(() => {\n getChangeEvents();\n }, [refreshEvents, getChangeEvents]);\n\n if (error) {\n if (error.message.includes('Forbidden')) {\n return <ChangeEventForbiddenState />;\n }\n\n return (\n <Alert severity=\"error\">\n Error encountered while fetching information. {error.message}\n </Alert>\n );\n }\n\n if (loading) {\n return (\n <div className={loadingStyles}>\n <Progress />\n </div>\n );\n }\n\n if (!changeEvents?.length) {\n return <ChangeEventEmptyState />;\n }\n\n return (\n <List dense>\n {changeEvents!.map((changeEvent, index) => (\n <ChangeEventListItem\n key={changeEvent.id + index}\n changeEvent={changeEvent}\n />\n ))}\n </List>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAkCA,MAAM,SAAA,GAAY,UAAA;AAAA,EAA2B,MAC3C,YAAA,CAAa;AAAA,IACX,aAAA,EAAe;AAAA,MACb,MAAA,EAAQ;AAAA;AACV,GACD;AACH,CAAA;AAEO,MAAM,eAAe,CAAC,EAAE,SAAA,EAAW,OAAA,EAAS,eAAc,KAAa;AAC5E,EAAA,MAAM,GAAA,GAAM,OAAO,eAAe,CAAA;AAClC,EAAA,MAAM,EAAE,aAAA,EAAc,GAAI,SAAA,EAAU;AAEpC,EAAA,MAAM,CAAC,EAAE,KAAA,EAAO,YAAA,EAAc,SAAS,KAAA,EAAM,EAAG,eAAe,CAAA,GAAI,UAAA;AAAA,IACjE,YAAY;AACV,MAAA,MAAM,EAAE,aAAA,EAAc,GAAI,MAAM,GAAA,CAAI,0BAAA;AAAA,QAClC,SAAA;AAAA,QACA;AAAA,OACF;AACA,MAAA,OAAO,aAAA;AAAA,IACT;AAAA,GACF;AAEA,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,eAAA,EAAgB;AAAA,EAClB,CAAA,EAAG,CAAC,aAAA,EAAe,eAAe,CAAC,CAAA;AAEnC,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,IAAI,KAAA,CAAM,OAAA,CAAQ,QAAA,CAAS,WAAW,CAAA,EAAG;AACvC,MAAA,2BAAQ,yBAAA,EAAA,EAA0B,CAAA;AAAA,IACpC;AAEA,IAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAM,QAAA,EAAS,OAAA,EAAQ,QAAA,EAAA;AAAA,MAAA,gDAAA;AAAA,MACyB,KAAA,CAAM;AAAA,KAAA,EACvD,CAAA;AAAA,EAEJ;AAEA,EAAA,IAAI,OAAA,EAAS;AACX,IAAA,2BACG,KAAA,EAAA,EAAI,SAAA,EAAW,aAAA,EACd,QAAA,kBAAA,GAAA,CAAC,YAAS,CAAA,EACZ,CAAA;AAAA,EAEJ;AAEA,EAAA,IAAI,CAAC,cAAc,MAAA,EAAQ;AACzB,IAAA,2BAAQ,qBAAA,EAAA,EAAsB,CAAA;AAAA,EAChC;AAEA,EAAA,uBACE,GAAA,CAAC,QAAK,KAAA,EAAK,IAAA,EACR,uBAAc,GAAA,CAAI,CAAC,aAAa,KAAA,qBAC/B,GAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MAEC;AAAA,KAAA;AAAA,IADK,YAAY,EAAA,GAAK;AAAA,GAGzB,CAAA,EACH,CAAA;AAEJ;;;;"}
@@ -10,16 +10,19 @@ const isPluginApplicableToEntity = (entity) => Boolean(
10
10
  const EntityPagerDutyCard = (props) => {
11
11
  const { readOnly, disableChangeEvents, disableOnCall } = props;
12
12
  const { entity } = useEntity();
13
- const pagerDutyEntity = getPagerDutyEntity(entity);
14
- return /* @__PURE__ */ jsx(
15
- PagerDutyCard,
16
- {
17
- ...pagerDutyEntity,
18
- readOnly,
19
- disableChangeEvents,
20
- disableOnCall
21
- }
22
- );
13
+ if (isPluginApplicableToEntity(entity)) {
14
+ const pagerDutyEntity = getPagerDutyEntity(entity);
15
+ return /* @__PURE__ */ jsx(
16
+ PagerDutyCard,
17
+ {
18
+ ...pagerDutyEntity,
19
+ readOnly,
20
+ disableChangeEvents,
21
+ disableOnCall
22
+ }
23
+ );
24
+ }
25
+ return null;
23
26
  };
24
27
 
25
28
  export { EntityPagerDutyCard, isPluginApplicableToEntity };
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../../src/components/EntityPagerDutyCard/index.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// eslint-disable-next-line @backstage/no-undeclared-imports\nimport { Entity } from '@backstage/catalog-model';\nimport { PAGERDUTY_INTEGRATION_KEY, PAGERDUTY_SERVICE_ID } from '../constants';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { getPagerDutyEntity } from '../pagerDutyEntity';\nimport { PagerDutyCard } from '../PagerDutyCard';\n\n/** @public */\nexport const isPluginApplicableToEntity = (entity: Entity) =>\n Boolean(\n entity.metadata.annotations?.[PAGERDUTY_INTEGRATION_KEY] ||\n entity.metadata.annotations?.[PAGERDUTY_SERVICE_ID],\n );\n\n/** @public */\nexport type EntityPagerDutyCardProps = {\n readOnly?: boolean;\n disableChangeEvents?: boolean;\n disableOnCall?: boolean;\n};\n\n/** @public */\nexport const EntityPagerDutyCard = (props: EntityPagerDutyCardProps) => {\n const { readOnly, disableChangeEvents, disableOnCall } = props;\n const { entity } = useEntity();\n const pagerDutyEntity = getPagerDutyEntity(entity);\n return (\n <PagerDutyCard\n {...pagerDutyEntity}\n readOnly={readOnly}\n disableChangeEvents={disableChangeEvents}\n disableOnCall={disableOnCall}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;AAuBO,MAAM,0BAAA,GAA6B,CAAC,MAAA,KACzC,OAAA;AAAA,EACE,MAAA,CAAO,SAAS,WAAA,GAAc,yBAAyB,KACrD,MAAA,CAAO,QAAA,CAAS,cAAc,oBAAoB;AACtD;AAUK,MAAM,mBAAA,GAAsB,CAAC,KAAA,KAAoC;AACtE,EAAA,MAAM,EAAE,QAAA,EAAU,mBAAA,EAAqB,aAAA,EAAc,GAAI,KAAA;AACzD,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAC7B,EAAA,MAAM,eAAA,GAAkB,mBAAmB,MAAM,CAAA;AACjD,EAAA,uBACE,GAAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACE,GAAG,eAAA;AAAA,MACJ,QAAA;AAAA,MACA,mBAAA;AAAA,MACA;AAAA;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../../../src/components/EntityPagerDutyCard/index.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// eslint-disable-next-line @backstage/no-undeclared-imports\nimport { Entity } from '@backstage/catalog-model';\nimport { PAGERDUTY_INTEGRATION_KEY, PAGERDUTY_SERVICE_ID } from '../constants';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { getPagerDutyEntity } from '../pagerDutyEntity';\nimport { PagerDutyCard } from '../PagerDutyCard';\n\n/** @public */\nexport const isPluginApplicableToEntity = (entity: Entity) =>\n Boolean(\n entity.metadata.annotations?.[PAGERDUTY_INTEGRATION_KEY] ||\n entity.metadata.annotations?.[PAGERDUTY_SERVICE_ID],\n );\n\n/** @public */\nexport type EntityPagerDutyCardProps = {\n readOnly?: boolean;\n disableChangeEvents?: boolean;\n disableOnCall?: boolean;\n};\n\n/** @public */\nexport const EntityPagerDutyCard = (props: EntityPagerDutyCardProps) => {\n const { readOnly, disableChangeEvents, disableOnCall } = props;\n const { entity } = useEntity();\n\n if (isPluginApplicableToEntity(entity)) {\n const pagerDutyEntity = getPagerDutyEntity(entity);\n\n return (\n <PagerDutyCard\n {...pagerDutyEntity}\n readOnly={readOnly}\n disableChangeEvents={disableChangeEvents}\n disableOnCall={disableOnCall}\n />\n );\n }\n\n return null;\n};\n"],"names":[],"mappings":";;;;;;AAuBO,MAAM,0BAAA,GAA6B,CAAC,MAAA,KACzC,OAAA;AAAA,EACE,MAAA,CAAO,SAAS,WAAA,GAAc,yBAAyB,KACrD,MAAA,CAAO,QAAA,CAAS,cAAc,oBAAoB;AACtD;AAUK,MAAM,mBAAA,GAAsB,CAAC,KAAA,KAAoC;AACtE,EAAA,MAAM,EAAE,QAAA,EAAU,mBAAA,EAAqB,aAAA,EAAc,GAAI,KAAA;AACzD,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAE7B,EAAA,IAAI,0BAAA,CAA2B,MAAM,CAAA,EAAG;AACtC,IAAA,MAAM,eAAA,GAAkB,mBAAmB,MAAM,CAAA;AAEjD,IAAA,uBACE,GAAA;AAAA,MAAC,aAAA;AAAA,MAAA;AAAA,QACE,GAAG,eAAA;AAAA,QACJ,QAAA;AAAA,QACA,mBAAA;AAAA,QACA;AAAA;AAAA,KACF;AAAA,EAEJ;AAEA,EAAA,OAAO,IAAA;AACT;;;;"}
@@ -10,16 +10,19 @@ const isPluginApplicableToEntity = (entity) => Boolean(
10
10
  const EntityPagerDutySmallCard = (props) => {
11
11
  const { readOnly, disableInsights, disableOnCall } = props;
12
12
  const { entity } = useEntity();
13
- const pagerDutyEntity = getPagerDutyEntity(entity);
14
- return /* @__PURE__ */ jsx(
15
- PagerDutySmallCard,
16
- {
17
- ...pagerDutyEntity,
18
- readOnly,
19
- disableInsights,
20
- disableOnCall
21
- }
22
- );
13
+ if (isPluginApplicableToEntity(entity)) {
14
+ const pagerDutyEntity = getPagerDutyEntity(entity);
15
+ return /* @__PURE__ */ jsx(
16
+ PagerDutySmallCard,
17
+ {
18
+ ...pagerDutyEntity,
19
+ readOnly,
20
+ disableInsights,
21
+ disableOnCall
22
+ }
23
+ );
24
+ }
25
+ return null;
23
26
  };
24
27
 
25
28
  export { EntityPagerDutySmallCard, isPluginApplicableToEntity };
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../../src/components/EntityPagerDutySmallCard/index.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// eslint-disable-next-line @backstage/no-undeclared-imports\nimport { Entity } from '@backstage/catalog-model';\nimport { PAGERDUTY_INTEGRATION_KEY, PAGERDUTY_SERVICE_ID } from '../constants';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { getPagerDutyEntity } from '../pagerDutyEntity';\nimport { PagerDutySmallCard } from '../PagerDutySmallCard';\n\n/** @public */\nexport const isPluginApplicableToEntity = (entity: Entity) =>\n Boolean(\n entity.metadata.annotations?.[PAGERDUTY_INTEGRATION_KEY] ||\n entity.metadata.annotations?.[PAGERDUTY_SERVICE_ID],\n );\n\n/** @public */\nexport type EntityPagerDutySmallCardProps = {\n readOnly?: boolean;\n disableInsights?: boolean;\n disableOnCall?: boolean;\n};\n\n/** @public */\nexport const EntityPagerDutySmallCard = (\n props: EntityPagerDutySmallCardProps,\n) => {\n const { readOnly, disableInsights, disableOnCall } = props;\n const { entity } = useEntity();\n const pagerDutyEntity = getPagerDutyEntity(entity);\n return (\n <PagerDutySmallCard\n {...pagerDutyEntity}\n readOnly={readOnly}\n disableInsights={disableInsights}\n disableOnCall={disableOnCall}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;AAuBO,MAAM,0BAAA,GAA6B,CAAC,MAAA,KACzC,OAAA;AAAA,EACE,MAAA,CAAO,SAAS,WAAA,GAAc,yBAAyB,KACrD,MAAA,CAAO,QAAA,CAAS,cAAc,oBAAoB;AACtD;AAUK,MAAM,wBAAA,GAA2B,CACtC,KAAA,KACG;AACH,EAAA,MAAM,EAAE,QAAA,EAAU,eAAA,EAAiB,aAAA,EAAc,GAAI,KAAA;AACrD,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAC7B,EAAA,MAAM,eAAA,GAAkB,mBAAmB,MAAM,CAAA;AACjD,EAAA,uBACE,GAAA;AAAA,IAAC,kBAAA;AAAA,IAAA;AAAA,MACE,GAAG,eAAA;AAAA,MACJ,QAAA;AAAA,MACA,eAAA;AAAA,MACA;AAAA;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../../../src/components/EntityPagerDutySmallCard/index.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 { Entity } from '@backstage/catalog-model';\nimport { PAGERDUTY_INTEGRATION_KEY, PAGERDUTY_SERVICE_ID } from '../constants';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { getPagerDutyEntity } from '../pagerDutyEntity';\nimport { PagerDutySmallCard } from '../PagerDutySmallCard';\n\n/** @public */\nexport const isPluginApplicableToEntity = (entity: Entity) =>\n Boolean(\n entity.metadata.annotations?.[PAGERDUTY_INTEGRATION_KEY] ||\n entity.metadata.annotations?.[PAGERDUTY_SERVICE_ID],\n );\n\n/** @public */\nexport type EntityPagerDutySmallCardProps = {\n readOnly?: boolean;\n disableInsights?: boolean;\n disableOnCall?: boolean;\n};\n\n/** @public */\nexport const EntityPagerDutySmallCard = (\n props: EntityPagerDutySmallCardProps,\n) => {\n const { readOnly, disableInsights, disableOnCall } = props;\n const { entity } = useEntity();\n\n if (isPluginApplicableToEntity(entity)) {\n const pagerDutyEntity = getPagerDutyEntity(entity);\n\n return (\n <PagerDutySmallCard\n {...pagerDutyEntity}\n readOnly={readOnly}\n disableInsights={disableInsights}\n disableOnCall={disableOnCall}\n />\n );\n }\n\n return null;\n};\n"],"names":[],"mappings":";;;;;;AAuBO,MAAM,0BAAA,GAA6B,CAAC,MAAA,KACzC,OAAA;AAAA,EACE,MAAA,CAAO,SAAS,WAAA,GAAc,yBAAyB,KACrD,MAAA,CAAO,QAAA,CAAS,cAAc,oBAAoB;AACtD;AAUK,MAAM,wBAAA,GAA2B,CACtC,KAAA,KACG;AACH,EAAA,MAAM,EAAE,QAAA,EAAU,eAAA,EAAiB,aAAA,EAAc,GAAI,KAAA;AACrD,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAE7B,EAAA,IAAI,0BAAA,CAA2B,MAAM,CAAA,EAAG;AACtC,IAAA,MAAM,eAAA,GAAkB,mBAAmB,MAAM,CAAA;AAEjD,IAAA,uBACE,GAAA;AAAA,MAAC,kBAAA;AAAA,MAAA;AAAA,QACE,GAAG,eAAA;AAAA,QACJ,QAAA;AAAA,QACA,eAAA;AAAA,QACA;AAAA;AAAA,KACF;AAAA,EAEJ;AAEA,EAAA,OAAO,IAAA;AACT;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { makeStyles, List, ListSubheader, createStyles } from '@material-ui/core';
2
+ import { List, ListSubheader } from '@material-ui/core';
3
3
  import { EscalationUsersEmptyState } from './EscalationUsersEmptyState.esm.js';
4
4
  import { EscalationUsersForbiddenState } from './EscalationUsersForbiddenState.esm.js';
5
5
  import { EscalationUser } from './EscalationUser.esm.js';
@@ -9,13 +9,6 @@ import { Alert } from '@material-ui/lab';
9
9
  import { useApi } from '@backstage/core-plugin-api';
10
10
  import { Progress } from '@backstage/core-components';
11
11
 
12
- const useStyles = makeStyles(
13
- () => createStyles({
14
- listStyle: {
15
- marginLeft: "-15px"
16
- }
17
- })
18
- );
19
12
  const EscalationPolicy = ({
20
13
  policyId,
21
14
  policyUrl,
@@ -23,7 +16,6 @@ const EscalationPolicy = ({
23
16
  account
24
17
  }) => {
25
18
  const api = useApi(pagerDutyApiRef);
26
- const classes = useStyles();
27
19
  const {
28
20
  value: users,
29
21
  loading,
@@ -46,7 +38,7 @@ const EscalationPolicy = ({
46
38
  if (!users?.length) {
47
39
  return /* @__PURE__ */ jsx(EscalationUsersEmptyState, {});
48
40
  }
49
- return /* @__PURE__ */ jsx(List, { dense: true, className: classes.listStyle, children: users.map((user, index) => /* @__PURE__ */ jsx(
41
+ return /* @__PURE__ */ jsx(List, { dense: true, children: users.map((user, index) => /* @__PURE__ */ jsx(
50
42
  EscalationUser,
51
43
  {
52
44
  user,
@@ -1 +1 @@
1
- {"version":3,"file":"EscalationPolicy.esm.js","sources":["../../../src/components/Escalation/EscalationPolicy.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// eslint-disable-next-line @backstage/no-undeclared-imports\nimport {\n List,\n ListSubheader,\n createStyles,\n makeStyles,\n} from '@material-ui/core';\nimport { EscalationUsersEmptyState } from './EscalationUsersEmptyState';\nimport { EscalationUsersForbiddenState } from './EscalationUsersForbiddenState';\nimport { EscalationUser } from './EscalationUser';\nimport useAsync from 'react-use/lib/useAsync';\nimport { pagerDutyApiRef } from '../../api';\nimport { Alert } from '@material-ui/lab';\n\nimport { useApi } from '@backstage/core-plugin-api';\nimport { Progress } from '@backstage/core-components';\nimport { BackstageTheme } from '@backstage/theme';\n\ntype Props = {\n policyId: string;\n policyUrl: string;\n policyName: string;\n account?: string;\n};\nconst useStyles = makeStyles<BackstageTheme>(() =>\n createStyles({\n listStyle: {\n marginLeft: '-15px',\n },\n }),\n);\n\nexport const EscalationPolicy = ({\n policyId,\n policyUrl,\n policyName,\n account,\n}: Props) => {\n const api = useApi(pagerDutyApiRef);\n const classes = useStyles();\n\n const {\n value: users,\n loading,\n error,\n } = useAsync(async () => {\n return await api.getOnCallByPolicyId(policyId, account);\n });\n\n if (error) {\n if (error.message.includes('Forbidden')) {\n return (\n <List dense subheader={<ListSubheader>ON CALL</ListSubheader>}>\n <EscalationUsersForbiddenState />\n </List>\n );\n }\n\n return (\n <Alert severity=\"error\">\n Error encountered while fetching information. {error.message}\n </Alert>\n );\n }\n\n if (loading) {\n return <Progress data-testid=\"escalation-progress\" />;\n }\n\n if (!users?.length) {\n return <EscalationUsersEmptyState />;\n }\n\n return (\n <List dense className={classes.listStyle}>\n {users!.map((user, index) => (\n <EscalationUser\n key={index}\n user={user}\n policyUrl={policyUrl}\n policyName={policyName}\n />\n ))}\n </List>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAuCA,MAAM,SAAA,GAAY,UAAA;AAAA,EAA2B,MAC3C,YAAA,CAAa;AAAA,IACX,SAAA,EAAW;AAAA,MACT,UAAA,EAAY;AAAA;AACd,GACD;AACH,CAAA;AAEO,MAAM,mBAAmB,CAAC;AAAA,EAC/B,QAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAA,KAAa;AACX,EAAA,MAAM,GAAA,GAAM,OAAO,eAAe,CAAA;AAClC,EAAA,MAAM,UAAU,SAAA,EAAU;AAE1B,EAAA,MAAM;AAAA,IACJ,KAAA,EAAO,KAAA;AAAA,IACP,OAAA;AAAA,IACA;AAAA,GACF,GAAI,SAAS,YAAY;AACvB,IAAA,OAAO,MAAM,GAAA,CAAI,mBAAA,CAAoB,QAAA,EAAU,OAAO,CAAA;AAAA,EACxD,CAAC,CAAA;AAED,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,IAAI,KAAA,CAAM,OAAA,CAAQ,QAAA,CAAS,WAAW,CAAA,EAAG;AACvC,MAAA,uBACE,GAAA,CAAC,IAAA,EAAA,EAAK,KAAA,EAAK,IAAA,EAAC,SAAA,kBAAW,GAAA,CAAC,aAAA,EAAA,EAAc,QAAA,EAAA,SAAA,EAAO,CAAA,EAC3C,QAAA,kBAAA,GAAA,CAAC,6BAAA,EAAA,EAA8B,CAAA,EACjC,CAAA;AAAA,IAEJ;AAEA,IAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAM,QAAA,EAAS,OAAA,EAAQ,QAAA,EAAA;AAAA,MAAA,gDAAA;AAAA,MACyB,KAAA,CAAM;AAAA,KAAA,EACvD,CAAA;AAAA,EAEJ;AAEA,EAAA,IAAI,OAAA,EAAS;AACX,IAAA,uBAAO,GAAA,CAAC,QAAA,EAAA,EAAS,aAAA,EAAY,qBAAA,EAAsB,CAAA;AAAA,EACrD;AAEA,EAAA,IAAI,CAAC,OAAO,MAAA,EAAQ;AAClB,IAAA,2BAAQ,yBAAA,EAAA,EAA0B,CAAA;AAAA,EACpC;AAEA,EAAA,uBACE,GAAA,CAAC,IAAA,EAAA,EAAK,KAAA,EAAK,IAAA,EAAC,SAAA,EAAW,OAAA,CAAQ,SAAA,EAC5B,QAAA,EAAA,KAAA,CAAO,GAAA,CAAI,CAAC,IAAA,EAAM,KAAA,qBACjB,GAAA;AAAA,IAAC,cAAA;AAAA,IAAA;AAAA,MAEC,IAAA;AAAA,MACA,SAAA;AAAA,MACA;AAAA,KAAA;AAAA,IAHK;AAAA,GAKR,CAAA,EACH,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"EscalationPolicy.esm.js","sources":["../../../src/components/Escalation/EscalationPolicy.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 */\nimport { List, ListSubheader } from '@material-ui/core';\nimport { EscalationUsersEmptyState } from './EscalationUsersEmptyState';\nimport { EscalationUsersForbiddenState } from './EscalationUsersForbiddenState';\nimport { EscalationUser } from './EscalationUser';\nimport useAsync from 'react-use/lib/useAsync';\nimport { pagerDutyApiRef } from '../../api';\nimport { Alert } from '@material-ui/lab';\n\nimport { useApi } from '@backstage/core-plugin-api';\nimport { Progress } from '@backstage/core-components';\n\ntype Props = {\n policyId: string;\n policyUrl: string;\n policyName: string;\n account?: string;\n};\n\nexport const EscalationPolicy = ({\n policyId,\n policyUrl,\n policyName,\n account,\n}: Props) => {\n const api = useApi(pagerDutyApiRef);\n\n const {\n value: users,\n loading,\n error,\n } = useAsync(async () => {\n return await api.getOnCallByPolicyId(policyId, account);\n });\n\n if (error) {\n if (error.message.includes('Forbidden')) {\n return (\n <List dense subheader={<ListSubheader>ON CALL</ListSubheader>}>\n <EscalationUsersForbiddenState />\n </List>\n );\n }\n\n return (\n <Alert severity=\"error\">\n Error encountered while fetching information. {error.message}\n </Alert>\n );\n }\n\n if (loading) {\n return <Progress data-testid=\"escalation-progress\" />;\n }\n\n if (!users?.length) {\n return <EscalationUsersEmptyState />;\n }\n\n return (\n <List dense>\n {users!.map((user, index) => (\n <EscalationUser\n key={index}\n user={user}\n policyUrl={policyUrl}\n policyName={policyName}\n />\n ))}\n </List>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAiCO,MAAM,mBAAmB,CAAC;AAAA,EAC/B,QAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAA,KAAa;AACX,EAAA,MAAM,GAAA,GAAM,OAAO,eAAe,CAAA;AAElC,EAAA,MAAM;AAAA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Item, ListItemIcon, ListItemText, IconButton, Typography, Tooltip } from '@material-ui/core';
3
- import Avatar from '@material-ui/core/Avatar';
2
+ import { makeStyles, ListItem, ListItemIcon, ListItemText, Typography, Tooltip } from '@material-ui/core';
4
3
  import NotificationsIcon from '@material-ui/icons/Notifications';
4
+ import { Avatar, Button } from '@backstage/ui';
5
5
 
6
- const useStyles = makeStyles((theme) => ({
6
+ const useStyles = makeStyles(() => ({
7
7
  listItemPrimary: {
8
8
  fontWeight: "bold"
9
9
  },
10
10
  listItemSecondary: {
11
11
  fontWeight: "normal",
12
12
  textDecoration: "underline",
13
- marginTop: "-5px"
13
+ marginTop: "-5px",
14
+ paddingLeft: "5px"
14
15
  },
15
16
  buttonStyle: {
16
- marginLeft: "-11px",
17
- marginTop: "-10px",
18
17
  fontSize: "15px",
19
- color: theme.palette.text.primary,
20
18
  "&:hover": {
21
- backgroundColor: "transparent",
22
19
  textDecoration: "underline"
23
20
  }
24
21
  },
25
22
  userTextButtonStyle: {
26
- marginLeft: "-11px",
27
- marginTop: "-10px",
28
- marginBottom: "-10px",
29
23
  fontSize: "15px",
30
- color: theme.palette.text.primary,
31
24
  "&:hover": {
32
25
  backgroundColor: "transparent",
33
26
  textDecoration: "underline"
@@ -40,14 +33,10 @@ const useStyles = makeStyles((theme) => ({
40
33
  },
41
34
  iconStyle: {
42
35
  fontSize: "25px",
43
- marginLeft: "-4px",
44
- color: theme.palette.text.primary
45
- },
46
- smallIconStyle: {
47
- color: theme.palette.text.primary
36
+ marginLeft: "-4px"
48
37
  },
49
38
  avatarStyle: {
50
- marginTop: "-20px"
39
+ marginTop: "-30px"
51
40
  }
52
41
  }));
53
42
  function navigateToUrl(url) {
@@ -59,7 +48,7 @@ const EscalationUser = ({ user, policyUrl, policyName }) => {
59
48
  /* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(
60
49
  Avatar,
61
50
  {
62
- alt: user.name,
51
+ name: user.name,
63
52
  src: user.avatar_url,
64
53
  className: classes.avatarStyle
65
54
  }
@@ -69,8 +58,9 @@ const EscalationUser = ({ user, policyUrl, policyName }) => {
69
58
  {
70
59
  primary: /* @__PURE__ */ jsxs(Fragment, { children: [
71
60
  /* @__PURE__ */ jsx(Tooltip, { title: "Open user in PagerDuty", placement: "top", children: /* @__PURE__ */ jsx(
72
- IconButton,
61
+ Button,
73
62
  {
63
+ variant: "tertiary",
74
64
  "aria-label": "open-user-in-browser",
75
65
  onClick: () => navigateToUrl(user.html_url),
76
66
  className: classes.userTextButtonStyle,
@@ -87,15 +77,15 @@ const EscalationUser = ({ user, policyUrl, policyName }) => {
87
77
  )
88
78
  ] }),
89
79
  secondary: /* @__PURE__ */ jsx(
90
- IconButton,
80
+ Button,
91
81
  {
92
82
  "aria-label": "open-escalation-policy-in-browser",
93
83
  onClick: () => navigateToUrl(policyUrl),
84
+ variant: "tertiary",
85
+ size: "small",
94
86
  className: classes.buttonStyle,
95
- children: /* @__PURE__ */ jsxs(Typography, { className: classes.containerStyle, children: [
96
- /* @__PURE__ */ jsx(NotificationsIcon, { className: classes.iconStyle }),
97
- policyName
98
- ] })
87
+ iconStart: /* @__PURE__ */ jsx(NotificationsIcon, { className: classes.iconStyle }),
88
+ children: /* @__PURE__ */ jsx(Typography, { className: classes.containerStyle, children: policyName })
99
89
  }
100
90
  )
101
91
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EscalationUser.esm.js","sources":["../../../src/components/Escalation/EscalationUser.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// eslint-disable-next-line @backstage/no-undeclared-imports\nimport {\n ListItem,\n ListItemIcon,\n Tooltip,\n ListItemText,\n makeStyles,\n IconButton,\n Typography,\n} from '@material-ui/core';\nimport Avatar from '@material-ui/core/Avatar';\nimport { PagerDutyUser } from '@pagerduty/backstage-plugin-common';\nimport NotificationsIcon from '@material-ui/icons/Notifications';\nimport { BackstageTheme } from '@backstage/theme';\n\nconst useStyles = makeStyles<BackstageTheme>(theme => ({\n listItemPrimary: {\n fontWeight: 'bold',\n },\n listItemSecondary: {\n fontWeight: 'normal',\n textDecoration: 'underline',\n marginTop: '-5px',\n },\n buttonStyle: {\n marginLeft: '-11px',\n marginTop: '-10px',\n fontSize: '15px',\n color: theme.palette.text.primary,\n '&:hover': {\n backgroundColor: 'transparent',\n textDecoration: 'underline',\n },\n },\n userTextButtonStyle: {\n marginLeft: '-11px',\n marginTop: '-10px',\n marginBottom: '-10px',\n fontSize: '15px',\n color: theme.palette.text.primary,\n '&:hover': {\n backgroundColor: 'transparent',\n textDecoration: 'underline',\n },\n },\n containerStyle: {\n display: 'flex',\n alignItems: 'center',\n fontWeight: 'bold',\n },\n iconStyle: {\n fontSize: '25px',\n marginLeft: '-4px',\n color: theme.palette.text.primary,\n },\n smallIconStyle: {\n color: theme.palette.text.primary,\n },\n avatarStyle: {\n marginTop: '-20px',\n },\n}));\n\ntype Props = {\n user: PagerDutyUser;\n policyUrl: string;\n policyName: string;\n};\n\nfunction navigateToUrl(url: string) {\n // open url in new browser window\n window.open(url, '_blank');\n}\n\nexport const EscalationUser = ({ user, policyUrl, policyName }: Props) => {\n const classes = useStyles();\n\n return (\n <ListItem>\n <ListItemIcon>\n <Avatar\n alt={user.name}\n src={user.avatar_url}\n className={classes.avatarStyle}\n />\n </ListItemIcon>\n <ListItemText\n primary={\n <>\n <Tooltip title=\"Open user in PagerDuty\" placement=\"top\">\n <IconButton\n aria-label=\"open-user-in-browser\"\n onClick={() => navigateToUrl(user.html_url)}\n className={classes.userTextButtonStyle}\n >\n <Typography className={classes.containerStyle}>\n {user.name}\n </Typography>\n </IconButton>\n </Tooltip>\n\n <Typography\n className={classes.listItemSecondary}\n color=\"textSecondary\"\n >\n {user.email}\n </Typography>\n </>\n }\n secondary={\n <IconButton\n aria-label=\"open-escalation-policy-in-browser\"\n onClick={() => navigateToUrl(policyUrl)}\n className={classes.buttonStyle}\n >\n <Typography className={classes.containerStyle}>\n <NotificationsIcon className={classes.iconStyle} />\n {policyName}\n </Typography>\n </IconButton>\n }\n />\n </ListItem>\n );\n};\n"],"names":[],"mappings":";;;;;AA8BA,MAAM,SAAA,GAAY,WAA2B,CAAA,KAAA,MAAU;AAAA,EACrD,eAAA,EAAiB;AAAA,IACf,UAAA,EAAY;AAAA,GACd;AAAA,EACA,iBAAA,EAAmB;AAAA,IACjB,UAAA,EAAY,QAAA;AAAA,IACZ,cAAA,EAAgB,WAAA;AAAA,IAChB,SAAA,EAAW;AAAA,GACb;AAAA,EACA,WAAA,EAAa;AAAA,IACX,UAAA,EAAY,OAAA;AAAA,IACZ,SAAA,EAAW,OAAA;AAAA,IACX,QAAA,EAAU,MAAA;AAAA,IACV,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,OAAA;AAAA,IAC1B,SAAA,EAAW;AAAA,MACT,eAAA,EAAiB,aAAA;AAAA,MACjB,cAAA,EAAgB;AAAA;AAClB,GACF;AAAA,EACA,mBAAA,EAAqB;AAAA,IACnB,UAAA,EAAY,OAAA;AAAA,IACZ,SAAA,EAAW,OAAA;AAAA,IACX,YAAA,EAAc,OAAA;AAAA,IACd,QAAA,EAAU,MAAA;AAAA,IACV,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,OAAA;AAAA,IAC1B,SAAA,EAAW;AAAA,MACT,eAAA,EAAiB,aAAA;AAAA,MACjB,cAAA,EAAgB;AAAA;AAClB,GACF;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,OAAA,EAAS,MAAA;AAAA,IACT,UAAA,EAAY,QAAA;AAAA,IACZ,UAAA,EAAY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AAA,EAAW,OAAA,CAAQ,cAAA,EAC5B,eAAK,IAAA,EACR;AAAA;AAAA,WACF,EACF,CAAA;AAAA,0BAEA,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,WAAW,OAAA,CAAQ,iBAAA;AAAA,cACnB,KAAA,EAAM,eAAA;AAAA,cAEL,QAAA,EAAA,IAAA,CAAK;AAAA;AAAA;AACR,SAAA,EACF,CAAA;AAAA,QAEF,SAAA,kBACE,GAAA;AAAA,UAAC,UAAA;AAAA,UAAA;AAAA,YACC,YAAA,EAAW,mCAAA;AAAA,YACX,OAAA,EAAS,MAAM,aAAA,CAAc,SAAS,CAAA;AAAA,YACtC,WAAW,OAAA,CAAQ,WAAA;AAAA,YAEnB,QAAA,kBAAA,IAAA,CAAC,UAAA,EAAA,EAAW,SAAA,EAAW,OAAA,CAAQ,cAAA,EAC7B,QAAA,EAAA;AAAA,8BAAA,GAAA,CAAC,iBAAA,EAAA,EAAkB,SAAA,EAAW,OAAA,CAAQ,SAAA,EAAW,CAAA;AAAA,cAChD;AAAA,aAAA,EACH;AAAA;AAAA;AACF;AAAA;AAEJ,GAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"EscalationUser.esm.js","sources":["../../../src/components/Escalation/EscalationUser.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// eslint-disable-next-line @backstage/no-undeclared-imports\nimport {\n ListItem,\n ListItemIcon,\n Tooltip,\n ListItemText,\n makeStyles,\n Typography,\n} from '@material-ui/core';\nimport { PagerDutyUser } from '@pagerduty/backstage-plugin-common';\nimport NotificationsIcon from '@material-ui/icons/Notifications';\nimport { BackstageTheme } from '@backstage/theme';\nimport { Avatar, Button } from '@backstage/ui';\n\nconst useStyles = makeStyles<BackstageTheme>(() => ({\n listItemPrimary: {\n fontWeight: 'bold',\n },\n listItemSecondary: {\n fontWeight: 'normal',\n textDecoration: 'underline',\n marginTop: '-5px',\n paddingLeft: '5px',\n },\n buttonStyle: {\n fontSize: '15px',\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n userTextButtonStyle: {\n fontSize: '15px',\n '&:hover': {\n backgroundColor: 'transparent',\n textDecoration: 'underline',\n },\n },\n containerStyle: {\n display: 'flex',\n alignItems: 'center',\n fontWeight: 'bold',\n },\n iconStyle: {\n fontSize: '25px',\n marginLeft: '-4px',\n },\n avatarStyle: {\n marginTop: '-30px',\n },\n}));\n\ntype Props = {\n user: PagerDutyUser;\n policyUrl: string;\n policyName: string;\n};\n\nfunction navigateToUrl(url: string) {\n // open url in new browser window\n window.open(url, '_blank');\n}\n\nexport const EscalationUser = ({ user, policyUrl, policyName }: Props) => {\n const classes = useStyles();\n\n return (\n <ListItem>\n <ListItemIcon>\n <Avatar\n name={user.name}\n src={user.avatar_url}\n className={classes.avatarStyle}\n />\n </ListItemIcon>\n <ListItemText\n primary={\n <>\n <Tooltip title=\"Open user in PagerDuty\" placement=\"top\">\n <Button\n variant=\"tertiary\"\n aria-label=\"open-user-in-browser\"\n onClick={() => navigateToUrl(user.html_url)}\n className={classes.userTextButtonStyle}\n >\n <Typography className={classes.containerStyle}>\n {user.name}\n </Typography>\n </Button>\n </Tooltip>\n\n <Typography\n className={classes.listItemSecondary}\n color=\"textSecondary\"\n >\n {user.email}\n </Typography>\n </>\n }\n secondary={\n <Button\n aria-label=\"open-escalation-policy-in-browser\"\n onClick={() => navigateToUrl(policyUrl)}\n variant=\"tertiary\"\n size=\"small\"\n className={classes.buttonStyle}\n iconStart={<NotificationsIcon className={classes.iconStyle} />}\n >\n <Typography className={classes.container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