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

Function formatComponents

storm-webapp/src/main/webapp/js/script.js:360–372  ·  view source on GitHub ↗
(row)

Source from the content-addressed store, hash-verified

358};
359
360var formatComponents = function (row) {
361 if (!row) return;
362 var result = '';
363 Object.keys(row.componentNumTasks || {}).sort().forEach (function (component){
364 var numTasks = row.componentNumTasks[component];
365 result += '<a class="worker-component-button btn btn-sm btn-primary" href="/component.html?id=' +
366 component + '&topology_id=' + row.topologyId + '">';
367 result += component;
368 result += '<span class="badge">' + numTasks + '</span>';
369 result += '</a>';
370 });
371 return result;
372};
373
374var format = function (row){
375 var result = '<div class="worker-child-row">Worker components: ';

Callers 1

formatFunction · 0.85

Calls 1

forEachMethod · 0.80

Tested by

no test coverage detected