mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-28 20:39:40 +00:00
bea9cd4149
This adds web assets so web developers can have a widget that can be integrated into a web ui.
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
|