Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Auronmatrix/d9985373ddc1f320727fdf530ebafe14 to your computer and use it in GitHub Desktop.
Save Auronmatrix/d9985373ddc1f320727fdf530ebafe14 to your computer and use it in GitHub Desktop.
AWS Step Functions: Find first failed task in history list
// For those that are annoyed that the AWS Step function history UI doesn't support filter
// Just paste this into your browser console and grab a coffee
if (!window.btn) { window.btn = document.getElementsByClassName('sfn-history-load-more-container')[0].children[0].children[0] }; var failed = Array.from(document.querySelectorAll('span')).find(el => el.textContent === 'TaskFailed'); var clickAndFind = () => { window.btn.click(); window.btn.scrollIntoView(); var failed = Array.from(document.querySelectorAll('span')).find(el => el.textContent === 'TaskFailed'); if (failed) { console.log("found failed"); failed.scrollIntoView(); document.getElementsByClassName("awsui-app-layout__content")[0].style.backgroundColor = "tomato" } else { console.log("no failed found. Trying again later"); window.setTimeout(clickAndFind, 800) }}; clickAndFind();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment