@page "/admin/connections"
@page "/admin/data-connections"
@using ScadaLink.Security
@using ScadaLink.Commons.Entities.Sites
@using ScadaLink.Commons.Interfaces.Repositories
@attribute [Authorize(Policy = AuthorizationPolicies.RequireAdmin)]
@inject ISiteRepository SiteRepository
@inject NavigationManager NavigationManager
@inject IDialogService Dialog
Connections
@if (_loading)
{
}
else if (_errorMessage != null)
{
@_errorMessage
}
else
{
@if (!string.IsNullOrWhiteSpace(_searchText) && _matchKeys.Count == 0 && _treeRoots.Count > 0)
{
No connections match the filter.
}
@{
var labelStyle = IsDimmed(node) ? "opacity: 0.4;" : "";
}
@if (node.Kind == DcNodeKind.Site)
{
@node.Label
@node.Children.Count
}
else
{
@node.Label
@node.Connection!.Protocol
}
@if (node.Kind == DcNodeKind.Site)
{
}
else
{
}
No sites configured. Add sites under Admin → Sites.
@_connections.Count connection(s) across @_treeRoots.Count site(s).
}
@code {
record DcTreeNode(string Key, string Label, DcNodeKind Kind, List