feat: add GrpcNodeAAddress/GrpcNodeBAddress to Site entity, CLI, and UI
This commit is contained in:
@@ -75,6 +75,18 @@
|
||||
placeholder="akka.tcp://scadalink@host:port/user/site-communication" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-2 align-items-end mt-1">
|
||||
<div class="col-md-6">
|
||||
<label class="form-label small">gRPC Node A Address</label>
|
||||
<input type="text" class="form-control form-control-sm" @bind="_formGrpcNodeAAddress"
|
||||
placeholder="http://host:8083" />
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label small">gRPC Node B Address (optional)</label>
|
||||
<input type="text" class="form-control form-control-sm" @bind="_formGrpcNodeBAddress"
|
||||
placeholder="http://host:8083" />
|
||||
</div>
|
||||
</div>
|
||||
@if (_formError != null)
|
||||
{
|
||||
<div class="text-danger small mt-1">@_formError</div>
|
||||
@@ -92,6 +104,8 @@
|
||||
<th>Description</th>
|
||||
<th>Node A</th>
|
||||
<th>Node B</th>
|
||||
<th>gRPC Node A</th>
|
||||
<th>gRPC Node B</th>
|
||||
<th>Data Connections</th>
|
||||
<th style="width: 260px;">Actions</th>
|
||||
</tr>
|
||||
@@ -100,7 +114,7 @@
|
||||
@if (_sites.Count == 0)
|
||||
{
|
||||
<tr>
|
||||
<td colspan="8" class="text-muted text-center">No sites configured.</td>
|
||||
<td colspan="10" class="text-muted text-center">No sites configured.</td>
|
||||
</tr>
|
||||
}
|
||||
@foreach (var site in _sites)
|
||||
@@ -112,6 +126,8 @@
|
||||
<td class="text-muted small">@(site.Description ?? "—")</td>
|
||||
<td class="small text-truncate" style="max-width: 200px;" title="@site.NodeAAddress">@(site.NodeAAddress ?? "—")</td>
|
||||
<td class="small text-truncate" style="max-width: 200px;" title="@site.NodeBAddress">@(site.NodeBAddress ?? "—")</td>
|
||||
<td class="small text-truncate" style="max-width: 200px;" title="@site.GrpcNodeAAddress">@(site.GrpcNodeAAddress ?? "—")</td>
|
||||
<td class="small text-truncate" style="max-width: 200px;" title="@site.GrpcNodeBAddress">@(site.GrpcNodeBAddress ?? "—")</td>
|
||||
<td>
|
||||
@{
|
||||
var conns = _siteConnections.GetValueOrDefault(site.Id);
|
||||
@@ -163,6 +179,8 @@
|
||||
private string? _formDescription;
|
||||
private string? _formNodeAAddress;
|
||||
private string? _formNodeBAddress;
|
||||
private string? _formGrpcNodeAAddress;
|
||||
private string? _formGrpcNodeBAddress;
|
||||
private string? _formError;
|
||||
|
||||
private bool _deploying;
|
||||
@@ -207,6 +225,8 @@
|
||||
_formDescription = null;
|
||||
_formNodeAAddress = null;
|
||||
_formNodeBAddress = null;
|
||||
_formGrpcNodeAAddress = null;
|
||||
_formGrpcNodeBAddress = null;
|
||||
_formError = null;
|
||||
_showForm = true;
|
||||
}
|
||||
@@ -219,6 +239,8 @@
|
||||
_formDescription = site.Description;
|
||||
_formNodeAAddress = site.NodeAAddress;
|
||||
_formNodeBAddress = site.NodeBAddress;
|
||||
_formGrpcNodeAAddress = site.GrpcNodeAAddress;
|
||||
_formGrpcNodeBAddress = site.GrpcNodeBAddress;
|
||||
_formError = null;
|
||||
_showForm = true;
|
||||
}
|
||||
@@ -248,6 +270,8 @@
|
||||
_editingSite.Description = _formDescription?.Trim();
|
||||
_editingSite.NodeAAddress = _formNodeAAddress?.Trim();
|
||||
_editingSite.NodeBAddress = _formNodeBAddress?.Trim();
|
||||
_editingSite.GrpcNodeAAddress = _formGrpcNodeAAddress?.Trim();
|
||||
_editingSite.GrpcNodeBAddress = _formGrpcNodeBAddress?.Trim();
|
||||
await SiteRepository.UpdateSiteAsync(_editingSite);
|
||||
}
|
||||
else
|
||||
@@ -261,7 +285,9 @@
|
||||
{
|
||||
Description = _formDescription?.Trim(),
|
||||
NodeAAddress = _formNodeAAddress?.Trim(),
|
||||
NodeBAddress = _formNodeBAddress?.Trim()
|
||||
NodeBAddress = _formNodeBAddress?.Trim(),
|
||||
GrpcNodeAAddress = _formGrpcNodeAAddress?.Trim(),
|
||||
GrpcNodeBAddress = _formGrpcNodeBAddress?.Trim()
|
||||
};
|
||||
await SiteRepository.AddSiteAsync(site);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user