Last active
October 26, 2018 18:56
-
-
Save spalenza/17e5b7dc10535c846d85ba634468c3e4 to your computer and use it in GitHub Desktop.
List OpsWorks Custom Recipes
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
function getRecipes(id) { | |
return $.map($('*[data-region="' + id + '"] li.opaque'), function(elem) { | |
return $(elem).text().replace('remove', '').trim(); | |
}) | |
}; | |
var setupRecipes = getRecipes('CustomRecipes.Setup'); | |
var configureRecipes = getRecipes('CustomRecipes.Configure'); | |
var deployRecipes = getRecipes('CustomRecipes.Deploy'); | |
var undeployRecipes = getRecipes('CustomRecipes.Undeploy'); | |
var shutdownRecipes = getRecipes('CustomRecipes.Shutdown'); | |
var packagesSoftwares = getRecipes('Packages'); | |
console.log('Setup: ' + setupRecipes.join(',')); | |
console.log('Configure: ' + configureRecipes.join(',')); | |
console.log('Deploy: ' + deployRecipes.join(',')); | |
console.log('Undeploy: ' + undeployRecipes.join(',')); | |
console.log('Shutdown: ' + shutdownRecipes.join(',')); | |
console.log('Packages: ' + packagesSoftwares.join(',')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment