Skip to content

Instantly share code, notes, and snippets.

@zehicle
Created May 6, 2014 23:25
Show Gist options
  • Save zehicle/b771eede1c0af6dacfbe to your computer and use it in GitHub Desktop.
Save zehicle/b771eede1c0af6dacfbe to your computer and use it in GitHub Desktop.
test capabilities page
<!DOCTYPE html>
<html>
<head>
<title>OpenStack DefCore Tracked Capabilities</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" ></script>
<script>
function create_caps() {
$.ajax({
type: "GET",
dataType: 'json',
url: 'cloudedge/397d70c98f47f855b908/raw/capabilities.json',
success: function(data, status, xhr) {
for(var capability in data) {
var line = "<li>"+data[capability]["domain"] + "\\"
if (data[capability]["core_test_count"]>0)
line += "<strong>Core " + capability+ "</strong>";
else
line += capability;
line += ":" + data[capability]['description']
line += "<ul id='"+ capability +"'>"
for (var test in data[capability]["tests"]) {
line += "<li>" + data[capability]["tests"][test] + "</li>"
}
line += "</ul></ul>"
console.log(line);
$("ul#capabilities").append(line)
};
},
});
}
window.onload = create_caps();
</script>
</head>
<body>
<h1>OpenStack DefCore Tracked Capabilities</h1>
<ul id="capabilities"></ul>
<div>Copyright OpenStack Foundation, 2014. Apache 2 License.</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment