| 358 | }; |
| 359 | |
| 360 | var 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 | |
| 374 | var format = function (row){ |
| 375 | var result = '<div class="worker-child-row">Worker components: '; |