Skip to content

Commit

Permalink
add changeset, revert some code
Browse files Browse the repository at this point in the history
  • Loading branch information
samiramkr committed Dec 14, 2020
1 parent e804237 commit 3b50f83
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
5 changes: 5 additions & 0 deletions .changeset/nice-trains-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@backstage/plugin-pagerduty': patch
---

Modifies queries
2 changes: 1 addition & 1 deletion plugins/pagerduty/src/api/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class PagerDutyClient implements PagerDutyApi {
}

async getOnCallByPolicyId(policyId: string): Promise<OnCall[]> {
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}`;
Expand Down
27 changes: 10 additions & 17 deletions plugins/pagerduty/src/components/Incident/IncidentListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
IconButton,
Link,
Typography,
Grid,
} from '@material-ui/core';
import { StatusError, StatusWarning } from '@backstage/core';
import { formatDistanceToNowStrict } from 'date-fns';
Expand Down Expand Up @@ -77,22 +76,16 @@ export const IncidentListItem = ({ incident }: Props) => {
className: classes.listItemPrimary,
}}
secondary={
<Grid container>
<Grid item>
<Typography noWrap variant="body2" color="textSecondary">
Created {createdAt} ago and assigned to{' '}
</Typography>
</Grid>
<Grid item>
<Link
href={user?.html_url ?? '#'}
target="_blank"
rel="noopener noreferrer"
>
{user?.summary ?? 'nobody'}
</Link>
</Grid>
</Grid>
<Typography noWrap variant="body2" color="textSecondary">
Created {createdAt} ago and assigned to{' '}
<Link
href={user?.html_url ?? '#'}
target="_blank"
rel="noopener noreferrer"
>
{user?.summary ?? 'nobody'}
</Link>
</Typography>
}
/>
<ListItemSecondaryAction>
Expand Down

0 comments on commit 3b50f83

Please sign in to comment.