@backstage-community/plugin-ilert 0.18.0 → 0.20.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.
- package/CHANGELOG.md +12 -0
- package/dist/ILertIcon.esm.js.map +1 -1
- package/dist/api/client.esm.js +2 -2
- package/dist/api/client.esm.js.map +1 -1
- package/dist/components/Alert/AlertActionsMenu.esm.js +9 -8
- package/dist/components/Alert/AlertActionsMenu.esm.js.map +1 -1
- package/dist/components/Alert/AlertAssignModal.esm.js +5 -4
- package/dist/components/Alert/AlertAssignModal.esm.js.map +1 -1
- package/dist/components/Alert/AlertLink.esm.js.map +1 -1
- package/dist/components/Alert/AlertNewModal.esm.js +5 -4
- package/dist/components/Alert/AlertNewModal.esm.js.map +1 -1
- package/dist/components/AlertSource/AlertSourceLink.esm.js.map +1 -1
- package/dist/components/AlertsPage/AlertsPage.esm.js.map +1 -1
- package/dist/components/AlertsPage/AlertsTable.esm.js.map +1 -1
- package/dist/components/AlertsPage/StatusChip.esm.js +1 -1
- package/dist/components/AlertsPage/StatusChip.esm.js.map +1 -1
- package/dist/components/AlertsPage/TableTitle.esm.js.map +1 -1
- package/dist/components/Errors/MissingAuthorizationHeaderError.esm.js.map +1 -1
- package/dist/components/ILertCard/ILertCard.esm.js.map +1 -1
- package/dist/components/ILertCard/ILertCardActionsHeader.esm.js +8 -7
- package/dist/components/ILertCard/ILertCardActionsHeader.esm.js.map +1 -1
- package/dist/components/ILertCard/ILertCardEmptyState.esm.js.map +1 -1
- package/dist/components/ILertCard/ILertCardHeaderStatus.esm.js.map +1 -1
- package/dist/components/ILertCard/ILertCardMaintenanceModal.esm.js +5 -4
- package/dist/components/ILertCard/ILertCardMaintenanceModal.esm.js.map +1 -1
- package/dist/components/ILertCard/ILertCardOnCall.esm.js +1 -1
- package/dist/components/ILertCard/ILertCardOnCall.esm.js.map +1 -1
- package/dist/components/ILertCard/ILertCardOnCallEmptyState.esm.js.map +1 -1
- package/dist/components/ILertCard/ILertCardOnCallItem.esm.js.map +1 -1
- package/dist/components/ILertCard/index.esm.js +6 -1
- package/dist/components/ILertCard/index.esm.js.map +1 -1
- package/dist/components/ILertPage/ILertPage.esm.js +1 -1
- package/dist/components/ILertPage/ILertPage.esm.js.map +1 -1
- package/dist/components/OnCallSchedulesPage/OnCallSchedulesGrid.esm.js.map +1 -1
- package/dist/components/OnCallSchedulesPage/OnCallSchedulesPage.esm.js.map +1 -1
- package/dist/components/OnCallSchedulesPage/OnCallShiftItem.esm.js.map +1 -1
- package/dist/components/Service/ServiceActionsMenu.esm.js.map +1 -1
- package/dist/components/Service/ServiceLink.esm.js.map +1 -1
- package/dist/components/ServicesPage/ServicesPage.esm.js.map +1 -1
- package/dist/components/ServicesPage/ServicesTable.esm.js.map +1 -1
- package/dist/components/ServicesPage/StatusChip.esm.js.map +1 -1
- package/dist/components/Shift/ShiftOverrideModal.esm.js +5 -4
- package/dist/components/Shift/ShiftOverrideModal.esm.js.map +1 -1
- package/dist/components/StatusPage/StatusPageActionsMenu.esm.js.map +1 -1
- package/dist/components/StatusPage/StatusPageLink.esm.js.map +1 -1
- package/dist/components/StatusPage/StatusPageURL.esm.js.map +1 -1
- package/dist/components/StatusPagePage/StatusChip.esm.js.map +1 -1
- package/dist/components/StatusPagePage/StatusPagesPage.esm.js.map +1 -1
- package/dist/components/StatusPagePage/StatusPagesTable.esm.js.map +1 -1
- package/dist/components/StatusPagePage/VisibilityChip.esm.js.map +1 -1
- package/dist/components/index.esm.js +5 -1
- package/dist/components/index.esm.js.map +1 -1
- package/dist/constants.esm.js.map +1 -1
- package/dist/hooks/index.esm.js.map +1 -1
- package/dist/hooks/useAlertActions.esm.js.map +1 -1
- package/dist/hooks/useAlertSource.esm.js.map +1 -1
- package/dist/hooks/useAlertSourceOnCalls.esm.js.map +1 -1
- package/dist/hooks/useAlerts.esm.js.map +1 -1
- package/dist/hooks/useAssignAlert.esm.js.map +1 -1
- package/dist/hooks/useNewAlert.esm.js.map +1 -1
- package/dist/hooks/useOnCallSchedules.esm.js.map +1 -1
- package/dist/hooks/useServices.esm.js.map +1 -1
- package/dist/hooks/useShiftOverride.esm.js.map +1 -1
- package/dist/hooks/useStatusPages.esm.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/plugin.esm.js +1 -1
- package/dist/plugin.esm.js.map +1 -1
- package/dist/route-refs.esm.js.map +1 -1
- package/dist/types.esm.js.map +1 -1
- package/package.json +9 -8
|
@@ -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 { 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,CAAA,GAAI,SAAiB,CAAC,CAAA;AACxD,EAAA,MAAM,
|
|
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 { 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,CAAA,GAAI,SAAiB,CAAC,CAAA;AACxD,EAAA,MAAM,IAAA,GAAO;AAAA,IACX,EAAE,OAAO,iBAAA,EAAkB;AAAA,IAC3B,EAAE,OAAO,QAAA,EAAS;AAAA,IAClB,EAAE,OAAO,UAAA,EAAW;AAAA,IACpB,EAAE,OAAO,cAAA;AAAe,GAC1B;AACA,EAAA,MAAM,YAAY,MAAM;AACtB,IAAA,QAAQ,WAAA;AAAa,MACnB,KAAK,CAAA;AACH,QAAA,2BAAQ,mBAAA,EAAA,EAAoB,CAAA;AAAA,MAC9B,KAAK,CAAA;AACH,QAAA,2BAAQ,UAAA,EAAA,EAAW,CAAA;AAAA,MACrB,KAAK,CAAA;AACH,QAAA,2BAAQ,YAAA,EAAA,EAAa,CAAA;AAAA,MACvB,KAAK,CAAA;AACH,QAAA,2BAAQ,eAAA,EAAA,EAAgB,CAAA;AAAA,MAC1B;AACE,QAAA,OAAO,IAAA;AAAA;AACX,EACF,CAAA;AAEA,EAAA,uBACE,IAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAQ,SAAA,EACZ,QAAA,EAAA;AAAA,oBAAA,IAAA,CAAC,MAAA,EAAA,EAAO,KAAA,EAAM,OAAA,EAAQ,IAAA,EAAK,MAAA,EACzB,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,WAAA,EAAA,EAAY,KAAA,EAAM,OAAA,EAAQ,KAAA,EAAM,OAAA,EAAQ,CAAA;AAAA,sBACzC,GAAA,CAAC,WAAA,EAAA,EAAY,KAAA,EAAM,WAAA,EAAY,OAAM,OAAA,EAAQ;AAAA,KAAA,EAC/C,CAAA;AAAA,oBACA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,aAAA,EAAe,WAAA;AAAA,QACf,QAAA,EAAU,CAAA,KAAA,KAAS,cAAA,CAAe,KAAK,CAAA;AAAA,QACvC,MAAM,IAAA,CAAK,GAAA,CAAI,CAAC,EAAE,KAAA,IAAS,KAAA,MAAW;AAAA,UACpC,EAAA,EAAI,MAAM,QAAA,EAAS;AAAA,UACnB;AAAA,SACF,CAAE;AAAA;AAAA,KACJ;AAAA,oBAEA,GAAA,CAAC,OAAA,EAAA,EAAQ,SAAA,EAAS,IAAA,EAAE,qBAAU,EAAE;AAAA,GAAA,EAClC,CAAA;AAEJ;;;;"}
|
|
@@ -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 { 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,
|
|
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 { 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,IAAA,EAAM;AAAA,IACJ,MAAA,EAAQ,EAAA;AAAA,IACR,KAAA,EAAO;AAAA,GACT;AAAA,EAEA,UAAA,EAAY;AAAA,IACV,QAAA,EAAU;AAAA,GACZ;AAAA,EAEA,WAAA,EAAa;AAAA,IACX,UAAA,EAAY,EAAA;AAAA,IACZ,UAAA,EAAY,mBAAA;AAAA,IACZ,QAAA,EAAU;AAAA,GACZ;AAAA,EAEA,aAAA,EAAe;AAAA,IACb,QAAA,EAAU,UAAA;AAAA,IACV,GAAA,EAAK,kBAAA;AAAA,IACL,IAAA,EAAM,EAAA;AAAA,IACN,KAAA,EAAO,EAAA;AAAA,IACP,MAAA,EAAQ,EAAA;AAAA,IACR,UAAA,EAAY,oBAAA;AAAA,IACZ,YAAA,EAAc;AAAA,GAChB;AAAA,EAEA,gBAAA,EAAkB;AAAA,IAChB,QAAA,EAAU,UAAA;AAAA,IACV,GAAA,EAAK,kBAAA;AAAA,IACL,IAAA,EAAM,EAAA;AAAA,IACN,KAAA,EAAO,EAAA;AAAA,IACP,MAAA,EAAQ,EAAA;AAAA,IACR,UA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A,CAAA,EAAI,QAAQ,YAAY,CAAA,CAAA;AAAA,QAEzD,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,aAAA,EAAe,CAAA;AAAA,0BACvC,GAAA;AAAA,YAAC,eAAA;AAAA,YAAA;AAAA,cACC,OAAO,QAAA,CAAS,SAAA;AAAA,cAChB,YAAY,QAAA,CAAS,EAAA;AAAA,cACrB;AAAA;AAAA,WACF;AAAA,8BACC,UAAA,EAAA,EAAW,SAAA,EAAW,QAAQ,UAAA,EAAY,OAAA,EAAQ,SAAQ,QAAA,EAAA,cAAA,EAE3D;AAAA;AAAA;AAAA;AACF,GAAA,EAAA,EArCS,KAsCX,CACD,CAAA,EACP,CAAA;AAEJ;;;;"}
|
|
@@ -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 { 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,
|
|
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,EAAA,MAAM,CAAC,EAAE,eAAA,EAAiB,SAAA,EAAW,KAAA,IAAS,EAAE,sBAAA,EAAwB,CAAA,GACtE,kBAAA,EAAmB;AAErB,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,IAAI,iBAAiB,mBAAA,EAAqB;AACxC,MAAA,uBACE,GAAA,CAAC,OAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,+BAAA,EAAA,EAAgC,CAAA,EACnC,CAAA;AAAA,IAEJ;AAEA,IAAA,uBACE,GAAA,CAAC,OAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,kBAAA,EAAA,EAAmB,OAAc,CAAA,EACpC,CAAA;AAAA,EAEJ;AAEA,EAAA,4BACG,OAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,iBAAc,KAAA,EAAM,iBAAA,EACnB,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,uEAEf,CAAA,EACF,CAAA;AAAA,oBACA,GAAA;AAAA,MAAC,mBAAA;AAAA,MAAA;AAAA,QACC,eAAA;AAAA,QACA,SAAA;AAAA,QACA;AAAA;AAAA;AACF,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -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 { 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,
|
|
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,UAAA,CAAW;AAAA,EAC3B,MAAA,EAAQ;AAAA,IACN,SAAA,EAAW,CAAA;AAAA,IACX,OAAA,EAAS,CAAA;AAAA,IACT,UAAA,EAAY,GAAA;AAAA,IACZ,QAAA,EAAU;AAAA,MACR,UAAA,EAAY,GAAA;AAAA,MACZ,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,OAAA,EAAS;AAAA,MACP,QAAA,EAAU;AAAA;AACZ;AAEJ,CAAC,CAAA;AAEM,MAAM,kBAAkB,CAAC;AAAA,EAC9B,UAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAA,KAIM;AACJ,EAAA,MAAM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AMA,QAAA,CACvD,OAAA,CAAQ,KAAA,CAAM,GAAG,CAAA,CACjB,QAAA,CAAS,cAAc,CAAC,IAC7B,CAAA,EACF,CAAA;AAAA,oBACA,IAAA,CAAC,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EAAC,IAAI,EAAA,EACb,QAAA,EAAA;AAAA,sBAAA,GAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,KAAA,EAAM,SAAA;AAAA,UACN,IAAA,EAAK,OAAA;AAAA,UACL,WAAW,OAAA,CAAQ,MAAA;AAAA,UACnB,SAAA,sBAAY,UAAA,EAAA,EAAW,CAAA;AAAA,UACvB,OAAA,EAAS,cAAA;AAAA,UAET,QAAA,kBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,OAAA,EAAQ,UAAA,EAAW,QAAA,EAAA,gBAAA,EAAc;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,KAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -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 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,
|
|
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,kBAAA,GAAqB,CAAC,EAAE,OAAA,EAAQ,KAA4B;AACvE,EAAA,MAAM,QAAA,GAAW,OAAO,WAAW,CAAA;AACnC,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAI,SAA6B,IAAI,CAAA;AAEjE,EAAA,MAAM,WAAA,GAAc,CAAC,KAAA,KAAmC;AACtD,IAAA,WAAA,CAAY,MAAM,aAAa,CAAA;AAAA,EACjC,CAAA;AAEA,EAAA,MAAM,kBAAkB,MAAM;AAC5B,IAAA,WAAA,CAAY,IAAI,CAAA;AAAA,EAClB,CAAA;AAEA,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,YAAA,EAAW,MAAA;AAAA,QACX,eAAA,EAAc,WAAA;AAAA,QACd,eAAA,EAAc,MAAA;AAAA,QACd,OAAA,EAAS,WAAA;AAAA,QACT,IAAA,EAAK,OAAA;AAAA,QAEL,8BAAC,YAAA,EAAA,EAAa;AAAA;AAAA,KAChB;AAAA,oBACA,GAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,EAAA,EAAI,CAAA,qBAAA,EAAwB,OAAA,CAAQ,EAAE,CAAA,CAAA;AAAA,QACtC,QAAA;AAAA,QACA,WAAA,EAAW,IAAA;AAAA,QACX,IAAA,EAAM,QAAQ,QAAQ,CAAA;AAAA,QACtB,OAAA,EAAS,eAAA;AAAA,QACT,UAAA,EAAY;AAAA,UACV,KAAA,EAAO,EAAE,SAAA,EAAW,EAAA,GAAK,GAAA;AAAI,SAC/B;AAAA,QAEA,QAAA,kBAAA,GAAA,CAAC,YAAuB,OAAA,EAAS,eAAA,EAC/B,8BAAC,UAAA,EAAA,EAAW,OAAA,EAAQ,WAAU,MAAA,EAAM,IAAA,EAClC,8BAAC,IAAA,EAAA,EAAK,EAAA,EAAI,SAAS,oBAAA,CAAqB,OAAO,GAAG,QAAA,EAAA,eAAA,EAElD,CAAA,EACF,KALY,SAMd;AAAA;AAAA;AACF,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -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 { 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,
|
|
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,WAAA,GAAc,CAAC,EAAE,OAAA,EAAQ,KAAmC;AACvE,EAAA,MAAM,QAAA,GAAW,OAAO,WAAW,CAAA;AAEnC,EAAA,IAAI,CAAC,OAAA,EAAS;AACZ,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,4BAAQ,IAAA,EAAA,EAAK,EAAA,EAAI,QAAA,CAAS,oBAAA,CAAqB,OAAO,CAAA,EAAG,QAAA,EAAA;AAAA,IAAA,GAAA;AAAA,IAAE,OAAA,CAAQ;AAAA,GAAA,EAAG,CAAA;AACxE;;;;"}
|
|
@@ -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 { 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,
|
|
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,EAAA,MAAM;AAAA,IACJ,EAAE,UAAA,EAAY,QAAA,EAAU,SAAA,EAAW,KAAA,EAAM;AAAA,IACzC,EAAE,YAAA,EAAc,mBAAA,EAAqB,YAAA;AAAa,GACpD,GAAI,YAAY,IAAI,CAAA;AAEpB,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,IAAI,KAAA,CAAM,SAAS,qBAAA,EAAuB;AACxC,MAAA,uBACE,GAAA,CAAC,OAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,+BAAA,EAAA,EAAgC,CAAA,EACnC,CAAA;AAAA,IAEJ;AAEA,IAAA,uBACE,GAAA,CAAC,OAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,kBAAA,EAAA,EAAmB,OAAc,CAAA,EACpC,CAAA;AAAA,EAEJ;AAEA,EAAA,4BACG,OAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,iBAAc,KAAA,EAAM,UAAA,EACnB,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,uEAEf,CAAA,EACF,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,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServicesTable.esm.js","sources":["../../../src/components/ServicesPage/ServicesTable.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 { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport { TableState } from '../../api';\nimport { Service } from '../../types';\nimport { StatusChip } from './StatusChip';\n\nimport { Table, TableColumn } from '@backstage/core-components';\nimport { ServiceActionsMenu } from '../Service/ServiceActionsMenu';\nimport { ServiceLink } from '../Service/ServiceLink';\n\nconst useStyles = makeStyles(theme => ({\n empty: {\n padding: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n },\n}));\n\nexport const ServicesTable = ({\n services,\n tableState,\n isLoading,\n onChangePage,\n onChangeRowsPerPage,\n compact,\n}: {\n services: Service[];\n tableState: TableState;\n isLoading: boolean;\n setIsLoading: (isLoading: boolean) => void;\n onChangePage: (page: number) => void;\n onChangeRowsPerPage: (pageSize: number) => void;\n compact?: boolean;\n}) => {\n const classes = useStyles();\n\n const smColumnStyle = {\n width: '10%',\n maxWidth: '10%',\n };\n const xlColumnStyle = {\n width: '30%',\n maxWidth: '30%',\n };\n const idColumn: TableColumn<Service> = {\n title: 'ID',\n field: 'id',\n highlight: true,\n cellStyle: smColumnStyle,\n headerStyle: smColumnStyle,\n render: rowData => <ServiceLink service={rowData} />,\n };\n const nameColumn: TableColumn<Service> = {\n title: 'Name',\n field: 'name',\n cellStyle: !compact ? xlColumnStyle : undefined,\n headerStyle: !compact ? xlColumnStyle : undefined,\n render: rowData => <Typography>{rowData.name}</Typography>,\n };\n const statusColumn: TableColumn<Service> = {\n title: 'Status',\n field: 'status',\n cellStyle: smColumnStyle,\n headerStyle: smColumnStyle,\n render: rowData => <StatusChip service={rowData} />,\n };\n const uptimeColumn: TableColumn<Service> = {\n title: 'Uptime in the last 90 days',\n field: 'uptimePercentage',\n cellStyle: smColumnStyle,\n headerStyle: smColumnStyle,\n render: rowData => (\n <Typography>{rowData.uptime?.uptimePercentage?.p90 || ''}</Typography>\n ),\n };\n const actionsColumn: TableColumn<Service> = {\n title: '',\n field: '',\n cellStyle: smColumnStyle,\n headerStyle: smColumnStyle,\n render: rowData => <ServiceActionsMenu service={rowData} />,\n };\n\n const columns: TableColumn<Service>[] = compact\n ? [nameColumn, statusColumn, uptimeColumn, actionsColumn]\n : [idColumn, nameColumn, statusColumn, uptimeColumn, actionsColumn];\n\n return (\n <Table\n options={{\n sorting: false,\n search: !compact,\n paging: !compact,\n actionsColumnIndex: -1,\n pageSize: tableState.pageSize,\n pageSizeOptions: !compact ? [10, 20, 50, 100] : [3, 10, 20, 50, 100],\n padding: 'dense',\n loadingType: 'overlay',\n showEmptyDataSourceMessage: !isLoading,\n showTitle: true,\n toolbar: true,\n }}\n emptyContent={\n <Typography color=\"textSecondary\" className={classes.empty}>\n No services\n </Typography>\n }\n title={\n <Typography variant=\"button\" color=\"textSecondary\">\n SERVICES\n </Typography>\n }\n page={tableState.page}\n onPageChange={onChangePage}\n onRowsPerPageChange={onChangeRowsPerPage}\n columns={columns}\n data={services}\n isLoading={isLoading}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAyBA,MAAM,SAAA,GAAY,WAAW,
|
|
1
|
+
{"version":3,"file":"ServicesTable.esm.js","sources":["../../../src/components/ServicesPage/ServicesTable.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 { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport { TableState } from '../../api';\nimport { Service } from '../../types';\nimport { StatusChip } from './StatusChip';\n\nimport { Table, TableColumn } from '@backstage/core-components';\nimport { ServiceActionsMenu } from '../Service/ServiceActionsMenu';\nimport { ServiceLink } from '../Service/ServiceLink';\n\nconst useStyles = makeStyles(theme => ({\n empty: {\n padding: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n },\n}));\n\nexport const ServicesTable = ({\n services,\n tableState,\n isLoading,\n onChangePage,\n onChangeRowsPerPage,\n compact,\n}: {\n services: Service[];\n tableState: TableState;\n isLoading: boolean;\n setIsLoading: (isLoading: boolean) => void;\n onChangePage: (page: number) => void;\n onChangeRowsPerPage: (pageSize: number) => void;\n compact?: boolean;\n}) => {\n const classes = useStyles();\n\n const smColumnStyle = {\n width: '10%',\n maxWidth: '10%',\n };\n const xlColumnStyle = {\n width: '30%',\n maxWidth: '30%',\n };\n const idColumn: TableColumn<Service> = {\n title: 'ID',\n field: 'id',\n highlight: true,\n cellStyle: smColumnStyle,\n headerStyle: smColumnStyle,\n render: rowData => <ServiceLink service={rowData} />,\n };\n const nameColumn: TableColumn<Service> = {\n title: 'Name',\n field: 'name',\n cellStyle: !compact ? xlColumnStyle : undefined,\n headerStyle: !compact ? xlColumnStyle : undefined,\n render: rowData => <Typography>{rowData.name}</Typography>,\n };\n const statusColumn: TableColumn<Service> = {\n title: 'Status',\n field: 'status',\n cellStyle: smColumnStyle,\n headerStyle: smColumnStyle,\n render: rowData => <StatusChip service={rowData} />,\n };\n const uptimeColumn: TableColumn<Service> = {\n title: 'Uptime in the last 90 days',\n field: 'uptimePercentage',\n cellStyle: smColumnStyle,\n headerStyle: smColumnStyle,\n render: rowData => (\n <Typography>{rowData.uptime?.uptimePercentage?.p90 || ''}</Typography>\n ),\n };\n const actionsColumn: TableColumn<Service> = {\n title: '',\n field: '',\n cellStyle: smColumnStyle,\n headerStyle: smColumnStyle,\n render: rowData => <ServiceActionsMenu service={rowData} />,\n };\n\n const columns: TableColumn<Service>[] = compact\n ? [nameColumn, statusColumn, uptimeColumn, actionsColumn]\n : [idColumn, nameColumn, statusColumn, uptimeColumn, actionsColumn];\n\n return (\n <Table\n options={{\n sorting: false,\n search: !compact,\n paging: !compact,\n actionsColumnIndex: -1,\n pageSize: tableState.pageSize,\n pageSizeOptions: !compact ? [10, 20, 50, 100] : [3, 10, 20, 50, 100],\n padding: 'dense',\n loadingType: 'overlay',\n showEmptyDataSourceMessage: !isLoading,\n showTitle: true,\n toolbar: true,\n }}\n emptyContent={\n <Typography color=\"textSecondary\" className={classes.empty}>\n No services\n </Typography>\n }\n title={\n <Typography variant=\"button\" color=\"textSecondary\">\n SERVICES\n </Typography>\n }\n page={tableState.page}\n onPageChange={onChangePage}\n onRowsPerPageChange={onChangeRowsPerPage}\n columns={columns}\n data={services}\n isLoading={isLoading}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAyBA,MAAM,SAAA,GAAY,WAAW,CAAA,KAAA,MAAU;AAAA,EACrC,KAAA,EAAO;AAAA,IACL,OAAA,EAAS,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,IACxB,OAAA,EAAS,MAAA;AAAA,IACT,cAAA,EAAgB;AAAA;AAEpB,CAAA,CAAE,CAAA;AAEK,MAAM,gBAAgB,CAAC;AAAA,EAC5B,QAAA;AAAA,EACA,UAAA;AAAA,EACA,SAAA;AAAA,EACA,YAAA;AAAA,EACA,mBAAA;AAAA,EACA;AACF,CAAA,KAQM;AACJ,EAAA,MAAM,UAAU,SAAA,EAAU;AAE1B,EAAA,MAAM,aAAA,GAAgB;AAAA,IACpB,KAAA,EAAO,KAAA;AAAA,IACP,QAAA,EAAU;AAAA,GACZ;AACA,EAAA,MAAM,aAAA,GAAgB;AAAA,IACpB,KAAA,EAAO,KAAA;AAAA,IACP,QAAA,EAAU;AAAA,GACZ;AACA,EAAA,MAAM,QAAA,GAAiC;AAAA,IACrC,KAAA,EAAO,IAAA;AAAA,IACP,KAAA,EAAO,IAAA;AAAA,IACP,SAAA,EAAW,IAAA;AAAA,IACX,SAAA,EAAW,aAAA;AAAA,IACX,WAAA,EAAa,aAAA;AAAA,IACb,MAAA,EAAQ,CAAA,OAAA,qBAAW,GAAA,CAAC,WAAA,EAAA,EAAY,SAAS,OAAA,EAAS;AAAA,GACpD;AACA,EAAA,MAAM,UAAA,GAAmC;AAAA,IACvC,KAAA,EAAO,MAAA;AAAA,IACP,KAAA,EAAO,MAAA;AAAA,IACP,SAAA,EAAW,CAAC,OAAA,GAAU,aAAA,GAAgB,MAAA;AAAA,IACtC,WAAA,EAAa,CAAC,OAAA,G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,CAAC,OAAA;AAAA,QACT,kBAAA,EAAoB,EAAA;AAAA,QACpB,UAAU,UAAA,CAAW,QAAA;AAAA,QACrB,eAAA,EAAiB,CAAC,OAAA,GAAU,CAAC,IAAI,EAAA,EAAI,EAAA,EAAI,GAAG,CAAA,GAAI,CAAC,CAAA,EAAG,EAAA,EAAI,EAAA,EAAI,IAAI,GAAG,CAAA;AAAA,QACnE,OAAA,EAAS,OAAA;AAAA,QACT,WAAA,EAAa,SAAA;AAAA,QACb,4BAA4B,CAAC,SAAA;AAAA,QAC7B,SAAA,EAAW,IAAA;AAAA,QACX,OAAA,EAAS;AAAA,OACX;AAAA,MACA,YAAA,sBACG,UAAA,EAAA,EAAW,KAAA,EAAM,iBAAgB,SAAA,EAAW,OAAA,CAAQ,OAAO,QAAA,EAAA,aAAA,EAE5D,CAAA;AAAA,MAEF,uBACE,GAAA,CAAC,UAAA,EAAA,EAAW,SAAQ,QAAA,EAAS,KAAA,EAAM,iBAAgB,QAAA,EAAA,UAAA,EAEnD,CAAA;AAAA,MAEF,MAAM,UAAA,CAAW,IAAA;AAAA,MACjB,YAAA,EAAc,YAAA;AAAA,MACd,mBAAA,EAAqB,mBAAA;AAAA,MACrB,OAAA;AAAA,MACA,IAAA,EAAM,QAAA;AAAA,MACN;AAAA;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusChip.esm.js","sources":["../../../src/components/ServicesPage/StatusChip.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 Chip from '@material-ui/core/Chip';\nimport { withStyles } from '@material-ui/core/styles';\nimport {\n DEGRADED,\n MAJOR_OUTAGE,\n OPERATIONAL,\n PARTIAL_OUTAGE,\n Service,\n UNDER_MAINTENANCE,\n} from '../../types';\n\nconst OperationalChip = withStyles(theme => ({\n root: {\n backgroundColor: '#388E3D',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\n\nconst UnderMaintenanceChip = withStyles(theme => ({\n root: {\n backgroundColor: '#616161',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\nconst DegradedChip = withStyles(theme => ({\n root: {\n backgroundColor: '#FBC02D',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\nconst PartialOutageChip = withStyles(theme => ({\n root: {\n backgroundColor: '#F57C02',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\nconst MajorOutageChip = withStyles(theme => ({\n root: {\n backgroundColor: '#D22F2E',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\n\nconst serviceStatusLabels = {\n [OPERATIONAL]: 'Operational',\n [UNDER_MAINTENANCE]: 'Under maintenance',\n [DEGRADED]: 'Degraded',\n [PARTIAL_OUTAGE]: 'Partial outage',\n [MAJOR_OUTAGE]: 'Major outage',\n} as Record<string, string>;\n\nexport const StatusChip = ({ service }: { service: Service }) => {\n const label = `${serviceStatusLabels[service.status]}`;\n\n switch (service.status) {\n case OPERATIONAL:\n return <OperationalChip label={label} size=\"small\" />;\n case UNDER_MAINTENANCE:\n return <UnderMaintenanceChip label={label} size=\"small\" />;\n case DEGRADED:\n return <DegradedChip label={label} size=\"small\" />;\n case PARTIAL_OUTAGE:\n return <PartialOutageChip label={label} size=\"small\" />;\n case MAJOR_OUTAGE:\n return <MajorOutageChip label={label} size=\"small\" />;\n default:\n return <Chip label={label} size=\"small\" />;\n }\n};\n"],"names":[],"mappings":";;;;;AA0BA,MAAM,eAAA,GAAkB,WAAW,
|
|
1
|
+
{"version":3,"file":"StatusChip.esm.js","sources":["../../../src/components/ServicesPage/StatusChip.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 Chip from '@material-ui/core/Chip';\nimport { withStyles } from '@material-ui/core/styles';\nimport {\n DEGRADED,\n MAJOR_OUTAGE,\n OPERATIONAL,\n PARTIAL_OUTAGE,\n Service,\n UNDER_MAINTENANCE,\n} from '../../types';\n\nconst OperationalChip = withStyles(theme => ({\n root: {\n backgroundColor: '#388E3D',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\n\nconst UnderMaintenanceChip = withStyles(theme => ({\n root: {\n backgroundColor: '#616161',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\nconst DegradedChip = withStyles(theme => ({\n root: {\n backgroundColor: '#FBC02D',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\nconst PartialOutageChip = withStyles(theme => ({\n root: {\n backgroundColor: '#F57C02',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\nconst MajorOutageChip = withStyles(theme => ({\n root: {\n backgroundColor: '#D22F2E',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\n\nconst serviceStatusLabels = {\n [OPERATIONAL]: 'Operational',\n [UNDER_MAINTENANCE]: 'Under maintenance',\n [DEGRADED]: 'Degraded',\n [PARTIAL_OUTAGE]: 'Partial outage',\n [MAJOR_OUTAGE]: 'Major outage',\n} as Record<string, string>;\n\nexport const StatusChip = ({ service }: { service: Service }) => {\n const label = `${serviceStatusLabels[service.status]}`;\n\n switch (service.status) {\n case OPERATIONAL:\n return <OperationalChip label={label} size=\"small\" />;\n case UNDER_MAINTENANCE:\n return <UnderMaintenanceChip label={label} size=\"small\" />;\n case DEGRADED:\n return <DegradedChip label={label} size=\"small\" />;\n case PARTIAL_OUTAGE:\n return <PartialOutageChip label={label} size=\"small\" />;\n case MAJOR_OUTAGE:\n return <MajorOutageChip label={label} size=\"small\" />;\n default:\n return <Chip label={label} size=\"small\" />;\n }\n};\n"],"names":[],"mappings":";;;;;AA0BA,MAAM,eAAA,GAAkB,WAAW,CAAA,KAAA,MAAU;AAAA,EAC3C,IAAA,EAAM;AAAA,IACJ,eAAA,EAAiB,SAAA;AAAA,IACjB,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO,KAAA;AAAA,IAC5B,MAAA,EAAQ;AAAA;AAEZ,CAAA,CAAE,EAAE,IAAI,CAAA;AAER,MAAM,oBAAA,GAAuB,WAAW,CAAA,KAAA,MAAU;AAAA,EAChD,IAAA,EAAM;AAAA,IACJ,eAAA,EAAiB,SAAA;AAAA,IACjB,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO,KAAA;AAAA,IAC5B,MAAA,EAAQ;AAAA;AAEZ,CAAA,CAAE,EAAE,IAAI,CAAA;AACR,MAAM,YAAA,GAAe,WAAW,CAAA,KAAA,MAAU;AAAA,EACxC,IAAA,EAAM;AAAA,IACJ,eAAA,EAAiB,SAAA;AAAA,IACjB,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO,KAAA;AAAA,IAC5B,MAAA,EAAQ;AAAA;AAEZ,CAAA,CAAE,EAAE,IAAI,CAAA;AACR,MAAM,iBAAA,GAAoB,WAAW,CAAA,KAAA,MAAU;AAAA,EAC7C,IAAA,EAAM;AAAA,IACJ,eAAA,EAAiB,SAAA;AAAA,IACjB,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO,KAAA;AAAA,IAC5B,MAAA,EAAQ;AAAA;AAEZ,CAAA,CAAE,EAAE,IAAI,CAAA;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A;AAAA,IACrD;AACE,MAAA,uBAAO,GAAA,CAAC,IAAA,EAAA,EAAK,KAAA,EAAc,IAAA,EAAK,OAAA,EAAQ,CAAA;AAAA;AAE9C;;;;"}
|
|
@@ -13,7 +13,8 @@ import { useShiftOverride } from '../../hooks/useShiftOverride.esm.js';
|
|
|
13
13
|
import { DateTimePicker } from '@material-ui/pickers/DateTimePicker';
|
|
14
14
|
import MuiPickersUtilsProvider from '@material-ui/pickers/MuiPickersUtilsProvider';
|
|
15
15
|
import LuxonUtils from '@date-io/luxon';
|
|
16
|
-
import { useApi
|
|
16
|
+
import { useApi } from '@backstage/core-plugin-api';
|
|
17
|
+
import { toastApiRef } from '@backstage/frontend-plugin-api';
|
|
17
18
|
|
|
18
19
|
const useStyles = makeStyles(() => ({
|
|
19
20
|
container: {
|
|
@@ -55,7 +56,7 @@ const ShiftOverrideModal = ({
|
|
|
55
56
|
{ setUser, setStart, setEnd, setIsLoading }
|
|
56
57
|
] = useShiftOverride(shift, isModalOpened);
|
|
57
58
|
const ilertApi = useApi(ilertApiRef);
|
|
58
|
-
const alertApi = useApi(
|
|
59
|
+
const alertApi = useApi(toastApiRef);
|
|
59
60
|
const classes = useStyles();
|
|
60
61
|
const handleClose = () => {
|
|
61
62
|
setIsModalOpened(false);
|
|
@@ -74,11 +75,11 @@ const ShiftOverrideModal = ({
|
|
|
74
75
|
end
|
|
75
76
|
);
|
|
76
77
|
if (success) {
|
|
77
|
-
alertApi.post({
|
|
78
|
+
alertApi.post({ title: "Shift overridden." });
|
|
78
79
|
refetchOnCallSchedules();
|
|
79
80
|
}
|
|
80
81
|
} catch (err) {
|
|
81
|
-
alertApi.post({
|
|
82
|
+
alertApi.post({ title: err, status: "danger" });
|
|
82
83
|
}
|
|
83
84
|
setIsModalOpened(false);
|
|
84
85
|
}, 250);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShiftOverrideModal.esm.js","sources":["../../../src/components/Shift/ShiftOverrideModal.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 */\n\nimport { makeStyles } from '@material-ui/core/styles';\nimport Button from '@material-ui/core/Button';\nimport TextField from '@material-ui/core/TextField';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport Autocomplete from '@material-ui/lab/Autocomplete';\nimport Typography from '@material-ui/core/Typography';\nimport { ilertApiRef } from '../../api';\nimport { useShiftOverride } from '../../hooks/useShiftOverride';\nimport { Shift } from '../../types';\nimport { DateTimePicker } from '@material-ui/pickers/DateTimePicker';\nimport MuiPickersUtilsProvider from '@material-ui/pickers/MuiPickersUtilsProvider';\nimport LuxonUtils from '@date-io/luxon';\nimport {
|
|
1
|
+
{"version":3,"file":"ShiftOverrideModal.esm.js","sources":["../../../src/components/Shift/ShiftOverrideModal.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 */\n\nimport { makeStyles } from '@material-ui/core/styles';\nimport Button from '@material-ui/core/Button';\nimport TextField from '@material-ui/core/TextField';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport Autocomplete from '@material-ui/lab/Autocomplete';\nimport Typography from '@material-ui/core/Typography';\nimport { ilertApiRef } from '../../api';\nimport { useShiftOverride } from '../../hooks/useShiftOverride';\nimport { Shift } from '../../types';\nimport { DateTimePicker } from '@material-ui/pickers/DateTimePicker';\nimport MuiPickersUtilsProvider from '@material-ui/pickers/MuiPickersUtilsProvider';\nimport LuxonUtils from '@date-io/luxon';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { toastApiRef } from '@backstage/frontend-plugin-api';\n\nconst useStyles = makeStyles(() => ({\n container: {\n display: 'flex',\n flexWrap: 'wrap',\n },\n formControl: {\n minWidth: 120,\n width: '100%',\n },\n option: {\n fontSize: 15,\n '& > span': {\n marginRight: 10,\n fontSize: 18,\n },\n },\n optionWrapper: {\n display: 'flex',\n width: '100%',\n },\n sourceImage: {\n height: 22,\n paddingRight: 4,\n },\n grow: {\n flexGrow: 1,\n },\n}));\n\nexport const ShiftOverrideModal = ({\n scheduleId,\n shift,\n refetchOnCallSchedules,\n isModalOpened,\n setIsModalOpened,\n}: {\n scheduleId: number;\n shift: Shift;\n refetchOnCallSchedules: () => void;\n isModalOpened: boolean;\n setIsModalOpened: (isModalOpened: boolean) => void;\n}) => {\n const [\n { isLoading, users, user, start, end },\n { setUser, setStart, setEnd, setIsLoading },\n ] = useShiftOverride(shift, isModalOpened);\n const ilertApi = useApi(ilertApiRef);\n const alertApi = useApi(toastApiRef);\n const classes = useStyles();\n\n const handleClose = () => {\n setIsModalOpened(false);\n };\n\n const handleOverride = () => {\n if (!shift || !shift.user) {\n return;\n }\n setIsLoading(true);\n setTimeout(async () => {\n try {\n const success = await ilertApi.overrideShift(\n scheduleId,\n user.id,\n start,\n end,\n );\n if (success) {\n alertApi.post({ title: 'Shift overridden.' });\n refetchOnCallSchedules();\n }\n } catch (err) {\n alertApi.post({ title: err, status: 'danger' });\n }\n setIsModalOpened(false);\n }, 250);\n };\n\n if (!shift) {\n return null;\n }\n\n return (\n <Dialog\n open={isModalOpened}\n onClose={handleClose}\n aria-labelledby=\"override-shift-form-title\"\n >\n <DialogTitle id=\"override-shift-form-title\">Shift override</DialogTitle>\n <DialogContent>\n <MuiPickersUtilsProvider utils={LuxonUtils}>\n <Autocomplete\n disabled={isLoading}\n options={users}\n value={user}\n classes={{\n root: classes.formControl,\n option: classes.option,\n }}\n onChange={(_event: any, newValue: any) => {\n setUser(newValue);\n }}\n autoHighlight\n getOptionLabel={a => ilertApi.getUserInitials(a)}\n renderOption={a => (\n <div className={classes.optionWrapper}>\n <Typography noWrap>{ilertApi.getUserInitials(a)}</Typography>\n </div>\n )}\n renderInput={params => (\n <TextField\n {...params}\n label=\"User\"\n variant=\"outlined\"\n fullWidth\n inputProps={{\n ...params.inputProps,\n autoComplete: 'new-password', // disable autocomplete and autofill\n }}\n />\n )}\n />\n <DateTimePicker\n label=\"Start\"\n inputVariant=\"outlined\"\n fullWidth\n margin=\"normal\"\n ampm={false}\n value={start}\n className={classes.formControl}\n onChange={date => {\n setStart(date?.toISO() ?? '');\n }}\n />\n <DateTimePicker\n label=\"End\"\n inputVariant=\"outlined\"\n fullWidth\n margin=\"normal\"\n ampm={false}\n value={end}\n className={classes.formControl}\n onChange={date => {\n setEnd(date?.toISO() ?? '');\n }}\n />\n </MuiPickersUtilsProvider>\n </DialogContent>\n <DialogActions>\n <Button\n disabled={isLoading}\n onClick={handleOverride}\n color=\"primary\"\n variant=\"contained\"\n >\n Override\n </Button>\n <Button disabled={isLoading} onClick={handleClose} color=\"primary\">\n Cancel\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAkCA,MAAM,SAAA,GAAY,WAAW,OAAO;AAAA,EAClC,SAAA,EAAW;AAAA,IACT,OAAA,EAAS,MAAA;AAAA,IACT,QAAA,EAAU;AAAA,GACZ;A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UAAA;AAAA,cACb,SAAA,EAAS,IAAA;AAAA,cACT,MAAA,EAAO,QAAA;AAAA,cACP,IAAA,EAAM,KAAA;AAAA,cACN,KAAA,EAAO,GAAA;AAAA,cACP,WAAW,OAAA,CAAQ,WAAA;AAAA,cACnB,UAAU,CAAA,IAAA,KAAQ;AAChB,gBAAA,MAAA,CAAO,IAAA,EAAM,KAAA,EAAM,IAAK,EAAE,CAAA;AAAA,cAC5B;AAAA;AAAA;AACF,SAAA,EACF,CAAA,EACF,CAAA;AAAA,6BACC,aAAA,EAAA,EACC,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,QAAA,EAAU,SAAA;AAAA,cACV,OAAA,EAAS,cAAA;AAAA,cACT,KAAA,EAAM,SAAA;AAAA,cACN,OAAA,EAAQ,WAAA;AAAA,cACT,QAAA,EAAA;AAAA;AAAA,WAED;AAAA,0BACA,GAAA,CAAC,UAAO,QAAA,EAAU,SAAA,EAAW,SAAS,WAAA,EAAa,KAAA,EAAM,WAAU,QAAA,EAAA,QAAA,EAEnE;AAAA,SAAA,EACF;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusPageActionsMenu.esm.js","sources":["../../../src/components/StatusPage/StatusPageActionsMenu.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 { StatusPage } from '../../types';\n\nimport { Link } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const StatusPageActionsMenu = ({\n statusPage,\n}: {\n statusPage: StatusPage;\n}) => {\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={`statusPage-actions-menu-${statusPage.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.getStatusPageDetailsURL(statusPage)}>\n View in iLert\n </Link>\n </Typography>\n </MenuItem>\n <MenuItem>\n <Typography variant=\"inherit\" noWrap>\n <Link to={`https://${ilertApi.getStatusPageURL(statusPage)}`}>\n View status page\n </Link>\n </Typography>\n </MenuItem>\n </Menu>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AA4BO,MAAM,wBAAwB,CAAC;AAAA,EACpC;AACF,
|
|
1
|
+
{"version":3,"file":"StatusPageActionsMenu.esm.js","sources":["../../../src/components/StatusPage/StatusPageActionsMenu.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 { StatusPage } from '../../types';\n\nimport { Link } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const StatusPageActionsMenu = ({\n statusPage,\n}: {\n statusPage: StatusPage;\n}) => {\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={`statusPage-actions-menu-${statusPage.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.getStatusPageDetailsURL(statusPage)}>\n View in iLert\n </Link>\n </Typography>\n </MenuItem>\n <MenuItem>\n <Typography variant=\"inherit\" noWrap>\n <Link to={`https://${ilertApi.getStatusPageURL(statusPage)}`}>\n View status page\n </Link>\n </Typography>\n </MenuItem>\n </Menu>\n </>\n );\n};\n"],"names":[],"mappings":";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AA,CAAwB,UAAU,GAAG,QAAA,EAAA,eAAA,EAExD,CAAA,EACF,KALY,SAMd,CAAA;AAAA,8BACC,QAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,cAAW,OAAA,EAAQ,SAAA,EAAU,QAAM,IAAA,EAClC,QAAA,kBAAA,GAAA,CAAC,QAAK,EAAA,EAAI,CAAA,QAAA,EAAW,SAAS,gBAAA,CAAiB,UAAU,CAAC,CAAA,CAAA,EAAI,QAAA,EAAA,kBAAA,EAE9D,GACF,CAAA,EACF;AAAA;AAAA;AAAA;AACF,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusPageLink.esm.js","sources":["../../../src/components/StatusPage/StatusPageLink.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 { StatusPage } from '../../types';\n\nimport { Link } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const StatusPageLink = ({\n statusPage,\n}: {\n statusPage: StatusPage | null;\n}) => {\n const ilertApi = useApi(ilertApiRef);\n\n if (!statusPage) {\n return null;\n }\n\n return (\n <Link to={ilertApi.getStatusPageDetailsURL(statusPage)}>\n #{statusPage.id}\n </Link>\n );\n};\n"],"names":[],"mappings":";;;;;AAqBO,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AACF,
|
|
1
|
+
{"version":3,"file":"StatusPageLink.esm.js","sources":["../../../src/components/StatusPage/StatusPageLink.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 { StatusPage } from '../../types';\n\nimport { Link } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const StatusPageLink = ({\n statusPage,\n}: {\n statusPage: StatusPage | null;\n}) => {\n const ilertApi = useApi(ilertApiRef);\n\n if (!statusPage) {\n return null;\n }\n\n return (\n <Link to={ilertApi.getStatusPageDetailsURL(statusPage)}>\n #{statusPage.id}\n </Link>\n );\n};\n"],"names":[],"mappings":";;;;;AAqBO,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AACF,CAAA,KAEM;AACJ,EAAA,MAAM,QAAA,GAAW,OAAO,WAAW,CAAA;AAEnC,EAAA,IAAI,CAAC,UAAA,EAAY;AACf,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,4BACG,IAAA,EAAA,EAAK,EAAA,EAAI,QAAA,CAAS,uBAAA,CAAwB,UAAU,CAAA,EAAG,QAAA,EAAA;AAAA,IAAA,GAAA;AAAA,IACpD,UAAA,CAAW;AAAA,GAAA,EACf,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusPageURL.esm.js","sources":["../../../src/components/StatusPage/StatusPageURL.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 { StatusPage } from '../../types';\n\nimport { Link } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const StatusPageURL = ({\n statusPage,\n}: {\n statusPage: StatusPage | null;\n}) => {\n const ilertApi = useApi(ilertApiRef);\n\n if (!statusPage) {\n return null;\n }\n\n const url = ilertApi.getStatusPageURL(statusPage);\n\n return <Link to={`https://${url}`}>{url}</Link>;\n};\n"],"names":[],"mappings":";;;;;AAqBO,MAAM,gBAAgB,CAAC;AAAA,EAC5B;AACF,
|
|
1
|
+
{"version":3,"file":"StatusPageURL.esm.js","sources":["../../../src/components/StatusPage/StatusPageURL.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 { StatusPage } from '../../types';\n\nimport { Link } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const StatusPageURL = ({\n statusPage,\n}: {\n statusPage: StatusPage | null;\n}) => {\n const ilertApi = useApi(ilertApiRef);\n\n if (!statusPage) {\n return null;\n }\n\n const url = ilertApi.getStatusPageURL(statusPage);\n\n return <Link to={`https://${url}`}>{url}</Link>;\n};\n"],"names":[],"mappings":";;;;;AAqBO,MAAM,gBAAgB,CAAC;AAAA,EAC5B;AACF,CAAA,KAEM;AACJ,EAAA,MAAM,QAAA,GAAW,OAAO,WAAW,CAAA;AAEnC,EAAA,IAAI,CAAC,UAAA,EAAY;AACf,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,MAAM,GAAA,GAAM,QAAA,CAAS,gBAAA,CAAiB,UAAU,CAAA;AAEhD,EAAA,2BAAQ,IAAA,EAAA,EAAK,EAAA,EAAI,CAAA,QAAA,EAAW,GAAG,IAAK,QAAA,EAAA,GAAA,EAAI,CAAA;AAC1C;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusChip.esm.js","sources":["../../../src/components/StatusPagePage/StatusChip.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 Chip from '@material-ui/core/Chip';\nimport { withStyles } from '@material-ui/core/styles';\nimport {\n DEGRADED,\n MAJOR_OUTAGE,\n OPERATIONAL,\n PARTIAL_OUTAGE,\n StatusPage,\n UNDER_MAINTENANCE,\n} from '../../types';\n\nconst OperationalChip = withStyles(theme => ({\n root: {\n backgroundColor: '#388E3D',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\n\nconst UnderMaintenanceChip = withStyles(theme => ({\n root: {\n backgroundColor: '#616161',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\nconst DegradedChip = withStyles(theme => ({\n root: {\n backgroundColor: '#FBC02D',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\nconst PartialOutageChip = withStyles(theme => ({\n root: {\n backgroundColor: '#F57C02',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\nconst MajorOutageChip = withStyles(theme => ({\n root: {\n backgroundColor: '#D22F2E',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\n\nconst statusPageStatusLabels = {\n [OPERATIONAL]: 'Operational',\n [UNDER_MAINTENANCE]: 'Under maintenance',\n [DEGRADED]: 'Degraded',\n [PARTIAL_OUTAGE]: 'Partial outage',\n [MAJOR_OUTAGE]: 'Major outage',\n} as Record<string, string>;\n\nexport const StatusChip = ({ statusPage }: { statusPage: StatusPage }) => {\n const label = `${statusPageStatusLabels[statusPage.status]}`;\n\n switch (statusPage.status) {\n case OPERATIONAL:\n return <OperationalChip label={label} size=\"small\" />;\n case UNDER_MAINTENANCE:\n return <UnderMaintenanceChip label={label} size=\"small\" />;\n case DEGRADED:\n return <DegradedChip label={label} size=\"small\" />;\n case PARTIAL_OUTAGE:\n return <PartialOutageChip label={label} size=\"small\" />;\n case MAJOR_OUTAGE:\n return <MajorOutageChip label={label} size=\"small\" />;\n default:\n return <Chip label={label} size=\"small\" />;\n }\n};\n"],"names":[],"mappings":";;;;;AA0BA,MAAM,eAAA,GAAkB,WAAW,
|
|
1
|
+
{"version":3,"file":"StatusChip.esm.js","sources":["../../../src/components/StatusPagePage/StatusChip.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 Chip from '@material-ui/core/Chip';\nimport { withStyles } from '@material-ui/core/styles';\nimport {\n DEGRADED,\n MAJOR_OUTAGE,\n OPERATIONAL,\n PARTIAL_OUTAGE,\n StatusPage,\n UNDER_MAINTENANCE,\n} from '../../types';\n\nconst OperationalChip = withStyles(theme => ({\n root: {\n backgroundColor: '#388E3D',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\n\nconst UnderMaintenanceChip = withStyles(theme => ({\n root: {\n backgroundColor: '#616161',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\nconst DegradedChip = withStyles(theme => ({\n root: {\n backgroundColor: '#FBC02D',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\nconst PartialOutageChip = withStyles(theme => ({\n root: {\n backgroundColor: '#F57C02',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\nconst MajorOutageChip = withStyles(theme => ({\n root: {\n backgroundColor: '#D22F2E',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\n\nconst statusPageStatusLabels = {\n [OPERATIONAL]: 'Operational',\n [UNDER_MAINTENANCE]: 'Under maintenance',\n [DEGRADED]: 'Degraded',\n [PARTIAL_OUTAGE]: 'Partial outage',\n [MAJOR_OUTAGE]: 'Major outage',\n} as Record<string, string>;\n\nexport const StatusChip = ({ statusPage }: { statusPage: StatusPage }) => {\n const label = `${statusPageStatusLabels[statusPage.status]}`;\n\n switch (statusPage.status) {\n case OPERATIONAL:\n return <OperationalChip label={label} size=\"small\" />;\n case UNDER_MAINTENANCE:\n return <UnderMaintenanceChip label={label} size=\"small\" />;\n case DEGRADED:\n return <DegradedChip label={label} size=\"small\" />;\n case PARTIAL_OUTAGE:\n return <PartialOutageChip label={label} size=\"small\" />;\n case MAJOR_OUTAGE:\n return <MajorOutageChip label={label} size=\"small\" />;\n default:\n return <Chip label={label} size=\"small\" />;\n }\n};\n"],"names":[],"mappings":";;;;;AA0BA,MAAM,eAAA,GAAkB,WAAW,CAAA,KAAA,MAAU;AAAA,EAC3C,IAAA,EAAM;AAAA,IACJ,eAAA,EAAiB,SAAA;AAAA,IACjB,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO,KAAA;AAAA,IAC5B,MAAA,EAAQ;AAAA;AAEZ,CAAA,CAAE,EAAE,IAAI,CAAA;AAER,MAAM,oB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EAAA,MAAM,KAAA,GAAQ,CAAA,EAAG,sBAAA,CAAuB,UAAA,CAAW,MAAM,CAAC,CAAA,CAAA;AAE1D,EAAA,QAAQ,WAAW,MAAA;AAAQ,IACzB,KAAK,WAAA;AACH,MAAA,uBAAO,GAAA,CAAC,eAAA,EAAA,EAAgB,KAAA,EAAc,IAAA,EAAK,OAAA,EAAQ,CAAA;AAAA,IACrD,KAAK,iBAAA;AACH,MAAA,uBAAO,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAc,IAAA,EAAK,OAAA,EAAQ,CAAA;AAAA,IAC1D,KAAK,QAAA;AACH,MAAA,uBAAO,GAAA,CAAC,YAAA,EAAA,EAAa,KAAA,EAAc,IAAA,EAAK,OAAA,EAAQ,CAAA;AAAA,IAClD,KAAK,cAAA;AACH,MAAA,uBAAO,GAAA,CAAC,iBAAA,EAAA,EAAkB,KAAA,EAAc,IAAA,EAAK,OAAA,EAAQ,CAAA;AAAA,IACvD,KAAK,YAAA;AACH,MAAA,uBAAO,GAAA,CAAC,eAAA,EAAA,EAAgB,KAAA,EAAc,IAAA,EAAK,OAAA,EAAQ,CAAA;AAAA,IACrD;AACE,MAAA,uBAAO,GAAA,CAAC,IAAA,EAAA,EAAK,KAAA,EAAc,IAAA,EAAK,OAAA,EAAQ,CAAA;AAAA;AAE9C;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusPagesPage.esm.js","sources":["../../../src/components/StatusPagePage/StatusPagesPage.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 { useStatusPages } from '../../hooks/useStatusPages';\nimport { MissingAuthorizationHeaderError } from '../Errors';\nimport { StatusPagesTable } from './StatusPagesTable';\n\nexport const StatusPagesPage = () => {\n const [\n { tableState, statusPages, isLoading, error },\n { onChangePage, onChangeRowsPerPage, setIsLoading },\n ] = useStatusPages(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=\"Status pages\">\n <SupportButton>\n This helps you to bring iLert into your developer portal.\n </SupportButton>\n </ContentHeader>\n <StatusPagesTable\n statusPages={statusPages}\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,kBAAkB,MAAM;AACnC,
|
|
1
|
+
{"version":3,"file":"StatusPagesPage.esm.js","sources":["../../../src/components/StatusPagePage/StatusPagesPage.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 { useStatusPages } from '../../hooks/useStatusPages';\nimport { MissingAuthorizationHeaderError } from '../Errors';\nimport { StatusPagesTable } from './StatusPagesTable';\n\nexport const StatusPagesPage = () => {\n const [\n { tableState, statusPages, isLoading, error },\n { onChangePage, onChangeRowsPerPage, setIsLoading },\n ] = useStatusPages(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=\"Status pages\">\n <SupportButton>\n This helps you to bring iLert into your developer portal.\n </SupportButton>\n </ContentHeader>\n <StatusPagesTable\n statusPages={statusPages}\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,kBAAkB,MAAM;AACnC,EAAA,MAAM;AAAA,IACJ,EAAE,UAAA,EAAY,WAAA,EAAa,SAAA,EAAW,KAAA,EAAM;AAAA,IAC5C,EAAE,YAAA,EAAc,mBAAA,EAAqB,YAAA;AAAa,GACpD,GAAI,eAAe,IAAI,CAAA;AAEvB,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,IAAI,KAAA,CAAM,SAAS,qBAAA,EAAuB;AACxC,MAAA,uBACE,GAAA,CAAC,OAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,+BAAA,EAAA,EAAgC,CAAA,EACnC,CAAA;AAAA,IAEJ;AAEA,IAAA,uBACE,GAAA,CAAC,OAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,kBAAA,EAAA,EAAmB,OAAc,CAAA,EACpC,CAAA;AAAA,EAEJ;AAEA,EAAA,4BACG,OAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,iBAAc,KAAA,EAAM,cAAA,EACnB,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,uEAEf,CAAA,EACF,CAAA;AAAA,oBACA,GAAA;AAAA,MAAC,gBAAA;AAAA,MAAA;AAAA,QACC,WAAA;AAAA,QACA,UAAA;AAAA,QACA,YAAA;AAAA,QACA,mBAAA;AAAA,QACA,SAAA;AAAA,QACA;AAAA;AAAA;AACF,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusPagesTable.esm.js","sources":["../../../src/components/StatusPagePage/StatusPagesTable.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 { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport { TableState } from '../../api';\nimport { StatusPage } from '../../types';\nimport { VisibilityChip } from './VisibilityChip';\n\nimport { Table, TableColumn } from '@backstage/core-components';\nimport { StatusPageActionsMenu } from '../StatusPage/StatusPageActionsMenu';\nimport { StatusPageLink } from '../StatusPage/StatusPageLink';\nimport { StatusPageURL } from '../StatusPage/StatusPageURL';\nimport { StatusChip } from './StatusChip';\n\nconst useStyles = makeStyles(theme => ({\n empty: {\n padding: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n },\n}));\n\nexport const StatusPagesTable = ({\n statusPages,\n tableState,\n isLoading,\n onChangePage,\n onChangeRowsPerPage,\n compact,\n}: {\n statusPages: StatusPage[];\n tableState: TableState;\n isLoading: boolean;\n setIsLoading: (isLoading: boolean) => void;\n onChangePage: (page: number) => void;\n onChangeRowsPerPage: (pageSize: number) => void;\n compact?: boolean;\n}) => {\n const classes = useStyles();\n\n const smColumnStyle = {\n width: '10%',\n maxWidth: '10%',\n };\n const xlColumnStyle = {\n width: '30%',\n maxWidth: '30%',\n };\n\n const idColumn: TableColumn<StatusPage> = {\n title: 'ID',\n field: 'id',\n highlight: true,\n cellStyle: smColumnStyle,\n headerStyle: smColumnStyle,\n render: rowData => <StatusPageLink statusPage={rowData} />,\n };\n const nameColumn: TableColumn<StatusPage> = {\n title: 'Name',\n field: 'name',\n cellStyle: !compact ? xlColumnStyle : undefined,\n headerStyle: !compact ? xlColumnStyle : undefined,\n render: rowData => <Typography>{rowData.name}</Typography>,\n };\n const urlColumn: TableColumn<StatusPage> = {\n title: 'URL',\n field: 'url',\n cellStyle: smColumnStyle,\n headerStyle: smColumnStyle,\n render: rowData => <StatusPageURL statusPage={rowData} />,\n };\n const visibilityColumn: TableColumn<StatusPage> = {\n title: 'Visibility',\n field: 'visibility',\n cellStyle: smColumnStyle,\n headerStyle: smColumnStyle,\n render: rowData => <VisibilityChip statusPage={rowData} />,\n };\n const statusColumn: TableColumn<StatusPage> = {\n title: 'Status',\n field: 'status',\n cellStyle: smColumnStyle,\n headerStyle: smColumnStyle,\n render: rowData => <StatusChip statusPage={rowData} />,\n };\n const actionsColumn: TableColumn<StatusPage> = {\n title: '',\n field: '',\n cellStyle: smColumnStyle,\n headerStyle: smColumnStyle,\n render: rowData => <StatusPageActionsMenu statusPage={rowData} />,\n };\n\n const columns: TableColumn<StatusPage>[] = compact\n ? [nameColumn, statusColumn, urlColumn, actionsColumn]\n : [\n idColumn,\n nameColumn,\n statusColumn,\n urlColumn,\n visibilityColumn,\n actionsColumn,\n ];\n\n return (\n <Table\n options={{\n sorting: false,\n search: !compact,\n paging: !compact,\n actionsColumnIndex: -1,\n pageSize: tableState.pageSize,\n pageSizeOptions: !compact ? [10, 20, 50, 100] : [3, 10, 20, 50, 100],\n padding: 'dense',\n loadingType: 'overlay',\n showEmptyDataSourceMessage: !isLoading,\n showTitle: true,\n toolbar: true,\n }}\n emptyContent={\n <Typography color=\"textSecondary\" className={classes.empty}>\n No status pages\n </Typography>\n }\n title={\n <Typography variant=\"button\" color=\"textSecondary\">\n STATUS PAGES\n </Typography>\n }\n page={tableState.page}\n onPageChange={onChangePage}\n onRowsPerPageChange={onChangeRowsPerPage}\n columns={columns}\n data={statusPages}\n isLoading={isLoading}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AA2BA,MAAM,SAAA,GAAY,WAAW,
|
|
1
|
+
{"version":3,"file":"StatusPagesTable.esm.js","sources":["../../../src/components/StatusPagePage/StatusPagesTable.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 { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport { TableState } from '../../api';\nimport { StatusPage } from '../../types';\nimport { VisibilityChip } from './VisibilityChip';\n\nimport { Table, TableColumn } from '@backstage/core-components';\nimport { StatusPageActionsMenu } from '../StatusPage/StatusPageActionsMenu';\nimport { StatusPageLink } from '../StatusPage/StatusPageLink';\nimport { StatusPageURL } from '../StatusPage/StatusPageURL';\nimport { StatusChip } from './StatusChip';\n\nconst useStyles = makeStyles(theme => ({\n empty: {\n padding: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n },\n}));\n\nexport const StatusPagesTable = ({\n statusPages,\n tableState,\n isLoading,\n onChangePage,\n onChangeRowsPerPage,\n compact,\n}: {\n statusPages: StatusPage[];\n tableState: TableState;\n isLoading: boolean;\n setIsLoading: (isLoading: boolean) => void;\n onChangePage: (page: number) => void;\n onChangeRowsPerPage: (pageSize: number) => void;\n compact?: boolean;\n}) => {\n const classes = useStyles();\n\n const smColumnStyle = {\n width: '10%',\n maxWidth: '10%',\n };\n const xlColumnStyle = {\n width: '30%',\n maxWidth: '30%',\n };\n\n const idColumn: TableColumn<StatusPage> = {\n title: 'ID',\n field: 'id',\n highlight: true,\n cellStyle: smColumnStyle,\n headerStyle: smColumnStyle,\n render: rowData => <StatusPageLink statusPage={rowData} />,\n };\n const nameColumn: TableColumn<StatusPage> = {\n title: 'Name',\n field: 'name',\n cellStyle: !compact ? xlColumnStyle : undefined,\n headerStyle: !compact ? xlColumnStyle : undefined,\n render: rowData => <Typography>{rowData.name}</Typography>,\n };\n const urlColumn: TableColumn<StatusPage> = {\n title: 'URL',\n field: 'url',\n cellStyle: smColumnStyle,\n headerStyle: smColumnStyle,\n render: rowData => <StatusPageURL statusPage={rowData} />,\n };\n const visibilityColumn: TableColumn<StatusPage> = {\n title: 'Visibility',\n field: 'visibility',\n cellStyle: smColumnStyle,\n headerStyle: smColumnStyle,\n render: rowData => <VisibilityChip statusPage={rowData} />,\n };\n const statusColumn: TableColumn<StatusPage> = {\n title: 'Status',\n field: 'status',\n cellStyle: smColumnStyle,\n headerStyle: smColumnStyle,\n render: rowData => <StatusChip statusPage={rowData} />,\n };\n const actionsColumn: TableColumn<StatusPage> = {\n title: '',\n field: '',\n cellStyle: smColumnStyle,\n headerStyle: smColumnStyle,\n render: rowData => <StatusPageActionsMenu statusPage={rowData} />,\n };\n\n const columns: TableColumn<StatusPage>[] = compact\n ? [nameColumn, statusColumn, urlColumn, actionsColumn]\n : [\n idColumn,\n nameColumn,\n statusColumn,\n urlColumn,\n visibilityColumn,\n actionsColumn,\n ];\n\n return (\n <Table\n options={{\n sorting: false,\n search: !compact,\n paging: !compact,\n actionsColumnIndex: -1,\n pageSize: tableState.pageSize,\n pageSizeOptions: !compact ? [10, 20, 50, 100] : [3, 10, 20, 50, 100],\n padding: 'dense',\n loadingType: 'overlay',\n showEmptyDataSourceMessage: !isLoading,\n showTitle: true,\n toolbar: true,\n }}\n emptyContent={\n <Typography color=\"textSecondary\" className={classes.empty}>\n No status pages\n </Typography>\n }\n title={\n <Typography variant=\"button\" color=\"textSecondary\">\n STATUS PAGES\n </Typography>\n }\n page={tableState.page}\n onPageChange={onChangePage}\n onRowsPerPageChange={onChangeRowsPerPage}\n columns={columns}\n data={statusPages}\n isLoading={isLoading}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AA2BA,MAAM,SAAA,GAAY,WAAW,CAAA,KAAA,MAAU;AAAA,EACrC,KAAA,EAAO;AAAA,IACL,OAAA,EAAS,KAAA,CAAM,OAAA,CAAQ,CAAC,CAAA;AAAA,IACxB,OAAA,EAAS,MAAA;AAAA,IACT,cAAA,EAAgB;AAAA;AAEpB,CAAA,CAAE,CAAA;AAEK,MAAM,mBAAmB,CAAC;AAAA,EAC/B,WAAA;AAAA,EACA,UAAA;AAAA,EACA,SAAA;AAAA,EACA,YAAA;AAAA,EACA,mBAAA;AAAA,EACA;AACF,CAAA,KAQM;AACJ,EAAA,MAAM,UAAU,SAAA,EAAU;AAE1B,EAAA,MAAM,aAAA,GAAgB;AAAA,IACpB,KAAA,EAAO,KAAA;AAAA,IACP,QAAA,EAAU;AAAA,GACZ;AACA,EAAA,MAAM,aAAA,GAAgB;AAAA,IACpB,KAAA,EAAO,KAAA;AAAA,IACP,QAAA,EAAU;AAAA,GACZ;AAEA,EAAA,MAAM,QAAA,GAAoC;AAAA,IACxC,KAAA,EAAO,IAAA;AAAA,IACP,KAAA,EAAO,IAAA;AAAA,IACP,SAAA,EAAW,IAAA;AAAA,IACX,SAAA,EAAW,aAAA;AAAA,IACX,WAAA,EAAa,aAAA;AAAA,IACb,MAAA,EAAQ,CAAA,OAAA,qBAAW,GAAA,CAAC,cAAA,EAAA,EAAe,YAAY,OAAA,EAAS;AAAA,GAC1D;AACA,EAAA,MAAM,UAAA,GAAsC;AAAA,IAC1C,KAAA,EAAO,MAAA;AAAA,IACP,KAAA,EAAO,MAAA;AAAA,IACP,SAAA,EAAW,CAAC,OAAA,GAAU,aAAA,GAAgB,MAAA;AAAA,IACtC,WAAA,EAA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Aa,CAAA,GACnD;AAAA,IACE,QAAA;AAAA,IACA,UAAA;AAAA,IACA,YAAA;AAAA,IACA,SAAA;AAAA,IACA,gBAAA;AAAA,IACA;AAAA,GACF;AAEJ,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,OAAA,EAAS;AAAA,QACP,OAAA,EAAS,KAAA;AAAA,QACT,QAAQ,CAAC,OAAA;AAAA,QACT,QAAQ,CAAC,OAAA;AAAA,QACT,kBAAA,EAAoB,EAAA;AAAA,QACpB,UAAU,UAAA,CAAW,QAAA;AAAA,QACrB,eAAA,EAAiB,CAAC,OAAA,GAAU,CAAC,IAAI,EAAA,EAAI,EAAA,EAAI,GAAG,CAAA,GAAI,CAAC,CAAA,EAAG,EAAA,EAAI,EAAA,EAAI,IAAI,GAAG,CAAA;AAAA,QACnE,OAAA,EAAS,OAAA;AAAA,QACT,WAAA,EAAa,SAAA;AAAA,QACb,4BAA4B,CAAC,SAAA;AAAA,QAC7B,SAAA,EAAW,IAAA;AAAA,QACX,OAAA,EAAS;AAAA,OACX;AAAA,MACA,YAAA,sBACG,UAAA,EAAA,EAAW,KAAA,EAAM,iBAAgB,SAAA,EAAW,OAAA,CAAQ,OAAO,QAAA,EAAA,iBAAA,EAE5D,CAAA;AAAA,MAEF,uBACE,GAAA,CAAC,UAAA,EAAA,EAAW,SAAQ,QAAA,EAAS,KAAA,EAAM,iBAAgB,QAAA,EAAA,cAAA,EAEnD,CAAA;AAAA,MAEF,MAAM,UAAA,CAAW,IAAA;AAAA,MACjB,YAAA,EAAc,YAAA;AAAA,MACd,mBAAA,EAAqB,mBAAA;AAAA,MACrB,OAAA;AAAA,MACA,IAAA,EAAM,WAAA;AAAA,MACN;AAAA;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisibilityChip.esm.js","sources":["../../../src/components/StatusPagePage/VisibilityChip.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 Chip from '@material-ui/core/Chip';\nimport { withStyles } from '@material-ui/core/styles';\nimport { PRIVATE, PUBLIC, StatusPage } from '../../types';\n\nconst PrivateChip = withStyles(theme => ({\n root: {\n backgroundColor: '#4caf50',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\n\nconst PublicChip = withStyles(theme => ({\n root: {\n backgroundColor: '#ffb74d',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\n\nconst statusPageVisibilityLabels = {\n [PUBLIC]: 'Public',\n [PRIVATE]: 'Private',\n} as Record<string, string>;\n\nexport const VisibilityChip = ({ statusPage }: { statusPage: StatusPage }) => {\n const label = `${statusPageVisibilityLabels[statusPage.visibility]}`;\n\n switch (statusPage.visibility) {\n case PRIVATE:\n return <PrivateChip label={label} size=\"small\" />;\n case PUBLIC:\n return <PublicChip label={label} size=\"small\" />;\n default:\n return <Chip label={label} size=\"small\" />;\n }\n};\n"],"names":[],"mappings":";;;;;AAmBA,MAAM,WAAA,GAAc,WAAW,
|
|
1
|
+
{"version":3,"file":"VisibilityChip.esm.js","sources":["../../../src/components/StatusPagePage/VisibilityChip.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 Chip from '@material-ui/core/Chip';\nimport { withStyles } from '@material-ui/core/styles';\nimport { PRIVATE, PUBLIC, StatusPage } from '../../types';\n\nconst PrivateChip = withStyles(theme => ({\n root: {\n backgroundColor: '#4caf50',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\n\nconst PublicChip = withStyles(theme => ({\n root: {\n backgroundColor: '#ffb74d',\n color: theme.palette.common.white,\n margin: 0,\n },\n}))(Chip);\n\nconst statusPageVisibilityLabels = {\n [PUBLIC]: 'Public',\n [PRIVATE]: 'Private',\n} as Record<string, string>;\n\nexport const VisibilityChip = ({ statusPage }: { statusPage: StatusPage }) => {\n const label = `${statusPageVisibilityLabels[statusPage.visibility]}`;\n\n switch (statusPage.visibility) {\n case PRIVATE:\n return <PrivateChip label={label} size=\"small\" />;\n case PUBLIC:\n return <PublicChip label={label} size=\"small\" />;\n default:\n return <Chip label={label} size=\"small\" />;\n }\n};\n"],"names":[],"mappings":";;;;;AAmBA,MAAM,WAAA,GAAc,WAAW,CAAA,KAAA,MAAU;AAAA,EACvC,IAAA,EAAM;AAAA,IACJ,eAAA,EAAiB,SAAA;AAAA,IACjB,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO,KAAA;AAAA,IAC5B,MAAA,EAAQ;AAAA;AAEZ,CAAA,CAAE,EAAE,IAAI,CAAA;AAER,MAAM,UAAA,GAAa,WAAW,CAAA,KAAA,MAAU;AAAA,EACtC,IAAA,EAAM;AAAA,IACJ,eAAA,EAAiB,SAAA;AAAA,IACjB,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO,KAAA;AAAA,IAC5B,MAAA,EAAQ;AAAA;AAEZ,CAAA,CAAE,EAAE,IAAI,CAAA;AAER,MAAM,0BAAA,GAA6B;AAAA,EACjC,CAAC,MAAM,GAAG,QAAA;AAAA,EACV,CAAC,OAAO,GAAG;AACb,CAAA;AAEO,MAAM,cAAA,GAAiB,CAAC,EAAE,UAAA,EAAW,KAAkC;AAC5E,EAAA,MAAM,KAAA,GAAQ,CAAA,EAAG,0BAAA,CAA2B,UAAA,CAAW,UAAU,CAAC,CAAA,CAAA;AAElE,EAAA,QAAQ,WAAW,UAAA;AAAY,IAC7B,KAAK,OAAA;AACH,MAAA,uBAAO,GAAA,CAAC,WAAA,EAAA,EAAY,KAAA,EAAc,IAAA,EAAK,OAAA,EAAQ,CAAA;AAAA,IACjD,KAAK,MAAA;AACH,MAAA,uBAAO,GAAA,CAAC,UAAA,EAAA,EAAW,KAAA,EAAc,IAAA,EAAK,OAAA,EAAQ,CAAA;AAAA,IAChD;AACE,MAAA,uBAAO,GAAA,CAAC,IAAA,EAAA,EAAK,KAAA,EAAc,IAAA,EAAK,OAAA,EAAQ,CAAA;AAAA;AAE9C;;;;"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { ILertPage } from './ILertPage/ILertPage.esm.js';
|
|
2
2
|
export { ILertCard, isPluginApplicableToEntity } from './ILertCard/ILertCard.esm.js';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export { ILertPage };
|
|
3
7
|
//# sourceMappingURL=index.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.esm.js","sources":["../src/constants.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const ILERT_INTEGRATION_KEY_ANNOTATION = 'ilert.com/integration-key';\n"],"names":[],"mappings":"AAeO,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.esm.js","sources":["../src/constants.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const ILERT_INTEGRATION_KEY_ANNOTATION = 'ilert.com/integration-key';\n"],"names":[],"mappings":"AAeO,MAAM,gCAAA,GAAmC;;;;"}
|