Last active
March 4, 2020 17:50
-
-
Save Auronmatrix/d9985373ddc1f320727fdf530ebafe14 to your computer and use it in GitHub Desktop.
AWS Step Functions: Find first failed task in history list
This file contains hidden or 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
// 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