This repository hosts the source code for PagerDuty Live, an open-source, single page application which enables organisations to manage their PagerDuty incidents in real-time through a unified console view.
Live URL: https://giranm.github.io/pd-live-react/
This project is not officially supported by PagerDuty and therefore no issues can be reported to or resolved by PagerDuty Support. This is an open-source project designed to be used in a safe/test environment before users can leverage on their primary domains.
If you wish to maintain + deploy your own version of PagerDuty Live, we recommend registering a new OAuth app as follows:
Install NodeJS v16.19 via asdf install
/ nvm
$ git clone
repo to desired destination and $ cd pd-live-react
into directory
Create .env
file in project root with overriding configuration (see section below for details)
Install dependencies with $ yarn install
and run application locally using $ yarn start
The app will be available under http://localhost:3000/pd-live-react
The following optional parameters can be used in a .env file to override PagerDuty Live during $ yarn start : |
Parameter | Usage |
---|---|---|
REACT_APP_PD_ENV |
PagerDuty Live Environment Tag; defaults to localhost-dev if not set |
|
REACT_APP_PD_OAUTH_CLIENT_ID |
PagerDuty OAuth App client ID (created upon registering app) | |
REACT_APP_PD_OAUTH_CLIENT_SECRET |
PagerDuty OAuth App client secret (created upon registering app) | |
REACT_APP_PD_USER_TOKEN |
PagerDuty Personal API Token; this will override OAuth login workflow if set and should be used for integration tests | |
REACT_APP_PD_SUBDOMAIN_ALLOW_LIST |
Comma separated list of allowed subdomains (e.g. acme-prod,acme-dev ) |
|
REACT_APP_PD_REQUIRED_ABILITY |
PagerDuty account-level ability required to use application | |
REACT_APP_DD_APPLICATION_ID |
Datadog RUM Application ID | |
REACT_APP_DD_CLIENT_TOKEN |
Datadog RUM Client Token | |
REACT_APP_DD_SITE |
Datadog site (e.g. datadoghq.com ) |
|
REACT_APP_DD_SAMPLE_RATE |
Datadog RUM Sample Rate (e.g. 100 ) |
|
REACT_APP_DD_TRACK_INTERACTIONS |
Datadog RUM Track Interactions (e.g. true ) |
|
REACT_APP_DD_DEFAULT_PRIVACY_LEVEL |
Datadog RUM Default Privacy Level (e.g. mask-user-input ) |
The following scripts have been created to run unit, component, and integration tests:
$ yarn jest
(Jest Unit/Component)$ yarn cypress:run:local
(Cypress Integration with headless Chromedriver)Please note that running integration tests will require environment variable REACT_APP_PD_USER_TOKEN
set.
The integration tests also assume the PagerDuty account associated with the above user token has been setup with the following Terraform environment.
To prepare PagerDuty Live for release, the current workflow should be carried out:
Checkout to develop
branch and verify if it's stable - i.e. no test and linting failures.
Update version information in package.json
using npm version
- example commands given below:
$ npm --no-git-tag-version version preminor --preid beta
v0.1.0-beta.0
$ npm --no-git-tag-version version minor
v0.2.0
Update application code version using $ yarn genversion
Prepare the appropriate release branch via $ git checkout -b release/<VERSION>
(following above semver)
Stage modified files, commit, and push changes upstream:
$ git add .
$ git commit -m "Publishing release <VERSION>"
$ git push --set-upstream origin release/<VERSION>
Raise pull requests to merge into main
branch.
Build static bundle via $ yarn build
or use appropriate CI/CD workflow.
MIT License
Copyright (c) 2021 Giran Moodley
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.