feat(centralui): Create saves bindings (upsert) and lands on Configure with a created/bound/bindError notice

Claude-Session: https://claude.ai/code/session_01G2GHPnbbKGvyyfbr2XBRVH
This commit is contained in:
Joseph Doherty
2026-08-21 06:12:53 -04:00
parent 74c7bd2fa8
commit 80b9ab2d57
2 changed files with 69 additions and 6 deletions
@@ -81,6 +81,28 @@
</div>
</div>
@* One-shot notice for an instance that just arrived from the Create page
(design 2026-08-21). Query-string only — nothing is persisted, so it
disappears on any later visit. *@
@if (Created == 1)
{
<div class="alert @(BindError is null ? "alert-success" : "alert-warning") py-2 small" data-test="configure-created-notice">
Instance created.
@if (BindError is not null)
{
<text>Bindings were NOT saved: @BindError — bind the groups below.</text>
}
else if (Bound is > 0)
{
<text>@Bound binding(s) saved. Test Bindings, then Deploy.</text>
}
else
{
<text>Bind the groups below, then Deploy.</text>
}
</div>
}
@* Connection Bindings — grouped by module (design 2026-08-20). Rows come
from the flattened configuration so composed module members appear;
each group header carries a connection + Object apply that rewrites
@@ -710,6 +732,13 @@
@code {
[Parameter] public int Id { get; set; }
// Set by the Create Instance page's post-create redirect (design 2026-08-21):
// Created=1 always, then either the count of bindings saved or the error that
// stopped them being saved. Read-only display — never persisted.
[SupplyParameterFromQuery] public int? Created { get; set; }
[SupplyParameterFromQuery] public int? Bound { get; set; }
[SupplyParameterFromQuery] public string? BindError { get; set; }
private Instance? _instance;
private string _templateName = "";
private string _siteName = "";