@pagerduty/backstage-plugin 0.15.10-next.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/assets/PD-Green.svg +21 -0
  2. package/assets/PD-Icon.svg +13 -0
  3. package/assets/PD-White.svg +21 -0
  4. package/assets/emptystate.svg +6 -0
  5. package/assets/forbiddenstate.svg +25 -0
  6. package/dist/alpha/api.esm.js +22 -0
  7. package/dist/alpha/api.esm.js.map +1 -0
  8. package/dist/alpha/entity-cards.esm.js +69 -0
  9. package/dist/alpha/entity-cards.esm.js.map +1 -0
  10. package/dist/alpha/nav-items.esm.js +21 -0
  11. package/dist/alpha/nav-items.esm.js.map +1 -0
  12. package/dist/alpha/pages.esm.js +15 -0
  13. package/dist/alpha/pages.esm.js.map +1 -0
  14. package/dist/alpha/plugin.esm.js +26 -0
  15. package/dist/alpha/plugin.esm.js.map +1 -0
  16. package/dist/alpha.d.ts +139 -0
  17. package/dist/alpha.esm.js +2 -0
  18. package/dist/alpha.esm.js.map +1 -0
  19. package/dist/api/client.esm.js +225 -0
  20. package/dist/api/client.esm.js.map +1 -0
  21. package/dist/assets/PD-Green.svg +21 -0
  22. package/dist/assets/PD-Icon.svg +13 -0
  23. package/dist/assets/PD-White.svg +21 -0
  24. package/dist/assets/emptystate.svg +6 -0
  25. package/dist/assets/forbiddenstate.svg +25 -0
  26. package/dist/components/ChangeEvents/ChangeEventEmptyState.esm.js +29 -0
  27. package/dist/components/ChangeEvents/ChangeEventEmptyState.esm.js.map +1 -0
  28. package/dist/components/ChangeEvents/ChangeEventForbiddenState.esm.js +29 -0
  29. package/dist/components/ChangeEvents/ChangeEventForbiddenState.esm.js.map +1 -0
  30. package/dist/components/ChangeEvents/ChangeEventListItem.esm.js +85 -0
  31. package/dist/components/ChangeEvents/ChangeEventListItem.esm.js.map +1 -0
  32. package/dist/components/ChangeEvents/ChangeEvents.esm.js +60 -0
  33. package/dist/components/ChangeEvents/ChangeEvents.esm.js.map +1 -0
  34. package/dist/components/EntityPagerDutyCard/index.esm.js +29 -0
  35. package/dist/components/EntityPagerDutyCard/index.esm.js.map +1 -0
  36. package/dist/components/EntityPagerDutySmallCard/index.esm.js +29 -0
  37. package/dist/components/EntityPagerDutySmallCard/index.esm.js.map +1 -0
  38. package/dist/components/Errors/ForbiddenError.esm.js +24 -0
  39. package/dist/components/Errors/ForbiddenError.esm.js.map +1 -0
  40. package/dist/components/Errors/MissingTokenError.esm.js +24 -0
  41. package/dist/components/Errors/MissingTokenError.esm.js.map +1 -0
  42. package/dist/components/Errors/ServiceNotFoundError.esm.js +24 -0
  43. package/dist/components/Errors/ServiceNotFoundError.esm.js.map +1 -0
  44. package/dist/components/Escalation/EscalationPolicy.esm.js +53 -0
  45. package/dist/components/Escalation/EscalationPolicy.esm.js.map +1 -0
  46. package/dist/components/Escalation/EscalationUser.esm.js +97 -0
  47. package/dist/components/Escalation/EscalationUser.esm.js.map +1 -0
  48. package/dist/components/Escalation/EscalationUsersEmptyState.esm.js +23 -0
  49. package/dist/components/Escalation/EscalationUsersEmptyState.esm.js.map +1 -0
  50. package/dist/components/Escalation/EscalationUsersForbiddenState.esm.js +23 -0
  51. package/dist/components/Escalation/EscalationUsersForbiddenState.esm.js.map +1 -0
  52. package/dist/components/HomePagePagerDutyCard/Content.esm.js +9 -0
  53. package/dist/components/HomePagePagerDutyCard/Content.esm.js.map +1 -0
  54. package/dist/components/HomePagePagerDutyCard/index.esm.js +2 -0
  55. package/dist/components/HomePagePagerDutyCard/index.esm.js.map +1 -0
  56. package/dist/components/Icons/index.esm.js +9 -0
  57. package/dist/components/Icons/index.esm.js.map +1 -0
  58. package/dist/components/Incident/IncidentEmptyState.esm.js +29 -0
  59. package/dist/components/Incident/IncidentEmptyState.esm.js.map +1 -0
  60. package/dist/components/Incident/IncidentForbiddenState.esm.js +29 -0
  61. package/dist/components/Incident/IncidentForbiddenState.esm.js.map +1 -0
  62. package/dist/components/Incident/IncidentListItem.esm.js +128 -0
  63. package/dist/components/Incident/IncidentListItem.esm.js.map +1 -0
  64. package/dist/components/Incident/Incidents.esm.js +54 -0
  65. package/dist/components/Incident/Incidents.esm.js.map +1 -0
  66. package/dist/components/PagerDutyCard/index.esm.js +231 -0
  67. package/dist/components/PagerDutyCard/index.esm.js.map +1 -0
  68. package/dist/components/PagerDutyCardCommon/InsightsCard.esm.js +42 -0
  69. package/dist/components/PagerDutyCardCommon/InsightsCard.esm.js.map +1 -0
  70. package/dist/components/PagerDutyCardCommon/OpenServiceButton.esm.js +43 -0
  71. package/dist/components/PagerDutyCardCommon/OpenServiceButton.esm.js.map +1 -0
  72. package/dist/components/PagerDutyCardCommon/ServiceStandardsCard.esm.js +134 -0
  73. package/dist/components/PagerDutyCardCommon/ServiceStandardsCard.esm.js.map +1 -0
  74. package/dist/components/PagerDutyCardCommon/StatusCard.esm.js +109 -0
  75. package/dist/components/PagerDutyCardCommon/StatusCard.esm.js.map +1 -0
  76. package/dist/components/PagerDutyCardCommon/TriggerIncidentButton.esm.js +66 -0
  77. package/dist/components/PagerDutyCardCommon/TriggerIncidentButton.esm.js.map +1 -0
  78. package/dist/components/PagerDutyPage/MappingTable.esm.js +282 -0
  79. package/dist/components/PagerDutyPage/MappingTable.esm.js.map +1 -0
  80. package/dist/components/PagerDutyPage/ServiceMappingComponent.esm.js +50 -0
  81. package/dist/components/PagerDutyPage/ServiceMappingComponent.esm.js.map +1 -0
  82. package/dist/components/PagerDutyPage/index.esm.js +117 -0
  83. package/dist/components/PagerDutyPage/index.esm.js.map +1 -0
  84. package/dist/components/PagerDutySmallCard/index.esm.js +227 -0
  85. package/dist/components/PagerDutySmallCard/index.esm.js.map +1 -0
  86. package/dist/components/TriggerButton/index.esm.js +51 -0
  87. package/dist/components/TriggerButton/index.esm.js.map +1 -0
  88. package/dist/components/TriggerDialog/TriggerDialog.esm.js +120 -0
  89. package/dist/components/TriggerDialog/TriggerDialog.esm.js.map +1 -0
  90. package/dist/components/constants.esm.js +6 -0
  91. package/dist/components/constants.esm.js.map +1 -0
  92. package/dist/components/pagerDutyEntity.esm.js +14 -0
  93. package/dist/components/pagerDutyEntity.esm.js.map +1 -0
  94. package/dist/deprecated.esm.js +10 -0
  95. package/dist/deprecated.esm.js.map +1 -0
  96. package/dist/hooks/index.esm.js +10 -0
  97. package/dist/hooks/index.esm.js.map +1 -0
  98. package/dist/index.d.ts +182 -0
  99. package/dist/index.esm.js +8 -0
  100. package/dist/index.esm.js.map +1 -0
  101. package/dist/package.json.esm.js +133 -0
  102. package/dist/package.json.esm.js.map +1 -0
  103. package/dist/plugin.esm.js +76 -0
  104. package/dist/plugin.esm.js.map +1 -0
  105. package/dist/routes.esm.js +6 -0
  106. package/dist/routes.esm.js.map +1 -0
  107. package/package.json +19 -7
@@ -0,0 +1,29 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { PAGERDUTY_INTEGRATION_KEY, PAGERDUTY_SERVICE_ID } from '../constants.esm.js';
3
+ import { useEntity } from '@backstage/plugin-catalog-react';
4
+ import { getPagerDutyEntity } from '../pagerDutyEntity.esm.js';
5
+ import { PagerDutyCard } from '../PagerDutyCard/index.esm.js';
6
+
7
+ const isPluginApplicableToEntity = (entity) => Boolean(
8
+ entity.metadata.annotations?.[PAGERDUTY_INTEGRATION_KEY] || entity.metadata.annotations?.[PAGERDUTY_SERVICE_ID]
9
+ );
10
+ const EntityPagerDutyCard = (props) => {
11
+ const { readOnly, disableChangeEvents, disableOnCall } = props;
12
+ const { entity } = useEntity();
13
+ if (isPluginApplicableToEntity(entity)) {
14
+ const pagerDutyEntity = getPagerDutyEntity(entity);
15
+ return /* @__PURE__ */ jsx(
16
+ PagerDutyCard,
17
+ {
18
+ ...pagerDutyEntity,
19
+ readOnly,
20
+ disableChangeEvents,
21
+ disableOnCall
22
+ }
23
+ );
24
+ }
25
+ return null;
26
+ };
27
+
28
+ export { EntityPagerDutyCard, isPluginApplicableToEntity };
29
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../../src/components/EntityPagerDutyCard/index.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport { Entity } from '@backstage/catalog-model';\nimport { PAGERDUTY_INTEGRATION_KEY, PAGERDUTY_SERVICE_ID } from '../constants';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { getPagerDutyEntity } from '../pagerDutyEntity';\nimport { PagerDutyCard } from '../PagerDutyCard';\n\n/** @public */\nexport const isPluginApplicableToEntity = (entity: Entity) =>\n Boolean(\n entity.metadata.annotations?.[PAGERDUTY_INTEGRATION_KEY] ||\n entity.metadata.annotations?.[PAGERDUTY_SERVICE_ID],\n );\n\n/** @public */\nexport type EntityPagerDutyCardProps = {\n readOnly?: boolean;\n disableChangeEvents?: boolean;\n disableOnCall?: boolean;\n};\n\n/** @public */\nexport const EntityPagerDutyCard = (props: EntityPagerDutyCardProps) => {\n const { readOnly, disableChangeEvents, disableOnCall } = props;\n const { entity } = useEntity();\n\n if (isPluginApplicableToEntity(entity)) {\n const pagerDutyEntity = getPagerDutyEntity(entity);\n\n return (\n <PagerDutyCard\n {...pagerDutyEntity}\n readOnly={readOnly}\n disableChangeEvents={disableChangeEvents}\n disableOnCall={disableOnCall}\n />\n );\n }\n\n return null;\n};\n"],"names":[],"mappings":";;;;;;AAuBO,MAAM,0BAAA,GAA6B,CAAC,MAAA,KACzC,OAAA;AAAA,EACE,MAAA,CAAO,SAAS,WAAA,GAAc,yBAAyB,KACrD,MAAA,CAAO,QAAA,CAAS,cAAc,oBAAoB;AACtD;AAUK,MAAM,mBAAA,GAAsB,CAAC,KAAA,KAAoC;AACtE,EAAA,MAAM,EAAE,QAAA,EAAU,mBAAA,EAAqB,aAAA,EAAc,GAAI,KAAA;AACzD,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAE7B,EAAA,IAAI,0BAAA,CAA2B,MAAM,CAAA,EAAG;AACtC,IAAA,MAAM,eAAA,GAAkB,mBAAmB,MAAM,CAAA;AAEjD,IAAA,uBACE,GAAA;AAAA,MAAC,aAAA;AAAA,MAAA;AAAA,QACE,GAAG,eAAA;AAAA,QACJ,QAAA;AAAA,QACA,mBAAA;AAAA,QACA;AAAA;AAAA,KACF;AAAA,EAEJ;AAEA,EAAA,OAAO,IAAA;AACT;;;;"}
@@ -0,0 +1,29 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { PAGERDUTY_INTEGRATION_KEY, PAGERDUTY_SERVICE_ID } from '../constants.esm.js';
3
+ import { useEntity } from '@backstage/plugin-catalog-react';
4
+ import { getPagerDutyEntity } from '../pagerDutyEntity.esm.js';
5
+ import { PagerDutySmallCard } from '../PagerDutySmallCard/index.esm.js';
6
+
7
+ const isPluginApplicableToEntity = (entity) => Boolean(
8
+ entity.metadata.annotations?.[PAGERDUTY_INTEGRATION_KEY] || entity.metadata.annotations?.[PAGERDUTY_SERVICE_ID]
9
+ );
10
+ const EntityPagerDutySmallCard = (props) => {
11
+ const { readOnly, disableInsights, disableOnCall } = props;
12
+ const { entity } = useEntity();
13
+ if (isPluginApplicableToEntity(entity)) {
14
+ const pagerDutyEntity = getPagerDutyEntity(entity);
15
+ return /* @__PURE__ */ jsx(
16
+ PagerDutySmallCard,
17
+ {
18
+ ...pagerDutyEntity,
19
+ readOnly,
20
+ disableInsights,
21
+ disableOnCall
22
+ }
23
+ );
24
+ }
25
+ return null;
26
+ };
27
+
28
+ export { EntityPagerDutySmallCard, isPluginApplicableToEntity };
29
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../../src/components/EntityPagerDutySmallCard/index.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity } from '@backstage/catalog-model';\nimport { PAGERDUTY_INTEGRATION_KEY, PAGERDUTY_SERVICE_ID } from '../constants';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { getPagerDutyEntity } from '../pagerDutyEntity';\nimport { PagerDutySmallCard } from '../PagerDutySmallCard';\n\n/** @public */\nexport const isPluginApplicableToEntity = (entity: Entity) =>\n Boolean(\n entity.metadata.annotations?.[PAGERDUTY_INTEGRATION_KEY] ||\n entity.metadata.annotations?.[PAGERDUTY_SERVICE_ID],\n );\n\n/** @public */\nexport type EntityPagerDutySmallCardProps = {\n readOnly?: boolean;\n disableInsights?: boolean;\n disableOnCall?: boolean;\n};\n\n/** @public */\nexport const EntityPagerDutySmallCard = (\n props: EntityPagerDutySmallCardProps,\n) => {\n const { readOnly, disableInsights, disableOnCall } = props;\n const { entity } = useEntity();\n\n if (isPluginApplicableToEntity(entity)) {\n const pagerDutyEntity = getPagerDutyEntity(entity);\n\n return (\n <PagerDutySmallCard\n {...pagerDutyEntity}\n readOnly={readOnly}\n disableInsights={disableInsights}\n disableOnCall={disableOnCall}\n />\n );\n }\n\n return null;\n};\n"],"names":[],"mappings":";;;;;;AAuBO,MAAM,0BAAA,GAA6B,CAAC,MAAA,KACzC,OAAA;AAAA,EACE,MAAA,CAAO,SAAS,WAAA,GAAc,yBAAyB,KACrD,MAAA,CAAO,QAAA,CAAS,cAAc,oBAAoB;AACtD;AAUK,MAAM,wBAAA,GAA2B,CACtC,KAAA,KACG;AACH,EAAA,MAAM,EAAE,QAAA,EAAU,eAAA,EAAiB,aAAA,EAAc,GAAI,KAAA;AACrD,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAE7B,EAAA,IAAI,0BAAA,CAA2B,MAAM,CAAA,EAAG;AACtC,IAAA,MAAM,eAAA,GAAkB,mBAAmB,MAAM,CAAA;AAEjD,IAAA,uBACE,GAAA;AAAA,MAAC,kBAAA;AAAA,MAAA;AAAA,QACE,GAAG,eAAA;AAAA,QACJ,QAAA;AAAA,QACA,eAAA;AAAA,QACA;AAAA;AAAA,KACF;AAAA,EAEJ;AAEA,EAAA,OAAO,IAAA;AACT;;;;"}
@@ -0,0 +1,24 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { Button } from '@material-ui/core';
3
+ import { EmptyState } from '@backstage/core-components';
4
+
5
+ const ForbiddenError = () => /* @__PURE__ */ jsx(
6
+ EmptyState,
7
+ {
8
+ missing: "info",
9
+ title: "Unauthorized",
10
+ description: "You don't have the required permissions to perform this action. See README for more details.",
11
+ action: /* @__PURE__ */ jsx(
12
+ Button,
13
+ {
14
+ color: "primary",
15
+ variant: "contained",
16
+ href: "https://pagerduty.github.io/backstage-plugin-docs/getting-started/pagerduty/",
17
+ children: "Read More"
18
+ }
19
+ )
20
+ }
21
+ );
22
+
23
+ export { ForbiddenError };
24
+ //# sourceMappingURL=ForbiddenError.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ForbiddenError.esm.js","sources":["../../../src/components/Errors/ForbiddenError.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 { 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"],"names":[],"mappings":";;;;AAmBO,MAAM,iBAAiB,sBAC5B,GAAA;AAAA,EAAC,UAAA;AAAA,EAAA;AAAA,IACC,OAAA,EAAQ,MAAA;AAAA,IACR,KAAA,EAAM,cAAA;AAAA,IACN,WAAA,EAAY,8FAAA;AAAA,IACZ,MAAA,kBACE,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,KAAA,EAAM,SAAA;AAAA,QACN,OAAA,EAAQ,WAAA;AAAA,QACR,IAAA,EAAK,8EAAA;AAAA,QACN,QAAA,EAAA;AAAA;AAAA;AAED;AAEJ;;;;"}
@@ -0,0 +1,24 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { Button } from '@material-ui/core';
3
+ import { EmptyState } from '@backstage/core-components';
4
+
5
+ const MissingTokenError = () => /* @__PURE__ */ jsx(
6
+ EmptyState,
7
+ {
8
+ missing: "info",
9
+ title: "Missing or invalid PagerDuty Token",
10
+ description: "The request to fetch data needs a valid token. See README for more details.",
11
+ action: /* @__PURE__ */ jsx(
12
+ Button,
13
+ {
14
+ color: "primary",
15
+ variant: "contained",
16
+ href: "https://pagerduty.github.io/backstage-plugin-docs/getting-started/pagerduty/",
17
+ children: "Read More"
18
+ }
19
+ )
20
+ }
21
+ );
22
+
23
+ export { MissingTokenError };
24
+ //# sourceMappingURL=MissingTokenError.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MissingTokenError.esm.js","sources":["../../../src/components/Errors/MissingTokenError.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 { 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"],"names":[],"mappings":";;;;AAmBO,MAAM,oBAAoB,sBAC/B,GAAA;AAAA,EAAC,UAAA;AAAA,EAAA;AAAA,IACC,OAAA,EAAQ,MAAA;AAAA,IACR,KAAA,EAAM,oCAAA;AAAA,IACN,WAAA,EAAY,6EAAA;AAAA,IACZ,MAAA,kBACE,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,KAAA,EAAM,SAAA;AAAA,QACN,OAAA,EAAQ,WAAA;AAAA,QACR,IAAA,EAAK,8EAAA;AAAA,QACN,QAAA,EAAA;AAAA;AAAA;AAED;AAEJ;;;;"}
@@ -0,0 +1,24 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { Button } from '@material-ui/core';
3
+ import { EmptyState } from '@backstage/core-components';
4
+
5
+ const ServiceNotFoundError = () => /* @__PURE__ */ jsx(
6
+ EmptyState,
7
+ {
8
+ missing: "data",
9
+ title: "PagerDuty Service Not Found",
10
+ description: "A service could not be found within PagerDuty based on the provided service id. Please verify your configuration.",
11
+ action: /* @__PURE__ */ jsx(
12
+ Button,
13
+ {
14
+ color: "primary",
15
+ variant: "contained",
16
+ href: "https://pagerduty.github.io/backstage-plugin-docs/getting-started/pagerduty/",
17
+ children: "Read More"
18
+ }
19
+ )
20
+ }
21
+ );
22
+
23
+ export { ServiceNotFoundError };
24
+ //# sourceMappingURL=ServiceNotFoundError.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServiceNotFoundError.esm.js","sources":["../../../src/components/Errors/ServiceNotFoundError.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 { 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"],"names":[],"mappings":";;;;AAmBO,MAAM,uBAAuB,sBAClC,GAAA;AAAA,EAAC,UAAA;AAAA,EAAA;AAAA,IACC,OAAA,EAAQ,MAAA;AAAA,IACR,KAAA,EAAM,6BAAA;AAAA,IACN,WAAA,EAAY,mHAAA;AAAA,IACZ,MAAA,kBACE,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,KAAA,EAAM,SAAA;AAAA,QACN,OAAA,EAAQ,WAAA;AAAA,QACR,IAAA,EAAK,8EAAA;AAAA,QACN,QAAA,EAAA;AAAA;AAAA;AAED;AAEJ;;;;"}
@@ -0,0 +1,53 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { List, ListSubheader } from '@material-ui/core';
3
+ import { EscalationUsersEmptyState } from './EscalationUsersEmptyState.esm.js';
4
+ import { EscalationUsersForbiddenState } from './EscalationUsersForbiddenState.esm.js';
5
+ import { EscalationUser } from './EscalationUser.esm.js';
6
+ import useAsync from 'react-use/lib/useAsync';
7
+ import { pagerDutyApiRef } from '../../api/client.esm.js';
8
+ import { Alert } from '@material-ui/lab';
9
+ import { useApi } from '@backstage/core-plugin-api';
10
+ import { Progress } from '@backstage/core-components';
11
+
12
+ const EscalationPolicy = ({
13
+ policyId,
14
+ policyUrl,
15
+ policyName,
16
+ account
17
+ }) => {
18
+ const api = useApi(pagerDutyApiRef);
19
+ const {
20
+ value: users,
21
+ loading,
22
+ error
23
+ } = useAsync(async () => {
24
+ return await api.getOnCallByPolicyId(policyId, account);
25
+ });
26
+ if (error) {
27
+ if (error.message.includes("Forbidden")) {
28
+ return /* @__PURE__ */ jsx(List, { dense: true, subheader: /* @__PURE__ */ jsx(ListSubheader, { children: "ON CALL" }), children: /* @__PURE__ */ jsx(EscalationUsersForbiddenState, {}) });
29
+ }
30
+ return /* @__PURE__ */ jsxs(Alert, { severity: "error", children: [
31
+ "Error encountered while fetching information. ",
32
+ error.message
33
+ ] });
34
+ }
35
+ if (loading) {
36
+ return /* @__PURE__ */ jsx(Progress, { "data-testid": "escalation-progress" });
37
+ }
38
+ if (!users?.length) {
39
+ return /* @__PURE__ */ jsx(EscalationUsersEmptyState, {});
40
+ }
41
+ return /* @__PURE__ */ jsx(List, { dense: true, children: users.map((user, index) => /* @__PURE__ */ jsx(
42
+ EscalationUser,
43
+ {
44
+ user,
45
+ policyUrl,
46
+ policyName
47
+ },
48
+ index
49
+ )) });
50
+ };
51
+
52
+ export { EscalationPolicy };
53
+ //# sourceMappingURL=EscalationPolicy.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EscalationPolicy.esm.js","sources":["../../../src/components/Escalation/EscalationPolicy.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { List, ListSubheader } from '@material-ui/core';\nimport { EscalationUsersEmptyState } from './EscalationUsersEmptyState';\nimport { EscalationUsersForbiddenState } from './EscalationUsersForbiddenState';\nimport { EscalationUser } from './EscalationUser';\nimport useAsync from 'react-use/lib/useAsync';\nimport { pagerDutyApiRef } from '../../api';\nimport { Alert } from '@material-ui/lab';\n\nimport { useApi } from '@backstage/core-plugin-api';\nimport { Progress } from '@backstage/core-components';\n\ntype Props = {\n policyId: string;\n policyUrl: string;\n policyName: string;\n account?: string;\n};\n\nexport const EscalationPolicy = ({\n policyId,\n policyUrl,\n policyName,\n account,\n}: Props) => {\n const api = useApi(pagerDutyApiRef);\n\n const {\n value: users,\n loading,\n error,\n } = useAsync(async () => {\n return await api.getOnCallByPolicyId(policyId, account);\n });\n\n if (error) {\n if (error.message.includes('Forbidden')) {\n return (\n <List dense subheader={<ListSubheader>ON CALL</ListSubheader>}>\n <EscalationUsersForbiddenState />\n </List>\n );\n }\n\n return (\n <Alert severity=\"error\">\n Error encountered while fetching information. {error.message}\n </Alert>\n );\n }\n\n if (loading) {\n return <Progress data-testid=\"escalation-progress\" />;\n }\n\n if (!users?.length) {\n return <EscalationUsersEmptyState />;\n }\n\n return (\n <List dense>\n {users!.map((user, index) => (\n <EscalationUser\n key={index}\n user={user}\n policyUrl={policyUrl}\n policyName={policyName}\n />\n ))}\n </List>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAiCO,MAAM,mBAAmB,CAAC;AAAA,EAC/B,QAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAA,KAAa;AACX,EAAA,MAAM,GAAA,GAAM,OAAO,eAAe,CAAA;AAElC,EAAA,MAAM;AAAA,IACJ,KAAA,EAAO,KAAA;AAAA,IACP,OAAA;AAAA,IACA;AAAA,GACF,GAAI,SAAS,YAAY;AACvB,IAAA,OAAO,MAAM,GAAA,CAAI,mBAAA,CAAoB,QAAA,EAAU,OAAO,CAAA;AAAA,EACxD,CAAC,CAAA;AAED,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,IAAI,KAAA,CAAM,OAAA,CAAQ,QAAA,CAAS,WAAW,CAAA,EAAG;AACvC,MAAA,uBACE,GAAA,CAAC,IAAA,EAAA,EAAK,KAAA,EAAK,IAAA,EAAC,SAAA,kBAAW,GAAA,CAAC,aAAA,EAAA,EAAc,QAAA,EAAA,SAAA,EAAO,CAAA,EAC3C,QAAA,kBAAA,GAAA,CAAC,6BAAA,EAAA,EAA8B,CAAA,EACjC,CAAA;AAAA,IAEJ;AAEA,IAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAM,QAAA,EAAS,OAAA,EAAQ,QAAA,EAAA;AAAA,MAAA,gDAAA;AAAA,MACyB,KAAA,CAAM;AAAA,KAAA,EACvD,CAAA;AAAA,EAEJ;AAEA,EAAA,IAAI,OAAA,EAAS;AACX,IAAA,uBAAO,GAAA,CAAC,QAAA,EAAA,EAAS,aAAA,EAAY,qBAAA,EAAsB,CAAA;AAAA,EACrD;AAEA,EAAA,IAAI,CAAC,OAAO,MAAA,EAAQ;AAClB,IAAA,2BAAQ,yBAAA,EAAA,EAA0B,CAAA;AAAA,EACpC;AAEA,EAAA,uBACE,GAAA,CAAC,QAAK,KAAA,EAAK,IAAA,EACR,gBAAO,GAAA,CAAI,CAAC,MAAM,KAAA,qBACjB,GAAA;AAAA,IAAC,cAAA;AAAA,IAAA;AAAA,MAEC,IAAA;AAAA,MACA,SAAA;AAAA,MACA;AAAA,KAAA;AAAA,IAHK;AAAA,GAKR,CAAA,EACH,CAAA;AAEJ;;;;"}
@@ -0,0 +1,97 @@
1
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
+ import { makeStyles, ListItem, ListItemIcon, ListItemText, Typography, Tooltip } from '@material-ui/core';
3
+ import NotificationsIcon from '@material-ui/icons/Notifications';
4
+ import { Avatar, Button } from '@backstage/ui';
5
+
6
+ const useStyles = makeStyles(() => ({
7
+ listItemPrimary: {
8
+ fontWeight: "bold"
9
+ },
10
+ listItemSecondary: {
11
+ fontWeight: "normal",
12
+ textDecoration: "underline",
13
+ marginTop: "-5px",
14
+ paddingLeft: "5px"
15
+ },
16
+ buttonStyle: {
17
+ fontSize: "15px",
18
+ "&:hover": {
19
+ textDecoration: "underline"
20
+ }
21
+ },
22
+ userTextButtonStyle: {
23
+ fontSize: "15px",
24
+ "&:hover": {
25
+ backgroundColor: "transparent",
26
+ textDecoration: "underline"
27
+ }
28
+ },
29
+ containerStyle: {
30
+ display: "flex",
31
+ alignItems: "center",
32
+ fontWeight: "bold"
33
+ },
34
+ iconStyle: {
35
+ fontSize: "25px",
36
+ marginLeft: "-4px"
37
+ },
38
+ avatarStyle: {
39
+ marginTop: "-30px"
40
+ }
41
+ }));
42
+ function navigateToUrl(url) {
43
+ window.open(url, "_blank");
44
+ }
45
+ const EscalationUser = ({ user, policyUrl, policyName }) => {
46
+ const classes = useStyles();
47
+ return /* @__PURE__ */ jsxs(ListItem, { children: [
48
+ /* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(
49
+ Avatar,
50
+ {
51
+ name: user.name,
52
+ src: user.avatar_url,
53
+ className: classes.avatarStyle
54
+ }
55
+ ) }),
56
+ /* @__PURE__ */ jsx(
57
+ ListItemText,
58
+ {
59
+ primary: /* @__PURE__ */ jsxs(Fragment, { children: [
60
+ /* @__PURE__ */ jsx(Tooltip, { title: "Open user in PagerDuty", placement: "top", children: /* @__PURE__ */ jsx(
61
+ Button,
62
+ {
63
+ variant: "tertiary",
64
+ "aria-label": "open-user-in-browser",
65
+ onClick: () => navigateToUrl(user.html_url),
66
+ className: classes.userTextButtonStyle,
67
+ children: /* @__PURE__ */ jsx(Typography, { className: classes.containerStyle, children: user.name })
68
+ }
69
+ ) }),
70
+ /* @__PURE__ */ jsx(
71
+ Typography,
72
+ {
73
+ className: classes.listItemSecondary,
74
+ color: "textSecondary",
75
+ children: user.email
76
+ }
77
+ )
78
+ ] }),
79
+ secondary: /* @__PURE__ */ jsx(
80
+ Button,
81
+ {
82
+ "aria-label": "open-escalation-policy-in-browser",
83
+ onClick: () => navigateToUrl(policyUrl),
84
+ variant: "tertiary",
85
+ size: "small",
86
+ className: classes.buttonStyle,
87
+ iconStart: /* @__PURE__ */ jsx(NotificationsIcon, { className: classes.iconStyle }),
88
+ children: /* @__PURE__ */ jsx(Typography, { className: classes.containerStyle, children: policyName })
89
+ }
90
+ )
91
+ }
92
+ )
93
+ ] });
94
+ };
95
+
96
+ export { EscalationUser };
97
+ //# sourceMappingURL=EscalationUser.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EscalationUser.esm.js","sources":["../../../src/components/Escalation/EscalationUser.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport {\n ListItem,\n ListItemIcon,\n Tooltip,\n ListItemText,\n makeStyles,\n Typography,\n} from '@material-ui/core';\nimport { PagerDutyUser } from '@pagerduty/backstage-plugin-common';\nimport NotificationsIcon from '@material-ui/icons/Notifications';\nimport { BackstageTheme } from '@backstage/theme';\nimport { Avatar, Button } from '@backstage/ui';\n\nconst useStyles = makeStyles<BackstageTheme>(() => ({\n listItemPrimary: {\n fontWeight: 'bold',\n },\n listItemSecondary: {\n fontWeight: 'normal',\n textDecoration: 'underline',\n marginTop: '-5px',\n paddingLeft: '5px',\n },\n buttonStyle: {\n fontSize: '15px',\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n userTextButtonStyle: {\n fontSize: '15px',\n '&:hover': {\n backgroundColor: 'transparent',\n textDecoration: 'underline',\n },\n },\n containerStyle: {\n display: 'flex',\n alignItems: 'center',\n fontWeight: 'bold',\n },\n iconStyle: {\n fontSize: '25px',\n marginLeft: '-4px',\n },\n avatarStyle: {\n marginTop: '-30px',\n },\n}));\n\ntype Props = {\n user: PagerDutyUser;\n policyUrl: string;\n policyName: string;\n};\n\nfunction navigateToUrl(url: string) {\n // open url in new browser window\n window.open(url, '_blank');\n}\n\nexport const EscalationUser = ({ user, policyUrl, policyName }: Props) => {\n const classes = useStyles();\n\n return (\n <ListItem>\n <ListItemIcon>\n <Avatar\n name={user.name}\n src={user.avatar_url}\n className={classes.avatarStyle}\n />\n </ListItemIcon>\n <ListItemText\n primary={\n <>\n <Tooltip title=\"Open user in PagerDuty\" placement=\"top\">\n <Button\n variant=\"tertiary\"\n aria-label=\"open-user-in-browser\"\n onClick={() => navigateToUrl(user.html_url)}\n className={classes.userTextButtonStyle}\n >\n <Typography className={classes.containerStyle}>\n {user.name}\n </Typography>\n </Button>\n </Tooltip>\n\n <Typography\n className={classes.listItemSecondary}\n color=\"textSecondary\"\n >\n {user.email}\n </Typography>\n </>\n }\n secondary={\n <Button\n aria-label=\"open-escalation-policy-in-browser\"\n onClick={() => navigateToUrl(policyUrl)}\n variant=\"tertiary\"\n size=\"small\"\n className={classes.buttonStyle}\n iconStart={<NotificationsIcon className={classes.iconStyle} />}\n >\n <Typography className={classes.containerStyle}>\n {policyName}\n </Typography>\n </Button>\n }\n />\n </ListItem>\n );\n};\n"],"names":[],"mappings":"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"}
@@ -0,0 +1,23 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { makeStyles, ListItem, ListItemIcon, ListItemText } from '@material-ui/core';
3
+ import { StatusWarning } from '@backstage/core-components';
4
+
5
+ const useStyles = makeStyles({
6
+ denseListIcon: {
7
+ marginRight: 0,
8
+ display: "flex",
9
+ flexDirection: "column",
10
+ alignItems: "center",
11
+ justifyContent: "center"
12
+ }
13
+ });
14
+ const EscalationUsersEmptyState = () => {
15
+ const classes = useStyles();
16
+ return /* @__PURE__ */ jsxs(ListItem, { children: [
17
+ /* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx("div", { className: classes.denseListIcon, children: /* @__PURE__ */ jsx(StatusWarning, {}) }) }),
18
+ /* @__PURE__ */ jsx(ListItemText, { primary: "No one is on-call. Update the escalation policy." })
19
+ ] });
20
+ };
21
+
22
+ export { EscalationUsersEmptyState };
23
+ //# sourceMappingURL=EscalationUsersEmptyState.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EscalationUsersEmptyState.esm.js","sources":["../../../src/components/Escalation/EscalationUsersEmptyState.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport {\n ListItem,\n ListItemIcon,\n ListItemText,\n makeStyles,\n} from '@material-ui/core';\nimport { StatusWarning } from '@backstage/core-components';\n\nconst useStyles = makeStyles({\n denseListIcon: {\n marginRight: 0,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n\nexport const EscalationUsersEmptyState = () => {\n const classes = useStyles();\n return (\n <ListItem>\n <ListItemIcon>\n <div className={classes.denseListIcon}>\n <StatusWarning />\n </div>\n </ListItemIcon>\n <ListItemText primary=\"No one is on-call. Update the escalation policy.\" />\n </ListItem>\n );\n};\n"],"names":[],"mappings":";;;;AAwBA,MAAM,YAAY,UAAA,CAAW;AAAA,EAC3B,aAAA,EAAe;AAAA,IACb,WAAA,EAAa,CAAA;AAAA,IACb,OAAA,EAAS,MAAA;AAAA,IACT,aAAA,EAAe,QAAA;AAAA,IACf,UAAA,EAAY,QAAA;AAAA,IACZ,cAAA,EAAgB;AAAA;AAEpB,CAAC,CAAA;AAEM,MAAM,4BAA4B,MAAM;AAC7C,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,4BACG,QAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,YAAA,EAAA,EACC,8BAAC,KAAA,EAAA,EAAI,SAAA,EAAW,QAAQ,aAAA,EACtB,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,CAAA,EACjB,CAAA,EACF,CAAA;AAAA,oBACA,GAAA,CAAC,YAAA,EAAA,EAAa,OAAA,EAAQ,kDAAA,EAAmD;AAAA,GAAA,EAC3E,CAAA;AAEJ;;;;"}
@@ -0,0 +1,23 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { makeStyles, ListItem, ListItemIcon, ListItemText } from '@material-ui/core';
3
+ import { StatusError } from '@backstage/core-components';
4
+
5
+ const useStyles = makeStyles({
6
+ denseListIcon: {
7
+ marginRight: 0,
8
+ display: "flex",
9
+ flexDirection: "column",
10
+ alignItems: "center",
11
+ justifyContent: "center"
12
+ }
13
+ });
14
+ const EscalationUsersForbiddenState = () => {
15
+ const classes = useStyles();
16
+ return /* @__PURE__ */ jsxs(ListItem, { children: [
17
+ /* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx("div", { className: classes.denseListIcon, children: /* @__PURE__ */ jsx(StatusError, {}) }) }),
18
+ /* @__PURE__ */ jsx(ListItemText, { primary: "You don't permissions to list on-calls. Check your OAuth token permissions." })
19
+ ] });
20
+ };
21
+
22
+ export { EscalationUsersForbiddenState };
23
+ //# sourceMappingURL=EscalationUsersForbiddenState.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EscalationUsersForbiddenState.esm.js","sources":["../../../src/components/Escalation/EscalationUsersForbiddenState.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport {\n ListItem,\n ListItemIcon,\n ListItemText,\n makeStyles,\n} from '@material-ui/core';\nimport { StatusError } from '@backstage/core-components';\n\nconst useStyles = makeStyles({\n denseListIcon: {\n marginRight: 0,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n\nexport const EscalationUsersForbiddenState = () => {\n const classes = useStyles();\n return (\n <ListItem>\n <ListItemIcon>\n <div className={classes.denseListIcon}>\n <StatusError />\n </div>\n </ListItemIcon>\n <ListItemText primary=\"You don't permissions to list on-calls. Check your OAuth token permissions.\" />\n </ListItem>\n );\n};\n"],"names":[],"mappings":";;;;AAwBA,MAAM,YAAY,UAAA,CAAW;AAAA,EAC3B,aAAA,EAAe;AAAA,IACb,WAAA,EAAa,CAAA;AAAA,IACb,OAAA,EAAS,MAAA;AAAA,IACT,aAAA,EAAe,QAAA;AAAA,IACf,UAAA,EAAY,QAAA;AAAA,IACZ,cAAA,EAAgB;AAAA;AAEpB,CAAC,CAAA;AAEM,MAAM,gCAAgC,MAAM;AACjD,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,4BACG,QAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,YAAA,EAAA,EACC,8BAAC,KAAA,EAAA,EAAI,SAAA,EAAW,QAAQ,aAAA,EACtB,QAAA,kBAAA,GAAA,CAAC,WAAA,EAAA,EAAY,CAAA,EACf,CAAA,EACF,CAAA;AAAA,oBACA,GAAA,CAAC,YAAA,EAAA,EAAa,OAAA,EAAQ,6EAAA,EAA8E;AAAA,GAAA,EACtG,CAAA;AAEJ;;;;"}
@@ -0,0 +1,9 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { PagerDutyCard } from '../PagerDutyCard/index.esm.js';
3
+
4
+ const Content = (props) => {
5
+ return /* @__PURE__ */ jsx(PagerDutyCard, { ...props });
6
+ };
7
+
8
+ export { Content };
9
+ //# sourceMappingURL=Content.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Content.esm.js","sources":["../../../src/components/HomePagePagerDutyCard/Content.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport { PagerDutyEntity } from '../../types';\nimport { PagerDutyCard } from '../PagerDutyCard';\n\n/** @public */\nexport type HomePagePagerDutyCardProps = PagerDutyEntity & {\n readOnly?: boolean;\n};\n\n/** @public */\nexport const Content = (props: HomePagePagerDutyCardProps) => {\n return <PagerDutyCard {...props} />;\n};\n"],"names":[],"mappings":";;;AAyBO,MAAM,OAAA,GAAU,CAAC,KAAA,KAAsC;AAC5D,EAAA,uBAAO,GAAA,CAAC,aAAA,EAAA,EAAe,GAAG,KAAA,EAAO,CAAA;AACnC;;;;"}
@@ -0,0 +1,2 @@
1
+ export { Content } from './Content.esm.js';
2
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import PDIcon from '../../assets/PD-Icon.svg';
3
+
4
+ function PagerDutyIcon() {
5
+ return /* @__PURE__ */ jsx("img", { src: PDIcon, alt: "PagerDuty", height: "20px" });
6
+ }
7
+
8
+ export { PagerDutyIcon };
9
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../../src/components/Icons/index.tsx"],"sourcesContent":["import PDIcon from '../../assets/PD-Icon.svg';\n\n/** @public */\nexport function PagerDutyIcon() {\n return <img src={PDIcon} alt=\"PagerDuty\" height=\"20px\" />;\n}\n"],"names":[],"mappings":";;;AAGO,SAAS,aAAA,GAAgB;AAC9B,EAAA,2BAAQ,KAAA,EAAA,EAAI,GAAA,EAAK,QAAQ,GAAA,EAAI,WAAA,EAAY,QAAO,MAAA,EAAO,CAAA;AACzD;;;;"}
@@ -0,0 +1,29 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { Grid, Typography } from '@material-ui/core';
3
+ import EmptyStateImage from '../../assets/emptystate.svg';
4
+
5
+ const IncidentsEmptyState = () => {
6
+ return /* @__PURE__ */ jsxs(
7
+ Grid,
8
+ {
9
+ container: true,
10
+ justifyContent: "center",
11
+ direction: "column",
12
+ alignItems: "center",
13
+ children: [
14
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(Typography, { variant: "h5", children: "Nice! No incidents found!" }) }),
15
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(
16
+ "img",
17
+ {
18
+ src: EmptyStateImage,
19
+ alt: "EmptyState",
20
+ "data-testid": "emptyStateImg"
21
+ }
22
+ ) })
23
+ ]
24
+ }
25
+ );
26
+ };
27
+
28
+ export { IncidentsEmptyState };
29
+ //# sourceMappingURL=IncidentEmptyState.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IncidentEmptyState.esm.js","sources":["../../../src/components/Incident/IncidentEmptyState.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport { Grid, Typography } from '@material-ui/core';\nimport EmptyStateImage from '../../assets/emptystate.svg';\n\nexport const IncidentsEmptyState = () => {\n return (\n <Grid\n container\n justifyContent=\"center\"\n direction=\"column\"\n alignItems=\"center\"\n >\n <Grid item xs={12}>\n <Typography variant=\"h5\">Nice! No incidents found!</Typography>\n </Grid>\n <Grid item xs={12}>\n <img\n src={EmptyStateImage}\n alt=\"EmptyState\"\n data-testid=\"emptyStateImg\"\n />\n </Grid>\n </Grid>\n );\n};\n"],"names":[],"mappings":";;;;AAmBO,MAAM,sBAAsB,MAAM;AACvC,EAAA,uBACE,IAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAS,IAAA;AAAA,MACT,cAAA,EAAe,QAAA;AAAA,MACf,SAAA,EAAU,QAAA;AAAA,MACV,UAAA,EAAW,QAAA;AAAA,MAEX,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EAAC,EAAA,EAAI,EAAA,EACb,8BAAC,UAAA,EAAA,EAAW,OAAA,EAAQ,IAAA,EAAK,QAAA,EAAA,2BAAA,EAAyB,CAAA,EACpD,CAAA;AAAA,wBACA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EAAC,IAAI,EAAA,EACb,QAAA,kBAAA,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,GAAA,EAAK,eAAA;AAAA,YACL,GAAA,EAAI,YAAA;AAAA,YACJ,aAAA,EAAY;AAAA;AAAA,SACd,EACF;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
@@ -0,0 +1,29 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { Grid, Typography } from '@material-ui/core';
3
+ import ForbiddenStateImage from '../../assets/forbiddenstate.svg';
4
+
5
+ const IncidentForbiddenState = () => {
6
+ return /* @__PURE__ */ jsxs(
7
+ Grid,
8
+ {
9
+ container: true,
10
+ justifyContent: "center",
11
+ direction: "column",
12
+ alignItems: "center",
13
+ children: [
14
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(Typography, { variant: "h5", children: "Feature not available with your account or token." }) }),
15
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(
16
+ "img",
17
+ {
18
+ src: ForbiddenStateImage,
19
+ alt: "ForbiddenState",
20
+ "data-testid": "forbiddenStateImg"
21
+ }
22
+ ) })
23
+ ]
24
+ }
25
+ );
26
+ };
27
+
28
+ export { IncidentForbiddenState };
29
+ //# sourceMappingURL=IncidentForbiddenState.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IncidentForbiddenState.esm.js","sources":["../../../src/components/Incident/IncidentForbiddenState.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line @backstage/no-undeclared-imports\nimport { Grid, Typography } from '@material-ui/core';\nimport ForbiddenStateImage from '../../assets/forbiddenstate.svg';\n\nexport const IncidentForbiddenState = () => {\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\">\n Feature not available with your account or token.\n </Typography>\n </Grid>\n <Grid item xs={12}>\n <img\n src={ForbiddenStateImage}\n alt=\"ForbiddenState\"\n data-testid=\"forbiddenStateImg\"\n />\n </Grid>\n </Grid>\n );\n};\n"],"names":[],"mappings":";;;;AAoBO,MAAM,yBAAyB,MAAM;AAC1C,EAAA,uBACE,IAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAS,IAAA;AAAA,MACT,cAAA,EAAe,QAAA;AAAA,MACf,SAAA,EAAU,QAAA;AAAA,MACV,UAAA,EAAW,QAAA;AAAA,MAEX,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EAAC,EAAA,EAAI,EAAA,EACb,8BAAC,UAAA,EAAA,EAAW,OAAA,EAAQ,IAAA,EAAK,QAAA,EAAA,mDAAA,EAEzB,CAAA,EACF,CAAA;AAAA,wBACA,GAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EAAC,IAAI,EAAA,EACb,QAAA,kBAAA,GAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,GAAA,EAAK,mBAAA;AAAA,YACL,GAAA,EAAI,gBAAA;AAAA,YACJ,aAAA,EAAY;AAAA;AAAA,SACd,EACF;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}