Created
October 26, 2023 10:01
-
-
Save ikari-pl/71cf8ae4206e8a3eb54cff78416ec8b0 to your computer and use it in GitHub Desktop.
Temporal activity heartbeat tracker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Shows history of heartbeats on temporal.io | |
// @namespace Violentmonkey Scripts | |
// @match https://cloud.temporal.io/namespaces/filing-factory-prod.laf1h/workflows/* | |
// @grant none | |
// @version 1.0 | |
// @author ikari | |
// @description 10/24/2023, 9:57:35 PM | |
// ==/UserScript== | |
let tt=""; | |
let tm = setInterval(function() { | |
let nt = document.querySelector('div.pending-activity-failure-details > div > div > div > div > div.cm-scroller > div.cm-content').innerText; | |
if (tt != nt) { | |
tt = nt; console.log(nt); | |
let logWin = document.querySelector('#logWin'); | |
if (!logWin) { | |
logWin = document.createElement('div'); | |
logWin.id = 'logWin'; | |
logWin.style = `position: absolute; | |
right: 10px; | |
bottom: 10px; | |
background: rgba(0,0,0,0.7); | |
border: 2px solid white; | |
border-radius: 10px; | |
color: white; | |
font-family: monospace; | |
white-space: pre; | |
max-height: 20em; | |
overflow-y: scroll;`; | |
document.body.appendChild(logWin); | |
} | |
let line = document.createElement('div'); | |
line.innerText = (new Date()) + nt; | |
logWin.appendChild(line); | |
} | |
}, 1000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment