JSFiddle - React, Tailwind, and code Playground

by eurica

HTML

<script src="https://eurica.github.io/pdjs/js/pdjs.js"></script>

JavaScript

PDJS = new PDJSobj({
    subdomain: "webdemo",
    token: "CkNpsqH9i6yTGus8VDzA",
})

inc = {
    service_key: "b19873c048e84ba6a2ff0a2ff8471f84",
    description: "Incident with context",
    incident_key: (new Date()).toString(),
    details: {
        hostname: "foobar",
        whizzbangversion: "4389ye8923498w3y89crwt",
        important_value: "97.8",
        context: {
            embed: [{
                type: "iframe",
                src: "https://rpm.newrelic.com/public/charts/bHKmUlh4MW4",
                name: "New Relic chart"
            }, {
                type: "iframe",
                src: "https://euri.ca/files/sendgrid/status.html",
                name: "PagerDuty Status"

            }, {
                type: "image",
                src: "https://euri.ca/files/sendgrid/attachments/1411321308_datadog%20detects%20an%20error.png"
            }],
            conference: {
                url: "https://plus.google.com/hangouts/_/pagerduty.com/incident-demo"
            }
        },
        power: "9003"
    }
}
console.log(inc)
PDJS.trigger(inc)