Giter Site home page Giter Site logo

sergiitk / pagerbeauty Goto Github PK

View Code? Open in Web Editor NEW
334.0 7.0 27.0 5.02 MB

:pager::sparkles: PagerDuty on-call widget for monitoring dashboard. Datadog and Grafana compatible

Home Page: https://demo.pagerbeauty.sergii.org/v1/schedules/PDUQGYJ.html

License: MIT License

JavaScript 94.39% HTML 0.01% Dockerfile 0.73% Shell 0.94% SCSS 3.25% Jinja 0.69%
pagerduty datadog dashboard wallboard on-call widget monitor docker oncall incidents

pagerbeauty's People

Contributors

brmurphy avatar dependabot[bot] avatar irabinovitch avatar jamesfrost avatar jarrodconnolly avatar semantic-release-bot avatar sergiitk avatar suhomozgy-andrey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pagerbeauty's Issues

PagerBeauty Helm Chart

My co-workers and I were wanting to use PagerBeauty, but its alternative executions were not viable. With that, we created a PagerBeauty Helm Chart to facilitate its configuration and installation.

This is the GitHub repository link: PagerBeauty Helm Chart

We would love for you to consider making the Helm Chart we created available to everyone along with the other execution alternatives.

Support serving from a subpath (ie /pagerbeauty)

Is your feature request related to a problem? Please describe.

I'd like to run pagerbeauty and serve is form a subpath (ie /pagerbeauty). We have a single https endpoint for tools, with an nginx forwarding various subpaths to those. This allows us to do access control centrally.

Describe the solution you'd like

An env var PAGERBEAUTY_HTTP_PATH=/pagerbeauty

Describe alternatives you've considered

I've tried having the nginx do all the rewrites in front of pagerbeauty, and got quite far - the redirect, the embedded scripts and styles etc. But the AJAX fetch of schedules.json is too much for a nginx rewrite.

Add phone number to on-call person name

Hello.
Thank you for this tool! It's pretty awesome ๐Ÿ˜Š

Is your feature request related to a problem? Please describe.
I think it would be useful to add a phone number to on-call person name. So when someone is looking who is on-call today, they can found not only person name, but also his phone number. (for example, they don't have access to PagerDuty)

Describe the solution you'd like
Add additional line somewhere under on-call person name with his main phone.

Describe alternatives you've considered
Phone number can be found in Slack or in Corporate people directory. But it's not so convenient.

Additional context
Nope

Theme is not Applied When No One is On-Call

Describe the bug
Themed styling is not applied to "on-call user" text when an on-call user is not found for a schedule, or a schedule itself is not found.

To Reproduce
Steps to reproduce the behavior:

  1. Navigate to an invalid schedule with a theme applied, such as v1/schedules/F.html?theme=grafana

Expected behavior
The text within the user_name div is properly styled.

access_token not working

Describe the bug
Deployed using the Heroku app and set an access_token and an http username/password. When trying to access the dashboard widgets using the access_token browser prompts for a username/password. (I also tried w/o a user/pass set, in which case it allows access even without the token)

To Reproduce
Steps to reproduce the behavior:

  1. Deploy using heroku app
  2. Include http auth values and access token
  3. test access with/without access_token

Expected behavior
w/o access_token access should not be granted
with access_token access should be granted and user/pass should not be requested

Actual behavior
with or w/o access_token browser prompts for user/pass, once they are entered access is granted, if they are not entered access is not granted. (seems that setting the access token doesn't do anything)

Ability to use browser local time

Is your feature request related to a problem? Please describe.

Our on-call team is split across 5 time zones, but our PD schedule is timed in NYC time. It would be useful to show the UI in local time rather than NYC time for everyone consuming it.

Describe the solution you'd like
I would see US team members on-call time in Europe/Copenhagen (my computer time) instead of US/New Yrok

Custom string on the panel

We use Live Call Routing addon and it would be great to have the LCR phone number on the dashboard instead of the personal phone number. However, the LCR number is not exposed via any API, but as it is a fixed string, actually, adding custom text to the Pagerbeauty panel would be really helpful.

Thank you, Sergii!

MQTT or webhook support

Is your feature request related to a problem? Please describe.
Not exactly.

Describe the solution you'd like
I am looking to integrate my PagerDuty schedule with HomeAssistant. I stumbled on this project and it looks like you're most of the way there. Ideally, I'd like to be able to create an HA sensor based on whether I'm on call or not and I'd like to be able to trigger an event when I'm paged. I'd use these to trigger reminders when I leave home w/o my laptop or would turn on my bedroom lights when I'm sleeping to get my attention. The automation would live in HA's world, but it would be nice if I could flow the events out of this project. MQTT or webhooks would make this pretty straightforward on the other side (and it would benefit people using other home automation software).

Describe alternatives you've considered
Writing my own from scratch...

Additional context
Nothing against your beautiful UI, but this feature could be purely headless.

CORs issue in Firefox

Describe the bug
I am getting CORS errors when trying to run the app

Access to XMLHttpRequest at 'https://xxxoncall.herokuapp.com/v1/schedules/P2MB6K8.html?access_token=xxxxxxxecb18b163&theme=grafana' from origin 'https://grafana-achm4.xxxxxx.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

To Reproduce
Steps to reproduce the behavior:

  1. Followed the docs
  2. Save and see image
  3. refresh and get error
  4. Consul shows CORs errors

User Timezones are not accounted for on display

Describe the bug
Start and End times are based on the timezone of the individual that is on-call and not the timezone of the viewer.

There is no indication of the timezone, and as such results in the displayed information being incorrect.

To Reproduce
Create two schedules, with users in different timezones;

Example given that generates screenshot below;

  • UK User from Nov 29, 2019 at 10:00 to Dec 6, 2019 at 10:00
  • USA User from Nov 30, 2019 at 04:00 to Dec 3, 2019 at 00:00

Expected behavior

Start/End times are shown localised to the viewer, not the assigned users timezone.

Screenshots

image

Add Health Check Endpoint

Having a dedicated endpoint that could be used to check the health of the service would help enable monitoring PagerBeauty deployments. This is a common pattern that can be used with other services.

We're currently using the /v1/schedules endpoint for health checking, but this isn't ideal, as it isn't the purpose of this endpoint. Additionally, this endpoint displays information about the schedules, and so should be authenticated.

Optionally, the health check endpoint could do some functional checks e.g. is the PagerDuty integration still working.

Support whitespaces between schedule ids in configuration

Is your feature request related to a problem? Please describe.
Currently PAGERBEAUTY_PD_SCHEDULES isn't accepting whitespaces between schedule ids.

Describe the solution you'd like
Remove extra whitespaces when splitting PAGERBEAUTY_PD_SCHEDULES into an array.

Additional context

  • PagerDuty API v2
  • Test API key: y_NbAkKc66ryYTWUXYEu
  • Test schedule ids: P538IZH,PJ1P5JQ,PY2L7QI

Pagerbeauty uses local time rather than UTC

Describe the bug
Pagerbeauty shows the previous person on call (at least for people on the US East coast) after someone else has gone on call

To Reproduce
Steps to reproduce the behavior:

  1. Create a new on call rotation for that starts at 10 AM EDT
  2. Visit the on call detail page for this rotation
  3. See that the rotation starts and ends at 2 PM according to pagerbeauty.

Expected behavior
On call time in pagerbeauty is the same as in pagerduty

Binary executables for Linux

Is your feature request related to a problem? Please describe.
Requesting for the binary executable of this nodejs repo

Describe the solution you'd like
I am able to build the binaries of Pagerbeauty nodejs repo but facing dependency issues.

Describe alternatives you've considered
Please make the binary executable available along with the releases.

Additional context
I am not supposed to use Docker in my infrastructure. So tried building the Linux executable but no success.

Documentation for running docker as https

I love the tool, but I cannot embed non-https sources in my Grafana environment. It's unclear to me how to do this using the docker deployment method.

I'll be sure to add the docs myself if I figure it out!

Show grey on-call box when there's no-one on call

Is your feature request related to a problem? Please describe.
PagerDuty API v2 GET /oncalls endpoint simply omits a schedule in the response when there's no one on call as of the moment for such schedule.

Because of that, even when a schedule with a valid on-call is loaded, when an engineer goes off duty, on refresh next refresh PagerBeauty will "forget" the schedule completely and show 404.

Describe the solution you'd like

  • Match the list of requested schedules
  • After loading all schedules, check which are missing
  • For missing schedules shown on-call as shown in the picture:
    nobody

Colors

  • Light #ddd
  • Dark #aaa

Additional context

  • PagerDuty API v2
  • Test API key: y_NbAkKc66ryYTWUXYEu
  • Test schedule ids: P538IZH,PJ1P5JQ,PY2L7QI

Doesn't work with the PD v2 API?

Describe the bug
I'm trying to get this setup and the /v1/schedules.html URI in the docs throws a 404 when I'm logged into my PD organization. According to PD, the v1 API was decommissioned as of 10/19. Does this mean you need to add v2 support?

Document running as Heroku demo

Is your feature request related to a problem? Please describe.
Currently there's no documentation on running this PagerBeauty on Heroku.

Describe the solution you'd like
Add Instructions to README.md

Additional context

  • PagerDuty API v2
  • Test API key: y_NbAkKc66ryYTWUXYEu
  • Test schedule ids: P538IZH,PJ1P5JQ,PY2L7QI

Add on-call current timeline indication

Is your feature request related to a problem? Please describe.
Just a feature suggestion from what I've seen of the demo images, I haven't actually used it yet.

Describe the solution you'd like
Having a timeline indication (IE, a bar or something similar) to show where in the beginning to end of the viewed person's on-call timeline you are currently at. It would be easier to see how much longer they are on call for at a glance rather than deciphering the date format itself.

PagerDuty Overrides do not work on PagerBeauty

Describe the bug
If you create an override in PagerDuty Pagerbeauty will still show a regular rotation instead of an override.

To Reproduce
Steps to reproduce the behavior:

  1. Create an override for any Schedule
  2. Create PagerBeauty widget for this Schedule
  3. User from the original Schedule is shown as currently oncall. =

Expected behavior
User from "Override" is shown as currently oncall.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.