@backstage-community/plugin-ilert 0.7.1 → 0.9.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 (95) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/ILertIcon.esm.js +63 -56
  3. package/dist/ILertIcon.esm.js.map +1 -1
  4. package/dist/components/Alert/AlertActionsMenu.esm.js +49 -42
  5. package/dist/components/Alert/AlertActionsMenu.esm.js.map +1 -1
  6. package/dist/components/Alert/AlertAssignModal.esm.js +68 -60
  7. package/dist/components/Alert/AlertAssignModal.esm.js.map +1 -1
  8. package/dist/components/Alert/AlertLink.esm.js +5 -2
  9. package/dist/components/Alert/AlertLink.esm.js.map +1 -1
  10. package/dist/components/Alert/AlertNewModal.esm.js +109 -87
  11. package/dist/components/Alert/AlertNewModal.esm.js.map +1 -1
  12. package/dist/components/AlertSource/AlertSourceLink.esm.js +19 -16
  13. package/dist/components/AlertSource/AlertSourceLink.esm.js.map +1 -1
  14. package/dist/components/AlertsPage/AlertsPage.esm.js +44 -36
  15. package/dist/components/AlertsPage/AlertsPage.esm.js.map +1 -1
  16. package/dist/components/AlertsPage/AlertsTable.esm.js +15 -15
  17. package/dist/components/AlertsPage/AlertsTable.esm.js.map +1 -1
  18. package/dist/components/AlertsPage/StatusChip.esm.js +5 -5
  19. package/dist/components/AlertsPage/StatusChip.esm.js.map +1 -1
  20. package/dist/components/AlertsPage/TableTitle.esm.js +30 -24
  21. package/dist/components/AlertsPage/TableTitle.esm.js.map +1 -1
  22. package/dist/components/Errors/MissingAuthorizationHeaderError.esm.js +6 -6
  23. package/dist/components/Errors/MissingAuthorizationHeaderError.esm.js.map +1 -1
  24. package/dist/components/ILertCard/ILertCard.esm.js +63 -51
  25. package/dist/components/ILertCard/ILertCard.esm.js.map +1 -1
  26. package/dist/components/ILertCard/ILertCardActionsHeader.esm.js +42 -33
  27. package/dist/components/ILertCard/ILertCardActionsHeader.esm.js.map +1 -1
  28. package/dist/components/ILertCard/ILertCardEmptyState.esm.js +28 -20
  29. package/dist/components/ILertCard/ILertCardEmptyState.esm.js.map +1 -1
  30. package/dist/components/ILertCard/ILertCardHeaderStatus.esm.js +3 -3
  31. package/dist/components/ILertCard/ILertCardHeaderStatus.esm.js.map +1 -1
  32. package/dist/components/ILertCard/ILertCardMaintenanceModal.esm.js +36 -27
  33. package/dist/components/ILertCard/ILertCardMaintenanceModal.esm.js.map +1 -1
  34. package/dist/components/ILertCard/ILertCardOnCall.esm.js +34 -28
  35. package/dist/components/ILertCard/ILertCardOnCall.esm.js.map +1 -1
  36. package/dist/components/ILertCard/ILertCardOnCallEmptyState.esm.js +6 -6
  37. package/dist/components/ILertCard/ILertCardOnCallEmptyState.esm.js.map +1 -1
  38. package/dist/components/ILertCard/ILertCardOnCallItem.esm.js +41 -31
  39. package/dist/components/ILertCard/ILertCardOnCallItem.esm.js.map +1 -1
  40. package/dist/components/ILertPage/ILertPage.esm.js +25 -17
  41. package/dist/components/ILertPage/ILertPage.esm.js.map +1 -1
  42. package/dist/components/OnCallSchedulesPage/OnCallSchedulesGrid.esm.js +45 -35
  43. package/dist/components/OnCallSchedulesPage/OnCallSchedulesGrid.esm.js.map +1 -1
  44. package/dist/components/OnCallSchedulesPage/OnCallSchedulesPage.esm.js +14 -11
  45. package/dist/components/OnCallSchedulesPage/OnCallSchedulesPage.esm.js.map +1 -1
  46. package/dist/components/OnCallSchedulesPage/OnCallShiftItem.esm.js +31 -23
  47. package/dist/components/OnCallSchedulesPage/OnCallShiftItem.esm.js.map +1 -1
  48. package/dist/components/Service/ServiceActionsMenu.esm.js +29 -25
  49. package/dist/components/Service/ServiceActionsMenu.esm.js.map +1 -1
  50. package/dist/components/Service/ServiceLink.esm.js +5 -2
  51. package/dist/components/Service/ServiceLink.esm.js.map +1 -1
  52. package/dist/components/ServicesPage/ServicesPage.esm.js +17 -14
  53. package/dist/components/ServicesPage/ServicesPage.esm.js.map +1 -1
  54. package/dist/components/ServicesPage/ServicesTable.esm.js +9 -9
  55. package/dist/components/ServicesPage/ServicesTable.esm.js.map +1 -1
  56. package/dist/components/ServicesPage/StatusChip.esm.js +7 -7
  57. package/dist/components/ServicesPage/StatusChip.esm.js.map +1 -1
  58. package/dist/components/Shift/ShiftOverrideModal.esm.js +83 -74
  59. package/dist/components/Shift/ShiftOverrideModal.esm.js.map +1 -1
  60. package/dist/components/StatusPage/StatusPageActionsMenu.esm.js +32 -26
  61. package/dist/components/StatusPage/StatusPageActionsMenu.esm.js.map +1 -1
  62. package/dist/components/StatusPage/StatusPageLink.esm.js +5 -2
  63. package/dist/components/StatusPage/StatusPageLink.esm.js.map +1 -1
  64. package/dist/components/StatusPage/StatusPageURL.esm.js +2 -2
  65. package/dist/components/StatusPage/StatusPageURL.esm.js.map +1 -1
  66. package/dist/components/StatusPagePage/StatusChip.esm.js +7 -7
  67. package/dist/components/StatusPagePage/StatusChip.esm.js.map +1 -1
  68. package/dist/components/StatusPagePage/StatusPagesPage.esm.js +17 -14
  69. package/dist/components/StatusPagePage/StatusPagesPage.esm.js.map +1 -1
  70. package/dist/components/StatusPagePage/StatusPagesTable.esm.js +10 -10
  71. package/dist/components/StatusPagePage/StatusPagesTable.esm.js.map +1 -1
  72. package/dist/components/StatusPagePage/VisibilityChip.esm.js +4 -4
  73. package/dist/components/StatusPagePage/VisibilityChip.esm.js.map +1 -1
  74. package/dist/hooks/useAlertActions.esm.js +3 -5
  75. package/dist/hooks/useAlertActions.esm.js.map +1 -1
  76. package/dist/hooks/useAlertSource.esm.js +3 -5
  77. package/dist/hooks/useAlertSource.esm.js.map +1 -1
  78. package/dist/hooks/useAlertSourceOnCalls.esm.js +3 -3
  79. package/dist/hooks/useAlertSourceOnCalls.esm.js.map +1 -1
  80. package/dist/hooks/useAlerts.esm.js +6 -9
  81. package/dist/hooks/useAlerts.esm.js.map +1 -1
  82. package/dist/hooks/useAssignAlert.esm.js +6 -4
  83. package/dist/hooks/useAssignAlert.esm.js.map +1 -1
  84. package/dist/hooks/useNewAlert.esm.js +6 -10
  85. package/dist/hooks/useNewAlert.esm.js.map +1 -1
  86. package/dist/hooks/useOnCallSchedules.esm.js +5 -3
  87. package/dist/hooks/useOnCallSchedules.esm.js.map +1 -1
  88. package/dist/hooks/useServices.esm.js +4 -4
  89. package/dist/hooks/useServices.esm.js.map +1 -1
  90. package/dist/hooks/useShiftOverride.esm.js +4 -4
  91. package/dist/hooks/useShiftOverride.esm.js.map +1 -1
  92. package/dist/hooks/useStatusPages.esm.js +4 -6
  93. package/dist/hooks/useStatusPages.esm.js.map +1 -1
  94. package/dist/index.d.ts +6 -8
  95. package/package.json +14 -7
@@ -1,5 +1,6 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import { Page, Header, HeaderLabel, HeaderTabs, Content } from '@backstage/core-components';
2
- import React from 'react';
3
+ import { useState } from 'react';
3
4
  import { AlertsPage } from '../AlertsPage/AlertsPage.esm.js';
4
5
  import '../AlertsPage/AlertsTable.esm.js';
5
6
  import { OnCallSchedulesPage } from '../OnCallSchedulesPage/OnCallSchedulesPage.esm.js';
@@ -10,7 +11,7 @@ import { StatusPagesPage } from '../StatusPagePage/StatusPagesPage.esm.js';
10
11
  import '../StatusPagePage/StatusPagesTable.esm.js';
11
12
 
12
13
  const ILertPage = () => {
13
- const [selectedTab, setSelectedTab] = React.useState(0);
14
+ const [selectedTab, setSelectedTab] = useState(0);
14
15
  const tabs = [
15
16
  { label: "Who is on call?" },
16
17
  { label: "Alerts" },
@@ -20,28 +21,35 @@ const ILertPage = () => {
20
21
  const renderTab = () => {
21
22
  switch (selectedTab) {
22
23
  case 0:
23
- return /* @__PURE__ */ React.createElement(OnCallSchedulesPage, null);
24
+ return /* @__PURE__ */ jsx(OnCallSchedulesPage, {});
24
25
  case 1:
25
- return /* @__PURE__ */ React.createElement(AlertsPage, null);
26
+ return /* @__PURE__ */ jsx(AlertsPage, {});
26
27
  case 2:
27
- return /* @__PURE__ */ React.createElement(ServicesPage, null);
28
+ return /* @__PURE__ */ jsx(ServicesPage, {});
28
29
  case 3:
29
- return /* @__PURE__ */ React.createElement(StatusPagesPage, null);
30
+ return /* @__PURE__ */ jsx(StatusPagesPage, {});
30
31
  default:
31
32
  return null;
32
33
  }
33
34
  };
34
- return /* @__PURE__ */ React.createElement(Page, { themeId: "website" }, /* @__PURE__ */ React.createElement(Header, { title: "iLert", type: "tool" }, /* @__PURE__ */ React.createElement(HeaderLabel, { label: "Owner", value: "iLert" }), /* @__PURE__ */ React.createElement(HeaderLabel, { label: "Lifecycle", value: "Alpha" })), /* @__PURE__ */ React.createElement(
35
- HeaderTabs,
36
- {
37
- selectedIndex: selectedTab,
38
- onChange: (index) => setSelectedTab(index),
39
- tabs: tabs.map(({ label }, index) => ({
40
- id: index.toString(),
41
- label
42
- }))
43
- }
44
- ), /* @__PURE__ */ React.createElement(Content, { noPadding: true }, renderTab()));
35
+ return /* @__PURE__ */ jsxs(Page, { themeId: "website", children: [
36
+ /* @__PURE__ */ jsxs(Header, { title: "iLert", type: "tool", children: [
37
+ /* @__PURE__ */ jsx(HeaderLabel, { label: "Owner", value: "iLert" }),
38
+ /* @__PURE__ */ jsx(HeaderLabel, { label: "Lifecycle", value: "Alpha" })
39
+ ] }),
40
+ /* @__PURE__ */ jsx(
41
+ HeaderTabs,
42
+ {
43
+ selectedIndex: selectedTab,
44
+ onChange: (index) => setSelectedTab(index),
45
+ tabs: tabs.map(({ label }, index) => ({
46
+ id: index.toString(),
47
+ label
48
+ }))
49
+ }
50
+ ),
51
+ /* @__PURE__ */ jsx(Content, { noPadding: true, children: renderTab() })
52
+ ] });
45
53
  };
46
54
 
47
55
  export { ILertPage, ILertPage as default };
@@ -1 +1 @@
1
- {"version":3,"file":"ILertPage.esm.js","sources":["../../../src/components/ILertPage/ILertPage.tsx"],"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 */\nimport {\n Content,\n Header,\n HeaderLabel,\n HeaderTabs,\n Page,\n} from '@backstage/core-components';\nimport React from 'react';\nimport { AlertsPage } from '../AlertsPage';\nimport { OnCallSchedulesPage } from '../OnCallSchedulesPage';\nimport { ServicesPage } from '../ServicesPage';\nimport { StatusPagesPage } from '../StatusPagePage';\n\n/** @public */\nexport const ILertPage = () => {\n const [selectedTab, setSelectedTab] = React.useState<number>(0);\n const tabs = [\n { label: 'Who is on call?' },\n { label: 'Alerts' },\n { label: 'Services' },\n { label: 'Status pages' },\n ];\n const renderTab = () => {\n switch (selectedTab) {\n case 0:\n return <OnCallSchedulesPage />;\n case 1:\n return <AlertsPage />;\n case 2:\n return <ServicesPage />;\n case 3:\n return <StatusPagesPage />;\n default:\n return null;\n }\n };\n\n return (\n <Page themeId=\"website\">\n <Header title=\"iLert\" type=\"tool\">\n <HeaderLabel label=\"Owner\" value=\"iLert\" />\n <HeaderLabel label=\"Lifecycle\" value=\"Alpha\" />\n </Header>\n <HeaderTabs\n selectedIndex={selectedTab}\n onChange={index => setSelectedTab(index)}\n tabs={tabs.map(({ label }, index) => ({\n id: index.toString(),\n label,\n }))}\n />\n\n <Content noPadding>{renderTab()}</Content>\n </Page>\n );\n};\n\nexport default ILertPage;\n"],"names":[],"mappings":";;;;;;;;;;;AA6BO,MAAM,YAAY,MAAM;AAC7B,EAAA,MAAM,CAAC,WAAa,EAAA,cAAc,CAAI,GAAA,KAAA,CAAM,SAAiB,CAAC,CAAA;AAC9D,EAAA,MAAM,IAAO,GAAA;AAAA,IACX,EAAE,OAAO,iBAAkB,EAAA;AAAA,IAC3B,EAAE,OAAO,QAAS,EAAA;AAAA,IAClB,EAAE,OAAO,UAAW,EAA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"version":3,"file":"ILertPage.esm.js","sources":["../../../src/components/ILertPage/ILertPage.tsx"],"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 */\nimport {\n Content,\n Header,\n HeaderLabel,\n HeaderTabs,\n Page,\n} from '@backstage/core-components';\nimport { useState } from 'react';\nimport { AlertsPage } from '../AlertsPage';\nimport { OnCallSchedulesPage } from '../OnCallSchedulesPage';\nimport { ServicesPage } from '../ServicesPage';\nimport { StatusPagesPage } from '../StatusPagePage';\n\n/** @public */\nexport const ILertPage = () => {\n const [selectedTab, setSelectedTab] = useState<number>(0);\n const tabs = [\n { label: 'Who is on call?' },\n { label: 'Alerts' },\n { label: 'Services' },\n { label: 'Status pages' },\n ];\n const renderTab = () => {\n switch (selectedTab) {\n case 0:\n return <OnCallSchedulesPage />;\n case 1:\n return <AlertsPage />;\n case 2:\n return <ServicesPage />;\n case 3:\n return <StatusPagesPage />;\n default:\n return null;\n }\n };\n\n return (\n <Page themeId=\"website\">\n <Header title=\"iLert\" type=\"tool\">\n <HeaderLabel label=\"Owner\" value=\"iLert\" />\n <HeaderLabel label=\"Lifecycle\" value=\"Alpha\" />\n </Header>\n <HeaderTabs\n selectedIndex={selectedTab}\n onChange={index => setSelectedTab(index)}\n tabs={tabs.map(({ label }, index) => ({\n id: index.toString(),\n label,\n }))}\n />\n\n <Content noPadding>{renderTab()}</Content>\n </Page>\n );\n};\n\nexport default ILertPage;\n"],"names":[],"mappings":";;;;;;;;;;;;AA6BO,MAAM,YAAY,MAAM;AAC7B,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAA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EAAI,MAAM,QAAS,EAAA;AAAA,UACnB;AAAA,SACA,CAAA;AAAA;AAAA,KACJ;AAAA,oBAEC,GAAA,CAAA,OAAA,EAAA,EAAQ,SAAS,EAAA,IAAA,EAAE,qBAAY,EAAA;AAAA,GAClC,EAAA,CAAA;AAEJ;;;;"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { makeStyles } from '@material-ui/core/styles';
3
3
  import Card from '@material-ui/core/Card';
4
4
  import CardContent from '@material-ui/core/CardContent';
@@ -91,44 +91,54 @@ const OnCallSchedulesGrid = ({
91
91
  const ilertApi = useApi(ilertApiRef);
92
92
  const classes = useStyles();
93
93
  if (isLoading) {
94
- return /* @__PURE__ */ React.createElement(Progress, null);
94
+ return /* @__PURE__ */ jsx(Progress, {});
95
95
  }
96
- return /* @__PURE__ */ React.createElement(ItemCardGrid, { "data-testid": "docs-explore" }, !onCallSchedules?.length ? null : onCallSchedules.map((schedule, index) => /* @__PURE__ */ React.createElement(Card, { key: index }, /* @__PURE__ */ React.createElement(
97
- CardHeader,
98
- {
99
- classes: { content: classes.cardHeader },
100
- title: /* @__PURE__ */ React.createElement(
101
- Link,
102
- {
103
- to: ilertApi.getScheduleDetailsURL(schedule),
104
- className: classes.link
105
- },
106
- schedule.name
107
- )
108
- }
109
- ), /* @__PURE__ */ React.createElement(CardContent, { className: classes.cardContent }, /* @__PURE__ */ React.createElement("div", { className: classes.indicatorCurrent }), /* @__PURE__ */ React.createElement(
110
- OnCallShiftItem,
111
- {
112
- shift: schedule.currentShift,
113
- scheduleId: schedule.id,
114
- refetchOnCallSchedules
115
- }
116
- ), /* @__PURE__ */ React.createElement(Typography, { className: classes.beforeText, variant: "body2" }, "On call now")), /* @__PURE__ */ React.createElement(
117
- CardContent,
118
- {
119
- className: `${classes.cardContent} ${classes.marginBottom}`
120
- },
121
- /* @__PURE__ */ React.createElement("div", { className: classes.indicatorNext }),
122
- /* @__PURE__ */ React.createElement(
123
- OnCallShiftItem,
96
+ return /* @__PURE__ */ jsx(ItemCardGrid, { "data-testid": "docs-explore", children: !onCallSchedules?.length ? null : onCallSchedules.map((schedule, index) => /* @__PURE__ */ jsxs(Card, { children: [
97
+ /* @__PURE__ */ jsx(
98
+ CardHeader,
124
99
  {
125
- shift: schedule.nextShift,
126
- scheduleId: schedule.id,
127
- refetchOnCallSchedules
100
+ classes: { content: classes.cardHeader },
101
+ title: /* @__PURE__ */ jsx(
102
+ Link,
103
+ {
104
+ to: ilertApi.getScheduleDetailsURL(schedule),
105
+ className: classes.link,
106
+ children: schedule.name
107
+ }
108
+ )
128
109
  }
129
110
  ),
130
- /* @__PURE__ */ React.createElement(Typography, { className: classes.beforeText, variant: "body2" }, "Next on call")
131
- ))));
111
+ /* @__PURE__ */ jsxs(CardContent, { className: classes.cardContent, children: [
112
+ /* @__PURE__ */ jsx("div", { className: classes.indicatorCurrent }),
113
+ /* @__PURE__ */ jsx(
114
+ OnCallShiftItem,
115
+ {
116
+ shift: schedule.currentShift,
117
+ scheduleId: schedule.id,
118
+ refetchOnCallSchedules
119
+ }
120
+ ),
121
+ /* @__PURE__ */ jsx(Typography, { className: classes.beforeText, variant: "body2", children: "On call now" })
122
+ ] }),
123
+ /* @__PURE__ */ jsxs(
124
+ CardContent,
125
+ {
126
+ className: `${classes.cardContent} ${classes.marginBottom}`,
127
+ children: [
128
+ /* @__PURE__ */ jsx("div", { className: classes.indicatorNext }),
129
+ /* @__PURE__ */ jsx(
130
+ OnCallShiftItem,
131
+ {
132
+ shift: schedule.nextShift,
133
+ scheduleId: schedule.id,
134
+ refetchOnCallSchedules
135
+ }
136
+ ),
137
+ /* @__PURE__ */ jsx(Typography, { className: classes.beforeText, variant: "body2", children: "Next on call" })
138
+ ]
139
+ }
140
+ )
141
+ ] }, index)) });
132
142
  };
133
143
 
134
144
  export { OnCallSchedulesGrid };
@@ -1 +1 @@
1
- {"version":3,"file":"OnCallSchedulesGrid.esm.js","sources":["../../../src/components/OnCallSchedulesPage/OnCallSchedulesGrid.tsx"],"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 */\nimport React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport Typography from '@material-ui/core/Typography';\nimport { Schedule } from '../../types';\nimport { ilertApiRef } from '../../api';\nimport { OnCallShiftItem } from './OnCallShiftItem';\n\nimport { useApi } from '@backstage/core-plugin-api';\nimport { ItemCardGrid, Progress, Link } from '@backstage/core-components';\n\nconst useStyles = makeStyles(() => ({\n card: {\n margin: 16,\n width: 'calc(100% - 32px)',\n },\n\n cardHeader: {\n maxWidth: '100%',\n },\n\n cardContent: {\n marginLeft: 80,\n borderLeft: '1px #808289 solid',\n position: 'relative',\n },\n\n indicatorNext: {\n position: 'absolute',\n top: 'calc(40% - 10px)',\n left: -6,\n width: 12,\n height: 12,\n background: '#92949c !important',\n borderRadius: '50%',\n },\n\n indicatorCurrent: {\n position: 'absolute',\n top: 'calc(40% - 10px)',\n left: -6,\n width: 12,\n height: 12,\n background: '#ffb74d !important',\n color: '#ffb74d !important',\n borderRadius: '50%',\n '&::after': {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n borderRadius: '50%',\n animation: '$ripple 1.2s infinite ease-in-out',\n border: '1px solid currentColor',\n content: '\"\"',\n },\n },\n '@keyframes ripple': {\n '0%': {\n transform: 'scale(.8)',\n opacity: 1,\n },\n '100%': {\n transform: 'scale(2.4)',\n opacity: 0,\n },\n },\n\n beforeText: {\n position: 'absolute',\n top: 'calc(31% - 10px)',\n left: -78,\n width: 65,\n height: 20,\n textAlign: 'center',\n color: '#808289',\n },\n\n marginBottom: {\n marginBottom: 16,\n },\n\n link: {\n fontSize: '1.5rem',\n fontWeight: 700,\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n display: 'block',\n },\n}));\n\nexport const OnCallSchedulesGrid = ({\n onCallSchedules,\n isLoading,\n refetchOnCallSchedules,\n}: {\n onCallSchedules: Schedule[];\n isLoading: boolean;\n refetchOnCallSchedules: () => void;\n}) => {\n const ilertApi = useApi(ilertApiRef);\n const classes = useStyles();\n\n if (isLoading) {\n return <Progress />;\n }\n return (\n <ItemCardGrid data-testid=\"docs-explore\">\n {!onCallSchedules?.length\n ? null\n : onCallSchedules.map((schedule, index) => (\n <Card key={index}>\n <CardHeader\n classes={{ content: classes.cardHeader }}\n title={\n <Link\n to={ilertApi.getScheduleDetailsURL(schedule)}\n className={classes.link}\n >\n {schedule.name}\n </Link>\n }\n />\n\n <CardContent className={classes.cardContent}>\n <div className={classes.indicatorCurrent} />\n <OnCallShiftItem\n shift={schedule.currentShift}\n scheduleId={schedule.id}\n refetchOnCallSchedules={refetchOnCallSchedules}\n />\n <Typography className={classes.beforeText} variant=\"body2\">\n On call now\n </Typography>\n </CardContent>\n\n <CardContent\n className={`${classes.cardContent} ${classes.marginBottom}`}\n >\n <div className={classes.indicatorNext} />\n <OnCallShiftItem\n shift={schedule.nextShift}\n scheduleId={schedule.id}\n refetchOnCallSchedules={refetchOnCallSchedules}\n />\n <Typography className={classes.beforeText} variant=\"body2\">\n Next on call\n </Typography>\n </CardContent>\n </Card>\n ))}\n </ItemCardGrid>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AA4BA,MAAM,SAAA,GAAY,WAAW,OAAO;AAAA,EAClC,IAAM,EAAA;AAAA,IACJ,MAAQ,EAAA,EAAA;AAAA,IACR,KAAO,EAAA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*\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 { makeStyles } from '@material-ui/core/styles';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport Typography from '@material-ui/core/Typography';\nimport { Schedule } from '../../types';\nimport { ilertApiRef } from '../../api';\nimport { OnCallShiftItem } from './OnCallShiftItem';\n\nimport { useApi } from '@backstage/core-plugin-api';\nimport { ItemCardGrid, Progress, Link } from '@backstage/core-components';\n\nconst useStyles = makeStyles(() => ({\n card: {\n margin: 16,\n width: 'calc(100% - 32px)',\n },\n\n cardHeader: {\n maxWidth: '100%',\n },\n\n cardContent: {\n marginLeft: 80,\n borderLeft: '1px #808289 solid',\n position: 'relative',\n },\n\n indicatorNext: {\n position: 'absolute',\n top: 'calc(40% - 10px)',\n left: -6,\n width: 12,\n height: 12,\n background: '#92949c !important',\n borderRadius: '50%',\n },\n\n indicatorCurrent: {\n position: 'absolute',\n top: 'calc(40% - 10px)',\n left: -6,\n width: 12,\n height: 12,\n background: '#ffb74d !important',\n color: '#ffb74d !important',\n borderRadius: '50%',\n '&::after': {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n borderRadius: '50%',\n animation: '$ripple 1.2s infinite ease-in-out',\n border: '1px solid currentColor',\n content: '\"\"',\n },\n },\n '@keyframes ripple': {\n '0%': {\n transform: 'scale(.8)',\n opacity: 1,\n },\n '100%': {\n transform: 'scale(2.4)',\n opacity: 0,\n },\n },\n\n beforeText: {\n position: 'absolute',\n top: 'calc(31% - 10px)',\n left: -78,\n width: 65,\n height: 20,\n textAlign: 'center',\n color: '#808289',\n },\n\n marginBottom: {\n marginBottom: 16,\n },\n\n link: {\n fontSize: '1.5rem',\n fontWeight: 700,\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n display: 'block',\n },\n}));\n\nexport const OnCallSchedulesGrid = ({\n onCallSchedules,\n isLoading,\n refetchOnCallSchedules,\n}: {\n onCallSchedules: Schedule[];\n isLoading: boolean;\n refetchOnCallSchedules: () => void;\n}) => {\n const ilertApi = useApi(ilertApiRef);\n const classes = useStyles();\n\n if (isLoading) {\n return <Progress />;\n }\n return (\n <ItemCardGrid data-testid=\"docs-explore\">\n {!onCallSchedules?.length\n ? null\n : onCallSchedules.map((schedule, index) => (\n <Card key={index}>\n <CardHeader\n classes={{ content: classes.cardHeader }}\n title={\n <Link\n to={ilertApi.getScheduleDetailsURL(schedule)}\n className={classes.link}\n >\n {schedule.name}\n </Link>\n }\n />\n\n <CardContent className={classes.cardContent}>\n <div className={classes.indicatorCurrent} />\n <OnCallShiftItem\n shift={schedule.currentShift}\n scheduleId={schedule.id}\n refetchOnCallSchedules={refetchOnCallSchedules}\n />\n <Typography className={classes.beforeText} variant=\"body2\">\n On call now\n </Typography>\n </CardContent>\n\n <CardContent\n className={`${classes.cardContent} ${classes.marginBottom}`}\n >\n <div className={classes.indicatorNext} />\n <OnCallShiftItem\n shift={schedule.nextShift}\n scheduleId={schedule.id}\n refetchOnCallSchedules={refetchOnCallSchedules}\n />\n <Typography className={classes.beforeText} variant=\"body2\">\n Next on call\n </Typography>\n </CardContent>\n </Card>\n ))}\n </ItemCardGrid>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AA2BA,MAAM,SAAA,GAAY,WAAW,OAAO;AAAA,EAClC,IAAM,EAAA;AAAA,IACJ,MAAQ,EAAA,EAAA;AAAA,IACR,KAAO,EAAA;AAAA,GACT;AAAA,EAEA,UAAY,EAAA;AAAA,IACV,QAAU,EAAA;AAAA,GACZ;AAAA,EAEA,WAAa,E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,WAAA,EAAA,EAAY,SAAW,EAAA,OAAA,CAAQ,WAC9B,EAAA,QAAA,EAAA;AAAA,sBAAC,GAAA,CAAA,KAAA,EAAA,EAAI,SAAW,EAAA,OAAA,CAAQ,gBAAkB,EAAA,CAAA;AAAA,sBAC1C,GAAA;AAAA,QAAC,eAAA;AAAA,QAAA;AAAA,UACC,OAAO,QAAS,CAAA,YAAA;AAAA,UAChB,YAAY,QAAS,CAAA,EAAA;AAAA,UACrB;AAAA;AAAA,OACF;AAAA,0BACC,UAAW,EAAA,EAAA,SAAA,EAAW,QAAQ,UAAY,EAAA,OAAA,EAAQ,SAAQ,QAE3D,EAAA,aAAA,EAAA;AAAA,KACF,EAAA,CAAA;AAAA,oBAEA,IAAA;AAAA,MAAC,WAAA;AAAA,MAAA;AAAA,QACC,WAAW,CAAG,EAAA,OAAA,CAAQ,WAAW,CAAA,CAAA,EAAI,QAAQ,YAAY,CAAA,CAAA;AAAA,QAEzD,QAAA,EAAA;AAAA,0BAAC,GAAA,CAAA,KAAA,EAAA,EAAI,SAAW,EAAA,OAAA,CAAQ,aAAe,EAAA,CAAA;AAAA,0BACvC,GAAA;AAAA,YAAC,eAAA;AAAA,YAAA;AAAA,cACC,OAAO,QAAS,CAAA,SAAA;AAAA,cAChB,YAAY,QAAS,CAAA,EAAA;AAAA,cACrB;AAAA;AAAA,WACF;AAAA,8BACC,UAAW,EAAA,EAAA,SAAA,EAAW,QAAQ,UAAY,EAAA,OAAA,EAAQ,SAAQ,QAE3D,EAAA,cAAA,EAAA;AAAA;AAAA;AAAA;AACF,GArCS,EAAA,EAAA,KAsCX,CACD,CACP,EAAA,CAAA;AAEJ;;;;"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { AuthenticationError } from '@backstage/errors';
3
3
  import { OnCallSchedulesGrid } from './OnCallSchedulesGrid.esm.js';
4
4
  import { MissingAuthorizationHeaderError } from '../Errors/MissingAuthorizationHeaderError.esm.js';
@@ -9,18 +9,21 @@ const OnCallSchedulesPage = () => {
9
9
  const [{ onCallSchedules, isLoading, error }, { refetchOnCallSchedules }] = useOnCallSchedules();
10
10
  if (error) {
11
11
  if (error instanceof AuthenticationError) {
12
- return /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(MissingAuthorizationHeaderError, null));
12
+ return /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsx(MissingAuthorizationHeaderError, {}) });
13
13
  }
14
- return /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(ResponseErrorPanel, { error }));
14
+ return /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsx(ResponseErrorPanel, { error }) });
15
15
  }
16
- return /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(ContentHeader, { title: "Who is on call?" }, /* @__PURE__ */ React.createElement(SupportButton, null, "This helps you to bring iLert into your developer portal.")), /* @__PURE__ */ React.createElement(
17
- OnCallSchedulesGrid,
18
- {
19
- onCallSchedules,
20
- isLoading,
21
- refetchOnCallSchedules
22
- }
23
- ));
16
+ return /* @__PURE__ */ jsxs(Content, { children: [
17
+ /* @__PURE__ */ jsx(ContentHeader, { title: "Who is on call?", children: /* @__PURE__ */ jsx(SupportButton, { children: "This helps you to bring iLert into your developer portal." }) }),
18
+ /* @__PURE__ */ jsx(
19
+ OnCallSchedulesGrid,
20
+ {
21
+ onCallSchedules,
22
+ isLoading,
23
+ refetchOnCallSchedules
24
+ }
25
+ )
26
+ ] });
24
27
  };
25
28
 
26
29
  export { OnCallSchedulesPage };
@@ -1 +1 @@
1
- {"version":3,"file":"OnCallSchedulesPage.esm.js","sources":["../../../src/components/OnCallSchedulesPage/OnCallSchedulesPage.tsx"],"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 */\nimport React from 'react';\nimport { AuthenticationError } from '@backstage/errors';\nimport { OnCallSchedulesGrid } from './OnCallSchedulesGrid';\nimport { MissingAuthorizationHeaderError } from '../Errors';\nimport { useOnCallSchedules } from '../../hooks/useOnCallSchedules';\nimport {\n Content,\n ContentHeader,\n SupportButton,\n ResponseErrorPanel,\n} from '@backstage/core-components';\n\nexport const OnCallSchedulesPage = () => {\n const [{ onCallSchedules, isLoading, error }, { refetchOnCallSchedules }] =\n useOnCallSchedules();\n\n if (error) {\n if (error instanceof AuthenticationError) {\n return (\n <Content>\n <MissingAuthorizationHeaderError />\n </Content>\n );\n }\n\n return (\n <Content>\n <ResponseErrorPanel error={error} />\n </Content>\n );\n }\n\n return (\n <Content>\n <ContentHeader title=\"Who is on call?\">\n <SupportButton>\n This helps you to bring iLert into your developer portal.\n </SupportButton>\n </ContentHeader>\n <OnCallSchedulesGrid\n onCallSchedules={onCallSchedules}\n isLoading={isLoading}\n refetchOnCallSchedules={refetchOnCallSchedules}\n />\n </Content>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA2BO,MAAM,sBAAsB,MAAM;AACvC,EAAM,MAAA,CAAC,EAAE,eAAA,EAAiB,SAAW,EAAA,KAAA,IAAS,EAAE,sBAAA,EAAwB,CAAA,GACtE,kBAAmB,EAAA;AAErB,EAAA,IAAI,KAAO,EAAA;AACT,IAAA,IAAI,iBAAiB,mBAAqB,EAAA;AACxC,MAAA,uBACG,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,IAAA,kBACE,KAAA,CAAA,aAAA,CAAA,+BAAA,EAAA,IAAgC,CACnC,CAAA;AAAA;AAIJ,IAAA,uBACG,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,IAAA,kBACE,KAAA,CAAA,aAAA,CAAA,kBAAA,EAAA,EAAmB,OAAc,CACpC,CAAA;AAAA;AAIJ,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,OACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,aAAc,EAAA,EAAA,KAAA,EAAM,qCAClB,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA,IAAA,EAAc,2DAEf,CACF,CACA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,eAAA;AAAA,MACA,SAAA;AAAA,MACA;AAAA;AAAA,GAEJ,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"OnCallSchedulesPage.esm.js","sources":["../../../src/components/OnCallSchedulesPage/OnCallSchedulesPage.tsx"],"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 */\nimport { AuthenticationError } from '@backstage/errors';\nimport { OnCallSchedulesGrid } from './OnCallSchedulesGrid';\nimport { MissingAuthorizationHeaderError } from '../Errors';\nimport { useOnCallSchedules } from '../../hooks/useOnCallSchedules';\nimport {\n Content,\n ContentHeader,\n SupportButton,\n ResponseErrorPanel,\n} from '@backstage/core-components';\n\nexport const OnCallSchedulesPage = () => {\n const [{ onCallSchedules, isLoading, error }, { refetchOnCallSchedules }] =\n useOnCallSchedules();\n\n if (error) {\n if (error instanceof AuthenticationError) {\n return (\n <Content>\n <MissingAuthorizationHeaderError />\n </Content>\n );\n }\n\n return (\n <Content>\n <ResponseErrorPanel error={error} />\n </Content>\n );\n }\n\n return (\n <Content>\n <ContentHeader title=\"Who is on call?\">\n <SupportButton>\n This helps you to bring iLert into your developer portal.\n </SupportButton>\n </ContentHeader>\n <OnCallSchedulesGrid\n onCallSchedules={onCallSchedules}\n isLoading={isLoading}\n refetchOnCallSchedules={refetchOnCallSchedules}\n />\n </Content>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA0BO,MAAM,sBAAsB,MAAM;AACvC,EAAM,MAAA,CAAC,EAAE,eAAA,EAAiB,SAAW,EAAA,KAAA,IAAS,EAAE,sBAAA,EAAwB,CAAA,GACtE,kBAAmB,EAAA;AAErB,EAAA,IAAI,KAAO,EAAA;AACT,IAAA,IAAI,iBAAiB,mBAAqB,EAAA;AACxC,MAAA,uBACG,GAAA,CAAA,OAAA,EAAA,EACC,QAAC,kBAAA,GAAA,CAAA,+BAAA,EAAA,EAAgC,CACnC,EAAA,CAAA;AAAA;AAIJ,IAAA,uBACG,GAAA,CAAA,OAAA,EAAA,EACC,QAAC,kBAAA,GAAA,CAAA,kBAAA,EAAA,EAAmB,OAAc,CACpC,EAAA,CAAA;AAAA;AAIJ,EAAA,4BACG,OACC,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,iBAAc,KAAM,EAAA,iBAAA,EACnB,QAAC,kBAAA,GAAA,CAAA,aAAA,EAAA,EAAc,uEAEf,CACF,EAAA,CAAA;AAAA,oBACA,GAAA;AAAA,MAAC,mBAAA;AAAA,MAAA;AAAA,QACC,eAAA;AAAA,QACA,SAAA;AAAA,QACA;AAAA;AAAA;AACF,GACF,EAAA,CAAA;AAEJ;;;;"}
@@ -1,3 +1,4 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
1
2
  import { useApi } from '@backstage/core-plugin-api';
2
3
  import Button from '@material-ui/core/Button';
3
4
  import Grid from '@material-ui/core/Grid';
@@ -5,7 +6,7 @@ import { makeStyles } from '@material-ui/core/styles';
5
6
  import Typography from '@material-ui/core/Typography';
6
7
  import RepeatIcon from '@material-ui/icons/Repeat';
7
8
  import { DateTime } from 'luxon';
8
- import React from 'react';
9
+ import { useState } from 'react';
9
10
  import { ilertApiRef } from '../../api/client.esm.js';
10
11
  import { ShiftOverrideModal } from '../Shift/ShiftOverrideModal.esm.js';
11
12
 
@@ -30,33 +31,40 @@ const OnCallShiftItem = ({
30
31
  }) => {
31
32
  const classes = useStyles();
32
33
  const ilertApi = useApi(ilertApiRef);
33
- const [isModalOpened, setIsModalOpened] = React.useState(false);
34
+ const [isModalOpened, setIsModalOpened] = useState(false);
34
35
  const handleOverride = () => {
35
36
  setIsModalOpened(true);
36
37
  };
37
38
  if (!shift || !shift.start) {
38
- return /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 0 }, /* @__PURE__ */ React.createElement(Grid, { item: true, sm: 12 }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle1", color: "textSecondary" }, "Nobody")));
39
+ return /* @__PURE__ */ jsx(Grid, { container: true, spacing: 0, children: /* @__PURE__ */ jsx(Grid, { item: true, sm: 12, children: /* @__PURE__ */ jsx(Typography, { variant: "subtitle1", color: "textSecondary", children: "Nobody" }) }) });
39
40
  }
40
- return /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 0 }, shift && shift.user ? /* @__PURE__ */ React.createElement(Grid, { item: true, sm: 12 }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle1", noWrap: true }, ilertApi.getUserInitials(shift.user))) : null, /* @__PURE__ */ React.createElement(Grid, { item: true, sm: 12 }, /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2", color: "textSecondary" }, `${DateTime.fromISO(shift.start).toFormat("D MMM, HH:mm")} - ${DateTime.fromISO(shift.end).toFormat("D MMM, HH:mm")}`)), /* @__PURE__ */ React.createElement(Grid, { item: true, sm: 12 }, /* @__PURE__ */ React.createElement(
41
- Button,
42
- {
43
- color: "primary",
44
- size: "small",
45
- className: classes.button,
46
- startIcon: /* @__PURE__ */ React.createElement(RepeatIcon, null),
47
- onClick: handleOverride
48
- },
49
- /* @__PURE__ */ React.createElement(Typography, { variant: "overline" }, "Override shift")
50
- ), /* @__PURE__ */ React.createElement(
51
- ShiftOverrideModal,
52
- {
53
- scheduleId,
54
- shift,
55
- refetchOnCallSchedules,
56
- isModalOpened,
57
- setIsModalOpened
58
- }
59
- )));
41
+ return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 0, children: [
42
+ shift && shift.user ? /* @__PURE__ */ jsx(Grid, { item: true, sm: 12, children: /* @__PURE__ */ jsx(Typography, { variant: "subtitle1", noWrap: true, children: ilertApi.getUserInitials(shift.user) }) }) : null,
43
+ /* @__PURE__ */ jsx(Grid, { item: true, sm: 12, children: /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", color: "textSecondary", children: `${DateTime.fromISO(shift.start).toFormat("D MMM, HH:mm")} - ${DateTime.fromISO(shift.end).toFormat("D MMM, HH:mm")}` }) }),
44
+ /* @__PURE__ */ jsxs(Grid, { item: true, sm: 12, children: [
45
+ /* @__PURE__ */ jsx(
46
+ Button,
47
+ {
48
+ color: "primary",
49
+ size: "small",
50
+ className: classes.button,
51
+ startIcon: /* @__PURE__ */ jsx(RepeatIcon, {}),
52
+ onClick: handleOverride,
53
+ children: /* @__PURE__ */ jsx(Typography, { variant: "overline", children: "Override shift" })
54
+ }
55
+ ),
56
+ /* @__PURE__ */ jsx(
57
+ ShiftOverrideModal,
58
+ {
59
+ scheduleId,
60
+ shift,
61
+ refetchOnCallSchedules,
62
+ isModalOpened,
63
+ setIsModalOpened
64
+ }
65
+ )
66
+ ] })
67
+ ] });
60
68
  };
61
69
 
62
70
  export { OnCallShiftItem };
@@ -1 +1 @@
1
- {"version":3,"file":"OnCallShiftItem.esm.js","sources":["../../../src/components/OnCallSchedulesPage/OnCallShiftItem.tsx"],"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 */\nimport { useApi } from '@backstage/core-plugin-api';\nimport Button from '@material-ui/core/Button';\nimport Grid from '@material-ui/core/Grid';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport RepeatIcon from '@material-ui/icons/Repeat';\nimport { DateTime as dt } from 'luxon';\nimport React from 'react';\nimport { ilertApiRef } from '../../api';\nimport { Shift } from '../../types';\nimport { ShiftOverrideModal } from '../Shift/ShiftOverrideModal';\n\nconst useStyles = makeStyles({\n button: {\n marginTop: 4,\n padding: 0,\n lineHeight: 1.8,\n '& span': {\n lineHeight: 1.8,\n fontSize: '0.65rem',\n },\n '& svg': {\n fontSize: '0.85rem !important',\n },\n },\n});\n\nexport const OnCallShiftItem = ({\n scheduleId,\n shift,\n refetchOnCallSchedules,\n}: {\n scheduleId: number;\n shift: Shift;\n refetchOnCallSchedules: () => void;\n}) => {\n const classes = useStyles();\n const ilertApi = useApi(ilertApiRef);\n const [isModalOpened, setIsModalOpened] = React.useState(false);\n\n const handleOverride = () => {\n setIsModalOpened(true);\n };\n\n if (!shift || !shift.start) {\n return (\n <Grid container spacing={0}>\n <Grid item sm={12}>\n <Typography variant=\"subtitle1\" color=\"textSecondary\">\n Nobody\n </Typography>\n </Grid>\n </Grid>\n );\n }\n\n return (\n <Grid container spacing={0}>\n {shift && shift.user ? (\n <Grid item sm={12}>\n <Typography variant=\"subtitle1\" noWrap>\n {ilertApi.getUserInitials(shift.user)}\n </Typography>\n </Grid>\n ) : null}\n <Grid item sm={12}>\n <Typography variant=\"subtitle2\" color=\"textSecondary\">\n {`${dt.fromISO(shift.start).toFormat('D MMM, HH:mm')} - ${dt\n .fromISO(shift.end)\n .toFormat('D MMM, HH:mm')}`}\n </Typography>\n </Grid>\n <Grid item sm={12}>\n <Button\n color=\"primary\"\n size=\"small\"\n className={classes.button}\n startIcon={<RepeatIcon />}\n onClick={handleOverride}\n >\n <Typography variant=\"overline\">Override shift</Typography>\n </Button>\n <ShiftOverrideModal\n scheduleId={scheduleId}\n shift={shift}\n refetchOnCallSchedules={refetchOnCallSchedules}\n isModalOpened={isModalOpened}\n setIsModalOpened={setIsModalOpened}\n />\n </Grid>\n </Grid>\n );\n};\n"],"names":["dt"],"mappings":";;;;;;;;;;;AA2BA,MAAM,YAAY,UAAW,CAAA;AAAA,EAC3B,MAAQ,EAAA;AAAA,IACN,SAAW,EAAA,CAAA;AAAA,IACX,OAAS,EAAA,CAAA;AAAA,IACT,UAAY,EAAA,GAAA;AAAA,IACZ,QAAU,EAAA;AAAA,MACR,UAAY,EAAA,GAAA;AAAA,MACZ,QAAU,EAAA;AAAA,KACZ;AAAA,IACA,OAAS,EAAA;AAAA,MACP,QAAU,EAAA;AAAA;AACZ;AAEJ,CAAC,CAAA;AAEM,MAAM,kBAAkB,CAAC;AAAA,EAC9B,UAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAIM,KAAA;AACJ,EAAA,MAAM,UAAU,SAAU,EAAA;AAC1B,EAAM,MAAA,QAAA,GAAW,OAAO,WAAW,CAAA;AACnC,EAAA,MAAM,CAAC,aAAe,EAAA,gBAAgB,CAAI,GAAA,KAAA,CAAM,SAAS,KAAK,CAAA;AAE9D,EAAA,MAAM,iBAAiB,MAAM;AAC3B,IAAA,gBAAA,CAAiB,IAAI,CAAA;AAAA,GACvB;AAEA,EAAA,IAAI,CAAC,KAAA,IAAS,CAAC,KAAA,CAAM,KAAO,EAAA;AAC1B,IACE,uBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,SAAS,EAAA,IAAA,EAAC,SAAS,CACvB,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,IAAI,EAAA,IAAA,EAAC,IAAI,EACb,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,cAAW,OAAQ,EAAA,WAAA,EAAY,OAAM,eA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Q,EAAA,UAAA,EAAA,EAAW,gBAAc;AAAA,GAE/C,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,kBAAA;AAAA,IAAA;AAAA,MACC,UAAA;AAAA,MACA,KAAA;AAAA,MACA,sBAAA;AAAA,MACA,aAAA;AAAA,MACA;AAAA;AAAA,GAEJ,CACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"OnCallShiftItem.esm.js","sources":["../../../src/components/OnCallSchedulesPage/OnCallShiftItem.tsx"],"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 */\nimport { useApi } from '@backstage/core-plugin-api';\nimport Button from '@material-ui/core/Button';\nimport Grid from '@material-ui/core/Grid';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport RepeatIcon from '@material-ui/icons/Repeat';\nimport { DateTime as dt } from 'luxon';\nimport { useState } from 'react';\nimport { ilertApiRef } from '../../api';\nimport { Shift } from '../../types';\nimport { ShiftOverrideModal } from '../Shift/ShiftOverrideModal';\n\nconst useStyles = makeStyles({\n button: {\n marginTop: 4,\n padding: 0,\n lineHeight: 1.8,\n '& span': {\n lineHeight: 1.8,\n fontSize: '0.65rem',\n },\n '& svg': {\n fontSize: '0.85rem !important',\n },\n },\n});\n\nexport const OnCallShiftItem = ({\n scheduleId,\n shift,\n refetchOnCallSchedules,\n}: {\n scheduleId: number;\n shift: Shift;\n refetchOnCallSchedules: () => void;\n}) => {\n const classes = useStyles();\n const ilertApi = useApi(ilertApiRef);\n const [isModalOpened, setIsModalOpened] = useState(false);\n\n const handleOverride = () => {\n setIsModalOpened(true);\n };\n\n if (!shift || !shift.start) {\n return (\n <Grid container spacing={0}>\n <Grid item sm={12}>\n <Typography variant=\"subtitle1\" color=\"textSecondary\">\n Nobody\n </Typography>\n </Grid>\n </Grid>\n );\n }\n\n return (\n <Grid container spacing={0}>\n {shift && shift.user ? (\n <Grid item sm={12}>\n <Typography variant=\"subtitle1\" noWrap>\n {ilertApi.getUserInitials(shift.user)}\n </Typography>\n </Grid>\n ) : null}\n <Grid item sm={12}>\n <Typography variant=\"subtitle2\" color=\"textSecondary\">\n {`${dt.fromISO(shift.start).toFormat('D MMM, HH:mm')} - ${dt\n .fromISO(shift.end)\n .toFormat('D MMM, HH:mm')}`}\n </Typography>\n </Grid>\n <Grid item sm={12}>\n <Button\n color=\"primary\"\n size=\"small\"\n className={classes.button}\n startIcon={<RepeatIcon />}\n onClick={handleOverride}\n >\n <Typography variant=\"overline\">Override shift</Typography>\n </Button>\n <ShiftOverrideModal\n scheduleId={scheduleId}\n shift={shift}\n refetchOnCallSchedules={refetchOnCallSchedules}\n isModalOpened={isModalOpened}\n setIsModalOpened={setIsModalOpened}\n />\n </Grid>\n </Grid>\n );\n};\n"],"names":["dt"],"mappings":";;;;;;;;;;;;AA2BA,MAAM,YAAY,UAAW,CAAA;AAAA,EAC3B,MAAQ,EAAA;AAAA,IACN,SAAW,EAAA,CAAA;AAAA,IACX,OAAS,EAAA,CAAA;AAAA,IACT,UAAY,EAAA,GAAA;AAAA,IACZ,QAAU,EAAA;AAAA,MACR,UAAY,EAAA,GAAA;AAAA,MACZ,QAAU,EAAA;AAAA,KACZ;AAAA,IACA,OAAS,EAAA;AAAA,MACP,QAAU,EAAA;AAAA;AACZ;AAEJ,CAAC,CAAA;AAEM,MAAM,kBAAkB,CAAC;AAAA,EAC9B,UAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAIM,KAAA;AACJ,EAAA,MAAM,UAAU,SAAU,EAAA;AAC1B,EAAM,MAAA,QAAA,GAAW,OAAO,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S,cAAc,CAAC,IAC7B,CACF,EAAA,CAAA;AAAA,oBACC,IAAA,CAAA,IAAA,EAAA,EAAK,IAAI,EAAA,IAAA,EAAC,IAAI,EACb,EAAA,QAAA,EAAA;AAAA,sBAAA,GAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,KAAM,EAAA,SAAA;AAAA,UACN,IAAK,EAAA,OAAA;AAAA,UACL,WAAW,OAAQ,CAAA,MAAA;AAAA,UACnB,SAAA,sBAAY,UAAW,EAAA,EAAA,CAAA;AAAA,UACvB,OAAS,EAAA,cAAA;AAAA,UAET,QAAC,kBAAA,GAAA,CAAA,UAAA,EAAA,EAAW,OAAQ,EAAA,UAAA,EAAW,QAAc,EAAA,gBAAA,EAAA;AAAA;AAAA,OAC/C;AAAA,sBACA,GAAA;AAAA,QAAC,kBAAA;AAAA,QAAA;AAAA,UACC,UAAA;AAAA,UACA,KAAA;AAAA,UACA,sBAAA;AAAA,UACA,aAAA;AAAA,UACA;AAAA;AAAA;AACF,KACF,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
@@ -1,46 +1,50 @@
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
1
2
  import IconButton from '@material-ui/core/IconButton';
2
3
  import Menu from '@material-ui/core/Menu';
3
4
  import MenuItem from '@material-ui/core/MenuItem';
4
5
  import Typography from '@material-ui/core/Typography';
5
6
  import MoreVertIcon from '@material-ui/icons/MoreVert';
6
- import React from 'react';
7
+ import { useState } from 'react';
7
8
  import { ilertApiRef } from '../../api/client.esm.js';
8
9
  import { Link } from '@backstage/core-components';
9
10
  import { useApi } from '@backstage/core-plugin-api';
10
11
 
11
12
  const ServiceActionsMenu = ({ service }) => {
12
13
  const ilertApi = useApi(ilertApiRef);
13
- const [anchorEl, setAnchorEl] = React.useState(null);
14
+ const [anchorEl, setAnchorEl] = useState(null);
14
15
  const handleClick = (event) => {
15
16
  setAnchorEl(event.currentTarget);
16
17
  };
17
18
  const handleCloseMenu = () => {
18
19
  setAnchorEl(null);
19
20
  };
20
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
21
- IconButton,
22
- {
23
- "aria-label": "more",
24
- "aria-controls": "long-menu",
25
- "aria-haspopup": "true",
26
- onClick: handleClick,
27
- size: "small"
28
- },
29
- /* @__PURE__ */ React.createElement(MoreVertIcon, null)
30
- ), /* @__PURE__ */ React.createElement(
31
- Menu,
32
- {
33
- id: `service-actions-menu-${service.id}`,
34
- anchorEl,
35
- keepMounted: true,
36
- open: Boolean(anchorEl),
37
- onClose: handleCloseMenu,
38
- PaperProps: {
39
- style: { maxHeight: 48 * 5.5 }
21
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
22
+ /* @__PURE__ */ jsx(
23
+ IconButton,
24
+ {
25
+ "aria-label": "more",
26
+ "aria-controls": "long-menu",
27
+ "aria-haspopup": "true",
28
+ onClick: handleClick,
29
+ size: "small",
30
+ children: /* @__PURE__ */ jsx(MoreVertIcon, {})
40
31
  }
41
- },
42
- /* @__PURE__ */ React.createElement(MenuItem, { key: "details", onClick: handleCloseMenu }, /* @__PURE__ */ React.createElement(Typography, { variant: "inherit", noWrap: true }, /* @__PURE__ */ React.createElement(Link, { to: ilertApi.getServiceDetailsURL(service) }, "View in iLert")))
43
- ));
32
+ ),
33
+ /* @__PURE__ */ jsx(
34
+ Menu,
35
+ {
36
+ id: `service-actions-menu-${service.id}`,
37
+ anchorEl,
38
+ keepMounted: true,
39
+ open: Boolean(anchorEl),
40
+ onClose: handleCloseMenu,
41
+ PaperProps: {
42
+ style: { maxHeight: 48 * 5.5 }
43
+ },
44
+ children: /* @__PURE__ */ jsx(MenuItem, { onClick: handleCloseMenu, children: /* @__PURE__ */ jsx(Typography, { variant: "inherit", noWrap: true, children: /* @__PURE__ */ jsx(Link, { to: ilertApi.getServiceDetailsURL(service), children: "View in iLert" }) }) }, "details")
45
+ }
46
+ )
47
+ ] });
44
48
  };
45
49
 
46
50
  export { ServiceActionsMenu };
@@ -1 +1 @@
1
- {"version":3,"file":"ServiceActionsMenu.esm.js","sources":["../../../src/components/Service/ServiceActionsMenu.tsx"],"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 */\nimport IconButton from '@material-ui/core/IconButton';\nimport Menu from '@material-ui/core/Menu';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Typography from '@material-ui/core/Typography';\nimport MoreVertIcon from '@material-ui/icons/MoreVert';\nimport React from 'react';\nimport { ilertApiRef } from '../../api';\nimport { Service } from '../../types';\n\nimport { Link } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const ServiceActionsMenu = ({ service }: { service: Service }) => {\n const ilertApi = useApi(ilertApiRef);\n const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null);\n\n const handleClick = (event: React.MouseEvent<HTMLElement>) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleCloseMenu = () => {\n setAnchorEl(null);\n };\n\n return (\n <>\n <IconButton\n aria-label=\"more\"\n aria-controls=\"long-menu\"\n aria-haspopup=\"true\"\n onClick={handleClick}\n size=\"small\"\n >\n <MoreVertIcon />\n </IconButton>\n <Menu\n id={`service-actions-menu-${service.id}`}\n anchorEl={anchorEl}\n keepMounted\n open={Boolean(anchorEl)}\n onClose={handleCloseMenu}\n PaperProps={{\n style: { maxHeight: 48 * 5.5 },\n }}\n >\n <MenuItem key=\"details\" onClick={handleCloseMenu}>\n <Typography variant=\"inherit\" noWrap>\n <Link to={ilertApi.getServiceDetailsURL(service)}>\n View in iLert\n </Link>\n </Typography>\n </MenuItem>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AQ,EAAA,SAAA,EAAU,QAAM,IAClC,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,EAAI,EAAA,QAAA,CAAS,qBAAqB,OAAO,CAAA,EAAA,EAAG,eAElD,CACF,CACF;AAAA,GAEJ,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"ServiceActionsMenu.esm.js","sources":["../../../src/components/Service/ServiceActionsMenu.tsx"],"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 */\nimport IconButton from '@material-ui/core/IconButton';\nimport Menu from '@material-ui/core/Menu';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport Typography from '@material-ui/core/Typography';\nimport MoreVertIcon from '@material-ui/icons/MoreVert';\nimport type { MouseEvent } from 'react';\nimport { useState } from 'react';\nimport { ilertApiRef } from '../../api';\nimport { Service } from '../../types';\n\nimport { Link } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const ServiceActionsMenu = ({ service }: { service: Service }) => {\n const ilertApi = useApi(ilertApiRef);\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const handleClick = (event: MouseEvent<HTMLElement>) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleCloseMenu = () => {\n setAnchorEl(null);\n };\n\n return (\n <>\n <IconButton\n aria-label=\"more\"\n aria-controls=\"long-menu\"\n aria-haspopup=\"true\"\n onClick={handleClick}\n size=\"small\"\n >\n <MoreVertIcon />\n </IconButton>\n <Menu\n id={`service-actions-menu-${service.id}`}\n anchorEl={anchorEl}\n keepMounted\n open={Boolean(anchorEl)}\n onClose={handleCloseMenu}\n PaperProps={{\n style: { maxHeight: 48 * 5.5 },\n }}\n >\n <MenuItem key=\"details\" onClick={handleCloseMenu}>\n <Typography variant=\"inherit\" noWrap>\n <Link to={ilertApi.getServiceDetailsURL(service)}>\n View in iLert\n </Link>\n </Typography>\n </MenuItem>\n </Menu>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AA4BO,MAAM,kBAAqB,GAAA,CAAC,EAAE,OAAA,EAAoC,KAAA;AACvE,EAAM,MAAA,QAAA,GAAW,OAAO,WAAW,CAAA;AACnC,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAI,SAA6B,IAAI,CAAA;AAEjE,EAAM,MAAA,WAAA,GAAc,CAAC,KAAmC,KAAA;AACtD,IAAA,WAAA,CAAY,MAAM,aAAa,CAAA;AAAA,GACjC;AAEA,EAAA,MAAM,kBAAkB,MAAM;AAC5B,IAAA,WAAA,CAAY,IAAI,CAAA;AAAA,GAClB;AAEA,EAAA,uBAEI,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,YAAW,EAAA,MAAA;AAAA,QACX,eAAc,EAAA,WAAA;AAAA,QACd,eAAc,EAAA,MAAA;AAAA,QACd,OAAS,EAAA,WAAA;AAAA,QACT,IAAK,EAAA,OAAA;AAAA,QAEL,8BAAC,YAAa,EAAA,EAAA;AAAA;AAAA,KAChB;AAAA,oBACA,GAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,EAAA,EAAI,CAAwB,qBAAA,EAAA,OAAA,CAAQ,EAAE,CAAA,CAAA;AAAA,QACtC,QAAA;AAAA,QACA,WAAW,EAAA,IAAA;AAAA,QACX,IAAA,EAAM,QAAQ,QAAQ,CAAA;AAAA,QACtB,OAAS,EAAA,eAAA;AAAA,QACT,UAAY,EAAA;AAAA,UACV,KAAO,EAAA,EAAE,SAAW,EAAA,EAAA,GAAK,GAAI;AAAA,SAC/B;AAAA,QAEA,QAAA,kBAAA,GAAA,CAAC,YAAuB,OAAS,EAAA,eAAA,EAC/B,8BAAC,UAAW,EAAA,EAAA,OAAA,EAAQ,WAAU,MAAM,EAAA,IAAA,EAClC,8BAAC,IAAK,EAAA,EAAA,EAAA,EAAI,SAAS,oBAAqB,CAAA,OAAO,GAAG,QAElD,EAAA,eAAA,EAAA,CAAA,EACF,KALY,SAMd;AAAA;AAAA;AACF,GACF,EAAA,CAAA;AAEJ;;;;"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsxs } from 'react/jsx-runtime';
2
2
  import { ilertApiRef } from '../../api/client.esm.js';
3
3
  import { Link } from '@backstage/core-components';
4
4
  import { useApi } from '@backstage/core-plugin-api';
@@ -8,7 +8,10 @@ const ServiceLink = ({ service }) => {
8
8
  if (!service) {
9
9
  return null;
10
10
  }
11
- return /* @__PURE__ */ React.createElement(Link, { to: ilertApi.getServiceDetailsURL(service) }, "#", service.id);
11
+ return /* @__PURE__ */ jsxs(Link, { to: ilertApi.getServiceDetailsURL(service), children: [
12
+ "#",
13
+ service.id
14
+ ] });
12
15
  };
13
16
 
14
17
  export { ServiceLink };
@@ -1 +1 @@
1
- {"version":3,"file":"ServiceLink.esm.js","sources":["../../../src/components/Service/ServiceLink.tsx"],"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 */\nimport React from 'react';\nimport { ilertApiRef } from '../../api';\nimport { Service } from '../../types';\n\nimport { Link } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const ServiceLink = ({ service }: { service: Service | null }) => {\n const ilertApi = useApi(ilertApiRef);\n\n if (!service) {\n return null;\n }\n\n return <Link to={ilertApi.getServiceDetailsURL(service)}>#{service.id}</Link>;\n};\n"],"names":[],"mappings":";;;;;AAsBO,MAAM,WAAc,GAAA,CAAC,EAAE,OAAA,EAA2C,KAAA;AACvE,EAAM,MAAA,QAAA,GAAW,OAAO,WAAW,CAAA;AAEnC,EAAA,IAAI,CAAC,OAAS,EAAA;AACZ,IAAO,OAAA,IAAA;AAAA;AAGT,EAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,EAAI,EAAA,QAAA,CAAS,qBAAqB,OAAO,CAAA,EAAA,EAAG,GAAE,EAAA,OAAA,CAAQ,EAAG,CAAA;AACxE;;;;"}
1
+ {"version":3,"file":"ServiceLink.esm.js","sources":["../../../src/components/Service/ServiceLink.tsx"],"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 */\nimport { ilertApiRef } from '../../api';\nimport { Service } from '../../types';\n\nimport { Link } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const ServiceLink = ({ service }: { service: Service | null }) => {\n const ilertApi = useApi(ilertApiRef);\n\n if (!service) {\n return null;\n }\n\n return <Link to={ilertApi.getServiceDetailsURL(service)}>#{service.id}</Link>;\n};\n"],"names":[],"mappings":";;;;;AAqBO,MAAM,WAAc,GAAA,CAAC,EAAE,OAAA,EAA2C,KAAA;AACvE,EAAM,MAAA,QAAA,GAAW,OAAO,WAAW,CAAA;AAEnC,EAAA,IAAI,CAAC,OAAS,EAAA;AACZ,IAAO,OAAA,IAAA;AAAA;AAGT,EAAA,4BAAQ,IAAK,EAAA,EAAA,EAAA,EAAI,QAAS,CAAA,oBAAA,CAAqB,OAAO,CAAG,EAAA,QAAA,EAAA;AAAA,IAAA,GAAA;AAAA,IAAE,OAAQ,CAAA;AAAA,GAAG,EAAA,CAAA;AACxE;;;;"}
@@ -1,5 +1,5 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
1
2
  import { Content, ResponseErrorPanel, ContentHeader, SupportButton } from '@backstage/core-components';
2
- import React from 'react';
3
3
  import { useServices } from '../../hooks/useServices.esm.js';
4
4
  import { MissingAuthorizationHeaderError } from '../Errors/MissingAuthorizationHeaderError.esm.js';
5
5
  import { ServicesTable } from './ServicesTable.esm.js';
@@ -11,21 +11,24 @@ const ServicesPage = () => {
11
11
  ] = useServices(true);
12
12
  if (error) {
13
13
  if (error.name === "AuthenticationError") {
14
- return /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(MissingAuthorizationHeaderError, null));
14
+ return /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsx(MissingAuthorizationHeaderError, {}) });
15
15
  }
16
- return /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(ResponseErrorPanel, { error }));
16
+ return /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsx(ResponseErrorPanel, { error }) });
17
17
  }
18
- return /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(ContentHeader, { title: "Services" }, /* @__PURE__ */ React.createElement(SupportButton, null, "This helps you to bring iLert into your developer portal.")), /* @__PURE__ */ React.createElement(
19
- ServicesTable,
20
- {
21
- services,
22
- tableState,
23
- onChangePage,
24
- onChangeRowsPerPage,
25
- isLoading,
26
- setIsLoading
27
- }
28
- ));
18
+ return /* @__PURE__ */ jsxs(Content, { children: [
19
+ /* @__PURE__ */ jsx(ContentHeader, { title: "Services", children: /* @__PURE__ */ jsx(SupportButton, { children: "This helps you to bring iLert into your developer portal." }) }),
20
+ /* @__PURE__ */ jsx(
21
+ ServicesTable,
22
+ {
23
+ services,
24
+ tableState,
25
+ onChangePage,
26
+ onChangeRowsPerPage,
27
+ isLoading,
28
+ setIsLoading
29
+ }
30
+ )
31
+ ] });
29
32
  };
30
33
 
31
34
  export { ServicesPage };
@@ -1 +1 @@
1
- {"version":3,"file":"ServicesPage.esm.js","sources":["../../../src/components/ServicesPage/ServicesPage.tsx"],"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 */\nimport {\n Content,\n ContentHeader,\n ResponseErrorPanel,\n SupportButton,\n} from '@backstage/core-components';\nimport React from 'react';\nimport { useServices } from '../../hooks/useServices';\nimport { MissingAuthorizationHeaderError } from '../Errors';\nimport { ServicesTable } from './ServicesTable';\n\nexport const ServicesPage = () => {\n const [\n { tableState, services, isLoading, error },\n { onChangePage, onChangeRowsPerPage, setIsLoading },\n ] = useServices(true);\n\n if (error) {\n if (error.name === 'AuthenticationError') {\n return (\n <Content>\n <MissingAuthorizationHeaderError />\n </Content>\n );\n }\n\n return (\n <Content>\n <ResponseErrorPanel error={error} />\n </Content>\n );\n }\n\n return (\n <Content>\n <ContentHeader title=\"Services\">\n <SupportButton>\n This helps you to bring iLert into your developer portal.\n </SupportButton>\n </ContentHeader>\n <ServicesTable\n services={services}\n tableState={tableState}\n onChangePage={onChangePage}\n onChangeRowsPerPage={onChangeRowsPerPage}\n isLoading={isLoading}\n setIsLoading={setIsLoading}\n />\n </Content>\n );\n};\n"],"names":[],"mappings":";;;;;;AA0BO,MAAM,eAAe,MAAM;AAChC,EAAM,MAAA;AAAA,IACJ,EAAE,UAAA,EAAY,QAAU,EAAA,SAAA,EAAW,KAAM,EAAA;AAAA,IACzC,EAAE,YAAc,EAAA,mBAAA,EAAqB,YAAa;AAAA,GACpD,GAAI,YAAY,IAAI,CAAA;AAEpB,EAAA,IAAI,KAAO,EAAA;AACT,IAAI,IAAA,KAAA,CAAM,SAAS,qBAAuB,EAAA;AACxC,MAAA,uBACG,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,IAAA,kBACE,KAAA,CAAA,aAAA,CAAA,+BAAA,EAAA,IAAgC,CACnC,CAAA;AAAA;AAIJ,IAAA,uBACG,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,IAAA,kBACE,KAAA,CAAA,aAAA,CAAA,kBAAA,EAAA,EAAmB,OAAc,CACpC,CAAA;AAAA;AAIJ,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,OACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,aAAc,EAAA,EAAA,KAAA,EAAM,8BAClB,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA,IAAA,EAAc,2DAEf,CACF,CACA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACC,QAAA;AAAA,MACA,UAAA;AAAA,MACA,YAAA;AAAA,MACA,mBAAA;AAAA,MACA,SAAA;AAAA,MACA;AAAA;AAAA,GAEJ,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"ServicesPage.esm.js","sources":["../../../src/components/ServicesPage/ServicesPage.tsx"],"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 */\nimport {\n Content,\n ContentHeader,\n ResponseErrorPanel,\n SupportButton,\n} from '@backstage/core-components';\nimport { useServices } from '../../hooks/useServices';\nimport { MissingAuthorizationHeaderError } from '../Errors';\nimport { ServicesTable } from './ServicesTable';\n\nexport const ServicesPage = () => {\n const [\n { tableState, services, isLoading, error },\n { onChangePage, onChangeRowsPerPage, setIsLoading },\n ] = useServices(true);\n\n if (error) {\n if (error.name === 'AuthenticationError') {\n return (\n <Content>\n <MissingAuthorizationHeaderError />\n </Content>\n );\n }\n\n return (\n <Content>\n <ResponseErrorPanel error={error} />\n </Content>\n );\n }\n\n return (\n <Content>\n <ContentHeader title=\"Services\">\n <SupportButton>\n This helps you to bring iLert into your developer portal.\n </SupportButton>\n </ContentHeader>\n <ServicesTable\n services={services}\n tableState={tableState}\n onChangePage={onChangePage}\n onChangeRowsPerPage={onChangeRowsPerPage}\n isLoading={isLoading}\n setIsLoading={setIsLoading}\n />\n </Content>\n );\n};\n"],"names":[],"mappings":";;;;;;AAyBO,MAAM,eAAe,MAAM;AAChC,EAAM,MAAA;AAAA,IACJ,EAAE,UAAA,EAAY,QAAU,EAAA,SAAA,EAAW,KAAM,EAAA;AAAA,IACzC,EAAE,YAAc,EAAA,mBAAA,EAAqB,YAAa;AAAA,GACpD,GAAI,YAAY,IAAI,CAAA;AAEpB,EAAA,IAAI,KAAO,EAAA;AACT,IAAI,IAAA,KAAA,CAAM,SAAS,qBAAuB,EAAA;AACxC,MAAA,uBACG,GAAA,CAAA,OAAA,EAAA,EACC,QAAC,kBAAA,GAAA,CAAA,+BAAA,EAAA,EAAgC,CACnC,EAAA,CAAA;AAAA;AAIJ,IAAA,uBACG,GAAA,CAAA,OAAA,EAAA,EACC,QAAC,kBAAA,GAAA,CAAA,kBAAA,EAAA,EAAmB,OAAc,CACpC,EAAA,CAAA;AAAA;AAIJ,EAAA,4BACG,OACC,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,iBAAc,KAAM,EAAA,UAAA,EACnB,QAAC,kBAAA,GAAA,CAAA,aAAA,EAAA,EAAc,uEAEf,CACF,EAAA,CAAA;AAAA,oBACA,GAAA;AAAA,MAAC,aAAA;AAAA,MAAA;AAAA,QACC,QAAA;AAAA,QACA,UAAA;AAAA,QACA,YAAA;AAAA,QACA,mBAAA;AAAA,QACA,SAAA;AAAA,QACA;AAAA;AAAA;AACF,GACF,EAAA,CAAA;AAEJ;;;;"}