@pagerduty/backstage-plugin 0.15.4 → 0.15.6
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/config.d.ts +1 -1
- package/dist/api/client.esm.js.map +1 -1
- package/dist/components/ChangeEvents/ChangeEventEmptyState.esm.js +12 -9
- package/dist/components/ChangeEvents/ChangeEventEmptyState.esm.js.map +1 -1
- package/dist/components/ChangeEvents/ChangeEventForbiddenState.esm.js +12 -9
- package/dist/components/ChangeEvents/ChangeEventForbiddenState.esm.js.map +1 -1
- package/dist/components/ChangeEvents/ChangeEventListItem.esm.js +37 -25
- package/dist/components/ChangeEvents/ChangeEventListItem.esm.js.map +1 -1
- package/dist/components/ChangeEvents/ChangeEvents.esm.js +13 -9
- package/dist/components/ChangeEvents/ChangeEvents.esm.js.map +1 -1
- package/dist/components/EntityPagerDutyCard/index.esm.js +2 -2
- package/dist/components/EntityPagerDutyCard/index.esm.js.map +1 -1
- package/dist/components/EntityPagerDutySmallCard/index.esm.js +2 -2
- package/dist/components/EntityPagerDutySmallCard/index.esm.js.map +1 -1
- package/dist/components/Errors/ForbiddenError.esm.js +6 -6
- package/dist/components/Errors/ForbiddenError.esm.js.map +1 -1
- package/dist/components/Errors/MissingTokenError.esm.js +6 -6
- package/dist/components/Errors/MissingTokenError.esm.js.map +1 -1
- package/dist/components/Errors/ServiceNotFoundError.esm.js +6 -6
- package/dist/components/Errors/ServiceNotFoundError.esm.js.map +1 -1
- package/dist/components/Escalation/EscalationPolicy.esm.js +21 -18
- package/dist/components/Escalation/EscalationPolicy.esm.js.map +1 -1
- package/dist/components/Escalation/EscalationUser.esm.js +48 -39
- package/dist/components/Escalation/EscalationUser.esm.js.map +1 -1
- package/dist/components/Escalation/EscalationUsersEmptyState.esm.js +5 -2
- package/dist/components/Escalation/EscalationUsersEmptyState.esm.js.map +1 -1
- package/dist/components/Escalation/EscalationUsersForbiddenState.esm.js +5 -2
- package/dist/components/Escalation/EscalationUsersForbiddenState.esm.js.map +1 -1
- package/dist/components/HomePagePagerDutyCard/Content.esm.js +2 -2
- package/dist/components/HomePagePagerDutyCard/Content.esm.js.map +1 -1
- package/dist/components/Icons/index.esm.js +2 -2
- package/dist/components/Icons/index.esm.js.map +1 -1
- package/dist/components/Incident/IncidentEmptyState.esm.js +15 -13
- package/dist/components/Incident/IncidentEmptyState.esm.js.map +1 -1
- package/dist/components/Incident/IncidentForbiddenState.esm.js +12 -9
- package/dist/components/Incident/IncidentForbiddenState.esm.js.map +1 -1
- package/dist/components/Incident/IncidentListItem.esm.js +53 -40
- package/dist/components/Incident/IncidentListItem.esm.js.map +1 -1
- package/dist/components/Incident/Incidents.esm.js +10 -6
- package/dist/components/Incident/Incidents.esm.js.map +1 -1
- package/dist/components/PagerDutyCard/index.esm.js +115 -81
- package/dist/components/PagerDutyCard/index.esm.js.map +1 -1
- package/dist/components/PagerDutyCardCommon/InsightsCard.esm.js +8 -2
- package/dist/components/PagerDutyCardCommon/InsightsCard.esm.js.map +1 -1
- package/dist/components/PagerDutyCardCommon/OpenServiceButton.esm.js +9 -6
- package/dist/components/PagerDutyCardCommon/OpenServiceButton.esm.js.map +1 -1
- package/dist/components/PagerDutyCardCommon/ServiceStandardsCard.esm.js +34 -16
- package/dist/components/PagerDutyCardCommon/ServiceStandardsCard.esm.js.map +1 -1
- package/dist/components/PagerDutyCardCommon/StatusCard.esm.js +10 -6
- package/dist/components/PagerDutyCardCommon/StatusCard.esm.js.map +1 -1
- package/dist/components/PagerDutyCardCommon/TriggerIncidentButton.esm.js +27 -20
- package/dist/components/PagerDutyCardCommon/TriggerIncidentButton.esm.js.map +1 -1
- package/dist/components/PagerDutyPage/MappingTable.esm.js +39 -31
- package/dist/components/PagerDutyPage/MappingTable.esm.js.map +1 -1
- package/dist/components/PagerDutyPage/ServiceMappingComponent.esm.js +3 -2
- package/dist/components/PagerDutyPage/ServiceMappingComponent.esm.js.map +1 -1
- package/dist/components/PagerDutyPage/index.esm.js +85 -50
- package/dist/components/PagerDutyPage/index.esm.js.map +1 -1
- package/dist/components/PagerDutySmallCard/index.esm.js +116 -89
- package/dist/components/PagerDutySmallCard/index.esm.js.map +1 -1
- package/dist/components/TriggerButton/index.esm.js +23 -19
- package/dist/components/TriggerButton/index.esm.js.map +1 -1
- package/dist/components/TriggerDialog/TriggerDialog.esm.js +56 -36
- package/dist/components/TriggerDialog/TriggerDialog.esm.js.map +1 -1
- package/dist/components/constants.esm.js.map +1 -1
- package/dist/components/pagerDutyEntity.esm.js +1 -1
- package/dist/components/pagerDutyEntity.esm.js.map +1 -1
- package/dist/deprecated.esm.js +1 -2
- package/dist/deprecated.esm.js.map +1 -1
- package/dist/hooks/index.esm.js.map +1 -1
- package/dist/index.d.ts +12 -12
- package/dist/plugin.esm.js +2 -2
- package/dist/plugin.esm.js.map +1 -1
- package/package.json +19 -28
- package/CHANGELOG.md +0 -1390
- package/LICENSE +0 -201
- package/README.md +0 -51
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { makeStyles,
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { makeStyles, List, ListSubheader, createStyles } 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';
|
|
@@ -33,31 +33,34 @@ const EscalationPolicy = ({
|
|
|
33
33
|
});
|
|
34
34
|
if (error) {
|
|
35
35
|
if (error.message.includes("Forbidden")) {
|
|
36
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ jsx(List, { dense: true, subheader: /* @__PURE__ */ jsx(ListSubheader, { children: "ON CALL" }), children: /* @__PURE__ */ jsx(EscalationUsersForbiddenState, {}) });
|
|
37
37
|
}
|
|
38
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ jsxs(Alert, { severity: "error", children: [
|
|
39
|
+
"Error encountered while fetching information. ",
|
|
40
|
+
error.message
|
|
41
|
+
] });
|
|
39
42
|
}
|
|
40
43
|
if (loading) {
|
|
41
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ jsx(Progress, { "data-testid": "escalation-progress" });
|
|
42
45
|
}
|
|
43
46
|
if (!users?.length) {
|
|
44
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ jsx(EscalationUsersEmptyState, {});
|
|
45
48
|
}
|
|
46
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ jsx(
|
|
47
50
|
List,
|
|
48
51
|
{
|
|
49
52
|
dense: true,
|
|
50
|
-
className: classes.listStyle
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
className: classes.listStyle,
|
|
54
|
+
children: users.map((user, index) => /* @__PURE__ */ jsx(
|
|
55
|
+
EscalationUser,
|
|
56
|
+
{
|
|
57
|
+
user,
|
|
58
|
+
policyUrl,
|
|
59
|
+
policyName
|
|
60
|
+
},
|
|
61
|
+
index
|
|
62
|
+
))
|
|
63
|
+
}
|
|
61
64
|
);
|
|
62
65
|
};
|
|
63
66
|
|
|
@@ -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
|
|
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 { List, ListSubheader, createStyles, makeStyles } 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\n dense\n className={classes.listStyle}\n >\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":";;;;;;;;;;;AAkCA,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;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAK,IAAA;AAAA,MACL,WAAW,OAAA,CAAQ,SAAA;AAAA,MAElB,QAAA,EAAA,KAAA,CAAO,GAAA,CAAI,CAAC,IAAA,EAAM,KAAA,qBACjB,GAAA;AAAA,QAAC,cAAA;AAAA,QAAA;AAAA,UAEC,IAAA;AAAA,UACA,SAAA;AAAA,UACA;AAAA,SAAA;AAAA,QAHK;AAAA,OAKR;AAAA;AAAA,GACH;AAEJ;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { makeStyles, ListItem, ListItemIcon, ListItemText,
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { makeStyles, ListItem, ListItemIcon, ListItemText, IconButton, Tooltip, Typography } from '@material-ui/core';
|
|
3
3
|
import Avatar from '@material-ui/core/Avatar';
|
|
4
4
|
import NotificationsIcon from '@material-ui/icons/Notifications';
|
|
5
5
|
|
|
@@ -55,43 +55,52 @@ function navigateToUrl(url) {
|
|
|
55
55
|
}
|
|
56
56
|
const EscalationUser = ({ user, policyUrl, policyName }) => {
|
|
57
57
|
const classes = useStyles();
|
|
58
|
-
return /* @__PURE__ */
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
58
|
+
return /* @__PURE__ */ jsxs(ListItem, { children: [
|
|
59
|
+
/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(
|
|
60
|
+
Avatar,
|
|
61
|
+
{
|
|
62
|
+
alt: user.name,
|
|
63
|
+
src: user.avatar_url,
|
|
64
|
+
className: classes.avatarStyle
|
|
65
|
+
}
|
|
66
|
+
) }),
|
|
67
|
+
/* @__PURE__ */ jsx(
|
|
68
|
+
ListItemText,
|
|
69
|
+
{
|
|
70
|
+
primary: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
71
|
+
/* @__PURE__ */ jsx(Tooltip, { title: "Open user in PagerDuty", placement: "top", children: /* @__PURE__ */ jsx(
|
|
72
|
+
IconButton,
|
|
73
|
+
{
|
|
74
|
+
"aria-label": "open-user-in-browser",
|
|
75
|
+
onClick: () => navigateToUrl(user.html_url),
|
|
76
|
+
className: classes.userTextButtonStyle,
|
|
77
|
+
children: /* @__PURE__ */ jsx("span", { className: classes.containerStyle, children: user.name })
|
|
78
|
+
}
|
|
79
|
+
) }),
|
|
80
|
+
/* @__PURE__ */ jsx(
|
|
81
|
+
Typography,
|
|
82
|
+
{
|
|
83
|
+
className: classes.listItemSecondary,
|
|
84
|
+
color: "textSecondary",
|
|
85
|
+
children: user.email
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
] }),
|
|
89
|
+
secondary: /* @__PURE__ */ jsx(
|
|
90
|
+
IconButton,
|
|
91
|
+
{
|
|
92
|
+
"aria-label": "open-escalation-policy-in-browser",
|
|
93
|
+
onClick: () => navigateToUrl(policyUrl),
|
|
94
|
+
className: classes.buttonStyle,
|
|
95
|
+
children: /* @__PURE__ */ jsxs("span", { className: classes.containerStyle, children: [
|
|
96
|
+
/* @__PURE__ */ jsx(NotificationsIcon, { className: classes.iconStyle }),
|
|
97
|
+
policyName
|
|
98
|
+
] })
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
] });
|
|
95
104
|
};
|
|
96
105
|
|
|
97
106
|
export { EscalationUser };
|
|
@@ -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
|
|
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 '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 <span className={classes.containerStyle}>{user.name}</span>\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 <span className={classes.containerStyle}>\n <NotificationsIcon className={classes.iconStyle} />\n {policyName}\n </span>\n </IconButton>\n }\n />\n </ListItem>\n );\n};\n"],"names":[],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { makeStyles, ListItem, ListItemIcon, ListItemText } from '@material-ui/core';
|
|
3
3
|
import { StatusWarning } from '@backstage/core-components';
|
|
4
4
|
|
|
@@ -13,7 +13,10 @@ const useStyles = makeStyles({
|
|
|
13
13
|
});
|
|
14
14
|
const EscalationUsersEmptyState = () => {
|
|
15
15
|
const classes = useStyles();
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsxs(ListItem, { children: [
|
|
17
|
+
/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx("div", { className: classes.denseListIcon, children: /* @__PURE__ */ jsx(StatusWarning, {}) }) }),
|
|
18
|
+
/* @__PURE__ */ jsx(ListItemText, { primary: "No one is on-call. Update the escalation policy." })
|
|
19
|
+
] });
|
|
17
20
|
};
|
|
18
21
|
|
|
19
22
|
export { EscalationUsersEmptyState };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EscalationUsersEmptyState.esm.js","sources":["../../../src/components/Escalation/EscalationUsersEmptyState.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
|
|
1
|
+
{"version":3,"file":"EscalationUsersEmptyState.esm.js","sources":["../../../src/components/Escalation/EscalationUsersEmptyState.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 ListItemText,\n makeStyles,\n} from '@material-ui/core';\nimport { StatusWarning } from '@backstage/core-components';\n\nconst useStyles = makeStyles({\n denseListIcon: {\n marginRight: 0,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n\nexport const EscalationUsersEmptyState = () => {\n const classes = useStyles();\n return (\n <ListItem>\n <ListItemIcon>\n <div className={classes.denseListIcon}>\n <StatusWarning />\n </div>\n </ListItemIcon>\n <ListItemText primary=\"No one is on-call. Update the escalation policy.\" />\n </ListItem>\n );\n};\n"],"names":[],"mappings":";;;;AAwBA,MAAM,YAAY,UAAA,CAAW;AAAA,EAC3B,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;AAEpB,CAAC,CAAA;AAEM,MAAM,4BAA4B,MAAM;AAC7C,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,4BACG,QAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,YAAA,EAAA,EACC,8BAAC,KAAA,EAAA,EAAI,SAAA,EAAW,QAAQ,aAAA,EACtB,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,CAAA,EACjB,CAAA,EACF,CAAA;AAAA,oBACA,GAAA,CAAC,YAAA,EAAA,EAAa,OAAA,EAAQ,kDAAA,EAAmD;AAAA,GAAA,EAC3E,CAAA;AAEJ;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { makeStyles, ListItem, ListItemIcon, ListItemText } from '@material-ui/core';
|
|
3
3
|
import { StatusError } from '@backstage/core-components';
|
|
4
4
|
|
|
@@ -13,7 +13,10 @@ const useStyles = makeStyles({
|
|
|
13
13
|
});
|
|
14
14
|
const EscalationUsersForbiddenState = () => {
|
|
15
15
|
const classes = useStyles();
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsxs(ListItem, { children: [
|
|
17
|
+
/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx("div", { className: classes.denseListIcon, children: /* @__PURE__ */ jsx(StatusError, {}) }) }),
|
|
18
|
+
/* @__PURE__ */ jsx(ListItemText, { primary: "You don't permissions to list on-calls. Check your OAuth token permissions." })
|
|
19
|
+
] });
|
|
17
20
|
};
|
|
18
21
|
|
|
19
22
|
export { EscalationUsersForbiddenState };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EscalationUsersForbiddenState.esm.js","sources":["../../../src/components/Escalation/EscalationUsersForbiddenState.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
|
|
1
|
+
{"version":3,"file":"EscalationUsersForbiddenState.esm.js","sources":["../../../src/components/Escalation/EscalationUsersForbiddenState.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 ListItemText,\n makeStyles,\n} from '@material-ui/core';\nimport { StatusError } from '@backstage/core-components';\n\nconst useStyles = makeStyles({\n denseListIcon: {\n marginRight: 0,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n\nexport const EscalationUsersForbiddenState = () => {\n const classes = useStyles();\n return (\n <ListItem>\n <ListItemIcon>\n <div className={classes.denseListIcon}>\n <StatusError />\n </div>\n </ListItemIcon>\n <ListItemText primary=\"You don't permissions to list on-calls. Check your OAuth token permissions.\" />\n </ListItem>\n );\n};\n"],"names":[],"mappings":";;;;AAwBA,MAAM,YAAY,UAAA,CAAW;AAAA,EAC3B,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;AAEpB,CAAC,CAAA;AAEM,MAAM,gCAAgC,MAAM;AACjD,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,4BACG,QAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,YAAA,EAAA,EACC,8BAAC,KAAA,EAAA,EAAI,SAAA,EAAW,QAAQ,aAAA,EACtB,QAAA,kBAAA,GAAA,CAAC,WAAA,EAAA,EAAY,CAAA,EACf,CAAA,EACF,CAAA;AAAA,oBACA,GAAA,CAAC,YAAA,EAAA,EAAa,OAAA,EAAQ,6EAAA,EAA8E;AAAA,GAAA,EACtG,CAAA;AAEJ;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { PagerDutyCard } from '../PagerDutyCard/index.esm.js';
|
|
3
3
|
|
|
4
4
|
const Content = (props) => {
|
|
5
|
-
return /* @__PURE__ */
|
|
5
|
+
return /* @__PURE__ */ jsx(PagerDutyCard, { ...props });
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export { Content };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.esm.js","sources":["../../../src/components/HomePagePagerDutyCard/Content.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
|
|
1
|
+
{"version":3,"file":"Content.esm.js","sources":["../../../src/components/HomePagePagerDutyCard/Content.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 { PagerDutyEntity } from '../../types';\nimport { PagerDutyCard } from '../PagerDutyCard';\n\n/** @public */\nexport type HomePagePagerDutyCardProps = PagerDutyEntity & {\n readOnly?: boolean;\n};\n\n/** @public */\nexport const Content = (props: HomePagePagerDutyCardProps) => {\n return <PagerDutyCard {...props} />;\n};\n"],"names":[],"mappings":";;;AAyBO,MAAM,OAAA,GAAU,CAAC,KAAA,KAAsC;AAC5D,EAAA,uBAAO,GAAA,CAAC,aAAA,EAAA,EAAe,GAAG,KAAA,EAAO,CAAA;AACnC;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import PDIcon from '../../assets/PD-Icon.svg';
|
|
3
3
|
|
|
4
4
|
function PagerDutyIcon() {
|
|
5
|
-
return /* @__PURE__ */
|
|
5
|
+
return /* @__PURE__ */ jsx("img", { src: PDIcon, alt: "PagerDuty", height: "20px" });
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export { PagerDutyIcon };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../../src/components/Icons/index.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../../src/components/Icons/index.tsx"],"sourcesContent":["import PDIcon from \"../../assets/PD-Icon.svg\";\n\n/** @public */\nexport function PagerDutyIcon() {\n\n return <img src={PDIcon} alt=\"PagerDuty\" height=\"20px\" />;\n};\n"],"names":[],"mappings":";;;AAGO,SAAS,aAAA,GAAgB;AAE9B,EAAA,2BAAQ,KAAA,EAAA,EAAI,GAAA,EAAK,QAAQ,GAAA,EAAI,WAAA,EAAY,QAAO,MAAA,EAAO,CAAA;AACzD;;;;"}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Grid, Typography } from '@material-ui/core';
|
|
3
3
|
import EmptyStateImage from '../../assets/emptystate.svg';
|
|
4
4
|
|
|
5
5
|
const IncidentsEmptyState = () => {
|
|
6
|
-
return /* @__PURE__ */
|
|
6
|
+
return /* @__PURE__ */ jsxs(
|
|
7
7
|
Grid,
|
|
8
8
|
{
|
|
9
9
|
container: true,
|
|
10
10
|
justifyContent: "center",
|
|
11
11
|
direction: "column",
|
|
12
|
-
alignItems: "center"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
alignItems: "center",
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(Typography, { variant: "h5", children: "Nice! No incidents found!" }) }),
|
|
15
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(
|
|
16
|
+
"img",
|
|
17
|
+
{
|
|
18
|
+
src: EmptyStateImage,
|
|
19
|
+
alt: "EmptyState",
|
|
20
|
+
"data-testid": "emptyStateImg"
|
|
21
|
+
}
|
|
22
|
+
) })
|
|
23
|
+
]
|
|
24
|
+
}
|
|
23
25
|
);
|
|
24
26
|
};
|
|
25
27
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IncidentEmptyState.esm.js","sources":["../../../src/components/Incident/IncidentEmptyState.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
|
|
1
|
+
{"version":3,"file":"IncidentEmptyState.esm.js","sources":["../../../src/components/Incident/IncidentEmptyState.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 { Grid, Typography } from '@material-ui/core';\nimport EmptyStateImage from \"../../assets/emptystate.svg\";\n\nexport const IncidentsEmptyState = () => {\n return (\n <Grid\n container\n justifyContent=\"center\"\n direction=\"column\"\n alignItems=\"center\"\n >\n <Grid item xs={12}>\n <Typography variant=\"h5\">Nice! No incidents found!</Typography>\n </Grid>\n <Grid item xs={12}>\n <img\n src={EmptyStateImage}\n alt=\"EmptyState\"\n data-testid=\"emptyStateImg\"\n />\n </Grid>\n </Grid>\n );\n};\n"],"names":[],"mappings":";;;;AAmBO,MAAM,sBAAsB,MAAM;AACvC,EAAA,uBACE,IAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAS,IAAA;AAAA,MACT,cAAA,EAAe,QAAA;AAAA,MACf,SAAA,EAAU,QAAA;AAAA,MACV,UAAA,EAAW,QAAA;AAAA,MAEX,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EAAC,EAAA,EAAI,EAAA,EACb,8BAAC,UAAA,EAAA,EAAW,OAAA,EAAQ,IAAA,EAAK,QAAA,EAAA,2BAAA,EAAyB,CAAA,EACpD,CAAA;AAAA,wBACA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EAAC,IAAI,EAAA,EACb,QAAA,kBAAA,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,GAAA,EAAK,eAAA;AAAA,YACL,GAAA,EAAI,YAAA;AAAA,YACJ,aAAA,EAAY;AAAA;AAAA,SACd,EACF;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Grid, Typography } from '@material-ui/core';
|
|
3
3
|
import ForbiddenStateImage from '../../assets/forbiddenstate.svg';
|
|
4
4
|
|
|
5
5
|
const IncidentForbiddenState = () => {
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
-
"
|
|
8
|
-
{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
return /* @__PURE__ */ jsxs(Grid, { container: true, justifyContent: "center", direction: "column", alignItems: "center", children: [
|
|
7
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(Typography, { variant: "h5", children: "Feature not available with your account or token." }) }),
|
|
8
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(
|
|
9
|
+
"img",
|
|
10
|
+
{
|
|
11
|
+
src: ForbiddenStateImage,
|
|
12
|
+
alt: "ForbiddenState",
|
|
13
|
+
"data-testid": "forbiddenStateImg"
|
|
14
|
+
}
|
|
15
|
+
) })
|
|
16
|
+
] });
|
|
14
17
|
};
|
|
15
18
|
|
|
16
19
|
export { IncidentForbiddenState };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IncidentForbiddenState.esm.js","sources":["../../../src/components/Incident/IncidentForbiddenState.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
|
|
1
|
+
{"version":3,"file":"IncidentForbiddenState.esm.js","sources":["../../../src/components/Incident/IncidentForbiddenState.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 { Grid, Typography } from '@material-ui/core';\nimport ForbiddenStateImage from '../../assets/forbiddenstate.svg';\n\nexport const IncidentForbiddenState = () => {\n return (\n <Grid container justifyContent=\"center\" direction=\"column\" alignItems=\"center\">\n <Grid item xs={12}>\n <Typography variant=\"h5\">Feature not available with your account or token.</Typography>\n </Grid>\n <Grid item xs={12}>\n <img\n src={ForbiddenStateImage}\n alt=\"ForbiddenState\"\n data-testid=\"forbiddenStateImg\"\n />\n </Grid>\n </Grid>\n );\n};\n"],"names":[],"mappings":";;;;AAoBO,MAAM,yBAAyB,MAAM;AAC1C,EAAA,uBACE,IAAA,CAAC,QAAK,SAAA,EAAS,IAAA,EAAC,gBAAe,QAAA,EAAS,SAAA,EAAU,QAAA,EAAS,UAAA,EAAW,QAAA,EACpE,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EAAC,EAAA,EAAI,EAAA,EACb,8BAAC,UAAA,EAAA,EAAW,OAAA,EAAQ,IAAA,EAAK,QAAA,EAAA,mDAAA,EAAiD,CAAA,EAC5E,CAAA;AAAA,oBACA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EAAC,IAAI,EAAA,EACb,QAAA,kBAAA,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,GAAA,EAAK,mBAAA;AAAA,QACL,GAAA,EAAI,gBAAA;AAAA,QACJ,aAAA,EAAY;AAAA;AAAA,KACd,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { makeStyles, ListItem, ListItemText,
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { makeStyles, ListItem, ListItemText, Typography, Chip, ListItemSecondaryAction, Tooltip, IconButton } from '@material-ui/core';
|
|
3
3
|
import { DateTime, Duration } from 'luxon';
|
|
4
4
|
import OpenInBrowserIcon from '@material-ui/icons/OpenInBrowser';
|
|
5
5
|
import { Link } from '@backstage/core-components';
|
|
@@ -69,44 +69,57 @@ const IncidentListItem = ({ incident }) => {
|
|
|
69
69
|
const duration = (/* @__PURE__ */ new Date()).getTime() - new Date(incident.created_at).getTime();
|
|
70
70
|
const createdAt = DateTime.local().minus(Duration.fromMillis(duration)).toRelative({ locale: "en" });
|
|
71
71
|
const user = incident.assignments[0]?.assignee;
|
|
72
|
-
return /* @__PURE__ */
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
72
|
+
return /* @__PURE__ */ jsxs(ListItem, { dense: true, children: [
|
|
73
|
+
/* @__PURE__ */ jsx(
|
|
74
|
+
ListItemText,
|
|
75
|
+
{
|
|
76
|
+
primary: /* @__PURE__ */ jsxs("div", { className: classes.textContainer, children: [
|
|
77
|
+
/* @__PURE__ */ jsx(
|
|
78
|
+
Chip,
|
|
79
|
+
{
|
|
80
|
+
"data-testid": `chip-${incident.status}`,
|
|
81
|
+
label: incident.status,
|
|
82
|
+
size: "small",
|
|
83
|
+
variant: "outlined",
|
|
84
|
+
className: incident.status === "triggered" ? classes.error : classes.warning
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
/* @__PURE__ */ jsx(
|
|
88
|
+
Chip,
|
|
89
|
+
{
|
|
90
|
+
"data-testid": `chip-${incident.urgency}`,
|
|
91
|
+
label: `${incident.urgency} urgency`,
|
|
92
|
+
size: "small",
|
|
93
|
+
variant: "outlined",
|
|
94
|
+
className: incident.urgency === "high" ? classes.highUrgency : classes.lowUrgency
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
incident.title
|
|
98
|
+
] }),
|
|
99
|
+
primaryTypographyProps: {
|
|
100
|
+
variant: "body1",
|
|
101
|
+
className: classes.listItemPrimary
|
|
102
|
+
},
|
|
103
|
+
secondary: /* @__PURE__ */ jsxs(Typography, { noWrap: true, variant: "body2", color: "textSecondary", children: [
|
|
104
|
+
"Created ",
|
|
105
|
+
createdAt,
|
|
106
|
+
" and assigned to",
|
|
107
|
+
" ",
|
|
108
|
+
/* @__PURE__ */ jsx(Link, { to: user?.html_url ?? "#", children: user?.summary ?? "nobody" })
|
|
109
|
+
] })
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
/* @__PURE__ */ jsx(ListItemSecondaryAction, { children: /* @__PURE__ */ jsx(Tooltip, { title: "View in PagerDuty", placement: "top", children: /* @__PURE__ */ jsx(
|
|
113
|
+
IconButton,
|
|
114
|
+
{
|
|
115
|
+
href: incident.html_url,
|
|
116
|
+
target: "_blank",
|
|
117
|
+
rel: "noopener noreferrer",
|
|
118
|
+
className: classes.smallIconStyle,
|
|
119
|
+
children: /* @__PURE__ */ jsx(OpenInBrowserIcon, {})
|
|
120
|
+
}
|
|
121
|
+
) }) })
|
|
122
|
+
] }, incident.id);
|
|
110
123
|
};
|
|
111
124
|
|
|
112
125
|
export { IncidentListItem };
|