refactor(historian): remove named-pipe transport
This commit is contained in:
+17
-9
@@ -66,11 +66,16 @@ else
|
||||
<div class="panel-head">Connection</div>
|
||||
<div style="padding:1rem">
|
||||
<div class="row g-3">
|
||||
<div class="col-md-5">
|
||||
<label class="form-label">Named pipe name</label>
|
||||
<InputText @bind-Value="_form.Historian.PipeName" class="form-control form-control-sm mono"
|
||||
placeholder="otopcua-historian" />
|
||||
<div class="form-text">Must match the sidecar's <code>OTOPCUA_HISTORIAN_PIPE</code> environment variable.</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form-label">Sidecar host</label>
|
||||
<InputText @bind-Value="_form.Historian.Host" class="form-control form-control-sm mono"
|
||||
placeholder="localhost" />
|
||||
<div class="form-text">DNS name or IP the historian sidecar's TCP listener is reachable at.</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label class="form-label">Sidecar port</label>
|
||||
<InputNumber @bind-Value="_form.Historian.Port" class="form-control form-control-sm mono" />
|
||||
<div class="form-text">Must match the sidecar's <code>OTOPCUA_HISTORIAN_TCP_PORT</code>.</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label class="form-label">Shared secret</label>
|
||||
@@ -209,7 +214,7 @@ else
|
||||
}
|
||||
|
||||
private static WonderwareHistorianClientOptions CreateDefaultOptions() =>
|
||||
new(PipeName: "otopcua-historian", SharedSecret: "");
|
||||
new(Host: "localhost", Port: 32569, SharedSecret: "");
|
||||
|
||||
private async Task SubmitAsync()
|
||||
{
|
||||
@@ -309,7 +314,8 @@ else
|
||||
/// </summary>
|
||||
public sealed class WonderwareHistorianClientFormModel
|
||||
{
|
||||
public string PipeName { get; set; } = "otopcua-historian";
|
||||
public string Host { get; set; } = "localhost";
|
||||
public int Port { get; set; } = 32569;
|
||||
public string SharedSecret { get; set; } = "";
|
||||
public string PeerName { get; set; } = "OtOpcUa";
|
||||
public int? ConnectTimeoutSeconds { get; set; }
|
||||
@@ -318,7 +324,8 @@ else
|
||||
|
||||
public static WonderwareHistorianClientFormModel FromRecord(WonderwareHistorianClientOptions r) => new()
|
||||
{
|
||||
PipeName = r.PipeName,
|
||||
Host = r.Host,
|
||||
Port = r.Port,
|
||||
SharedSecret = r.SharedSecret,
|
||||
PeerName = r.PeerName,
|
||||
ConnectTimeoutSeconds = r.ConnectTimeout.HasValue ? (int)r.ConnectTimeout.Value.TotalSeconds : null,
|
||||
@@ -327,7 +334,8 @@ else
|
||||
};
|
||||
|
||||
public WonderwareHistorianClientOptions ToRecord() => new(
|
||||
PipeName: PipeName,
|
||||
Host: Host,
|
||||
Port: Port,
|
||||
SharedSecret: SharedSecret,
|
||||
PeerName: PeerName,
|
||||
ConnectTimeout: ConnectTimeoutSeconds.HasValue ? TimeSpan.FromSeconds(ConnectTimeoutSeconds.Value) : null,
|
||||
|
||||
Reference in New Issue
Block a user