MCPcopy Create free account
hub / github.com/apache/storm / updateAvailableStreams

Function updateAvailableStreams

storm-webapp/src/main/webapp/js/visualization.js:356–376  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

354}
355
356function updateAvailableStreams() {
357 var container = jQuery("#available-streams");
358 $.each(visNS.availableStreamsHash, function(streamIdSanitized, streamName) {
359 var entry = jQuery(container).find("#stream-" + streamIdSanitized)
360 if (entry.length == 0) {
361 var checked = "checked"
362 if (streamName.startsWith("__")) {
363 checked = ""
364 }
365 // Render template
366 var template = $('#stream_selector_template').html();
367 var html = Mustache.render(template, {"checked": checked, "streamName": streamName, "streamNameSanitized": streamIdSanitized});
368 container.append(html);
369
370 // keep list of streams in sorted order
371 var items = jQuery("#available-streams li").get();
372 items.sort(asc_sort);
373 jQuery(items).appendTo('#available-streams');
374 }
375 });
376}
377
378// Called when a stream's checkbox is selected/unselected.
379function checkStream(checkBox) {

Callers 1

addAvailableStreamFunction · 0.85

Calls 3

appendMethod · 0.80
eachMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected