mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-23 10:02:04 +00:00
23 lines
696 B
JavaScript
23 lines
696 B
JavaScript
$(document).ready(function() {
|
|
|
|
$.getJSON("/confluent-api/nodes/", function( data) {
|
|
var items = [];
|
|
var options = [];
|
|
var nodename = "";
|
|
$.each( data["_links"]["item"], function( key, val ) {
|
|
if (typeof(val) == "object") {
|
|
nodename = val.href;
|
|
} else {
|
|
nodename = val;
|
|
}
|
|
nodename = nodename.replace('/', '');
|
|
$("#nodes").append("<button id="+nodename+">"+nodename+"</button><br>");
|
|
$("#"+nodename).button().click(function( event ) {
|
|
var tname = this.id;
|
|
var url = "/confluent-api/nodes/" + tname + "/console/session";
|
|
new ConsoleWindow(url, tname);
|
|
});
|
|
});
|
|
});
|
|
}); // end document
|