Associate ScadaBridge controls, guidance and editor errors

This commit is contained in:
Joseph Doherty
2026-11-13 17:59:00 -05:00
parent 20885b6161
commit 915a8a5914
93 changed files with 24126 additions and 476 deletions
@@ -174,7 +174,7 @@
}
</span>
<span class="text-muted small">@g.Members.Count</span>
<select class="form-select form-select-sm" style="width: 160px;" data-test="binding-group-connection"
<select aria-label="Binding group connection" class="form-select form-select-sm" style="width: 160px;" data-test="binding-group-connection"
value="@GroupConnectionInput(g)"
@onchange="e => _groupConnectionInput[g.Key] = int.TryParse(e.Value?.ToString(), out var v) ? v : 0">
<option value="0">@(g.ConnectionState == BindingConnectionState.Mixed ? "— mixed —" : "— none —")</option>
@@ -183,7 +183,7 @@
<option value="@c.Id">@c.Name</option>
}
</select>
<input class="form-control form-control-sm font-monospace" style="max-width: 260px;" data-test="binding-group-object"
<input aria-label="Binding group object reference" class="form-control form-control-sm font-monospace" style="max-width: 260px;" data-test="binding-group-object"
value="@GroupObjectInput(g)"
placeholder="@(g.IsObjectMixed ? "mixed — enter object to unify" : "object, e.g. MESReceiver_022")"
title="Object path the module's members hang off; Apply rewrites every member to <object>.<member>. Blank clears the overrides."
@@ -241,7 +241,7 @@
}
</td>
<td>
<select class="form-select form-select-sm"
<select aria-label="Attribute data connection" class="form-select form-select-sm"
value="@connId"
@onchange="(e) => OnBindingChanged(name, e)">
<option value="0">— none —</option>
@@ -252,7 +252,7 @@
</select>
</td>
<td>
<input class="form-control form-control-sm font-monospace"
<input aria-label="Attribute source reference" class="form-control form-control-sm font-monospace"
value="@GetOverrideForAttr(name)"
@onchange="(e) => OnOverrideForAttrChanged(name, e)"
placeholder="@(m.Row.DefaultReference ?? "(no default)")" />
@@ -407,7 +407,7 @@
}
else
{
<input type="text" class="form-control form-control-sm"
<input aria-label="Attribute override value" type="text" class="form-control form-control-sm"
value="@GetOverrideValue(attr.Name)"
@onchange="(e) => OnOverrideChanged(attr.Name, e)" />
}
@@ -537,10 +537,10 @@
<div class="row g-2">
<div class="col-md-6">
<label class="form-label small text-uppercase text-muted fw-semibold mb-1">
<label class="form-label small text-uppercase text-muted fw-semibold mb-1" for="@($"{_fieldScope}-field-1")">
Priority override
</label>
<input type="number" min="0" max="1000" class="form-control form-control-sm"
<input id="@($"{_fieldScope}-field-1")" type="number" min="0" max="1000" class="form-control form-control-sm"
data-test="alarm-priority-input"
placeholder="@_editingAlarm.PriorityLevel"
@bind="_editingPriorityText" @bind:event="oninput" />
@@ -549,8 +549,8 @@
@* Tri-state: blank = inherit the template alarm's flag.
"Not reportable" is a real override, not a clear — it
pins a reportable template alarm off for this instance. *@
<label class="form-label small text-uppercase text-muted fw-semibold mb-1">MES reportable override</label>
<select class="form-select form-select-sm" data-test="alarm-mes-select" @bind="_editingMesReportableText">
<label class="form-label small text-uppercase text-muted fw-semibold mb-1" for="@($"{_fieldScope}-field-2")">MES reportable override</label>
<select id="@($"{_fieldScope}-field-2")" class="form-select form-select-sm" data-test="alarm-mes-select" @bind="_editingMesReportableText">
<option value="">Inherited (@(_editingAlarm.IsMesReportable ? "reportable" : "not reportable"))</option>
<option value="true">Reportable</option>
<option value="false">Not reportable</option>
@@ -676,7 +676,7 @@
<div class="text-muted font-monospace text-truncate">@src.SourceReference</div>
</td>
<td>
<select class="form-select form-select-sm"
<select aria-label="Native alarm data connection" class="form-select form-select-sm"
value="@(_nasConnEdit.GetValueOrDefault(src.Name) ?? "")"
@onchange="e => _nasConnEdit[src.Name] = string.IsNullOrEmpty((string?)e.Value) ? null : (string?)e.Value">
<option value="">(inherited)</option>
@@ -687,19 +687,19 @@
</select>
</td>
<td>
<input class="form-control form-control-sm font-monospace"
<input aria-label="Native alarm source reference" class="form-control form-control-sm font-monospace"
placeholder="@src.SourceReference"
value="@(_nasRefEdit.GetValueOrDefault(src.Name) ?? "")"
@onchange="e => _nasRefEdit[src.Name] = string.IsNullOrWhiteSpace((string?)e.Value) ? null : ((string?)e.Value)!.Trim()" />
</td>
<td>
<input class="form-control form-control-sm"
<input aria-label="Native alarm condition filter" class="form-control form-control-sm"
placeholder="@(string.IsNullOrEmpty(src.ConditionFilter) ? "(all)" : src.ConditionFilter)"
value="@(_nasFilterEdit.GetValueOrDefault(src.Name) ?? "")"
@onchange="e => _nasFilterEdit[src.Name] = string.IsNullOrWhiteSpace((string?)e.Value) ? null : ((string?)e.Value)!.Trim()" />
</td>
<td>
<select class="form-select form-select-sm" data-test="@($"nas-mes-{src.Name}")"
<select aria-label="Native alarm MES reportable override" class="form-select form-select-sm" data-test="@($"nas-mes-{src.Name}")"
value="@MesText(_nasMesEdit.GetValueOrDefault(src.Name))"
@onchange="e => _nasMesEdit[src.Name] = ParseMes((string?)e.Value)">
<option value="" selected="@(_nasMesEdit.GetValueOrDefault(src.Name) == null)">Inherited (@(src.IsMesReportable ? "reportable" : "not reportable"))</option>
@@ -733,7 +733,7 @@
</div>
<div class="card-body py-2">
<div class="d-flex align-items-center gap-2">
<select class="form-select form-select-sm" style="width: auto;" data-test="area-select" @bind="_reassignAreaId">
<select aria-label="Assigned area" class="form-select form-select-sm" style="width: auto;" data-test="area-select" @bind="_reassignAreaId">
<option value="0">No area</option>
@foreach (var a in _siteAreas)
{
@@ -2008,3 +2008,5 @@
_ => "bg-secondary"
};
}
@code { private readonly string _fieldScope = "field-" + Guid.NewGuid().ToString("N"); }