Skip to content

Commit cd6d4e0

Browse files
authored
Merge pull request #494 from PagerDuty/release/0.14.0-beta.0
2 parents d5ac12e + 338cfda commit cd6d4e0

File tree

23 files changed

+106
-43
lines changed

23 files changed

+106
-43
lines changed

.github/workflows/cd-workflow.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ jobs:
2929
VITE_PD_ENV: ${{ secrets.PD_ENV }}
3030
VITE_PD_SUBDOMAIN_ALLOW_LIST: '*'
3131
VITE_PD_OAUTH_CLIENT_ID: ${{ secrets.PD_OAUTH_CLIENT_ID }}
32-
VITE_PD_OAUTH_CLIENT_SECRET: ${{ secrets.PD_OAUTH_CLIENT_SECRET }}
3332
VITE_PD_REQUIRED_ABILITY: 'teams'
3433
VITE_DD_APPLICATION_ID: ${{ secrets.DD_APPLICATION_ID }}
3534
VITE_DD_CLIENT_TOKEN: ${{ secrets.DD_CLIENT_TOKEN }}

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ This repository hosts the source code for PagerDuty Live, an open-source, single
44

55
**Live URL: https://pagerduty.github.io/pd-live-react/**
66

7+
## :heavy_exclamation_mark: Deprecation
8+
9+
**This project has been replaced by [Operations Console](https://support.pagerduty.com/main/docs/operations-console), which is supported product from PagerDuty. Please plan to migrate to Operations Console instead.**
10+
711
## :warning: Disclaimer
812

913
**This project is not officially supported by PagerDuty and therefore no issues can be reported to or resolved by PagerDuty Support.
@@ -45,7 +49,6 @@ The following _optional_ parameters can be used in a `.env` file to override Pag
4549
| ----------- | ----------- |
4650
| `VITE_PD_ENV` | PagerDuty Live Environment Tag; defaults to `localhost-dev` if not set |
4751
| `VITE_PD_OAUTH_CLIENT_ID` | PagerDuty OAuth App client ID (created upon registering app) |
48-
| `VITE_PD_OAUTH_CLIENT_SECRET` | PagerDuty OAuth App client secret (created upon registering app) |
4952
| `VITE_PD_USER_TOKEN` | PagerDuty [Personal API Token](https://support.pagerduty.com/docs/generating-api-keys#generating-a-personal-rest-api-key); this will override OAuth login workflow if set and should be used for integration tests|
5053
| `VITE_PD_SUBDOMAIN_ALLOW_LIST` | Comma separated list of allowed subdomains (e.g. `acme-prod,acme-dev`) |
5154
| `VITE_PD_REQUIRED_ABILITY` | PagerDuty account-level [ability](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODEwMg-list-abilities) required to use application |

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pd-live-react",
33
"homepage": "https://pagerduty.github.io/pd-live-react",
4-
"version": "0.13.2-beta.0",
4+
"version": "0.14.0-beta.0",
55
"private": true,
66
"dependencies": {
77
"@chakra-ui/icons": "^2.1.1",

src/App.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424

2525
import moment from 'moment/min/moment-with-locales';
2626

27+
import DeprecationAlertComponent from 'src/components/DeprecationAlert/DeprecationAlert';
2728
import CatastropheModal from 'src/components/CatastropheModal/CatastropheModal';
2829
import AuthComponent from 'src/components/Auth/AuthComponent';
2930
import UnauthorizedModalComponent from 'src/components/UnauthorizedModal/UnauthorizedModalComponent';
@@ -77,7 +78,7 @@ import {
7778
} from 'src/redux/monitoring/actions';
7879

7980
import {
80-
PD_USER_TOKEN, PD_OAUTH_CLIENT_ID, PD_OAUTH_CLIENT_SECRET,
81+
PD_USER_TOKEN, PD_OAUTH_CLIENT_ID,
8182
} from 'src/config/constants';
8283

8384
import 'src/App.scss';
@@ -168,7 +169,7 @@ const App = () => {
168169
if (!PD_USER_TOKEN && (typeof token !== 'string' || !token.startsWith('pd'))) {
169170
return (
170171
<div className="App">
171-
<AuthComponent clientId={PD_OAUTH_CLIENT_ID} clientSecret={PD_OAUTH_CLIENT_SECRET} />
172+
<AuthComponent clientId={PD_OAUTH_CLIENT_ID} />
172173
</div>
173174
);
174175
}
@@ -202,6 +203,7 @@ const App = () => {
202203
>
203204
<Box position="fixed" w="100%" h="100%" overflow="hidden">
204205
<Box as="header" top={0} w="100%" pb={1}>
206+
<DeprecationAlertComponent />
205207
<NavigationBarComponent />
206208
</Box>
207209
<Box as="main" id="main">

src/App.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,7 @@ body.dark-mode div.react-select__option--is-focused {
124124
color: $pd-brand-white !important;
125125
}
126126

127+
a.external-link {
128+
text-decoration: underline;
129+
}
130+

src/components/Auth/AuthComponent.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const AuthComponent = (props) => {
3737
redirectURL,
3838
} = props;
3939
const {
40-
clientId, clientSecret,
40+
clientId,
4141
} = props;
4242

4343
if (!redirectURL) {
@@ -52,7 +52,7 @@ const AuthComponent = (props) => {
5252
const savedButtons = savedButtonsStr ? JSON.parse(savedButtonsStr) : [];
5353
const buttonParams = savedButtons ? `?button=${savedButtons.join('&button=')}` : '';
5454

55-
exchangeCodeForToken(clientId, clientSecret, redirectURL, codeVerifier, code).then((data) => {
55+
exchangeCodeForToken(clientId, redirectURL, codeVerifier, code).then((data) => {
5656
const {
5757
access_token: newAccessToken,
5858
refresh_token: newRefreshToken,
@@ -77,7 +77,7 @@ const AuthComponent = (props) => {
7777
} else {
7878
sessionStorage.removeItem('pd_buttons');
7979
}
80-
getAuthURL(clientId, clientSecret, redirectURL, codeVerifier).then((url) => {
80+
getAuthURL(clientId, redirectURL, codeVerifier).then((url) => {
8181
const subdomainParams = subdomain ? `&subdomain=${subdomain}&service_region=${region}` : '';
8282
setAuthURL(`${url}${subdomainParams}`);
8383
});
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import React from 'react';
2+
3+
import {
4+
useDisclosure,
5+
Alert,
6+
AlertIcon,
7+
AlertTitle,
8+
AlertDescription,
9+
Box,
10+
CloseButton,
11+
} from '@chakra-ui/react';
12+
13+
import {
14+
useTranslation, Trans,
15+
} from 'react-i18next';
16+
17+
const DeprecationAlertComponent = () => {
18+
const {
19+
isOpen: isVisible, onClose,
20+
} = useDisclosure({ defaultIsOpen: true });
21+
const {
22+
t,
23+
} = useTranslation();
24+
25+
return isVisible ? (
26+
<Alert status="info">
27+
<AlertIcon />
28+
<Box w="100%">
29+
<AlertTitle>{t('PD Live is deprecated')}</AlertTitle>
30+
<AlertDescription>
31+
<Trans i18nKey="Deprecation">
32+
Deprecation Notice
33+
<a
34+
href="https://support.pagerduty.com/main/docs/operations-console"
35+
rel="external nofollow noopener noreferrer"
36+
className="external-link"
37+
target="_blank"
38+
>
39+
Operations Console
40+
</a>
41+
</Trans>
42+
</AlertDescription>
43+
</Box>
44+
<CloseButton
45+
alignSelf="flex-start"
46+
position="relative"
47+
right={-1}
48+
top={-1}
49+
onClick={onClose}
50+
/>
51+
</Alert>
52+
) : (
53+
''
54+
);
55+
};
56+
57+
export default DeprecationAlertComponent;

src/components/NavigationBar/NavigationBarComponent.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import {
3232
} from '@chakra-ui/icons';
3333

3434
import {
35-
PD_OAUTH_CLIENT_ID, PD_OAUTH_CLIENT_SECRET,
35+
PD_OAUTH_CLIENT_ID,
3636
} from 'src/config/constants';
3737

3838
import {
@@ -203,7 +203,7 @@ const NavigationBarComponent = () => {
203203
onClick={() => {
204204
const token = sessionStorage.getItem('pd_access_token');
205205
if (token) {
206-
revokeToken(token, PD_OAUTH_CLIENT_ID, PD_OAUTH_CLIENT_SECRET);
206+
revokeToken(token, PD_OAUTH_CLIENT_ID);
207207
}
208208
userAcceptDisclaimer();
209209
userUnauthorize();

src/config/constants.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export const PD_ENV = import.meta.env.VITE_PD_ENV || 'localhost-dev';
77

88
// Authentication
99
export const PD_OAUTH_CLIENT_ID = import.meta.env.VITE_PD_OAUTH_CLIENT_ID || null;
10-
export const PD_OAUTH_CLIENT_SECRET = import.meta.env.VITE_PD_OAUTH_CLIENT_SECRET || null;
1110
export const PD_SUBDOMAIN_ALLOW_LIST = import.meta.env.VITE_PD_SUBDOMAIN_ALLOW_LIST || '*';
1211
export const PD_USER_TOKEN = import.meta.env.VITE_PD_USER_TOKEN || null;
1312
export const PD_REQUIRED_ABILITY = import.meta.env.VITE_PD_REQUIRED_ABILITY || null;

src/config/version.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)