@using System.Linq @using System.Text.Json @using marlin.web.Controllers @model marlin.web.Controllers.JobsController.JobSpawnDetails @{ var sourcesJson = JsonSerializer.Serialize(Model.Sources.Select(s => new { id = s.Id, label = s.UpstreamUrl, mainBranch = s.MainBranch, branches = s.Branches.Select(b => new { name = b.Name, commit = b.Commit.Hash }) })); }