@pagerduty/backstage-plugin 0.9.4-next.10 → 0.9.4-next.12
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/dist/esm/{index-05ed342b.esm.js → index-9059229b.esm.js} +38 -10
- package/dist/esm/index-9059229b.esm.js.map +1 -0
- package/dist/esm/{index-7306b2fe.esm.js → index-c1a175e0.esm.js} +5 -2
- package/dist/esm/{index-7306b2fe.esm.js.map → index-c1a175e0.esm.js.map} +1 -1
- package/dist/index.esm.js +4 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/esm/index-05ed342b.esm.js.map +0 -1
|
@@ -22,6 +22,9 @@ import AddAlert from '@material-ui/icons/AddAlert';
|
|
|
22
22
|
import { makeStyles as makeStyles$1, createStyles, useTheme } from '@material-ui/core/styles';
|
|
23
23
|
import { useAsyncFn as useAsyncFn$1 } from 'react-use';
|
|
24
24
|
import Alert$1 from '@material-ui/lab/Alert/Alert';
|
|
25
|
+
import InfoIcon from '@material-ui/icons/Info';
|
|
26
|
+
import CheckCircle from '@material-ui/icons/CheckCircle';
|
|
27
|
+
import RadioButtonUncheckedIcon from '@material-ui/icons/RadioButtonUnchecked';
|
|
25
28
|
import validateColor from 'validate-color';
|
|
26
29
|
|
|
27
30
|
const PAGERDUTY_INTEGRATION_KEY = "pagerduty.com/integration-key";
|
|
@@ -206,7 +209,7 @@ const HomePagePagerDutyCard = pagerDutyPlugin.provide(
|
|
|
206
209
|
createCardExtension({
|
|
207
210
|
name: "HomePagePagerDutyCard",
|
|
208
211
|
title: "PagerDuty Homepage Card",
|
|
209
|
-
components: () => import('./index-
|
|
212
|
+
components: () => import('./index-c1a175e0.esm.js'),
|
|
210
213
|
settings: {
|
|
211
214
|
schema: {
|
|
212
215
|
title: "PagerDuty",
|
|
@@ -961,7 +964,7 @@ function colorFromPercentage(theme, percentage) {
|
|
|
961
964
|
}
|
|
962
965
|
return theme.palette.success.main;
|
|
963
966
|
}
|
|
964
|
-
function ServiceStandardsCard({ total, completed }) {
|
|
967
|
+
function ServiceStandardsCard({ total, completed, standards }) {
|
|
965
968
|
const useStyles = makeStyles((theme) => ({
|
|
966
969
|
cardStyle: {
|
|
967
970
|
height: "120px",
|
|
@@ -971,7 +974,8 @@ function ServiceStandardsCard({ total, completed }) {
|
|
|
971
974
|
},
|
|
972
975
|
containerStyle: {
|
|
973
976
|
display: "flex",
|
|
974
|
-
justifyContent: "center"
|
|
977
|
+
justifyContent: "center",
|
|
978
|
+
marginTop: "-100px"
|
|
975
979
|
},
|
|
976
980
|
largeTextStyle: {
|
|
977
981
|
fontSize: "50px",
|
|
@@ -987,6 +991,14 @@ function ServiceStandardsCard({ total, completed }) {
|
|
|
987
991
|
justifyContent: "center",
|
|
988
992
|
marginLeft: "-2px",
|
|
989
993
|
marginTop: "25px"
|
|
994
|
+
},
|
|
995
|
+
tooltipContainer: {},
|
|
996
|
+
tooltipIcon: {
|
|
997
|
+
marginRight: "5px"
|
|
998
|
+
},
|
|
999
|
+
standardItem: {
|
|
1000
|
+
display: "flex",
|
|
1001
|
+
alignItems: "center"
|
|
990
1002
|
}
|
|
991
1003
|
}));
|
|
992
1004
|
const BorderLinearProgress = withStyles((theme) => ({
|
|
@@ -1003,8 +1015,23 @@ function ServiceStandardsCard({ total, completed }) {
|
|
|
1003
1015
|
backgroundColor: completed !== void 0 && total !== void 0 ? colorFromPercentage(theme, completed / total) : colorFromPercentage(theme, 0)
|
|
1004
1016
|
}
|
|
1005
1017
|
}))(LinearProgress);
|
|
1006
|
-
const { cardStyle, containerStyle, largeTextStyle, smallTextStyle } = useStyles();
|
|
1007
|
-
return /* @__PURE__ */ React.createElement(Card, { className: cardStyle }, completed !== void 0 && total !== void 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className:
|
|
1018
|
+
const { cardStyle, containerStyle, largeTextStyle, smallTextStyle, tooltipContainer, tooltipIcon, standardItem } = useStyles();
|
|
1019
|
+
return /* @__PURE__ */ React.createElement(Card, { className: cardStyle }, completed !== void 0 && total !== void 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: tooltipContainer }, /* @__PURE__ */ React.createElement(IconButton, null, /* @__PURE__ */ React.createElement(
|
|
1020
|
+
Tooltip,
|
|
1021
|
+
{
|
|
1022
|
+
interactive: true,
|
|
1023
|
+
title: /* @__PURE__ */ React.createElement(React.Fragment, null, standards == null ? void 0 : standards.map((standard, _) => /* @__PURE__ */ React.createElement("p", null, standard.pass ? /* @__PURE__ */ React.createElement(
|
|
1024
|
+
"span",
|
|
1025
|
+
{
|
|
1026
|
+
className: standardItem
|
|
1027
|
+
},
|
|
1028
|
+
/* @__PURE__ */ React.createElement(CheckCircle, { className: tooltipIcon }),
|
|
1029
|
+
" ",
|
|
1030
|
+
standard.name
|
|
1031
|
+
) : /* @__PURE__ */ React.createElement("span", { className: standardItem }, /* @__PURE__ */ React.createElement(RadioButtonUncheckedIcon, { className: tooltipIcon }), " ", standard.name))))
|
|
1032
|
+
},
|
|
1033
|
+
/* @__PURE__ */ React.createElement(InfoIcon, null)
|
|
1034
|
+
))), /* @__PURE__ */ React.createElement("div", { className: containerStyle }, /* @__PURE__ */ React.createElement(Typography, { className: largeTextStyle }, completed), /* @__PURE__ */ React.createElement(Typography, { className: smallTextStyle }, "/", total)), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
|
|
1008
1035
|
BorderLinearProgress,
|
|
1009
1036
|
{
|
|
1010
1037
|
variant: "determinate",
|
|
@@ -1072,7 +1099,7 @@ const useStyles$1 = makeStyles$1(
|
|
|
1072
1099
|
);
|
|
1073
1100
|
const BasicCard = ({ children }) => /* @__PURE__ */ React.createElement(InfoCard, { title: "PagerDuty" }, children);
|
|
1074
1101
|
const PagerDutyCard$1 = (props) => {
|
|
1075
|
-
var _a, _b;
|
|
1102
|
+
var _a, _b, _c, _d, _e;
|
|
1076
1103
|
const classes = useStyles$1();
|
|
1077
1104
|
const theme = useTheme();
|
|
1078
1105
|
const { readOnly, disableChangeEvents } = props;
|
|
@@ -1102,7 +1129,7 @@ const PagerDutyCard$1 = (props) => {
|
|
|
1102
1129
|
policyLink: foundService.escalation_policy.html_url,
|
|
1103
1130
|
policyName: foundService.escalation_policy.name,
|
|
1104
1131
|
status: foundService.status,
|
|
1105
|
-
|
|
1132
|
+
standards: serviceStandards
|
|
1106
1133
|
};
|
|
1107
1134
|
return result;
|
|
1108
1135
|
}, [props]);
|
|
@@ -1154,8 +1181,9 @@ const PagerDutyCard$1 = (props) => {
|
|
|
1154
1181
|
))), /* @__PURE__ */ React.createElement(Grid, { item: true, md: 3 }, /* @__PURE__ */ React.createElement(
|
|
1155
1182
|
ServiceStandardsCard,
|
|
1156
1183
|
{
|
|
1157
|
-
total: (_a = service == null ? void 0 : service.
|
|
1158
|
-
completed: (
|
|
1184
|
+
total: (_b = (_a = service == null ? void 0 : service.standards) == null ? void 0 : _a.score) == null ? void 0 : _b.total,
|
|
1185
|
+
completed: (_d = (_c = service == null ? void 0 : service.standards) == null ? void 0 : _c.score) == null ? void 0 : _d.passing,
|
|
1186
|
+
standards: (_e = service == null ? void 0 : service.standards) == null ? void 0 : _e.standards
|
|
1159
1187
|
}
|
|
1160
1188
|
))), /* @__PURE__ */ React.createElement(Divider, null), /* @__PURE__ */ React.createElement(CardContent, null, /* @__PURE__ */ React.createElement(TabbedCard, null, /* @__PURE__ */ React.createElement(CardTab, { label: "Incidents" }, /* @__PURE__ */ React.createElement(
|
|
1161
1189
|
Incidents,
|
|
@@ -1249,4 +1277,4 @@ function TriggerButton(props) {
|
|
|
1249
1277
|
const PagerDutyCard = EntityPagerDutyCard;
|
|
1250
1278
|
|
|
1251
1279
|
export { EntityPagerDutyCard$1 as E, HomePagePagerDutyCard as H, PagerDutyCard$1 as P, TriggerButton as T, UnauthorizedError as U, PagerDutyClient as a, pagerDutyApiRef as b, PagerDutyCard as c, isPluginApplicableToEntity as i, pagerDutyPlugin as p };
|
|
1252
|
-
//# sourceMappingURL=index-
|
|
1280
|
+
//# sourceMappingURL=index-9059229b.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-9059229b.esm.js","sources":["../../src/components/constants.ts","../../src/components/pagerDutyEntity.ts","../../src/api/client.ts","../../src/plugin.ts","../../src/components/Incident/IncidentListItem.tsx","../../src/components/Incident/IncidentEmptyState.tsx","../../src/components/Incident/IncidentForbiddenState.tsx","../../src/components/Incident/Incidents.tsx","../../src/components/Escalation/EscalationUsersEmptyState.tsx","../../src/components/Escalation/EscalationUsersForbiddenState.tsx","../../src/components/Escalation/EscalationUser.tsx","../../src/components/Escalation/EscalationPolicy.tsx","../../src/components/Errors/MissingTokenError.tsx","../../src/components/Errors/ServiceNotFoundError.tsx","../../src/components/ChangeEvents/ChangeEventListItem.tsx","../../src/components/ChangeEvents/ChangeEventEmptyState.tsx","../../src/components/ChangeEvents/ChangeEventForbiddenState.tsx","../../src/components/ChangeEvents/ChangeEvents.tsx","../../src/components/Errors/ForbiddenError.tsx","../../src/hooks/index.ts","../../src/components/TriggerDialog/TriggerDialog.tsx","../../src/components/PagerDutyCard/TriggerIncidentButton.tsx","../../src/components/PagerDutyCard/OpenServiceButton.tsx","../../src/components/PagerDutyCard/StatusCard.tsx","../../src/components/PagerDutyCard/ServiceStandardsCard.tsx","../../src/components/PagerDutyCard/InsightsCard.tsx","../../src/components/PagerDutyCard/index.tsx","../../src/components/EntityPagerDutyCard/index.tsx","../../src/components/TriggerButton/index.tsx","../../src/deprecated.ts"],"sourcesContent":["/*\n * Copyright 2021 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 */\nexport const PAGERDUTY_INTEGRATION_KEY = 'pagerduty.com/integration-key';\nexport const PAGERDUTY_SERVICE_ID = 'pagerduty.com/service-id';\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity } from '@backstage/catalog-model';\nimport { PagerDutyEntity } from '../types';\nimport { PAGERDUTY_INTEGRATION_KEY, PAGERDUTY_SERVICE_ID } from './constants';\n\nexport function getPagerDutyEntity(entity: Entity): PagerDutyEntity {\n const {\n [PAGERDUTY_INTEGRATION_KEY]: integrationKey,\n [PAGERDUTY_SERVICE_ID]: serviceId,\n } = entity.metadata.annotations || ({} as Record<string, string>);\n const name = entity.metadata.name;\n\n return { integrationKey, serviceId, name };\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n PagerDutyApi,\n PagerDutyTriggerAlarmRequest,\n PagerDutyClientApiDependencies,\n PagerDutyClientApiConfig,\n RequestOptions,\n} from './types';\nimport { PagerDutyChangeEventsResponse, \n PagerDutyOnCallUsersResponse, \n PagerDutyUser, \n PagerDutyServiceResponse,\n PagerDutyIncidentsResponse,\n PagerDutyServiceStandardsResponse\n} from '@pagerduty/backstage-plugin-common';\nimport { createApiRef, ConfigApi } from '@backstage/core-plugin-api';\nimport { NotFoundError } from '@backstage/errors';\nimport { Entity } from '@backstage/catalog-model';\nimport { getPagerDutyEntity } from '../components/pagerDutyEntity';\nimport { PagerDutyEntity } from '../types';\n\n/** @public */\nexport class UnauthorizedError extends Error {}\n\n/** @public */\nexport class ForbiddenError extends Error { }\n\n/** @public */\nexport const pagerDutyApiRef = createApiRef<PagerDutyApi>({\n id: 'plugin.pagerduty.api',\n});\n\n/** @public */\nexport class PagerDutyClient implements PagerDutyApi {\n static fromConfig(\n configApi: ConfigApi,\n dependencies: PagerDutyClientApiDependencies,\n ) {\n const { discoveryApi, fetchApi } = dependencies;\n\n const eventsBaseUrl: string =\n configApi.getOptionalString('pagerDuty.eventsBaseUrl') ??\n 'https://events.pagerduty.com/v2';\n\n return new PagerDutyClient({\n eventsBaseUrl,\n discoveryApi,\n fetchApi,\n });\n }\n\n constructor(private readonly config: PagerDutyClientApiConfig) {}\n\n async getServiceByPagerDutyEntity(\n pagerDutyEntity: PagerDutyEntity,\n ): Promise<PagerDutyServiceResponse> {\n const { integrationKey, serviceId } = pagerDutyEntity;\n\n let response: PagerDutyServiceResponse;\n let url: string;\n\n if (integrationKey) {\n url = `${await this.config.discoveryApi.getBaseUrl(\n 'pagerduty',\n )}/services?integration_key=${integrationKey}`;\n const serviceResponse = await this.findByUrl<PagerDutyServiceResponse>(url);\n\n if (serviceResponse.service === undefined) throw new NotFoundError();\n\n response = serviceResponse;\n } else if (serviceId) {\n url = `${await this.config.discoveryApi.getBaseUrl(\n 'pagerduty',\n )}/services/${serviceId}`;\n\n response = await this.findByUrl<PagerDutyServiceResponse>(url);\n } else {\n throw new NotFoundError();\n }\n\n return response;\n }\n\n async getServiceByEntity(entity: Entity): Promise<PagerDutyServiceResponse> {\n return await this.getServiceByPagerDutyEntity(getPagerDutyEntity(entity));\n }\n\n async getServiceById(serviceId: string): Promise<PagerDutyServiceResponse> {\n const url = `${await this.config.discoveryApi.getBaseUrl(\n 'pagerduty',\n )}/services/${serviceId}`;\n\n return await this.findByUrl<PagerDutyServiceResponse>(url);\n }\n\n async getIncidentsByServiceId(\n serviceId: string,\n ): Promise<PagerDutyIncidentsResponse> {\n const url = `${await this.config.discoveryApi.getBaseUrl(\n 'pagerduty',\n )}/services/${serviceId}/incidents`;\n\n return await this.findByUrl<PagerDutyIncidentsResponse>(url);\n }\n\n async getChangeEventsByServiceId(\n serviceId: string,\n ): Promise<PagerDutyChangeEventsResponse> {\n const url = `${await this.config.discoveryApi.getBaseUrl(\n 'pagerduty',\n )}/services/${serviceId}/change-events`;\n\n return await this.findByUrl<PagerDutyChangeEventsResponse>(url);\n }\n\n async getServiceStandardsByServiceId(\n serviceId: string,\n ): Promise<PagerDutyServiceStandardsResponse> {\n const url = `${await this.config.discoveryApi.getBaseUrl(\n 'pagerduty',\n )}/services/${serviceId}/standards`;\n\n return await this.findByUrl<PagerDutyServiceStandardsResponse>(url);\n }\n\n async getOnCallByPolicyId(\n policyId: string,\n ): Promise<PagerDutyUser[]> {\n const params = `escalation_policy_ids[]=${policyId}`;\n const url = `${await this.config.discoveryApi.getBaseUrl(\n 'pagerduty',\n )}/oncall-users?${params}`;\n\n const response: PagerDutyOnCallUsersResponse = await this.findByUrl<PagerDutyOnCallUsersResponse>(url);\n return response.users;\n }\n\n triggerAlarm(request: PagerDutyTriggerAlarmRequest): Promise<Response> {\n const { integrationKey, source, description, userName } = request;\n\n const body = JSON.stringify({\n event_action: 'trigger',\n routing_key: integrationKey,\n client: 'Backstage',\n client_url: source,\n payload: {\n summary: description,\n source: source,\n severity: 'error',\n class: 'manual trigger',\n custom_details: {\n user: userName,\n },\n },\n });\n\n const options = {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json; charset=UTF-8',\n Accept: 'application/json, text/plain, */*',\n },\n body,\n };\n\n const url = this.config.eventsBaseUrl ?? 'https://events.pagerduty.com/v2';\n\n return this.request(`${url}/enqueue`, options);\n }\n\n private async findByUrl<T>(url: string): Promise<T> {\n const options = {\n method: 'GET',\n headers: {\n Accept: 'application/vnd.pagerduty+json;version=2',\n 'Content-Type': 'application/json',\n },\n };\n const response = await this.request(url, options);\n return response.json();\n }\n\n private async request(\n url: string,\n options: RequestOptions,\n ): Promise<Response> {\n const response = await this.config.fetchApi.fetch(url, options);\n if (response.status === 401) {\n throw new UnauthorizedError(\"Unauthorized: You don't have access to this resource\");\n }\n\n if (response.status === 403) {\n throw new ForbiddenError(\"Forbidden: You are not allowed to perform this action\");\n }\n\n if (response.status === 404) {\n throw new NotFoundError(\"Not Found: Resource not found\");\n }\n\n if (!response.ok) {\n const payload = await response.json();\n const errors = payload.errors.map((error: string) => error).join(' ');\n const message = `Request failed with ${response.status}, ${errors}`;\n throw new Error(message);\n }\n return response;\n }\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { pagerDutyApiRef, PagerDutyClient } from './api';\nimport {\n createApiFactory,\n createPlugin,\n createRouteRef,\n discoveryApiRef,\n fetchApiRef,\n configApiRef,\n createComponentExtension,\n} from '@backstage/core-plugin-api';\nimport { createCardExtension } from '@backstage/plugin-home-react';\nimport { HomePagePagerDutyCardProps } from './components/HomePagePagerDutyCard/Content';\n\nexport const rootRouteRef = createRouteRef({\n id: 'pagerduty',\n});\n\n/** @public */\nexport const pagerDutyPlugin = createPlugin({\n id: 'pagerduty',\n apis: [\n createApiFactory({\n api: pagerDutyApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n configApi: configApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ configApi, discoveryApi, fetchApi }) =>\n PagerDutyClient.fromConfig(configApi, { discoveryApi, fetchApi }),\n }),\n ],\n});\n\n/** @public */\nexport const EntityPagerDutyCard = pagerDutyPlugin.provide(\n createComponentExtension({\n name: 'EntityPagerDutyCard',\n component: {\n lazy: () =>\n import('./components/EntityPagerDutyCard').then(\n m => m.EntityPagerDutyCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const HomePagePagerDutyCard = pagerDutyPlugin.provide(\n createCardExtension<HomePagePagerDutyCardProps>({\n name: 'HomePagePagerDutyCard',\n title: 'PagerDuty Homepage Card',\n components: () => import('./components/HomePagePagerDutyCard'),\n settings: {\n schema: {\n title: 'PagerDuty',\n type: 'object',\n properties: {\n integrationKey: {\n title: 'PagerDuty integration key',\n type: 'string',\n },\n serviceId: {\n title: 'PagerDuty service id',\n type: 'string',\n },\n name: {\n title: 'PagerDuty service name',\n type: 'string',\n },\n },\n },\n },\n }),\n);\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React from 'react';\nimport {\n ListItem,\n ListItemSecondaryAction,\n Tooltip,\n ListItemText,\n makeStyles,\n IconButton,\n Typography,\n Chip,\n} from '@material-ui/core';\nimport { DateTime, Duration } from 'luxon';\nimport { PagerDutyIncident } from '@pagerduty/backstage-plugin-common';\nimport OpenInBrowserIcon from '@material-ui/icons/OpenInBrowser';\nimport { BackstageTheme } from '@backstage/theme';\nimport { Link } from '@backstage/core-components';\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 warning: {\n borderColor: theme.palette.warning.main,\n color: \"#fff\",\n backgroundColor: theme.palette.warning.main,\n boxShadow: \"0 4px 4px 0 rgba(0,0,0,0.2)\",\n textTransform: \"uppercase\",\n \"& *\": {\n color: \"#fff\",\n },\n },\n error: {\n borderColor: theme.palette.error.main,\n color: \"#fff\",\n backgroundColor: theme.palette.error.main,\n boxShadow: \"0 4px 4px 0 rgba(0,0,0,0.2)\",\n textTransform: \"uppercase\",\n \"& *\": {\n color: \"#fff\",\n },\n },\n lowUrgency: {\n borderColor: theme.palette.warning.main,\n color: theme.palette.warning.main,\n backgroundColor: \"#fff\",\n boxShadow: \"0 4px 4px 0 rgba(0,0,0,0.2)\",\n textTransform: \"uppercase\",\n \"& *\": {\n color: theme.palette.warning.main,\n },\n },\n highUrgency: {\n borderColor: theme.palette.error.main,\n color: theme.palette.error.main,\n backgroundColor: \"#fff\",\n boxShadow: \"0 4px 4px 0 rgba(0,0,0,0.2)\",\n textTransform: \"uppercase\",\n \"& *\": {\n color: theme.palette.error.main,\n },\n },\n textContainer: {\n display: \"flex\",\n alignItems: \"baseline\",\n },\n smallIconStyle: {\n color: theme.palette.text.primary,\n marginRight: \"-20px\",\n },\n}));\n\ntype Props = {\n incident: PagerDutyIncident;\n};\n\nexport const IncidentListItem = ({ incident }: Props) => {\n const classes = useStyles();\n const duration =\n new Date().getTime() - new Date(incident.created_at).getTime();\n const createdAt = DateTime.local()\n .minus(Duration.fromMillis(duration))\n .toRelative({ locale: 'en' });\n const user = incident.assignments[0]?.assignee;\n\n return (\n <ListItem dense key={incident.id}>\n <ListItemText\n primary={\n <div className={classes.textContainer}>\n <Chip\n data-testid={`chip-${incident.status}`}\n label={incident.status}\n size=\"small\"\n variant=\"outlined\"\n className={\n incident.status === \"triggered\"\n ? classes.error\n : classes.warning\n }\n />\n <Chip\n data-testid={`chip-${incident.urgency}`}\n label={`${incident.urgency} urgency`}\n size=\"small\"\n variant=\"outlined\"\n className={\n incident.urgency === \"high\"\n ? classes.highUrgency\n : classes.lowUrgency\n }\n />\n {incident.title}\n </div>\n }\n primaryTypographyProps={{\n variant: \"body1\",\n className: classes.listItemPrimary,\n }}\n secondary={\n <Typography noWrap variant=\"body2\" color=\"textSecondary\">\n Created {createdAt} and assigned to{\" \"}\n <Link to={user?.html_url ?? \"#\"}>{user?.summary ?? \"nobody\"}</Link>\n </Typography>\n }\n />\n <ListItemSecondaryAction>\n <Tooltip title=\"View in PagerDuty\" placement=\"top\">\n <IconButton\n href={incident.html_url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={classes.smallIconStyle}\n >\n <OpenInBrowserIcon />\n </IconButton>\n </Tooltip>\n </ListItemSecondaryAction>\n </ListItem>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React from 'react';\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","/*\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 React from 'react';\nimport { Grid, Typography } from '@material-ui/core';\nimport ForbiddenStateImage from '../../assets/forbiddenstate.svg';\n\nexport const IncidentForbiddenState = () => {\n return (\n <Grid container justify=\"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","/*\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 React, { useEffect } from 'react';\nimport { List } from '@material-ui/core';\nimport { IncidentListItem } from './IncidentListItem';\nimport { IncidentsEmptyState } from './IncidentEmptyState';\nimport useAsyncFn from 'react-use/lib/useAsyncFn';\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 { IncidentForbiddenState } from './IncidentForbiddenState';\n\ntype Props = {\n serviceId: string;\n refreshIncidents: boolean;\n};\n\nexport const Incidents = ({ serviceId, refreshIncidents }: Props) => {\n const api = useApi(pagerDutyApiRef);\n\n const [{ value: incidents, loading, error }, getIncidents] = useAsyncFn(\n async () => {\n const { incidents: foundIncidents } = await api.getIncidentsByServiceId(\n serviceId,\n );\n return foundIncidents;\n },\n );\n\n useEffect(() => {\n getIncidents();\n }, [refreshIncidents, getIncidents]);\n\n if (error) {\n if (error.message.includes('Forbidden')) {\n return <IncidentForbiddenState />;\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 (!incidents?.length) {\n return <IncidentsEmptyState />;\n }\n\n return (\n <List dense>\n {incidents!.map((incident, index) => (\n <IncidentListItem key={incident.id + index} incident={incident} />\n ))}\n </List>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React from 'react';\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","/*\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 React from 'react';\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","/*\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 React from 'react';\nimport {\n ListItem,\n ListItemIcon,\n ListItemSecondaryAction,\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';\nimport OpenInBrowser from '@material-ui/icons/OpenInBrowser';\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 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 navigateToEscalationPolicy(url: string) {\n // open url in new browser window\n window.open(url, \"_blank\");\n}\n\n// function sendEmail(email: string) {\n \n// window.open(`mailto:${email}`, \"_blank\");\n// }\n\nexport const EscalationUser = ({ user, policyUrl, policyName }: Props) => {\n const classes = useStyles();\n\n return (\n <ListItem>\n <ListItemIcon>\n <Avatar alt={user.name} src={user.avatar_url} className={classes.avatarStyle} />\n </ListItemIcon>\n <ListItemText\n primary={\n <>\n <Typography className={classes.listItemPrimary}>\n {user.name}\n </Typography>\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-service-in-browser\"\n onClick={() => navigateToEscalationPolicy(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 <ListItemSecondaryAction>\n {/* <Tooltip title=\"Send e-mail to user\" placement=\"top\">\n <IconButton href={`mailto:${user.email}`}>\n <MailOutline className={classes.smallIconStyle} />\n </IconButton>\n </Tooltip> */}\n <Tooltip title=\"Open user in PagerDuty\" placement=\"top\">\n <IconButton\n href={user.html_url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={classes.smallIconStyle}\n >\n <OpenInBrowser />\n </IconButton>\n </Tooltip>\n </ListItemSecondaryAction>\n </ListItem>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React from 'react';\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};\n\nexport const EscalationPolicy = ({ policyId, policyUrl, policyName }: 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);\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 />;\n }\n\n if (!users?.length) {\n return <EscalationUsersEmptyState />;\n }\n\n return (\n <List dense subheader={<ListSubheader>ON CALL</ListSubheader>} style={{marginLeft: \"-15px\"}}>\n {users!.map((user, index) => (\n <EscalationUser key={index} user={user} policyUrl={policyUrl} policyName={policyName} />\n ))}\n </List>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React from 'react';\nimport { Button } from '@material-ui/core';\nimport { EmptyState } from '@backstage/core-components';\n\nexport const MissingTokenError = () => (\n <EmptyState\n missing=\"info\"\n title=\"Missing or invalid PagerDuty Token\"\n description=\"The request to fetch data needs a valid token. See README for more details.\"\n action={\n <Button\n color=\"primary\"\n variant=\"contained\"\n href=\"https://pagerduty.github.io/backstage-plugin-docs/getting-started/pagerduty/\"\n >\n Read More\n </Button>\n }\n />\n);\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React from 'react';\nimport { Button } from '@material-ui/core';\nimport { EmptyState } from '@backstage/core-components';\n\nexport const ServiceNotFoundError = () => (\n <EmptyState\n missing=\"data\"\n title=\"PagerDuty Service Not Found\"\n description=\"A service could not be found within PagerDuty based on the provided service id. Please verify your configuration.\"\n action={\n <Button\n color=\"primary\"\n variant=\"contained\"\n href=\"https://pagerduty.github.io/backstage-plugin-docs/getting-started/pagerduty/\"\n >\n Read More\n </Button>\n }\n />\n);\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React from 'react';\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 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 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={classes.smallExternalLinkIconStyle}\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 <OpenInBrowserIcon />\n </IconButton>\n </Tooltip>\n )}\n </ListItemSecondaryAction>\n </ListItem>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React from 'react';\nimport { Grid, Typography } from '@material-ui/core';\nimport EmptyStateImage from '../../assets/emptystate.svg';\n\nexport const ChangeEventEmptyState = () => {\n return (\n <Grid container justify=\"center\" direction=\"column\" alignItems=\"center\">\n <Grid item xs={12}>\n <Typography variant=\"h5\">No change events to display yet.</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","/*\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 React from 'react';\nimport { Grid, Typography } from '@material-ui/core';\nimport ForbiddenStateImage from '../../assets/forbiddenstate.svg';\n\nexport const ChangeEventForbiddenState = () => {\n return (\n <Grid container justify=\"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","/*\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 React, { 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 refreshEvents: boolean;\n};\n\nexport const ChangeEvents = ({ serviceId, 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(serviceId);\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","/*\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 React from 'react';\nimport { Button } from '@material-ui/core';\nimport { EmptyState } from '@backstage/core-components';\n\nexport const ForbiddenError = () => (\n <EmptyState\n missing=\"info\"\n title=\"Unauthorized\"\n description=\"You don't have the required permissions to perform this action. See README for more details.\"\n action={\n <Button\n color=\"primary\"\n variant=\"contained\"\n href=\"https://pagerduty.github.io/backstage-plugin-docs/getting-started/pagerduty/\"\n >\n Read More\n </Button>\n }\n />\n);\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { PagerDutyEntity } from '../types';\nimport { getPagerDutyEntity } from '../components/pagerDutyEntity';\n\nexport function usePagerdutyEntity(): PagerDutyEntity {\n const { entity } = useEntity();\n\n return getPagerDutyEntity(entity);\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React, { useState, useEffect } from 'react';\nimport {\n Dialog,\n DialogTitle,\n TextField,\n DialogActions,\n Button,\n DialogContent,\n Typography,\n CircularProgress,\n} from '@material-ui/core';\nimport useAsyncFn from 'react-use/lib/useAsyncFn';\nimport { pagerDutyApiRef } from '../../api';\nimport { Alert } from '@material-ui/lab';\nimport {\n useApi,\n alertApiRef,\n identityApiRef,\n} from '@backstage/core-plugin-api';\nimport { DEFAULT_NAMESPACE, parseEntityRef } from '@backstage/catalog-model';\n\ntype Props = {\n showDialog: boolean;\n handleDialog: () => void;\n onIncidentCreated?: () => void;\n name: string;\n integrationKey: string;\n};\n\nexport const TriggerDialog = ({\n showDialog,\n handleDialog,\n onIncidentCreated: onIncidentCreated,\n name,\n integrationKey,\n}: Props) => {\n const alertApi = useApi(alertApiRef);\n const identityApi = useApi(identityApiRef);\n const api = useApi(pagerDutyApiRef);\n const [description, setDescription] = useState<string>('');\n\n const [{ value, loading, error }, handleTriggerAlarm] = useAsyncFn(\n async (descriptions: string) => {\n const { userEntityRef } = await identityApi.getBackstageIdentity();\n const { name: userName } = parseEntityRef(userEntityRef, {\n defaultKind: 'User',\n defaultNamespace: DEFAULT_NAMESPACE,\n });\n return await api.triggerAlarm({\n integrationKey: integrationKey as string,\n source: window.location.toString(),\n description: descriptions,\n userName,\n });\n },\n );\n\n const descriptionChanged = (\n event: React.ChangeEvent<HTMLTextAreaElement>,\n ) => {\n setDescription(event.target.value);\n };\n\n useEffect(() => {\n if (value) {\n (async () => {\n alertApi.post({\n message: `Alarm successfully triggered`,\n });\n\n handleDialog();\n\n // The pager duty API isn't always returning the newly created alarm immediately\n await new Promise(resolve => setTimeout(resolve, 1000));\n onIncidentCreated?.();\n })();\n }\n }, [value, alertApi, handleDialog, onIncidentCreated]);\n\n if (error) {\n alertApi.post({\n message: `Failed to trigger alarm. ${error.message}`,\n severity: 'error',\n });\n }\n\n return (\n <Dialog maxWidth=\"md\" open={showDialog} onClose={handleDialog} fullWidth>\n <DialogTitle>\n This action will trigger an incident for <strong>\"{name}\"</strong>.\n </DialogTitle>\n <DialogContent>\n <Alert severity=\"info\">\n <Typography variant=\"body1\" align=\"justify\">\n If the issue you are seeing does not need urgent attention, please\n get in touch with the responsible team using their preferred\n communications channel. You can find information about the owner of\n this entity in the \"About\" card. If the issue is urgent, please\n don't hesitate to trigger the alert.\n </Typography>\n </Alert>\n <Typography\n variant=\"body1\"\n style={{ marginTop: '1em' }}\n gutterBottom\n align=\"justify\"\n >\n Please describe the problem you want to report. Be as descriptive as\n possible. Your signed in user and a reference to the current page will\n automatically be amended to the alarm so that the receiver can reach\n out to you if necessary.\n </Typography>\n <TextField\n inputProps={{ 'data-testid': 'trigger-input' }}\n id=\"description\"\n multiline\n fullWidth\n rows=\"4\"\n margin=\"normal\"\n label=\"Problem description\"\n variant=\"outlined\"\n onChange={descriptionChanged}\n />\n </DialogContent>\n <DialogActions>\n <Button\n data-testid=\"trigger-button\"\n id=\"trigger\"\n color=\"secondary\"\n disabled={!description || loading}\n variant=\"contained\"\n onClick={() => handleTriggerAlarm(description)}\n endIcon={loading && <CircularProgress size={16} />}\n >\n Trigger Incident\n </Button>\n <Button id=\"close\" color=\"primary\" onClick={handleDialog}>\n Close\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n","/*\n * Copyright 2021 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 React, { useCallback, useState } from \"react\";\nimport { makeStyles, IconButton } from \"@material-ui/core\";\nimport { BackstageTheme } from \"@backstage/theme\";\n\nimport { usePagerdutyEntity } from \"../../hooks\";\nimport { TriggerDialog } from \"../TriggerDialog\";\nimport AddAlert from \"@material-ui/icons/AddAlert\";\n\nconst useStyles = makeStyles<BackstageTheme>((theme) => ({\n buttonStyle: {\n color: theme.palette.text.primary,\n \"&:hover\": {\n backgroundColor: \"transparent\",\n textDecoration: \"underline\",\n },\n },\n containerStyle: {\n flex: \"flex !important\",\n fontSize: \"14px\",\n width: \"80px\",\n lineHeight: \"14px\",\n },\n iconStyle: {\n fontSize: \"35px\",\n marginBottom: \"-10px\"\n }\n}));\n\n/** @public */\nexport type TriggerIncidentButtonProps = {\n handleRefresh: () => void;\n}\n\n/** @public */\nexport function TriggerIncidentButton({ handleRefresh } : TriggerIncidentButtonProps) {\n const { buttonStyle, containerStyle, iconStyle } = useStyles();\n const { integrationKey, name } = usePagerdutyEntity();\n const [dialogShown, setDialogShown] = useState<boolean>(false);\n\n const showDialog = useCallback(() => {\n setDialogShown(true);\n }, [setDialogShown]);\n const hideDialog = useCallback(() => {\n setDialogShown(false);\n }, [setDialogShown]);\n\n const disabled = !integrationKey;\n return (\n <>\n <IconButton\n aria-label=\"create-incident\"\n onClick={showDialog}\n className={disabled ? \"\" : buttonStyle}\n disabled={disabled}\n >\n <div className={containerStyle}>\n <AddAlert className={iconStyle} />\n <p>Create new incident</p>\n </div>\n </IconButton>\n {integrationKey && (\n <TriggerDialog\n showDialog={dialogShown}\n handleDialog={hideDialog}\n integrationKey={integrationKey}\n name={name}\n onIncidentCreated={handleRefresh}\n />\n )}\n </>\n );\n}\n","/*\n * Copyright 2021 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\n// import React, { useCallback, useState } from \"react\";\nimport React from \"react\";\nimport { makeStyles, IconButton } from \"@material-ui/core\";\nimport { BackstageTheme } from \"@backstage/theme\";\n\n// import { usePagerdutyEntity } from \"../../hooks\";\n// import { TriggerDialog } from \"../TriggerDialog\";\nimport OpenInBrowser from \"@material-ui/icons/OpenInBrowser\";\n\nconst useStyles = makeStyles<BackstageTheme>((theme) => ({\n buttonStyle: {\n color: theme.palette.text.primary,\n \"&:hover\": {\n backgroundColor: \"transparent\",\n textDecoration: \"underline\",\n },\n },\n containerStyle: {\n flex: \"flex\",\n fontSize: \"14px\",\n width: \"85px\",\n lineHeight: \"14px\",\n },\n iconStyle: {\n fontSize: \"35px\",\n marginBottom: \"-10px\",\n },\n}));\n\n/** @public */\nexport function OpenServiceButton(props: { serviceUrl: string}) {\n const { buttonStyle, containerStyle, iconStyle } = useStyles();\n // const { integrationKey, name } = usePagerdutyEntity();\n // const [dialogShown, setDialogShown] = useState<boolean>(false);\n\n // const showDialog = useCallback(() => {\n // setDialogShown(true);\n // }, [setDialogShown]);\n // const hideDialog = useCallback(() => {\n // setDialogShown(false);\n // }, [setDialogShown]);\n\n function navigateToService() {\n window.open(props.serviceUrl, \"_blank\");\n }\n\n return (\n <>\n <IconButton\n aria-label=\"open-service-in-browser\"\n onClick={navigateToService}\n className={buttonStyle}\n >\n <div className={containerStyle}>\n <OpenInBrowser className={iconStyle} />\n <p>Open service in PagerDuty</p>\n </div>\n </IconButton>\n {/* {integrationKey && (\n <TriggerDialog\n showDialog={dialogShown}\n handleDialog={hideDialog}\n integrationKey={integrationKey}\n name={name}\n />\n )} */}\n </>\n );\n}\n","import { Card, Typography } from \"@material-ui/core\";\nimport React, { useEffect } from \"react\";\nimport { Theme, makeStyles } from \"@material-ui/core/styles\";\nimport { BackstageTheme } from \"@backstage/theme\";\nimport { useApi } from \"@backstage/core-plugin-api\";\nimport { pagerDutyApiRef } from \"../../api\";\nimport { useAsyncFn } from \"react-use\";\nimport Alert from \"@material-ui/lab/Alert/Alert\";\nimport { Progress } from \"@backstage/core-components\";\n\ntype Props = {\n serviceId: string;\n refreshStatus: boolean;\n};\n\nfunction labelFromStatus(status: string) {\n let label;\n switch (status) {\n case \"active\":\n label = \"OK\";\n break;\n case \"warning\":\n label = \"ACTIVE\";\n break;\n case \"critical\":\n label = \"ALARM\";\n break;\n case \"maintenance\":\n label = \"MAINTENANCE\";\n break;\n case \"disabled\":\n label = \"DISABLED\";\n break;\n default:\n label = \"OK\";\n break;\n }\n\n return label;\n}\n\nfunction colorFromStatus(theme: Theme, status: string) {\n let color;\n switch (status) {\n case \"active\":\n color = theme.palette.success.main;\n break;\n case \"warning\":\n color = theme.palette.warningBackground;\n break;\n case \"critical\":\n color = theme.palette.error.main;\n break;\n case \"maintenance\":\n color = \"#ebdc00\";\n break;\n case \"disabled\":\n color = \"#A9A9A9\";\n break;\n default:\n color = theme.palette.success.main;\n break;\n }\n\n return color;\n}\n\nfunction StatusCard({ serviceId, refreshStatus }: Props) {\n const api = useApi(pagerDutyApiRef);\n const [{ value: status, loading, error }, getStatus] = useAsyncFn(\n async () => {\n const { service: foundService } = await api.getServiceById(serviceId);\n return foundService.status;\n }\n );\n\n const useStyles = makeStyles<BackstageTheme>((theme) => ({\n cardStyle: {\n height: \"120px\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor:\n status !== undefined\n ? colorFromStatus(theme, status)\n : colorFromStatus(theme, \"active\"),\n marginRight: \"10px\",\n },\n largeTextStyle: {\n color: \"white\",\n fontWeight: \"bold\",\n fontSize: \"20px\",\n wordWrap: \"break-word\",\n },\n }));\n\n const { cardStyle, largeTextStyle } = useStyles();\n\n useEffect(() => {\n getStatus();\n }, [refreshStatus, getStatus]);\n\n if (error) {\n if (error.message.includes(\"Forbidden\")) {\n return <p>forbidden</p>;\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 (!status) {\n return <p>not found</p>;\n }\n\n return (\n <Card className={cardStyle}>\n {status !== undefined ? (\n <Typography className={largeTextStyle}>\n {labelFromStatus(status!)}\n </Typography>\n ) : (\n <Typography className={largeTextStyle}>Unable to get status</Typography>\n )}\n </Card>\n );\n}\n\nexport default StatusCard;\n","import { BackstageTheme } from \"@backstage/theme\";\nimport {\n Card,\n IconButton,\n LinearProgress,\n Theme,\n Tooltip,\n Typography,\n makeStyles,\n withStyles,\n} from \"@material-ui/core\";\nimport React from \"react\";\nimport InfoIcon from \"@material-ui/icons/Info\"\nimport { PagerDutyServiceStandard } from \"@pagerduty/backstage-plugin-common\";\nimport CheckCircle from \"@material-ui/icons/CheckCircle\";\nimport RadioButtonUncheckedIcon from \"@material-ui/icons/RadioButtonUnchecked\";\n\ntype Props = {\n total: number | undefined;\n completed: number | undefined;\n standards: PagerDutyServiceStandard[] | undefined\n};\n\nfunction colorFromPercentage(theme: Theme, percentage: number) {\n if (percentage < 0.5) {\n return theme.palette.error.main;\n } else if (percentage < 0.8) {\n return theme.palette.warning.main;\n }\n return theme.palette.success.main;\n}\n\nfunction ServiceStandardsCard({ total, completed, standards }: Props) {\n const useStyles = makeStyles<BackstageTheme>((theme) => ({\n cardStyle: {\n height: \"120px\",\n display: \"grid\",\n gridTemplateRows: \"1fr auto auto\",\n backgroundColor: \"rgba(0, 0, 0, 0.03)\",\n },\n containerStyle: {\n display: \"flex\",\n justifyContent: \"center\",\n marginTop: \"-100px\",\n },\n largeTextStyle: {\n fontSize: \"50px\",\n color:\n completed !== undefined && total !== undefined\n ? colorFromPercentage(theme, completed / total)\n : colorFromPercentage(theme, 0),\n alignSelf: \"center\",\n justifyContent: \"center\",\n },\n smallTextStyle: {\n color: theme.palette.textSubtle,\n fontSize: \"14px\",\n fontWeight: \"bold\",\n alignSelf: \"center\",\n justifyContent: \"center\",\n marginLeft: \"-2px\",\n marginTop: \"25px\",\n },\n tooltipContainer: {\n \n },\n tooltipIcon: {\n marginRight: \"5px\",\n },\n standardItem: {\n display: \"flex\",\n alignItems: \"center\",\n },\n }));\n\n const BorderLinearProgress = withStyles((theme) => ({\n root: {\n height: 10,\n borderRadius: 5,\n margin: 5,\n },\n colorPrimary: {\n backgroundColor:\n theme.palette.grey[theme.palette.type === \"light\" ? 200 : 700],\n },\n bar: {\n borderRadius: 5,\n backgroundColor:\n completed !== undefined && total !== undefined\n ? colorFromPercentage(theme, completed / total)\n : colorFromPercentage(theme, 0),\n },\n }))(LinearProgress);\n\n const { cardStyle, containerStyle, largeTextStyle, smallTextStyle, tooltipContainer, tooltipIcon, standardItem } =\n useStyles();\n return (\n <Card className={cardStyle}>\n {completed !== undefined && total !== undefined ? (\n <>\n <div className={tooltipContainer}>\n <IconButton>\n <Tooltip\n interactive\n title={\n <>\n {standards?.map((standard, _) => (\n <p>\n {standard.pass ? (\n <span className={standardItem}\n >\n <CheckCircle className={tooltipIcon} /> {standard.name}\n </span>\n ) : (\n <span className={standardItem}>\n <RadioButtonUncheckedIcon className={tooltipIcon} /> {standard.name}\n </span>\n )}\n </p>\n ))}\n </>\n }\n >\n <InfoIcon />\n </Tooltip>\n </IconButton>\n </div>\n <div className={containerStyle}>\n <Typography className={largeTextStyle}>{completed}</Typography>\n <Typography className={smallTextStyle}>/{total}</Typography>\n </div>\n <div>\n <BorderLinearProgress\n variant=\"determinate\"\n value={(completed! / total!) * 100}\n />\n </div>\n </>\n ) : (\n <div className={containerStyle}>\n <Typography className={largeTextStyle}>\n Unable to retrieve Scores\n </Typography>\n </div>\n )}\n </Card>\n );\n}\n\nexport default ServiceStandardsCard;\n","import { BackstageTheme } from \"@backstage/theme\";\nimport { Card, Typography, makeStyles } from \"@material-ui/core\";\nimport React from \"react\";\nimport validateColor from \"validate-color\";\n\ntype Props = {\n count: number;\n label: string;\n color: string;\n};\n\nfunction IncidentCounterCard({ count, label, color }: Props) {\n\n const textColor = color && validateColor(color) ? color : \"black\";\n\n const useStyles = makeStyles<BackstageTheme>(() => ({\n cardStyle: {\n marginRight: \"10px\",\n height: \"120px\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"rgba(0, 0, 0, 0.03)\",\n },\n largeTextStyle: {\n color: textColor,\n fontSize: \"30px\",\n marginTop: \"-10px\",\n },\n smallTextStyle: {\n color: textColor,\n fontWeight: \"bold\",\n fontSize: \"10px\",\n marginTop: \"-5px\",\n textTransform: \"uppercase\",\n flexWrap: \"wrap\",\n },\n }));\n\n const { cardStyle, largeTextStyle, smallTextStyle } = useStyles();\n\n return (\n <Card className={cardStyle}>\n <Typography className={largeTextStyle}>{count}</Typography>\n <Typography className={smallTextStyle}>{label}</Typography>\n </Card>\n );\n}\n\nexport default IncidentCounterCard;\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React, { ReactNode, useCallback, useState } from \"react\";\nimport {\n Card,\n CardHeader,\n Divider,\n CardContent,\n Grid,\n Typography,\n} from \"@material-ui/core\";\nimport { Incidents } from \"../Incident\";\nimport { EscalationPolicy } from \"../Escalation\";\nimport useAsync from \"react-use/lib/useAsync\";\nimport { pagerDutyApiRef, UnauthorizedError } from \"../../api\";\nimport { MissingTokenError, ServiceNotFoundError } from \"../Errors\";\nimport { ChangeEvents } from \"../ChangeEvents\";\nimport PDGreenImage from \"../../assets/PD-Green.svg\";\nimport PDWhiteImage from \"../../assets/PD-White.svg\";\n\nimport { useApi } from \"@backstage/core-plugin-api\";\nimport { NotFoundError } from \"@backstage/errors\";\nimport {\n Progress,\n TabbedCard,\n CardTab,\n InfoCard,\n} from \"@backstage/core-components\";\nimport { PagerDutyEntity } from \"../../types\";\nimport { ForbiddenError } from \"../Errors/ForbiddenError\";\nimport { TriggerIncidentButton } from \"./TriggerIncidentButton\";\nimport { OpenServiceButton } from \"./OpenServiceButton\";\nimport { createStyles, makeStyles, useTheme } from \"@material-ui/core/styles\";\nimport StatusCard from \"./StatusCard\";\nimport ServiceStandardsCard from \"./ServiceStandardsCard\";\nimport { BackstageTheme } from \"@backstage/theme\";\nimport { PagerDutyCardServiceResponse } from \"../../api/types\";\nimport InsightsCard from \"./InsightsCard\";\n\nconst useStyles = makeStyles<BackstageTheme>((theme) =>\n createStyles({\n overviewHeaderTextStyle: {\n fontSize: \"14px\",\n fontWeight: 500,\n color:\n theme.palette.type === \"light\"\n ? \"rgba(0, 0, 0, 0.54)\"\n : \"rgba(255, 255, 255, 0.7)\",\n },\n headerStyle: {\n marginRight: \"1em\",\n },\n overviewHeaderContainerStyle: {\n display: \"flex\",\n margin: \"15px\",\n marginBottom: \"20px\",\n },\n overviewCardsContainerStyle: {\n display: \"flex\",\n margin: \"15px\",\n marginTop: \"-15px\",\n },\n incidentMetricsContainerStyle: {\n display: \"flex\",\n height: \"100%\",\n justifyContent: \"center\",\n columnSpan: \"all\",\n },\n })\n);\n\nconst BasicCard = ({ children }: { children: ReactNode }) => (\n <InfoCard title=\"PagerDuty\">{children}</InfoCard>\n);\n\n/** @public */\nexport type PagerDutyCardProps = PagerDutyEntity & {\n readOnly?: boolean;\n disableChangeEvents?: boolean;\n};\n\n/** @public */\nexport const PagerDutyCard = (props: PagerDutyCardProps) => {\n const classes = useStyles();\n\n const theme = useTheme();\n const { readOnly, disableChangeEvents } = props;\n const api = useApi(pagerDutyApiRef);\n const [refreshIncidents, setRefreshIncidents] = useState<boolean>(false);\n const [refreshChangeEvents, setRefreshChangeEvents] =\n useState<boolean>(false);\n const [refreshStatus, setRefreshStatus] = useState<boolean>(false);\n\n const handleRefresh = useCallback(() => {\n setRefreshIncidents((x) => !x);\n setRefreshChangeEvents((x) => !x);\n setRefreshStatus((x) => !x);\n }, []);\n\n const {\n value: service,\n loading,\n error,\n } = useAsync(async () => {\n const { service: foundService } = await api.getServiceByPagerDutyEntity(\n props\n );\n\n const { standards: serviceStandards } =\n await api.getServiceStandardsByServiceId(foundService.id);\n\n const result: PagerDutyCardServiceResponse = {\n id: foundService.id,\n name: foundService.name,\n url: foundService.html_url,\n policyId: foundService.escalation_policy.id,\n policyLink: foundService.escalation_policy.html_url as string,\n policyName: foundService.escalation_policy.name,\n status: foundService.status,\n standards: serviceStandards,\n };\n\n return result;\n }, [props]);\n\n if (error) {\n let errorNode: ReactNode;\n\n switch (error.constructor) {\n case UnauthorizedError:\n errorNode = <MissingTokenError />;\n break;\n case NotFoundError:\n errorNode = <ServiceNotFoundError />;\n break;\n default:\n errorNode = <ForbiddenError />;\n }\n\n return <BasicCard>{errorNode}</BasicCard>;\n }\n\n if (loading) {\n return (\n <BasicCard>\n <Progress />\n </BasicCard>\n );\n }\n\n return (\n <>\n <Card data-testid=\"pagerduty-card\">\n <CardHeader\n className={classes.headerStyle}\n title={\n theme.palette.type === \"dark\" ? (\n <img src={PDWhiteImage} alt=\"PagerDuty\" height=\"35\" />\n ) : (\n <img src={PDGreenImage} alt=\"PagerDuty\" height=\"35\" />\n )\n }\n action={\n !readOnly ? (\n <div>\n <TriggerIncidentButton handleRefresh={handleRefresh} />\n <OpenServiceButton serviceUrl={service!.url} />\n </div>\n ) : (\n <OpenServiceButton serviceUrl={service!.url} />\n )\n }\n />\n <Grid item md={12} className={classes.overviewHeaderContainerStyle}>\n <Grid item md={3}>\n <Typography className={classes.overviewHeaderTextStyle}>\n STATUS\n </Typography>\n </Grid>\n <Grid item md={6}>\n <Typography className={classes.overviewHeaderTextStyle}>\n INSIGHTS\n </Typography>\n </Grid>\n <Grid item md={3}>\n <Typography className={classes.overviewHeaderTextStyle}>\n STANDARDS\n </Typography>\n </Grid>\n </Grid>\n <Grid item md={12} className={classes.overviewCardsContainerStyle}>\n <Grid item md={3}>\n <StatusCard serviceId={service!.id} refreshStatus={refreshStatus} />\n </Grid>\n <Grid item md={6} className={classes.incidentMetricsContainerStyle}>\n <Grid md={4}>\n <InsightsCard\n count={29}\n label=\"interruptions\"\n color={theme.palette.textSubtle}\n />\n </Grid>\n <Grid md={4}>\n <InsightsCard\n count={29}\n label=\"high urgency\"\n color={theme.palette.warning.main}\n />\n </Grid>\n <Grid md={4}>\n <InsightsCard\n count={32}\n label=\"incidents\"\n color={theme.palette.error.main}\n />\n </Grid>\n </Grid>\n <Grid item md={3}>\n <ServiceStandardsCard\n total={service?.standards?.score?.total}\n completed={service?.standards?.score?.passing}\n standards={service?.standards?.standards}\n />\n </Grid>\n </Grid>\n\n <Divider />\n <CardContent>\n <TabbedCard>\n <CardTab label=\"Incidents\">\n <Incidents\n serviceId={service!.id}\n refreshIncidents={refreshIncidents}\n />\n </CardTab>\n {disableChangeEvents !== true ? (\n <CardTab label=\"Change Events\">\n <ChangeEvents\n serviceId={service!.id}\n refreshEvents={refreshChangeEvents}\n />\n </CardTab>\n ) : (\n <></>\n )}\n </TabbedCard>\n <EscalationPolicy\n policyId={service!.policyId}\n policyUrl={service!.policyLink}\n policyName={service!.policyName}\n />\n </CardContent>\n </Card> \n </>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React from 'react';\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};\n\n/** @public */\nexport const EntityPagerDutyCard = (props: EntityPagerDutyCardProps) => {\n const { readOnly, disableChangeEvents } = props;\n const { entity } = useEntity();\n const pagerDutyEntity = getPagerDutyEntity(entity);\n return (\n <PagerDutyCard\n {...pagerDutyEntity}\n readOnly={readOnly}\n disableChangeEvents={disableChangeEvents}\n />\n );\n};\n","/*\n * Copyright 2021 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 React, { useCallback, ReactNode, useState } from 'react';\nimport { makeStyles, Button } from '@material-ui/core';\nimport { BackstageTheme } from '@backstage/theme';\n\nimport { usePagerdutyEntity } from '../../hooks';\nimport { TriggerDialog } from '../TriggerDialog';\n\nconst useStyles = makeStyles<BackstageTheme>(theme => ({\n buttonStyle: {\n backgroundColor: theme.palette.error.main,\n color: theme.palette.error.contrastText,\n '&:hover': {\n backgroundColor: theme.palette.error.dark,\n },\n },\n}));\n\n/** @public */\nexport function TriggerButton(props: { children?: ReactNode }) {\n const { buttonStyle } = useStyles();\n const { integrationKey, name } = usePagerdutyEntity();\n const [dialogShown, setDialogShown] = useState<boolean>(false);\n\n const showDialog = useCallback(() => {\n setDialogShown(true);\n }, [setDialogShown]);\n const hideDialog = useCallback(() => {\n setDialogShown(false);\n }, [setDialogShown]);\n\n const disabled = !integrationKey;\n return (\n <>\n <Button\n onClick={showDialog}\n variant=\"contained\"\n className={disabled ? '' : buttonStyle}\n disabled={disabled}\n >\n {integrationKey\n ? props.children ?? 'Create new incident'\n : 'Missing integration key'}\n </Button>\n {integrationKey && (\n <TriggerDialog\n showDialog={dialogShown}\n handleDialog={hideDialog}\n integrationKey={integrationKey}\n name={name}\n />\n )}\n </>\n );\n}\n","/*\n * Copyright 2023 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 { EntityPagerDutyCardProps, EntityPagerDutyCard } from './components';\n\n/**\n * @public\n * @deprecated Please use EntityPagerDutyCard\n */\nexport const PagerDutyCard = EntityPagerDutyCard;\n\n/**\n * @public\n * @deprecated Please use EntityPagerDutyCardProps\n */\nexport type PagerDutyCardProps = EntityPagerDutyCardProps;\n"],"names":["ForbiddenError","EntityPagerDutyCard","useStyles","OpenInBrowser","useAsyncFn","makeStyles","Alert","PagerDutyCard","InsightsCard"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeO,MAAM,yBAA4B,GAAA,+BAAA,CAAA;AAClC,MAAM,oBAAuB,GAAA,0BAAA;;ACI7B,SAAS,mBAAmB,MAAiC,EAAA;AAClE,EAAM,MAAA;AAAA,IACJ,CAAC,yBAAyB,GAAG,cAAA;AAAA,IAC7B,CAAC,oBAAoB,GAAG,SAAA;AAAA,GACtB,GAAA,MAAA,CAAO,QAAS,CAAA,WAAA,IAAgB,EAAC,CAAA;AACrC,EAAM,MAAA,IAAA,GAAO,OAAO,QAAS,CAAA,IAAA,CAAA;AAE7B,EAAO,OAAA,EAAE,cAAgB,EAAA,SAAA,EAAW,IAAK,EAAA,CAAA;AAC3C;;ACSO,MAAM,0BAA0B,KAAM,CAAA;AAAC,CAAA;AAGvC,MAAMA,yBAAuB,KAAM,CAAA;AAAE,CAAA;AAGrC,MAAM,kBAAkB,YAA2B,CAAA;AAAA,EACxD,EAAI,EAAA,sBAAA;AACN,CAAC,EAAA;AAGM,MAAM,eAAwC,CAAA;AAAA,EAkBnD,YAA6B,MAAkC,EAAA;AAAlC,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA,CA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AAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACC,UAAY,EAAA,WAAA;AAAA,MACZ,YAAc,EAAA,UAAA;AAAA,MACd,cAAA;AAAA,MACA,IAAA;AAAA,KAAA;AAAA,GAGN,CAAA,CAAA;AAEJ;;AChDO,MAAM,aAAgB,GAAA;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { P as PagerDutyCard } from './index-
|
|
2
|
+
import { P as PagerDutyCard } from './index-9059229b.esm.js';
|
|
3
3
|
import '@backstage/core-plugin-api';
|
|
4
4
|
import '@backstage/errors';
|
|
5
5
|
import '@backstage/plugin-home-react';
|
|
@@ -23,6 +23,9 @@ import '@material-ui/icons/AddAlert';
|
|
|
23
23
|
import '@material-ui/core/styles';
|
|
24
24
|
import 'react-use';
|
|
25
25
|
import '@material-ui/lab/Alert/Alert';
|
|
26
|
+
import '@material-ui/icons/Info';
|
|
27
|
+
import '@material-ui/icons/CheckCircle';
|
|
28
|
+
import '@material-ui/icons/RadioButtonUnchecked';
|
|
26
29
|
import 'validate-color';
|
|
27
30
|
|
|
28
31
|
const Content = (props) => {
|
|
@@ -30,4 +33,4 @@ const Content = (props) => {
|
|
|
30
33
|
};
|
|
31
34
|
|
|
32
35
|
export { Content };
|
|
33
|
-
//# sourceMappingURL=index-
|
|
36
|
+
//# sourceMappingURL=index-c1a175e0.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-c1a175e0.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 React from 'react';\n\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2Ba,MAAA,OAAA,GAAU,CAAC,KAAsC,KAAA;AAC5D,EAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,aAAe,EAAA,EAAA,GAAG,KAAO,EAAA,CAAA,CAAA;AACnC;;;;"}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { E as EntityPagerDutyCard, H as HomePagePagerDutyCard, c as PagerDutyCard, a as PagerDutyClient, T as TriggerButton, U as UnauthorizedError, i as isPagerDutyAvailable, i as isPluginApplicableToEntity, b as pagerDutyApiRef, p as pagerDutyPlugin, p as plugin } from './esm/index-
|
|
1
|
+
export { E as EntityPagerDutyCard, H as HomePagePagerDutyCard, c as PagerDutyCard, a as PagerDutyClient, T as TriggerButton, U as UnauthorizedError, i as isPagerDutyAvailable, i as isPluginApplicableToEntity, b as pagerDutyApiRef, p as pagerDutyPlugin, p as plugin } from './esm/index-9059229b.esm.js';
|
|
2
2
|
import '@backstage/core-plugin-api';
|
|
3
3
|
import '@backstage/errors';
|
|
4
4
|
import '@backstage/plugin-home-react';
|
|
@@ -23,5 +23,8 @@ import '@material-ui/icons/AddAlert';
|
|
|
23
23
|
import '@material-ui/core/styles';
|
|
24
24
|
import 'react-use';
|
|
25
25
|
import '@material-ui/lab/Alert/Alert';
|
|
26
|
+
import '@material-ui/icons/Info';
|
|
27
|
+
import '@material-ui/icons/CheckCircle';
|
|
28
|
+
import '@material-ui/icons/RadioButtonUnchecked';
|
|
26
29
|
import 'validate-color';
|
|
27
30
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-05ed342b.esm.js","sources":["../../src/components/constants.ts","../../src/components/pagerDutyEntity.ts","../../src/api/client.ts","../../src/plugin.ts","../../src/components/Incident/IncidentListItem.tsx","../../src/components/Incident/IncidentEmptyState.tsx","../../src/components/Incident/IncidentForbiddenState.tsx","../../src/components/Incident/Incidents.tsx","../../src/components/Escalation/EscalationUsersEmptyState.tsx","../../src/components/Escalation/EscalationUsersForbiddenState.tsx","../../src/components/Escalation/EscalationUser.tsx","../../src/components/Escalation/EscalationPolicy.tsx","../../src/components/Errors/MissingTokenError.tsx","../../src/components/Errors/ServiceNotFoundError.tsx","../../src/components/ChangeEvents/ChangeEventListItem.tsx","../../src/components/ChangeEvents/ChangeEventEmptyState.tsx","../../src/components/ChangeEvents/ChangeEventForbiddenState.tsx","../../src/components/ChangeEvents/ChangeEvents.tsx","../../src/components/Errors/ForbiddenError.tsx","../../src/hooks/index.ts","../../src/components/TriggerDialog/TriggerDialog.tsx","../../src/components/PagerDutyCard/TriggerIncidentButton.tsx","../../src/components/PagerDutyCard/OpenServiceButton.tsx","../../src/components/PagerDutyCard/StatusCard.tsx","../../src/components/PagerDutyCard/ServiceStandardsCard.tsx","../../src/components/PagerDutyCard/InsightsCard.tsx","../../src/components/PagerDutyCard/index.tsx","../../src/components/EntityPagerDutyCard/index.tsx","../../src/components/TriggerButton/index.tsx","../../src/deprecated.ts"],"sourcesContent":["/*\n * Copyright 2021 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 */\nexport const PAGERDUTY_INTEGRATION_KEY = 'pagerduty.com/integration-key';\nexport const PAGERDUTY_SERVICE_ID = 'pagerduty.com/service-id';\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity } from '@backstage/catalog-model';\nimport { PagerDutyEntity } from '../types';\nimport { PAGERDUTY_INTEGRATION_KEY, PAGERDUTY_SERVICE_ID } from './constants';\n\nexport function getPagerDutyEntity(entity: Entity): PagerDutyEntity {\n const {\n [PAGERDUTY_INTEGRATION_KEY]: integrationKey,\n [PAGERDUTY_SERVICE_ID]: serviceId,\n } = entity.metadata.annotations || ({} as Record<string, string>);\n const name = entity.metadata.name;\n\n return { integrationKey, serviceId, name };\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n PagerDutyApi,\n PagerDutyTriggerAlarmRequest,\n PagerDutyClientApiDependencies,\n PagerDutyClientApiConfig,\n RequestOptions,\n} from './types';\nimport { PagerDutyChangeEventsResponse, \n PagerDutyOnCallUsersResponse, \n PagerDutyUser, \n PagerDutyServiceResponse,\n PagerDutyIncidentsResponse,\n PagerDutyServiceStandardsResponse\n} from '@pagerduty/backstage-plugin-common';\nimport { createApiRef, ConfigApi } from '@backstage/core-plugin-api';\nimport { NotFoundError } from '@backstage/errors';\nimport { Entity } from '@backstage/catalog-model';\nimport { getPagerDutyEntity } from '../components/pagerDutyEntity';\nimport { PagerDutyEntity } from '../types';\n\n/** @public */\nexport class UnauthorizedError extends Error {}\n\n/** @public */\nexport class ForbiddenError extends Error { }\n\n/** @public */\nexport const pagerDutyApiRef = createApiRef<PagerDutyApi>({\n id: 'plugin.pagerduty.api',\n});\n\n/** @public */\nexport class PagerDutyClient implements PagerDutyApi {\n static fromConfig(\n configApi: ConfigApi,\n dependencies: PagerDutyClientApiDependencies,\n ) {\n const { discoveryApi, fetchApi } = dependencies;\n\n const eventsBaseUrl: string =\n configApi.getOptionalString('pagerDuty.eventsBaseUrl') ??\n 'https://events.pagerduty.com/v2';\n\n return new PagerDutyClient({\n eventsBaseUrl,\n discoveryApi,\n fetchApi,\n });\n }\n\n constructor(private readonly config: PagerDutyClientApiConfig) {}\n\n async getServiceByPagerDutyEntity(\n pagerDutyEntity: PagerDutyEntity,\n ): Promise<PagerDutyServiceResponse> {\n const { integrationKey, serviceId } = pagerDutyEntity;\n\n let response: PagerDutyServiceResponse;\n let url: string;\n\n if (integrationKey) {\n url = `${await this.config.discoveryApi.getBaseUrl(\n 'pagerduty',\n )}/services?integration_key=${integrationKey}`;\n const serviceResponse = await this.findByUrl<PagerDutyServiceResponse>(url);\n\n if (serviceResponse.service === undefined) throw new NotFoundError();\n\n response = serviceResponse;\n } else if (serviceId) {\n url = `${await this.config.discoveryApi.getBaseUrl(\n 'pagerduty',\n )}/services/${serviceId}`;\n\n response = await this.findByUrl<PagerDutyServiceResponse>(url);\n } else {\n throw new NotFoundError();\n }\n\n return response;\n }\n\n async getServiceByEntity(entity: Entity): Promise<PagerDutyServiceResponse> {\n return await this.getServiceByPagerDutyEntity(getPagerDutyEntity(entity));\n }\n\n async getServiceById(serviceId: string): Promise<PagerDutyServiceResponse> {\n const url = `${await this.config.discoveryApi.getBaseUrl(\n 'pagerduty',\n )}/services/${serviceId}`;\n\n return await this.findByUrl<PagerDutyServiceResponse>(url);\n }\n\n async getIncidentsByServiceId(\n serviceId: string,\n ): Promise<PagerDutyIncidentsResponse> {\n const url = `${await this.config.discoveryApi.getBaseUrl(\n 'pagerduty',\n )}/services/${serviceId}/incidents`;\n\n return await this.findByUrl<PagerDutyIncidentsResponse>(url);\n }\n\n async getChangeEventsByServiceId(\n serviceId: string,\n ): Promise<PagerDutyChangeEventsResponse> {\n const url = `${await this.config.discoveryApi.getBaseUrl(\n 'pagerduty',\n )}/services/${serviceId}/change-events`;\n\n return await this.findByUrl<PagerDutyChangeEventsResponse>(url);\n }\n\n async getServiceStandardsByServiceId(\n serviceId: string,\n ): Promise<PagerDutyServiceStandardsResponse> {\n const url = `${await this.config.discoveryApi.getBaseUrl(\n 'pagerduty',\n )}/services/${serviceId}/standards`;\n\n return await this.findByUrl<PagerDutyServiceStandardsResponse>(url);\n }\n\n async getOnCallByPolicyId(\n policyId: string,\n ): Promise<PagerDutyUser[]> {\n const params = `escalation_policy_ids[]=${policyId}`;\n const url = `${await this.config.discoveryApi.getBaseUrl(\n 'pagerduty',\n )}/oncall-users?${params}`;\n\n const response: PagerDutyOnCallUsersResponse = await this.findByUrl<PagerDutyOnCallUsersResponse>(url);\n return response.users;\n }\n\n triggerAlarm(request: PagerDutyTriggerAlarmRequest): Promise<Response> {\n const { integrationKey, source, description, userName } = request;\n\n const body = JSON.stringify({\n event_action: 'trigger',\n routing_key: integrationKey,\n client: 'Backstage',\n client_url: source,\n payload: {\n summary: description,\n source: source,\n severity: 'error',\n class: 'manual trigger',\n custom_details: {\n user: userName,\n },\n },\n });\n\n const options = {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json; charset=UTF-8',\n Accept: 'application/json, text/plain, */*',\n },\n body,\n };\n\n const url = this.config.eventsBaseUrl ?? 'https://events.pagerduty.com/v2';\n\n return this.request(`${url}/enqueue`, options);\n }\n\n private async findByUrl<T>(url: string): Promise<T> {\n const options = {\n method: 'GET',\n headers: {\n Accept: 'application/vnd.pagerduty+json;version=2',\n 'Content-Type': 'application/json',\n },\n };\n const response = await this.request(url, options);\n return response.json();\n }\n\n private async request(\n url: string,\n options: RequestOptions,\n ): Promise<Response> {\n const response = await this.config.fetchApi.fetch(url, options);\n if (response.status === 401) {\n throw new UnauthorizedError(\"Unauthorized: You don't have access to this resource\");\n }\n\n if (response.status === 403) {\n throw new ForbiddenError(\"Forbidden: You are not allowed to perform this action\");\n }\n\n if (response.status === 404) {\n throw new NotFoundError(\"Not Found: Resource not found\");\n }\n\n if (!response.ok) {\n const payload = await response.json();\n const errors = payload.errors.map((error: string) => error).join(' ');\n const message = `Request failed with ${response.status}, ${errors}`;\n throw new Error(message);\n }\n return response;\n }\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { pagerDutyApiRef, PagerDutyClient } from './api';\nimport {\n createApiFactory,\n createPlugin,\n createRouteRef,\n discoveryApiRef,\n fetchApiRef,\n configApiRef,\n createComponentExtension,\n} from '@backstage/core-plugin-api';\nimport { createCardExtension } from '@backstage/plugin-home-react';\nimport { HomePagePagerDutyCardProps } from './components/HomePagePagerDutyCard/Content';\n\nexport const rootRouteRef = createRouteRef({\n id: 'pagerduty',\n});\n\n/** @public */\nexport const pagerDutyPlugin = createPlugin({\n id: 'pagerduty',\n apis: [\n createApiFactory({\n api: pagerDutyApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n configApi: configApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ configApi, discoveryApi, fetchApi }) =>\n PagerDutyClient.fromConfig(configApi, { discoveryApi, fetchApi }),\n }),\n ],\n});\n\n/** @public */\nexport const EntityPagerDutyCard = pagerDutyPlugin.provide(\n createComponentExtension({\n name: 'EntityPagerDutyCard',\n component: {\n lazy: () =>\n import('./components/EntityPagerDutyCard').then(\n m => m.EntityPagerDutyCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const HomePagePagerDutyCard = pagerDutyPlugin.provide(\n createCardExtension<HomePagePagerDutyCardProps>({\n name: 'HomePagePagerDutyCard',\n title: 'PagerDuty Homepage Card',\n components: () => import('./components/HomePagePagerDutyCard'),\n settings: {\n schema: {\n title: 'PagerDuty',\n type: 'object',\n properties: {\n integrationKey: {\n title: 'PagerDuty integration key',\n type: 'string',\n },\n serviceId: {\n title: 'PagerDuty service id',\n type: 'string',\n },\n name: {\n title: 'PagerDuty service name',\n type: 'string',\n },\n },\n },\n },\n }),\n);\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React from 'react';\nimport {\n ListItem,\n ListItemSecondaryAction,\n Tooltip,\n ListItemText,\n makeStyles,\n IconButton,\n Typography,\n Chip,\n} from '@material-ui/core';\nimport { DateTime, Duration } from 'luxon';\nimport { PagerDutyIncident } from '@pagerduty/backstage-plugin-common';\nimport OpenInBrowserIcon from '@material-ui/icons/OpenInBrowser';\nimport { BackstageTheme } from '@backstage/theme';\nimport { Link } from '@backstage/core-components';\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 warning: {\n borderColor: theme.palette.warning.main,\n color: \"#fff\",\n backgroundColor: theme.palette.warning.main,\n boxShadow: \"0 4px 4px 0 rgba(0,0,0,0.2)\",\n textTransform: \"uppercase\",\n \"& *\": {\n color: \"#fff\",\n },\n },\n error: {\n borderColor: theme.palette.error.main,\n color: \"#fff\",\n backgroundColor: theme.palette.error.main,\n boxShadow: \"0 4px 4px 0 rgba(0,0,0,0.2)\",\n textTransform: \"uppercase\",\n \"& *\": {\n color: \"#fff\",\n },\n },\n lowUrgency: {\n borderColor: theme.palette.warning.main,\n color: theme.palette.warning.main,\n backgroundColor: \"#fff\",\n boxShadow: \"0 4px 4px 0 rgba(0,0,0,0.2)\",\n textTransform: \"uppercase\",\n \"& *\": {\n color: theme.palette.warning.main,\n },\n },\n highUrgency: {\n borderColor: theme.palette.error.main,\n color: theme.palette.error.main,\n backgroundColor: \"#fff\",\n boxShadow: \"0 4px 4px 0 rgba(0,0,0,0.2)\",\n textTransform: \"uppercase\",\n \"& *\": {\n color: theme.palette.error.main,\n },\n },\n textContainer: {\n display: \"flex\",\n alignItems: \"baseline\",\n },\n smallIconStyle: {\n color: theme.palette.text.primary,\n marginRight: \"-20px\",\n },\n}));\n\ntype Props = {\n incident: PagerDutyIncident;\n};\n\nexport const IncidentListItem = ({ incident }: Props) => {\n const classes = useStyles();\n const duration =\n new Date().getTime() - new Date(incident.created_at).getTime();\n const createdAt = DateTime.local()\n .minus(Duration.fromMillis(duration))\n .toRelative({ locale: 'en' });\n const user = incident.assignments[0]?.assignee;\n\n return (\n <ListItem dense key={incident.id}>\n <ListItemText\n primary={\n <div className={classes.textContainer}>\n <Chip\n data-testid={`chip-${incident.status}`}\n label={incident.status}\n size=\"small\"\n variant=\"outlined\"\n className={\n incident.status === \"triggered\"\n ? classes.error\n : classes.warning\n }\n />\n <Chip\n data-testid={`chip-${incident.urgency}`}\n label={`${incident.urgency} urgency`}\n size=\"small\"\n variant=\"outlined\"\n className={\n incident.urgency === \"high\"\n ? classes.highUrgency\n : classes.lowUrgency\n }\n />\n {incident.title}\n </div>\n }\n primaryTypographyProps={{\n variant: \"body1\",\n className: classes.listItemPrimary,\n }}\n secondary={\n <Typography noWrap variant=\"body2\" color=\"textSecondary\">\n Created {createdAt} and assigned to{\" \"}\n <Link to={user?.html_url ?? \"#\"}>{user?.summary ?? \"nobody\"}</Link>\n </Typography>\n }\n />\n <ListItemSecondaryAction>\n <Tooltip title=\"View in PagerDuty\" placement=\"top\">\n <IconButton\n href={incident.html_url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={classes.smallIconStyle}\n >\n <OpenInBrowserIcon />\n </IconButton>\n </Tooltip>\n </ListItemSecondaryAction>\n </ListItem>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React from 'react';\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","/*\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 React from 'react';\nimport { Grid, Typography } from '@material-ui/core';\nimport ForbiddenStateImage from '../../assets/forbiddenstate.svg';\n\nexport const IncidentForbiddenState = () => {\n return (\n <Grid container justify=\"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","/*\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 React, { useEffect } from 'react';\nimport { List } from '@material-ui/core';\nimport { IncidentListItem } from './IncidentListItem';\nimport { IncidentsEmptyState } from './IncidentEmptyState';\nimport useAsyncFn from 'react-use/lib/useAsyncFn';\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 { IncidentForbiddenState } from './IncidentForbiddenState';\n\ntype Props = {\n serviceId: string;\n refreshIncidents: boolean;\n};\n\nexport const Incidents = ({ serviceId, refreshIncidents }: Props) => {\n const api = useApi(pagerDutyApiRef);\n\n const [{ value: incidents, loading, error }, getIncidents] = useAsyncFn(\n async () => {\n const { incidents: foundIncidents } = await api.getIncidentsByServiceId(\n serviceId,\n );\n return foundIncidents;\n },\n );\n\n useEffect(() => {\n getIncidents();\n }, [refreshIncidents, getIncidents]);\n\n if (error) {\n if (error.message.includes('Forbidden')) {\n return <IncidentForbiddenState />;\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 (!incidents?.length) {\n return <IncidentsEmptyState />;\n }\n\n return (\n <List dense>\n {incidents!.map((incident, index) => (\n <IncidentListItem key={incident.id + index} incident={incident} />\n ))}\n </List>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React from 'react';\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","/*\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 React from 'react';\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","/*\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 React from 'react';\nimport {\n ListItem,\n ListItemIcon,\n ListItemSecondaryAction,\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';\nimport OpenInBrowser from '@material-ui/icons/OpenInBrowser';\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 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 navigateToEscalationPolicy(url: string) {\n // open url in new browser window\n window.open(url, \"_blank\");\n}\n\n// function sendEmail(email: string) {\n \n// window.open(`mailto:${email}`, \"_blank\");\n// }\n\nexport const EscalationUser = ({ user, policyUrl, policyName }: Props) => {\n const classes = useStyles();\n\n return (\n <ListItem>\n <ListItemIcon>\n <Avatar alt={user.name} src={user.avatar_url} className={classes.avatarStyle} />\n </ListItemIcon>\n <ListItemText\n primary={\n <>\n <Typography className={classes.listItemPrimary}>\n {user.name}\n </Typography>\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-service-in-browser\"\n onClick={() => navigateToEscalationPolicy(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 <ListItemSecondaryAction>\n {/* <Tooltip title=\"Send e-mail to user\" placement=\"top\">\n <IconButton href={`mailto:${user.email}`}>\n <MailOutline className={classes.smallIconStyle} />\n </IconButton>\n </Tooltip> */}\n <Tooltip title=\"Open user in PagerDuty\" placement=\"top\">\n <IconButton\n href={user.html_url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={classes.smallIconStyle}\n >\n <OpenInBrowser />\n </IconButton>\n </Tooltip>\n </ListItemSecondaryAction>\n </ListItem>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React from 'react';\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};\n\nexport const EscalationPolicy = ({ policyId, policyUrl, policyName }: 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);\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 />;\n }\n\n if (!users?.length) {\n return <EscalationUsersEmptyState />;\n }\n\n return (\n <List dense subheader={<ListSubheader>ON CALL</ListSubheader>} style={{marginLeft: \"-15px\"}}>\n {users!.map((user, index) => (\n <EscalationUser key={index} user={user} policyUrl={policyUrl} policyName={policyName} />\n ))}\n </List>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React from 'react';\nimport { Button } from '@material-ui/core';\nimport { EmptyState } from '@backstage/core-components';\n\nexport const MissingTokenError = () => (\n <EmptyState\n missing=\"info\"\n title=\"Missing or invalid PagerDuty Token\"\n description=\"The request to fetch data needs a valid token. See README for more details.\"\n action={\n <Button\n color=\"primary\"\n variant=\"contained\"\n href=\"https://pagerduty.github.io/backstage-plugin-docs/getting-started/pagerduty/\"\n >\n Read More\n </Button>\n }\n />\n);\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React from 'react';\nimport { Button } from '@material-ui/core';\nimport { EmptyState } from '@backstage/core-components';\n\nexport const ServiceNotFoundError = () => (\n <EmptyState\n missing=\"data\"\n title=\"PagerDuty Service Not Found\"\n description=\"A service could not be found within PagerDuty based on the provided service id. Please verify your configuration.\"\n action={\n <Button\n color=\"primary\"\n variant=\"contained\"\n href=\"https://pagerduty.github.io/backstage-plugin-docs/getting-started/pagerduty/\"\n >\n Read More\n </Button>\n }\n />\n);\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React from 'react';\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 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 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={classes.smallExternalLinkIconStyle}\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 <OpenInBrowserIcon />\n </IconButton>\n </Tooltip>\n )}\n </ListItemSecondaryAction>\n </ListItem>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React from 'react';\nimport { Grid, Typography } from '@material-ui/core';\nimport EmptyStateImage from '../../assets/emptystate.svg';\n\nexport const ChangeEventEmptyState = () => {\n return (\n <Grid container justify=\"center\" direction=\"column\" alignItems=\"center\">\n <Grid item xs={12}>\n <Typography variant=\"h5\">No change events to display yet.</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","/*\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 React from 'react';\nimport { Grid, Typography } from '@material-ui/core';\nimport ForbiddenStateImage from '../../assets/forbiddenstate.svg';\n\nexport const ChangeEventForbiddenState = () => {\n return (\n <Grid container justify=\"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","/*\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 React, { 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 refreshEvents: boolean;\n};\n\nexport const ChangeEvents = ({ serviceId, 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(serviceId);\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","/*\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 React from 'react';\nimport { Button } from '@material-ui/core';\nimport { EmptyState } from '@backstage/core-components';\n\nexport const ForbiddenError = () => (\n <EmptyState\n missing=\"info\"\n title=\"Unauthorized\"\n description=\"You don't have the required permissions to perform this action. See README for more details.\"\n action={\n <Button\n color=\"primary\"\n variant=\"contained\"\n href=\"https://pagerduty.github.io/backstage-plugin-docs/getting-started/pagerduty/\"\n >\n Read More\n </Button>\n }\n />\n);\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { PagerDutyEntity } from '../types';\nimport { getPagerDutyEntity } from '../components/pagerDutyEntity';\n\nexport function usePagerdutyEntity(): PagerDutyEntity {\n const { entity } = useEntity();\n\n return getPagerDutyEntity(entity);\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React, { useState, useEffect } from 'react';\nimport {\n Dialog,\n DialogTitle,\n TextField,\n DialogActions,\n Button,\n DialogContent,\n Typography,\n CircularProgress,\n} from '@material-ui/core';\nimport useAsyncFn from 'react-use/lib/useAsyncFn';\nimport { pagerDutyApiRef } from '../../api';\nimport { Alert } from '@material-ui/lab';\nimport {\n useApi,\n alertApiRef,\n identityApiRef,\n} from '@backstage/core-plugin-api';\nimport { DEFAULT_NAMESPACE, parseEntityRef } from '@backstage/catalog-model';\n\ntype Props = {\n showDialog: boolean;\n handleDialog: () => void;\n onIncidentCreated?: () => void;\n name: string;\n integrationKey: string;\n};\n\nexport const TriggerDialog = ({\n showDialog,\n handleDialog,\n onIncidentCreated: onIncidentCreated,\n name,\n integrationKey,\n}: Props) => {\n const alertApi = useApi(alertApiRef);\n const identityApi = useApi(identityApiRef);\n const api = useApi(pagerDutyApiRef);\n const [description, setDescription] = useState<string>('');\n\n const [{ value, loading, error }, handleTriggerAlarm] = useAsyncFn(\n async (descriptions: string) => {\n const { userEntityRef } = await identityApi.getBackstageIdentity();\n const { name: userName } = parseEntityRef(userEntityRef, {\n defaultKind: 'User',\n defaultNamespace: DEFAULT_NAMESPACE,\n });\n return await api.triggerAlarm({\n integrationKey: integrationKey as string,\n source: window.location.toString(),\n description: descriptions,\n userName,\n });\n },\n );\n\n const descriptionChanged = (\n event: React.ChangeEvent<HTMLTextAreaElement>,\n ) => {\n setDescription(event.target.value);\n };\n\n useEffect(() => {\n if (value) {\n (async () => {\n alertApi.post({\n message: `Alarm successfully triggered`,\n });\n\n handleDialog();\n\n // The pager duty API isn't always returning the newly created alarm immediately\n await new Promise(resolve => setTimeout(resolve, 1000));\n onIncidentCreated?.();\n })();\n }\n }, [value, alertApi, handleDialog, onIncidentCreated]);\n\n if (error) {\n alertApi.post({\n message: `Failed to trigger alarm. ${error.message}`,\n severity: 'error',\n });\n }\n\n return (\n <Dialog maxWidth=\"md\" open={showDialog} onClose={handleDialog} fullWidth>\n <DialogTitle>\n This action will trigger an incident for <strong>\"{name}\"</strong>.\n </DialogTitle>\n <DialogContent>\n <Alert severity=\"info\">\n <Typography variant=\"body1\" align=\"justify\">\n If the issue you are seeing does not need urgent attention, please\n get in touch with the responsible team using their preferred\n communications channel. You can find information about the owner of\n this entity in the \"About\" card. If the issue is urgent, please\n don't hesitate to trigger the alert.\n </Typography>\n </Alert>\n <Typography\n variant=\"body1\"\n style={{ marginTop: '1em' }}\n gutterBottom\n align=\"justify\"\n >\n Please describe the problem you want to report. Be as descriptive as\n possible. Your signed in user and a reference to the current page will\n automatically be amended to the alarm so that the receiver can reach\n out to you if necessary.\n </Typography>\n <TextField\n inputProps={{ 'data-testid': 'trigger-input' }}\n id=\"description\"\n multiline\n fullWidth\n rows=\"4\"\n margin=\"normal\"\n label=\"Problem description\"\n variant=\"outlined\"\n onChange={descriptionChanged}\n />\n </DialogContent>\n <DialogActions>\n <Button\n data-testid=\"trigger-button\"\n id=\"trigger\"\n color=\"secondary\"\n disabled={!description || loading}\n variant=\"contained\"\n onClick={() => handleTriggerAlarm(description)}\n endIcon={loading && <CircularProgress size={16} />}\n >\n Trigger Incident\n </Button>\n <Button id=\"close\" color=\"primary\" onClick={handleDialog}>\n Close\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n","/*\n * Copyright 2021 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 React, { useCallback, useState } from \"react\";\nimport { makeStyles, IconButton } from \"@material-ui/core\";\nimport { BackstageTheme } from \"@backstage/theme\";\n\nimport { usePagerdutyEntity } from \"../../hooks\";\nimport { TriggerDialog } from \"../TriggerDialog\";\nimport AddAlert from \"@material-ui/icons/AddAlert\";\n\nconst useStyles = makeStyles<BackstageTheme>((theme) => ({\n buttonStyle: {\n color: theme.palette.text.primary,\n \"&:hover\": {\n backgroundColor: \"transparent\",\n textDecoration: \"underline\",\n },\n },\n containerStyle: {\n flex: \"flex !important\",\n fontSize: \"14px\",\n width: \"80px\",\n lineHeight: \"14px\",\n },\n iconStyle: {\n fontSize: \"35px\",\n marginBottom: \"-10px\"\n }\n}));\n\n/** @public */\nexport type TriggerIncidentButtonProps = {\n handleRefresh: () => void;\n}\n\n/** @public */\nexport function TriggerIncidentButton({ handleRefresh } : TriggerIncidentButtonProps) {\n const { buttonStyle, containerStyle, iconStyle } = useStyles();\n const { integrationKey, name } = usePagerdutyEntity();\n const [dialogShown, setDialogShown] = useState<boolean>(false);\n\n const showDialog = useCallback(() => {\n setDialogShown(true);\n }, [setDialogShown]);\n const hideDialog = useCallback(() => {\n setDialogShown(false);\n }, [setDialogShown]);\n\n const disabled = !integrationKey;\n return (\n <>\n <IconButton\n aria-label=\"create-incident\"\n onClick={showDialog}\n className={disabled ? \"\" : buttonStyle}\n disabled={disabled}\n >\n <div className={containerStyle}>\n <AddAlert className={iconStyle} />\n <p>Create new incident</p>\n </div>\n </IconButton>\n {integrationKey && (\n <TriggerDialog\n showDialog={dialogShown}\n handleDialog={hideDialog}\n integrationKey={integrationKey}\n name={name}\n onIncidentCreated={handleRefresh}\n />\n )}\n </>\n );\n}\n","/*\n * Copyright 2021 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\n// import React, { useCallback, useState } from \"react\";\nimport React from \"react\";\nimport { makeStyles, IconButton } from \"@material-ui/core\";\nimport { BackstageTheme } from \"@backstage/theme\";\n\n// import { usePagerdutyEntity } from \"../../hooks\";\n// import { TriggerDialog } from \"../TriggerDialog\";\nimport OpenInBrowser from \"@material-ui/icons/OpenInBrowser\";\n\nconst useStyles = makeStyles<BackstageTheme>((theme) => ({\n buttonStyle: {\n color: theme.palette.text.primary,\n \"&:hover\": {\n backgroundColor: \"transparent\",\n textDecoration: \"underline\",\n },\n },\n containerStyle: {\n flex: \"flex\",\n fontSize: \"14px\",\n width: \"85px\",\n lineHeight: \"14px\",\n },\n iconStyle: {\n fontSize: \"35px\",\n marginBottom: \"-10px\",\n },\n}));\n\n/** @public */\nexport function OpenServiceButton(props: { serviceUrl: string}) {\n const { buttonStyle, containerStyle, iconStyle } = useStyles();\n // const { integrationKey, name } = usePagerdutyEntity();\n // const [dialogShown, setDialogShown] = useState<boolean>(false);\n\n // const showDialog = useCallback(() => {\n // setDialogShown(true);\n // }, [setDialogShown]);\n // const hideDialog = useCallback(() => {\n // setDialogShown(false);\n // }, [setDialogShown]);\n\n function navigateToService() {\n window.open(props.serviceUrl, \"_blank\");\n }\n\n return (\n <>\n <IconButton\n aria-label=\"open-service-in-browser\"\n onClick={navigateToService}\n className={buttonStyle}\n >\n <div className={containerStyle}>\n <OpenInBrowser className={iconStyle} />\n <p>Open service in PagerDuty</p>\n </div>\n </IconButton>\n {/* {integrationKey && (\n <TriggerDialog\n showDialog={dialogShown}\n handleDialog={hideDialog}\n integrationKey={integrationKey}\n name={name}\n />\n )} */}\n </>\n );\n}\n","import { Card, Typography } from \"@material-ui/core\";\nimport React, { useEffect } from \"react\";\nimport { Theme, makeStyles } from \"@material-ui/core/styles\";\nimport { BackstageTheme } from \"@backstage/theme\";\nimport { useApi } from \"@backstage/core-plugin-api\";\nimport { pagerDutyApiRef } from \"../../api\";\nimport { useAsyncFn } from \"react-use\";\nimport Alert from \"@material-ui/lab/Alert/Alert\";\nimport { Progress } from \"@backstage/core-components\";\n\ntype Props = {\n serviceId: string;\n refreshStatus: boolean;\n};\n\nfunction labelFromStatus(status: string) {\n let label;\n switch (status) {\n case \"active\":\n label = \"OK\";\n break;\n case \"warning\":\n label = \"ACTIVE\";\n break;\n case \"critical\":\n label = \"ALARM\";\n break;\n case \"maintenance\":\n label = \"MAINTENANCE\";\n break;\n case \"disabled\":\n label = \"DISABLED\";\n break;\n default:\n label = \"OK\";\n break;\n }\n\n return label;\n}\n\nfunction colorFromStatus(theme: Theme, status: string) {\n let color;\n switch (status) {\n case \"active\":\n color = theme.palette.success.main;\n break;\n case \"warning\":\n color = theme.palette.warningBackground;\n break;\n case \"critical\":\n color = theme.palette.error.main;\n break;\n case \"maintenance\":\n color = \"#ebdc00\";\n break;\n case \"disabled\":\n color = \"#A9A9A9\";\n break;\n default:\n color = theme.palette.success.main;\n break;\n }\n\n return color;\n}\n\nfunction StatusCard({ serviceId, refreshStatus }: Props) {\n const api = useApi(pagerDutyApiRef);\n const [{ value: status, loading, error }, getStatus] = useAsyncFn(\n async () => {\n const { service: foundService } = await api.getServiceById(serviceId);\n return foundService.status;\n }\n );\n\n const useStyles = makeStyles<BackstageTheme>((theme) => ({\n cardStyle: {\n height: \"120px\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor:\n status !== undefined\n ? colorFromStatus(theme, status)\n : colorFromStatus(theme, \"active\"),\n marginRight: \"10px\",\n },\n largeTextStyle: {\n color: \"white\",\n fontWeight: \"bold\",\n fontSize: \"20px\",\n wordWrap: \"break-word\",\n },\n }));\n\n const { cardStyle, largeTextStyle } = useStyles();\n\n useEffect(() => {\n getStatus();\n }, [refreshStatus, getStatus]);\n\n if (error) {\n if (error.message.includes(\"Forbidden\")) {\n return <p>forbidden</p>;\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 (!status) {\n return <p>not found</p>;\n }\n\n return (\n <Card className={cardStyle}>\n {status !== undefined ? (\n <Typography className={largeTextStyle}>\n {labelFromStatus(status!)}\n </Typography>\n ) : (\n <Typography className={largeTextStyle}>Unable to get status</Typography>\n )}\n </Card>\n );\n}\n\nexport default StatusCard;\n","import { BackstageTheme } from \"@backstage/theme\";\nimport {\n Card,\n LinearProgress,\n Theme,\n Typography,\n makeStyles,\n withStyles,\n} from \"@material-ui/core\";\nimport React from \"react\";\n\ntype Props = {\n total: number | undefined;\n completed: number | undefined;\n};\n\nfunction colorFromPercentage(theme: Theme, percentage: number) {\n if (percentage < 0.5) {\n return theme.palette.error.main;\n } else if (percentage < 0.8) {\n return theme.palette.warning.main;\n }\n return theme.palette.success.main;\n}\n\nfunction ServiceStandardsCard({ total, completed }: Props) {\n const useStyles = makeStyles<BackstageTheme>((theme) => ({\n cardStyle: {\n height: \"120px\",\n display: \"grid\",\n gridTemplateRows: \"1fr auto auto\",\n backgroundColor: \"rgba(0, 0, 0, 0.03)\",\n },\n containerStyle: {\n display: \"flex\",\n justifyContent: \"center\",\n },\n largeTextStyle: {\n fontSize: \"50px\",\n color:\n completed !== undefined && total !== undefined\n ? colorFromPercentage(theme, completed / total)\n : colorFromPercentage(theme, 0),\n alignSelf: \"center\",\n justifyContent: \"center\",\n },\n smallTextStyle: {\n color: theme.palette.textSubtle,\n fontSize: \"14px\",\n fontWeight: \"bold\",\n alignSelf: \"center\",\n justifyContent: \"center\",\n marginLeft: \"-2px\",\n marginTop: \"25px\",\n },\n }));\n\n const BorderLinearProgress = withStyles((theme) => ({\n root: {\n height: 10,\n borderRadius: 5,\n margin: 5,\n },\n colorPrimary: {\n backgroundColor:\n theme.palette.grey[theme.palette.type === \"light\" ? 200 : 700],\n },\n bar: {\n borderRadius: 5,\n backgroundColor:\n completed !== undefined && total !== undefined\n ? colorFromPercentage(theme, completed / total)\n : colorFromPercentage(theme, 0),\n },\n }))(LinearProgress);\n\n const { cardStyle, containerStyle, largeTextStyle, smallTextStyle } =\n useStyles();\n return (\n <Card className={cardStyle}>\n {completed !== undefined && total !== undefined ? (\n <>\n <div className={containerStyle}>\n <Typography className={largeTextStyle}>{completed}</Typography>\n <Typography className={smallTextStyle}>/{total}</Typography>\n </div>\n <div>\n <BorderLinearProgress\n variant=\"determinate\"\n value={(completed! / total!) * 100}\n />\n </div>\n </>\n ) : (\n <div className={containerStyle}>\n <Typography className={largeTextStyle}>\n Unable to retrieve Scores\n </Typography>\n </div>\n )}\n </Card>\n );\n}\n\nexport default ServiceStandardsCard;\n","import { BackstageTheme } from \"@backstage/theme\";\nimport { Card, Typography, makeStyles } from \"@material-ui/core\";\nimport React from \"react\";\nimport validateColor from \"validate-color\";\n\ntype Props = {\n count: number;\n label: string;\n color: string;\n};\n\nfunction IncidentCounterCard({ count, label, color }: Props) {\n\n const textColor = color && validateColor(color) ? color : \"black\";\n\n const useStyles = makeStyles<BackstageTheme>(() => ({\n cardStyle: {\n marginRight: \"10px\",\n height: \"120px\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"rgba(0, 0, 0, 0.03)\",\n },\n largeTextStyle: {\n color: textColor,\n fontSize: \"30px\",\n marginTop: \"-10px\",\n },\n smallTextStyle: {\n color: textColor,\n fontWeight: \"bold\",\n fontSize: \"10px\",\n marginTop: \"-5px\",\n textTransform: \"uppercase\",\n flexWrap: \"wrap\",\n },\n }));\n\n const { cardStyle, largeTextStyle, smallTextStyle } = useStyles();\n\n return (\n <Card className={cardStyle}>\n <Typography className={largeTextStyle}>{count}</Typography>\n <Typography className={smallTextStyle}>{label}</Typography>\n </Card>\n );\n}\n\nexport default IncidentCounterCard;\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React, { ReactNode, useCallback, useState } from \"react\";\nimport {\n Card,\n CardHeader,\n Divider,\n CardContent,\n Grid,\n Typography,\n} from \"@material-ui/core\";\nimport { Incidents } from \"../Incident\";\nimport { EscalationPolicy } from \"../Escalation\";\nimport useAsync from \"react-use/lib/useAsync\";\nimport { pagerDutyApiRef, UnauthorizedError } from \"../../api\";\nimport { MissingTokenError, ServiceNotFoundError } from \"../Errors\";\nimport { ChangeEvents } from \"../ChangeEvents\";\nimport PDGreenImage from \"../../assets/PD-Green.svg\";\nimport PDWhiteImage from \"../../assets/PD-White.svg\";\n\nimport { useApi } from \"@backstage/core-plugin-api\";\nimport { NotFoundError } from \"@backstage/errors\";\nimport {\n Progress,\n TabbedCard,\n CardTab,\n InfoCard,\n} from \"@backstage/core-components\";\nimport { PagerDutyEntity } from \"../../types\";\nimport { ForbiddenError } from \"../Errors/ForbiddenError\";\nimport { TriggerIncidentButton } from \"./TriggerIncidentButton\";\nimport { OpenServiceButton } from \"./OpenServiceButton\";\nimport { createStyles, makeStyles, useTheme } from \"@material-ui/core/styles\";\nimport StatusCard from \"./StatusCard\";\nimport ServiceStandardsCard from \"./ServiceStandardsCard\";\nimport { BackstageTheme } from \"@backstage/theme\";\nimport { PagerDutyCardServiceResponse } from \"../../api/types\";\nimport InsightsCard from \"./InsightsCard\";\n\nconst useStyles = makeStyles<BackstageTheme>((theme) =>\n createStyles({\n overviewHeaderTextStyle: {\n fontSize: \"14px\",\n fontWeight: 500,\n color:\n theme.palette.type === \"light\"\n ? \"rgba(0, 0, 0, 0.54)\"\n : \"rgba(255, 255, 255, 0.7)\",\n },\n headerStyle: {\n marginRight: \"1em\",\n },\n overviewHeaderContainerStyle: {\n display: \"flex\",\n margin: \"15px\",\n marginBottom: \"20px\",\n },\n overviewCardsContainerStyle: {\n display: \"flex\",\n margin: \"15px\",\n marginTop: \"-15px\",\n },\n incidentMetricsContainerStyle: {\n display: \"flex\",\n height: \"100%\",\n justifyContent: \"center\",\n columnSpan: \"all\",\n },\n })\n);\n\nconst BasicCard = ({ children }: { children: ReactNode }) => (\n <InfoCard title=\"PagerDuty\">{children}</InfoCard>\n);\n\n/** @public */\nexport type PagerDutyCardProps = PagerDutyEntity & {\n readOnly?: boolean;\n disableChangeEvents?: boolean;\n};\n\n/** @public */\nexport const PagerDutyCard = (props: PagerDutyCardProps) => {\n const classes = useStyles();\n\n const theme = useTheme();\n const { readOnly, disableChangeEvents } = props;\n const api = useApi(pagerDutyApiRef);\n const [refreshIncidents, setRefreshIncidents] = useState<boolean>(false);\n const [refreshChangeEvents, setRefreshChangeEvents] =\n useState<boolean>(false);\n const [refreshStatus, setRefreshStatus] = useState<boolean>(false);\n\n const handleRefresh = useCallback(() => {\n setRefreshIncidents((x) => !x);\n setRefreshChangeEvents((x) => !x);\n setRefreshStatus((x) => !x);\n }, []);\n\n const {\n value: service,\n loading,\n error,\n } = useAsync(async () => {\n const { service: foundService } = await api.getServiceByPagerDutyEntity(\n props\n );\n\n const { standards: serviceStandards } =\n await api.getServiceStandardsByServiceId(foundService.id);\n\n const result: PagerDutyCardServiceResponse = {\n id: foundService.id,\n name: foundService.name,\n url: foundService.html_url,\n policyId: foundService.escalation_policy.id,\n policyLink: foundService.escalation_policy.html_url as string,\n policyName: foundService.escalation_policy.name,\n status: foundService.status,\n standardsScore: serviceStandards.score,\n };\n\n return result;\n }, [props]);\n\n if (error) {\n let errorNode: ReactNode;\n\n switch (error.constructor) {\n case UnauthorizedError:\n errorNode = <MissingTokenError />;\n break;\n case NotFoundError:\n errorNode = <ServiceNotFoundError />;\n break;\n default:\n errorNode = <ForbiddenError />;\n }\n\n return <BasicCard>{errorNode}</BasicCard>;\n }\n\n if (loading) {\n return (\n <BasicCard>\n <Progress />\n </BasicCard>\n );\n }\n\n return (\n <>\n <Card data-testid=\"pagerduty-card\">\n <CardHeader\n className={classes.headerStyle}\n title={\n theme.palette.type === \"dark\" ? (\n <img src={PDWhiteImage} alt=\"PagerDuty\" height=\"35\" />\n ) : (\n <img src={PDGreenImage} alt=\"PagerDuty\" height=\"35\" />\n )\n }\n action={\n !readOnly ? (\n <div>\n <TriggerIncidentButton handleRefresh={handleRefresh} />\n <OpenServiceButton serviceUrl={service!.url} />\n </div>\n ) : (\n <OpenServiceButton serviceUrl={service!.url} />\n )\n }\n />\n <Grid item md={12} className={classes.overviewHeaderContainerStyle}>\n <Grid item md={3}>\n <Typography className={classes.overviewHeaderTextStyle}>\n STATUS\n </Typography>\n </Grid>\n <Grid item md={6}>\n <Typography className={classes.overviewHeaderTextStyle}>\n INSIGHTS\n </Typography>\n </Grid>\n <Grid item md={3}>\n <Typography className={classes.overviewHeaderTextStyle}>\n STANDARDS\n </Typography>\n </Grid>\n </Grid>\n <Grid item md={12} className={classes.overviewCardsContainerStyle}>\n <Grid item md={3}>\n <StatusCard serviceId={service!.id} refreshStatus={refreshStatus} />\n </Grid>\n <Grid item md={6} className={classes.incidentMetricsContainerStyle}>\n <Grid md={4}>\n <InsightsCard\n count={29}\n label=\"interruptions\"\n color={theme.palette.textSubtle}\n />\n </Grid>\n <Grid md={4}>\n <InsightsCard\n count={29}\n label=\"high urgency\"\n color={theme.palette.warning.main}\n />\n </Grid>\n <Grid md={4}>\n <InsightsCard\n count={32}\n label=\"incidents\"\n color={theme.palette.error.main}\n />\n </Grid>\n </Grid>\n <Grid item md={3}>\n <ServiceStandardsCard\n total={service?.standardsScore?.total}\n completed={service?.standardsScore?.passing}\n />\n </Grid>\n </Grid>\n\n <Divider />\n <CardContent>\n <TabbedCard>\n <CardTab label=\"Incidents\">\n <Incidents\n serviceId={service!.id}\n refreshIncidents={refreshIncidents}\n />\n </CardTab>\n {disableChangeEvents !== true ? (\n <CardTab label=\"Change Events\">\n <ChangeEvents\n serviceId={service!.id}\n refreshEvents={refreshChangeEvents}\n />\n </CardTab>\n ) : (\n <></>\n )}\n </TabbedCard>\n <EscalationPolicy\n policyId={service!.policyId}\n policyUrl={service!.policyLink}\n policyName={service!.policyName}\n />\n </CardContent>\n </Card> \n </>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport React from 'react';\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};\n\n/** @public */\nexport const EntityPagerDutyCard = (props: EntityPagerDutyCardProps) => {\n const { readOnly, disableChangeEvents } = props;\n const { entity } = useEntity();\n const pagerDutyEntity = getPagerDutyEntity(entity);\n return (\n <PagerDutyCard\n {...pagerDutyEntity}\n readOnly={readOnly}\n disableChangeEvents={disableChangeEvents}\n />\n );\n};\n","/*\n * Copyright 2021 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 React, { useCallback, ReactNode, useState } from 'react';\nimport { makeStyles, Button } from '@material-ui/core';\nimport { BackstageTheme } from '@backstage/theme';\n\nimport { usePagerdutyEntity } from '../../hooks';\nimport { TriggerDialog } from '../TriggerDialog';\n\nconst useStyles = makeStyles<BackstageTheme>(theme => ({\n buttonStyle: {\n backgroundColor: theme.palette.error.main,\n color: theme.palette.error.contrastText,\n '&:hover': {\n backgroundColor: theme.palette.error.dark,\n },\n },\n}));\n\n/** @public */\nexport function TriggerButton(props: { children?: ReactNode }) {\n const { buttonStyle } = useStyles();\n const { integrationKey, name } = usePagerdutyEntity();\n const [dialogShown, setDialogShown] = useState<boolean>(false);\n\n const showDialog = useCallback(() => {\n setDialogShown(true);\n }, [setDialogShown]);\n const hideDialog = useCallback(() => {\n setDialogShown(false);\n }, [setDialogShown]);\n\n const disabled = !integrationKey;\n return (\n <>\n <Button\n onClick={showDialog}\n variant=\"contained\"\n className={disabled ? '' : buttonStyle}\n disabled={disabled}\n >\n {integrationKey\n ? props.children ?? 'Create new incident'\n : 'Missing integration key'}\n </Button>\n {integrationKey && (\n <TriggerDialog\n showDialog={dialogShown}\n handleDialog={hideDialog}\n integrationKey={integrationKey}\n name={name}\n />\n )}\n </>\n );\n}\n","/*\n * Copyright 2023 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 { EntityPagerDutyCardProps, EntityPagerDutyCard } from './components';\n\n/**\n * @public\n * @deprecated Please use EntityPagerDutyCard\n */\nexport const PagerDutyCard = EntityPagerDutyCard;\n\n/**\n * @public\n * @deprecated Please use EntityPagerDutyCardProps\n */\nexport type PagerDutyCardProps = EntityPagerDutyCardProps;\n"],"names":["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