Created
March 23, 2016 16:46
-
-
Save dwelch2344/ada7c0761d876e20418d to your computer and use it in GitHub Desktop.
When looking at the Consul ui / services tab, run this to get rid of everything (assuming you're tunneled into the right box -- since the Agent API only relates to the node executed on)
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
$('.name small') | |
.map( (i,e) => e.innerText.trim() ) | |
.filter( (i,e) => e.indexOf("service:") == 0) | |
.map( (i,e) => e.replace("service:", '') ) | |
.each( (i,e) => { | |
var url = "http://localhost:8500/v1/agent/service/deregister/" + e | |
console.log('Trying', url) | |
$.ajax({ | |
type: "GET", | |
url: url, | |
async: true, | |
success: function () { | |
console.log('Success', e) | |
} | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment