@pagerduty/backstage-plugin 0.9.3-next.0 → 0.9.4-next.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/assets/PD-Green.svg +21 -0
- package/assets/PD-White.svg +21 -0
- package/dist/assets/PD-Green.svg +21 -0
- package/dist/assets/PD-White.svg +21 -0
- package/dist/esm/{index-4efddecc.esm.js → index-46dbc440.esm.js} +9 -6
- package/dist/esm/{index-4efddecc.esm.js.map → index-46dbc440.esm.js.map} +1 -1
- package/dist/esm/{index-ecbd8285.esm.js → index-cad5ded3.esm.js} +397 -55
- package/dist/esm/index-cad5ded3.esm.js.map +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.esm.js +8 -5
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/esm/index-ecbd8285.esm.js.map +0 -1
|
@@ -8,18 +8,21 @@ import Done from '@material-ui/icons/Done';
|
|
|
8
8
|
import Warning from '@material-ui/icons/Warning';
|
|
9
9
|
import { DateTime, Duration } from 'luxon';
|
|
10
10
|
import OpenInBrowserIcon from '@material-ui/icons/OpenInBrowser';
|
|
11
|
-
import { Link, Progress, StatusWarning, StatusError, EmptyState,
|
|
11
|
+
import { Link, Progress, StatusWarning, StatusError, EmptyState, TabbedCard, CardTab, InfoCard } from '@backstage/core-components';
|
|
12
12
|
import EmptyStateImage from '../assets/emptystate.svg';
|
|
13
13
|
import useAsyncFn from 'react-use/lib/useAsyncFn';
|
|
14
14
|
import { Alert } from '@material-ui/lab';
|
|
15
15
|
import ForbiddenStateImage from '../assets/forbiddenstate.svg';
|
|
16
16
|
import Avatar from '@material-ui/core/Avatar';
|
|
17
|
-
import
|
|
17
|
+
import NotificationsIcon from '@material-ui/icons/Notifications';
|
|
18
|
+
import MailOutline from '@material-ui/icons/MailOutline';
|
|
18
19
|
import useAsync from 'react-use/lib/useAsync';
|
|
19
|
-
import AlarmAddIcon from '@material-ui/icons/AlarmAdd';
|
|
20
|
-
import WebIcon from '@material-ui/icons/Web';
|
|
21
|
-
import DateRangeIcon from '@material-ui/icons/DateRange';
|
|
22
20
|
import { parseEntityRef, DEFAULT_NAMESPACE } from '@backstage/catalog-model';
|
|
21
|
+
import PDGreenImage from '../assets/PD-Green.svg';
|
|
22
|
+
import PDWhiteImage from '../assets/PD-White.svg';
|
|
23
|
+
import AddAlert from '@material-ui/icons/AddAlert';
|
|
24
|
+
import { useTheme } from '@material-ui/core/styles';
|
|
25
|
+
import LinearProgress from '@material-ui/core/LinearProgress';
|
|
23
26
|
|
|
24
27
|
const PAGERDUTY_INTEGRATION_KEY = "pagerduty.com/integration-key";
|
|
25
28
|
const PAGERDUTY_SERVICE_ID = "pagerduty.com/service-id";
|
|
@@ -191,7 +194,7 @@ const HomePagePagerDutyCard = pagerDutyPlugin.provide(
|
|
|
191
194
|
createCardExtension({
|
|
192
195
|
name: "HomePagePagerDutyCard",
|
|
193
196
|
title: "PagerDuty Homepage Card",
|
|
194
|
-
components: () => import('./index-
|
|
197
|
+
components: () => import('./index-46dbc440.esm.js'),
|
|
195
198
|
settings: {
|
|
196
199
|
schema: {
|
|
197
200
|
title: "PagerDuty",
|
|
@@ -215,7 +218,7 @@ const HomePagePagerDutyCard = pagerDutyPlugin.provide(
|
|
|
215
218
|
})
|
|
216
219
|
);
|
|
217
220
|
|
|
218
|
-
const useStyles$
|
|
221
|
+
const useStyles$7 = makeStyles((theme) => ({
|
|
219
222
|
denseListIcon: {
|
|
220
223
|
marginRight: 0,
|
|
221
224
|
display: "flex",
|
|
@@ -243,7 +246,7 @@ const useStyles$5 = makeStyles((theme) => ({
|
|
|
243
246
|
}));
|
|
244
247
|
const IncidentListItem = ({ incident }) => {
|
|
245
248
|
var _a, _b, _c;
|
|
246
|
-
const classes = useStyles$
|
|
249
|
+
const classes = useStyles$7();
|
|
247
250
|
const duration = (/* @__PURE__ */ new Date()).getTime() - new Date(incident.created_at).getTime();
|
|
248
251
|
const createdAt = DateTime.local().minus(Duration.fromMillis(duration)).toRelative({ locale: "en" });
|
|
249
252
|
const user = (_a = incident.assignments[0]) == null ? void 0 : _a.assignee;
|
|
@@ -339,7 +342,7 @@ const Incidents = ({ serviceId, refreshIncidents }) => {
|
|
|
339
342
|
return /* @__PURE__ */ React.createElement(List, { dense: true }, incidents.map((incident, index) => /* @__PURE__ */ React.createElement(IncidentListItem, { key: incident.id + index, incident })));
|
|
340
343
|
};
|
|
341
344
|
|
|
342
|
-
const useStyles$
|
|
345
|
+
const useStyles$6 = makeStyles({
|
|
343
346
|
denseListIcon: {
|
|
344
347
|
marginRight: 0,
|
|
345
348
|
display: "flex",
|
|
@@ -349,11 +352,11 @@ const useStyles$4 = makeStyles({
|
|
|
349
352
|
}
|
|
350
353
|
});
|
|
351
354
|
const EscalationUsersEmptyState = () => {
|
|
352
|
-
const classes = useStyles$
|
|
355
|
+
const classes = useStyles$6();
|
|
353
356
|
return /* @__PURE__ */ React.createElement(ListItem, null, /* @__PURE__ */ React.createElement(ListItemIcon, null, /* @__PURE__ */ React.createElement("div", { className: classes.denseListIcon }, /* @__PURE__ */ React.createElement(StatusWarning, null))), /* @__PURE__ */ React.createElement(ListItemText, { primary: "No one is on-call. Update the escalation policy." }));
|
|
354
357
|
};
|
|
355
358
|
|
|
356
|
-
const useStyles$
|
|
359
|
+
const useStyles$5 = makeStyles({
|
|
357
360
|
denseListIcon: {
|
|
358
361
|
marginRight: 0,
|
|
359
362
|
display: "flex",
|
|
@@ -363,30 +366,72 @@ const useStyles$3 = makeStyles({
|
|
|
363
366
|
}
|
|
364
367
|
});
|
|
365
368
|
const EscalationUsersForbiddenState = () => {
|
|
366
|
-
const classes = useStyles$
|
|
369
|
+
const classes = useStyles$5();
|
|
367
370
|
return /* @__PURE__ */ React.createElement(ListItem, null, /* @__PURE__ */ React.createElement(ListItemIcon, null, /* @__PURE__ */ React.createElement("div", { className: classes.denseListIcon }, /* @__PURE__ */ React.createElement(StatusError, null))), /* @__PURE__ */ React.createElement(ListItemText, { primary: "You don't permissions to list on-calls. Check your OAuth token permissions." }));
|
|
368
371
|
};
|
|
369
372
|
|
|
370
|
-
const useStyles$
|
|
373
|
+
const useStyles$4 = makeStyles((theme) => ({
|
|
371
374
|
listItemPrimary: {
|
|
372
375
|
fontWeight: "bold"
|
|
376
|
+
},
|
|
377
|
+
listItemSecondary: {
|
|
378
|
+
fontWeight: "normal",
|
|
379
|
+
textDecoration: "underline",
|
|
380
|
+
marginTop: "-5px"
|
|
381
|
+
},
|
|
382
|
+
buttonStyle: {
|
|
383
|
+
marginLeft: "-11px",
|
|
384
|
+
marginTop: "-10px",
|
|
385
|
+
fontSize: "15px",
|
|
386
|
+
color: theme.palette.text.primary,
|
|
387
|
+
"&:hover": {
|
|
388
|
+
backgroundColor: "transparent",
|
|
389
|
+
textDecoration: "underline"
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
containerStyle: {
|
|
393
|
+
display: "flex",
|
|
394
|
+
alignItems: "center",
|
|
395
|
+
fontWeight: "bold"
|
|
396
|
+
},
|
|
397
|
+
iconStyle: {
|
|
398
|
+
fontSize: "25px",
|
|
399
|
+
marginLeft: "-4px",
|
|
400
|
+
color: theme.palette.text.primary
|
|
401
|
+
},
|
|
402
|
+
smallIconStyle: {
|
|
403
|
+
color: theme.palette.text.primary
|
|
373
404
|
}
|
|
374
|
-
});
|
|
405
|
+
}));
|
|
375
406
|
const EscalationUser = ({ user }) => {
|
|
376
|
-
const classes = useStyles$
|
|
377
|
-
return /* @__PURE__ */ React.createElement(ListItem, null, /* @__PURE__ */ React.createElement(ListItemIcon, null, /* @__PURE__ */ React.createElement(Avatar, { alt:
|
|
407
|
+
const classes = useStyles$4();
|
|
408
|
+
return /* @__PURE__ */ React.createElement(ListItem, null, /* @__PURE__ */ React.createElement(ListItemIcon, null, /* @__PURE__ */ React.createElement(Avatar, { alt: user.name, src: user.avatar_url })), /* @__PURE__ */ React.createElement(
|
|
378
409
|
ListItemText,
|
|
379
410
|
{
|
|
380
|
-
primary: /* @__PURE__ */ React.createElement(Typography, { className: classes.listItemPrimary }, user.name),
|
|
381
|
-
|
|
411
|
+
primary: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Typography, { className: classes.listItemPrimary }, user.name), /* @__PURE__ */ React.createElement(
|
|
412
|
+
Typography,
|
|
413
|
+
{
|
|
414
|
+
className: classes.listItemSecondary,
|
|
415
|
+
color: "textSecondary"
|
|
416
|
+
},
|
|
417
|
+
user.email
|
|
418
|
+
)),
|
|
419
|
+
secondary: /* @__PURE__ */ React.createElement(
|
|
420
|
+
IconButton,
|
|
421
|
+
{
|
|
422
|
+
"aria-label": "open-service-in-browser",
|
|
423
|
+
className: classes.buttonStyle
|
|
424
|
+
},
|
|
425
|
+
/* @__PURE__ */ React.createElement("span", { className: classes.containerStyle }, /* @__PURE__ */ React.createElement(NotificationsIcon, { className: classes.iconStyle }), "Web Team")
|
|
426
|
+
)
|
|
382
427
|
}
|
|
383
|
-
), /* @__PURE__ */ React.createElement(ListItemSecondaryAction, null, /* @__PURE__ */ React.createElement(Tooltip, { title: "Send e-mail to user", placement: "top" }, /* @__PURE__ */ React.createElement(IconButton, { href: `mailto:${user.email}` }, /* @__PURE__ */ React.createElement(
|
|
428
|
+
), /* @__PURE__ */ React.createElement(ListItemSecondaryAction, null, /* @__PURE__ */ React.createElement(Tooltip, { title: "Send e-mail to user", placement: "top" }, /* @__PURE__ */ React.createElement(IconButton, { href: `mailto:${user.email}` }, /* @__PURE__ */ React.createElement(MailOutline, { className: classes.smallIconStyle }))), /* @__PURE__ */ React.createElement(Tooltip, { title: "View in PagerDuty", placement: "top" }, /* @__PURE__ */ React.createElement(
|
|
384
429
|
IconButton,
|
|
385
430
|
{
|
|
386
431
|
href: user.html_url,
|
|
387
432
|
target: "_blank",
|
|
388
433
|
rel: "noopener noreferrer",
|
|
389
|
-
|
|
434
|
+
className: classes.smallIconStyle
|
|
390
435
|
},
|
|
391
436
|
/* @__PURE__ */ React.createElement(OpenInBrowserIcon, null)
|
|
392
437
|
))));
|
|
@@ -536,7 +581,7 @@ const TriggerDialog = ({
|
|
|
536
581
|
), /* @__PURE__ */ React.createElement(Button, { id: "close", color: "primary", onClick: handleDialog }, "Close")));
|
|
537
582
|
};
|
|
538
583
|
|
|
539
|
-
const useStyles$
|
|
584
|
+
const useStyles$3 = makeStyles({
|
|
540
585
|
denseListIcon: {
|
|
541
586
|
marginRight: 0,
|
|
542
587
|
display: "flex",
|
|
@@ -549,7 +594,7 @@ const useStyles$1 = makeStyles({
|
|
|
549
594
|
}
|
|
550
595
|
});
|
|
551
596
|
const ChangeEventListItem = ({ changeEvent }) => {
|
|
552
|
-
const classes = useStyles$
|
|
597
|
+
const classes = useStyles$3();
|
|
553
598
|
const duration = (/* @__PURE__ */ new Date()).getTime() - new Date(changeEvent.timestamp).getTime();
|
|
554
599
|
const changedAt = DateTime.local().minus(Duration.fromMillis(duration)).toRelative({ locale: "en" });
|
|
555
600
|
let externalLinkElem;
|
|
@@ -658,16 +703,104 @@ const ForbiddenError = () => /* @__PURE__ */ React.createElement(
|
|
|
658
703
|
}
|
|
659
704
|
);
|
|
660
705
|
|
|
706
|
+
function usePagerdutyEntity() {
|
|
707
|
+
const { entity } = useEntity();
|
|
708
|
+
return getPagerDutyEntity(entity);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
const useStyles$2 = makeStyles((theme) => ({
|
|
712
|
+
buttonStyle: {
|
|
713
|
+
color: theme.palette.text.primary,
|
|
714
|
+
"&:hover": {
|
|
715
|
+
backgroundColor: "transparent",
|
|
716
|
+
textDecoration: "underline"
|
|
717
|
+
}
|
|
718
|
+
},
|
|
719
|
+
containerStyle: {
|
|
720
|
+
flex: "flex !important",
|
|
721
|
+
fontSize: "14px",
|
|
722
|
+
width: "80px",
|
|
723
|
+
lineHeight: "14px"
|
|
724
|
+
},
|
|
725
|
+
iconStyle: {
|
|
726
|
+
fontSize: "35px",
|
|
727
|
+
marginBottom: "-10px"
|
|
728
|
+
}
|
|
729
|
+
}));
|
|
730
|
+
function TriggerIncidentButton() {
|
|
731
|
+
const { buttonStyle, containerStyle, iconStyle } = useStyles$2();
|
|
732
|
+
const { integrationKey, name } = usePagerdutyEntity();
|
|
733
|
+
const [dialogShown, setDialogShown] = useState(false);
|
|
734
|
+
const showDialog = useCallback(() => {
|
|
735
|
+
setDialogShown(true);
|
|
736
|
+
}, [setDialogShown]);
|
|
737
|
+
const hideDialog = useCallback(() => {
|
|
738
|
+
setDialogShown(false);
|
|
739
|
+
}, [setDialogShown]);
|
|
740
|
+
const disabled = !integrationKey;
|
|
741
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
742
|
+
IconButton,
|
|
743
|
+
{
|
|
744
|
+
"aria-label": "create-incident",
|
|
745
|
+
onClick: showDialog,
|
|
746
|
+
className: disabled ? "" : buttonStyle,
|
|
747
|
+
disabled
|
|
748
|
+
},
|
|
749
|
+
/* @__PURE__ */ React.createElement("div", { className: containerStyle }, /* @__PURE__ */ React.createElement(AddAlert, { className: iconStyle }), /* @__PURE__ */ React.createElement("p", null, "Create New Incident"))
|
|
750
|
+
), integrationKey && /* @__PURE__ */ React.createElement(
|
|
751
|
+
TriggerDialog,
|
|
752
|
+
{
|
|
753
|
+
showDialog: dialogShown,
|
|
754
|
+
handleDialog: hideDialog,
|
|
755
|
+
integrationKey,
|
|
756
|
+
name
|
|
757
|
+
}
|
|
758
|
+
));
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
const useStyles$1 = makeStyles((theme) => ({
|
|
762
|
+
buttonStyle: {
|
|
763
|
+
color: theme.palette.text.primary,
|
|
764
|
+
"&:hover": {
|
|
765
|
+
backgroundColor: "transparent",
|
|
766
|
+
textDecoration: "underline"
|
|
767
|
+
}
|
|
768
|
+
},
|
|
769
|
+
containerStyle: {
|
|
770
|
+
flex: "flex",
|
|
771
|
+
fontSize: "14px",
|
|
772
|
+
width: "85px",
|
|
773
|
+
lineHeight: "14px"
|
|
774
|
+
},
|
|
775
|
+
iconStyle: {
|
|
776
|
+
fontSize: "35px",
|
|
777
|
+
marginBottom: "-10px"
|
|
778
|
+
}
|
|
779
|
+
}));
|
|
780
|
+
function OpenServiceButton(props) {
|
|
781
|
+
const { buttonStyle, containerStyle, iconStyle } = useStyles$1();
|
|
782
|
+
function navigateToService() {
|
|
783
|
+
window.open(props.serviceUrl, "_blank");
|
|
784
|
+
}
|
|
785
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
786
|
+
IconButton,
|
|
787
|
+
{
|
|
788
|
+
"aria-label": "open-service-in-browser",
|
|
789
|
+
onClick: navigateToService,
|
|
790
|
+
className: buttonStyle
|
|
791
|
+
},
|
|
792
|
+
/* @__PURE__ */ React.createElement("div", { className: containerStyle }, /* @__PURE__ */ React.createElement(OpenInBrowserIcon, { className: iconStyle }), /* @__PURE__ */ React.createElement("p", null, "Open service in PagerDuty"))
|
|
793
|
+
));
|
|
794
|
+
}
|
|
795
|
+
|
|
661
796
|
const BasicCard = ({ children }) => /* @__PURE__ */ React.createElement(InfoCard, { title: "PagerDuty" }, children);
|
|
662
797
|
const PagerDutyCard$1 = (props) => {
|
|
798
|
+
const theme = useTheme();
|
|
663
799
|
const { readOnly, disableChangeEvents, integrationKey, name } = props;
|
|
664
800
|
const api = useApi(pagerDutyApiRef);
|
|
665
801
|
const [refreshIncidents, setRefreshIncidents] = useState(false);
|
|
666
802
|
const [refreshChangeEvents, setRefreshChangeEvents] = useState(false);
|
|
667
803
|
const [dialogShown, setDialogShown] = useState(false);
|
|
668
|
-
const showDialog = useCallback(() => {
|
|
669
|
-
setDialogShown(true);
|
|
670
|
-
}, [setDialogShown]);
|
|
671
804
|
const hideDialog = useCallback(() => {
|
|
672
805
|
setDialogShown(false);
|
|
673
806
|
}, [setDialogShown]);
|
|
@@ -708,36 +841,250 @@ const PagerDutyCard$1 = (props) => {
|
|
|
708
841
|
if (loading) {
|
|
709
842
|
return /* @__PURE__ */ React.createElement(BasicCard, null, /* @__PURE__ */ React.createElement(Progress, null));
|
|
710
843
|
}
|
|
711
|
-
const serviceLink = {
|
|
712
|
-
label: "Service Directory",
|
|
713
|
-
href: service.url,
|
|
714
|
-
icon: /* @__PURE__ */ React.createElement(WebIcon, null)
|
|
715
|
-
};
|
|
716
844
|
const createIncidentDisabled = !integrationKey;
|
|
717
|
-
const triggerLink = {
|
|
718
|
-
label: "Create Incident",
|
|
719
|
-
onClick: showDialog,
|
|
720
|
-
icon: /* @__PURE__ */ React.createElement(AlarmAddIcon, null),
|
|
721
|
-
color: "secondary",
|
|
722
|
-
disabled: createIncidentDisabled,
|
|
723
|
-
title: createIncidentDisabled ? "Must provide an integration-key to create incidents" : ""
|
|
724
|
-
};
|
|
725
|
-
const escalationPolicyLink = {
|
|
726
|
-
label: "Escalation Policy",
|
|
727
|
-
href: service.policyLink,
|
|
728
|
-
icon: /* @__PURE__ */ React.createElement(DateRangeIcon, null)
|
|
729
|
-
};
|
|
730
845
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Card, { "data-testid": "pagerduty-card" }, /* @__PURE__ */ React.createElement(
|
|
731
846
|
CardHeader,
|
|
732
847
|
{
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
848
|
+
style: { marginRight: "1em" },
|
|
849
|
+
title: theme.palette.type === "dark" ? /* @__PURE__ */ React.createElement("img", { src: PDWhiteImage, alt: "PagerDuty", height: "35" }) : /* @__PURE__ */ React.createElement("img", { src: PDGreenImage, alt: "PagerDuty", height: "35" }),
|
|
850
|
+
action: !readOnly ? /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(TriggerIncidentButton, null), /* @__PURE__ */ React.createElement(OpenServiceButton, { serviceUrl: service.url })) : /* @__PURE__ */ React.createElement(OpenServiceButton, { serviceUrl: service.url })
|
|
851
|
+
}
|
|
852
|
+
), /* @__PURE__ */ React.createElement(Grid, { item: true, md: 12, style: { display: "flex", margin: "15px" } }, /* @__PURE__ */ React.createElement(Grid, { item: true, md: 3 }, /* @__PURE__ */ React.createElement(Typography, { style: { fontSize: "16px", fontWeight: "bold" } }, "STATUS")), /* @__PURE__ */ React.createElement(Grid, { item: true, md: 6 }, /* @__PURE__ */ React.createElement(Typography, { style: { fontSize: "16px", fontWeight: "bold" } }, "INCIDENT HISTORY")), /* @__PURE__ */ React.createElement(Grid, { item: true, md: 3 }, /* @__PURE__ */ React.createElement(
|
|
853
|
+
Typography,
|
|
854
|
+
{
|
|
855
|
+
style: {
|
|
856
|
+
fontSize: "16px",
|
|
857
|
+
fontWeight: "bold",
|
|
858
|
+
marginLeft: "10px"
|
|
859
|
+
}
|
|
860
|
+
},
|
|
861
|
+
"SERVICE STANDARDS"
|
|
862
|
+
))), /* @__PURE__ */ React.createElement(
|
|
863
|
+
Grid,
|
|
864
|
+
{
|
|
865
|
+
item: true,
|
|
866
|
+
md: 12,
|
|
867
|
+
style: { display: "flex", margin: "15px", marginTop: "-15px" }
|
|
868
|
+
},
|
|
869
|
+
/* @__PURE__ */ React.createElement(Grid, { item: true, md: 3 }, /* @__PURE__ */ React.createElement(
|
|
870
|
+
Card,
|
|
871
|
+
{
|
|
872
|
+
style: {
|
|
873
|
+
background: "darkRed",
|
|
874
|
+
marginRight: "20px",
|
|
875
|
+
height: "150px",
|
|
876
|
+
display: "flex",
|
|
877
|
+
alignItems: "center",
|
|
878
|
+
justifyContent: "center"
|
|
738
879
|
}
|
|
880
|
+
},
|
|
881
|
+
/* @__PURE__ */ React.createElement(
|
|
882
|
+
Typography,
|
|
883
|
+
{
|
|
884
|
+
variant: "h3",
|
|
885
|
+
style: { color: "white", fontWeight: "bold" }
|
|
886
|
+
},
|
|
887
|
+
"ALARM"
|
|
888
|
+
),
|
|
889
|
+
/* @__PURE__ */ React.createElement(
|
|
890
|
+
Typography,
|
|
891
|
+
{
|
|
892
|
+
style: {
|
|
893
|
+
alignSelf: "start",
|
|
894
|
+
position: "absolute",
|
|
895
|
+
verticalAlign: "bottom",
|
|
896
|
+
marginTop: "120px",
|
|
897
|
+
marginLeft: "10px",
|
|
898
|
+
color: "white"
|
|
899
|
+
}
|
|
900
|
+
},
|
|
901
|
+
"Last triggered 8 minutes ago"
|
|
739
902
|
)
|
|
740
|
-
|
|
903
|
+
)),
|
|
904
|
+
/* @__PURE__ */ React.createElement(
|
|
905
|
+
Grid,
|
|
906
|
+
{
|
|
907
|
+
item: true,
|
|
908
|
+
md: 6,
|
|
909
|
+
style: {
|
|
910
|
+
display: "flex",
|
|
911
|
+
height: "100%",
|
|
912
|
+
justifyContent: "center",
|
|
913
|
+
columnSpan: "all"
|
|
914
|
+
}
|
|
915
|
+
},
|
|
916
|
+
/* @__PURE__ */ React.createElement(Grid, { md: 4, style: { height: "100%" } }, /* @__PURE__ */ React.createElement(
|
|
917
|
+
Card,
|
|
918
|
+
{
|
|
919
|
+
style: {
|
|
920
|
+
marginRight: "10px",
|
|
921
|
+
height: "150px",
|
|
922
|
+
display: "flex",
|
|
923
|
+
alignItems: "center",
|
|
924
|
+
justifyContent: "center"
|
|
925
|
+
}
|
|
926
|
+
},
|
|
927
|
+
/* @__PURE__ */ React.createElement(
|
|
928
|
+
Typography,
|
|
929
|
+
{
|
|
930
|
+
style: {
|
|
931
|
+
color: "red",
|
|
932
|
+
fontSize: "50px"
|
|
933
|
+
}
|
|
934
|
+
},
|
|
935
|
+
"1"
|
|
936
|
+
),
|
|
937
|
+
/* @__PURE__ */ React.createElement(
|
|
938
|
+
Typography,
|
|
939
|
+
{
|
|
940
|
+
style: {
|
|
941
|
+
color: "red",
|
|
942
|
+
fontWeight: "bold",
|
|
943
|
+
fontSize: "10px"
|
|
944
|
+
}
|
|
945
|
+
},
|
|
946
|
+
"TRIGGERED"
|
|
947
|
+
)
|
|
948
|
+
)),
|
|
949
|
+
/* @__PURE__ */ React.createElement(Grid, { md: 4 }, /* @__PURE__ */ React.createElement(
|
|
950
|
+
Card,
|
|
951
|
+
{
|
|
952
|
+
style: {
|
|
953
|
+
marginRight: "10px",
|
|
954
|
+
height: "150px",
|
|
955
|
+
display: "flex",
|
|
956
|
+
alignItems: "center",
|
|
957
|
+
justifyContent: "center"
|
|
958
|
+
}
|
|
959
|
+
},
|
|
960
|
+
/* @__PURE__ */ React.createElement(
|
|
961
|
+
Typography,
|
|
962
|
+
{
|
|
963
|
+
style: {
|
|
964
|
+
color: "orange",
|
|
965
|
+
fontSize: "50px"
|
|
966
|
+
}
|
|
967
|
+
},
|
|
968
|
+
"1"
|
|
969
|
+
),
|
|
970
|
+
/* @__PURE__ */ React.createElement(
|
|
971
|
+
Typography,
|
|
972
|
+
{
|
|
973
|
+
style: {
|
|
974
|
+
color: "orange",
|
|
975
|
+
fontWeight: "bold",
|
|
976
|
+
fontSize: "10px"
|
|
977
|
+
}
|
|
978
|
+
},
|
|
979
|
+
"ACKNOWLEDGED"
|
|
980
|
+
)
|
|
981
|
+
)),
|
|
982
|
+
/* @__PURE__ */ React.createElement(Grid, { md: 4 }, /* @__PURE__ */ React.createElement(
|
|
983
|
+
Card,
|
|
984
|
+
{
|
|
985
|
+
style: {
|
|
986
|
+
marginRight: "10px",
|
|
987
|
+
height: "150px",
|
|
988
|
+
display: "flex",
|
|
989
|
+
alignItems: "center",
|
|
990
|
+
justifyContent: "center"
|
|
991
|
+
}
|
|
992
|
+
},
|
|
993
|
+
/* @__PURE__ */ React.createElement(
|
|
994
|
+
Typography,
|
|
995
|
+
{
|
|
996
|
+
style: {
|
|
997
|
+
color: "green",
|
|
998
|
+
fontSize: "50px"
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
"43"
|
|
1002
|
+
),
|
|
1003
|
+
/* @__PURE__ */ React.createElement(
|
|
1004
|
+
Typography,
|
|
1005
|
+
{
|
|
1006
|
+
style: {
|
|
1007
|
+
color: "green",
|
|
1008
|
+
fontWeight: "bold",
|
|
1009
|
+
fontSize: "10px"
|
|
1010
|
+
}
|
|
1011
|
+
},
|
|
1012
|
+
"RESOLVED"
|
|
1013
|
+
)
|
|
1014
|
+
))
|
|
1015
|
+
),
|
|
1016
|
+
/* @__PURE__ */ React.createElement(Grid, { item: true, md: 3 }, /* @__PURE__ */ React.createElement(
|
|
1017
|
+
Card,
|
|
1018
|
+
{
|
|
1019
|
+
style: {
|
|
1020
|
+
marginRight: "20px",
|
|
1021
|
+
height: "150px",
|
|
1022
|
+
display: "grid",
|
|
1023
|
+
gridTemplateRows: "1fr auto auto"
|
|
1024
|
+
}
|
|
1025
|
+
},
|
|
1026
|
+
/* @__PURE__ */ React.createElement(
|
|
1027
|
+
"div",
|
|
1028
|
+
{
|
|
1029
|
+
style: {
|
|
1030
|
+
display: "inline-block",
|
|
1031
|
+
justifyContent: "space-around",
|
|
1032
|
+
marginTop: "30px"
|
|
1033
|
+
}
|
|
1034
|
+
},
|
|
1035
|
+
/* @__PURE__ */ React.createElement(
|
|
1036
|
+
Typography,
|
|
1037
|
+
{
|
|
1038
|
+
style: {
|
|
1039
|
+
fontSize: "50px",
|
|
1040
|
+
color: "black",
|
|
1041
|
+
fontWeight: "bold",
|
|
1042
|
+
alignSelf: "center",
|
|
1043
|
+
justifyContent: "center"
|
|
1044
|
+
}
|
|
1045
|
+
},
|
|
1046
|
+
"4"
|
|
1047
|
+
),
|
|
1048
|
+
/* @__PURE__ */ React.createElement(
|
|
1049
|
+
Typography,
|
|
1050
|
+
{
|
|
1051
|
+
variant: "body1",
|
|
1052
|
+
style: {
|
|
1053
|
+
color: "black",
|
|
1054
|
+
alignSelf: "center",
|
|
1055
|
+
justifyContent: "center",
|
|
1056
|
+
marginLeft: "1px",
|
|
1057
|
+
marginTop: "20px"
|
|
1058
|
+
}
|
|
1059
|
+
},
|
|
1060
|
+
"/5"
|
|
1061
|
+
)
|
|
1062
|
+
),
|
|
1063
|
+
/* @__PURE__ */ React.createElement("div", { style: { display: "flex", flexDirection: "row-reverse" } }, /* @__PURE__ */ React.createElement(
|
|
1064
|
+
Typography,
|
|
1065
|
+
{
|
|
1066
|
+
style: {
|
|
1067
|
+
justifyContent: "end",
|
|
1068
|
+
color: "gray",
|
|
1069
|
+
textDecoration: "underline",
|
|
1070
|
+
marginRight: "5px"
|
|
1071
|
+
}
|
|
1072
|
+
},
|
|
1073
|
+
"See service standards"
|
|
1074
|
+
)),
|
|
1075
|
+
/* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
|
|
1076
|
+
LinearProgress,
|
|
1077
|
+
{
|
|
1078
|
+
variant: "determinate",
|
|
1079
|
+
value: 80,
|
|
1080
|
+
style: {
|
|
1081
|
+
margin: "5px",
|
|
1082
|
+
borderRadius: "10px",
|
|
1083
|
+
height: "10px"
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
))
|
|
1087
|
+
))
|
|
741
1088
|
), /* @__PURE__ */ React.createElement(Divider, null), /* @__PURE__ */ React.createElement(CardContent, null, /* @__PURE__ */ React.createElement(TabbedCard, null, /* @__PURE__ */ React.createElement(CardTab, { label: "Incidents" }, /* @__PURE__ */ React.createElement(
|
|
742
1089
|
Incidents,
|
|
743
1090
|
{
|
|
@@ -789,11 +1136,6 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
789
1136
|
EntityPagerDutyCard: EntityPagerDutyCard
|
|
790
1137
|
});
|
|
791
1138
|
|
|
792
|
-
function usePagerdutyEntity() {
|
|
793
|
-
const { entity } = useEntity();
|
|
794
|
-
return getPagerDutyEntity(entity);
|
|
795
|
-
}
|
|
796
|
-
|
|
797
1139
|
const useStyles = makeStyles((theme) => ({
|
|
798
1140
|
buttonStyle: {
|
|
799
1141
|
backgroundColor: theme.palette.error.main,
|
|
@@ -838,4 +1180,4 @@ function TriggerButton(props) {
|
|
|
838
1180
|
const PagerDutyCard = EntityPagerDutyCard;
|
|
839
1181
|
|
|
840
1182
|
export { EntityPagerDutyCard$1 as E, HomePagePagerDutyCard as H, PagerDutyCard$1 as P, TriggerButton as T, UnauthorizedError as U, PagerDutyClient as a, pagerDutyApiRef as b, PagerDutyCard as c, isPluginApplicableToEntity as i, pagerDutyPlugin as p };
|
|
841
|
-
//# sourceMappingURL=index-
|
|
1183
|
+
//# sourceMappingURL=index-cad5ded3.esm.js.map
|