From 3b50f833dfedee33e868b1fbc165b3d59cbb15cd Mon Sep 17 00:00:00 2001 From: Samira Mokaram Date: Mon, 14 Dec 2020 11:30:10 +0100 Subject: [PATCH] add changeset, revert some code --- .changeset/nice-trains-punch.md | 5 ++++ plugins/pagerduty/src/api/client.ts | 2 +- .../components/Incident/IncidentListItem.tsx | 27 +++++++------------ 3 files changed, 16 insertions(+), 18 deletions(-) create mode 100644 .changeset/nice-trains-punch.md diff --git a/.changeset/nice-trains-punch.md b/.changeset/nice-trains-punch.md new file mode 100644 index 0000000000..a8698eff41 --- /dev/null +++ b/.changeset/nice-trains-punch.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-pagerduty': patch +--- + +Modifies queries diff --git a/plugins/pagerduty/src/api/client.ts b/plugins/pagerduty/src/api/client.ts index 34bba1b7b3..d1220f715f 100644 --- a/plugins/pagerduty/src/api/client.ts +++ b/plugins/pagerduty/src/api/client.ts @@ -66,7 +66,7 @@ export class PagerDutyClient implements PagerDutyApi { } async getOnCallByPolicyId(policyId: string): Promise { - const params = `time_zone=UTC&include[]=users&escalation_policy_ids[]=${policyId}&include[]=escalation_level`; + const params = `time_zone=UTC&include[]=users&escalation_policy_ids[]=${policyId}`; const url = `${await this.config.discoveryApi.getBaseUrl( 'proxy', )}/pagerduty/oncalls?${params}`; diff --git a/plugins/pagerduty/src/components/Incident/IncidentListItem.tsx b/plugins/pagerduty/src/components/Incident/IncidentListItem.tsx index c0143fa591..860623dcd4 100644 --- a/plugins/pagerduty/src/components/Incident/IncidentListItem.tsx +++ b/plugins/pagerduty/src/components/Incident/IncidentListItem.tsx @@ -25,7 +25,6 @@ import { IconButton, Link, Typography, - Grid, } from '@material-ui/core'; import { StatusError, StatusWarning } from '@backstage/core'; import { formatDistanceToNowStrict } from 'date-fns'; @@ -77,22 +76,16 @@ export const IncidentListItem = ({ incident }: Props) => { className: classes.listItemPrimary, }} secondary={ - - - - Created {createdAt} ago and assigned to{' '} - - - - - {user?.summary ?? 'nobody'} - - - + + Created {createdAt} ago and assigned to{' '} + + {user?.summary ?? 'nobody'} + + } />