MCPcopy Create free account
hub / github.com/bee-queue/arena / formatToTreeView

Function formatToTreeView

public/dashboard.js:8–29  ·  view source on GitHub ↗
(flow, flowHost)

Source from the content-addressed store, hash-verified

6 }
7
8 function formatToTreeView(flow, flowHost) {
9 const {job, children} = flow;
10 if (!job) {
11 return {};
12 }
13 const text = `${job.name} <a href="${basePath}/${encodeURIComponent(
14 flowHost
15 )}/${encodeURIComponent(job.queueName)}/${
16 job.id
17 }"><span class="label label-default">${job.id}</span></a>`;
18
19 if (children && children.length > 0) {
20 return {
21 text,
22 nodes: children.map((child) => formatToTreeView(child, flowHost)),
23 };
24 } else {
25 return {
26 text,
27 };
28 }
29 }
30
31 // Set up individual "retry job" handler
32 $('.js-retry-job').on('click', function (e) {

Callers 1

dashboard.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected