From ebfc845b999751a6b63cefc49defb769ecd2ba6d Mon Sep 17 00:00:00 2001 From: Andrew Thal Date: Tue, 23 Feb 2021 12:07:48 -0500 Subject: [PATCH 1/3] Update Pagerduty setup instructions Signed-off-by: GitHub --- plugins/pagerduty/README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/plugins/pagerduty/README.md b/plugins/pagerduty/README.md index 0e5d75d41c4c2..db34908050180 100644 --- a/plugins/pagerduty/README.md +++ b/plugins/pagerduty/README.md @@ -28,12 +28,12 @@ Add it to the app in `plugins.ts`: export { plugin as Pagerduty } from '@backstage/plugin-pagerduty'; ``` -Add it to the `EntityPage.ts`: +Add it to the `EntityPage.tsx`: ```ts import { isPluginApplicableToEntity as isPagerDutyAvailable, - PagerDutyCard, + EntityPagerDutyCard, } from '@backstage/plugin-pagerduty'; // add to code { @@ -45,6 +45,18 @@ import { } ``` +Add the proxy configuration in `app-config.yaml` + +```yaml +proxy: + ... + '/pagerduty': + target: https://api.pagerduty.com + headers: + Authorization: + $env: PAGERDUTY_TOKEN +``` + ## Client configuration If you want to override the default URL for events, you can add it to `app-config.yaml`. From 8ab12ecd8784afc65185fa96c2c913b4c4d22e5c Mon Sep 17 00:00:00 2001 From: Andrew Thal Date: Wed, 3 Mar 2021 09:27:58 -0500 Subject: [PATCH 2/3] Update README.md Signed-off-by: Andrew Thal --- plugins/pagerduty/README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/plugins/pagerduty/README.md b/plugins/pagerduty/README.md index db34908050180..55fc793a199db 100644 --- a/plugins/pagerduty/README.md +++ b/plugins/pagerduty/README.md @@ -45,18 +45,6 @@ import { } ``` -Add the proxy configuration in `app-config.yaml` - -```yaml -proxy: - ... - '/pagerduty': - target: https://api.pagerduty.com - headers: - Authorization: - $env: PAGERDUTY_TOKEN -``` - ## Client configuration If you want to override the default URL for events, you can add it to `app-config.yaml`. @@ -72,6 +60,18 @@ pagerduty: In order for the client to make requests to the [PagerDuty API](https://developer.pagerduty.com/docs/rest-api-v2/rest-api/) it needs an [API Token](https://support.pagerduty.com/docs/generating-api-keys#generating-a-general-access-rest-api-key). + +Add the proxy configuration in `app-config.yaml` + +```yaml +proxy: + ... + '/pagerduty': + target: https://api.pagerduty.com + headers: + Authorization: Token token=${PAGERDUTY_TOKEN} +``` + Then start the backend passing the token as an environment variable: ```bash From 3c58f9a8688c06852a42124b1564076b22ded2bd Mon Sep 17 00:00:00 2001 From: Andrew Thal Date: Mon, 15 Mar 2021 14:49:16 +0000 Subject: [PATCH 3/3] Fix lint Signed-off-by: Andrew Thal --- plugins/pagerduty/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/pagerduty/README.md b/plugins/pagerduty/README.md index 55fc793a199db..965a71902053c 100644 --- a/plugins/pagerduty/README.md +++ b/plugins/pagerduty/README.md @@ -60,7 +60,6 @@ pagerduty: In order for the client to make requests to the [PagerDuty API](https://developer.pagerduty.com/docs/rest-api-v2/rest-api/) it needs an [API Token](https://support.pagerduty.com/docs/generating-api-keys#generating-a-general-access-rest-api-key). - Add the proxy configuration in `app-config.yaml` ```yaml