perf(centralui): load template stubs/analysis projections instead of the full tracked graph (review 2026-10-21 07/P-1, 08/P1)

This commit is contained in:
Joseph Doherty
2026-10-22 08:40:49 -04:00
parent 0ebfafa98b
commit c429fb374b
12 changed files with 103 additions and 28 deletions
@@ -1,3 +1,4 @@
using ZB.MOM.WW.ScadaBridge.Commons.Types.Templates;
using System.Security.Claims;
using Bunit;
using Bunit.TestDoubles;
@@ -108,8 +109,9 @@ public class InstanceCreateTemplateFieldTests : BunitContext
new("Elsewhere") { Id = 8, FolderId = 3 },
};
_repo.GetAllTemplatesAsync(Arg.Any<CancellationToken>())
.Returns(Task.FromResult<IReadOnlyList<Template>>(templates));
_repo.GetTemplateStubsAsync(Arg.Any<CancellationToken>())
.Returns(Task.FromResult<IReadOnlyList<TemplateStub>>(
(templates).Select(t => new TemplateStub(t.Id, t.Name, t.ParentTemplateId, t.FolderId, t.IsDerived, t.OwnerCompositionId)).ToList()));
_repo.GetAllFoldersAsync(Arg.Any<CancellationToken>())
.Returns(Task.FromResult<IReadOnlyList<TemplateFolder>>(folders));