@page "/" @attribute [Authorize] @using ScadaLink.Commons.Interfaces.Repositories @inject ISiteRepository SiteRepository @inject ITemplateEngineRepository TemplateEngineRepository @inject IInboundApiRepository InboundApiRepository

Welcome to ScadaLink

@* CentralUI-024: claim type resolved via JwtTokenService. *@ Signed in as @context.User.GetDisplayName()

Central management console for the ScadaLink SCADA system.

@* KPI row *@
@(_loaded ? _siteCount.ToString() : "—")
Sites configured
@(_loaded ? _dataConnectionCount.ToString() : "—")
Data connections configured
@(_loaded ? _templateCount.ToString() : "—")
Templates
@(_loaded ? _apiKeyCount.ToString() : "—")
API keys
@* Quick actions *@
Quick actions
@code { private bool _loaded; private int _siteCount; private int _dataConnectionCount; private int _templateCount; private int _apiKeyCount; protected override async Task OnInitializedAsync() { try { _siteCount = (await SiteRepository.GetAllSitesAsync()).Count; _dataConnectionCount = (await SiteRepository.GetAllDataConnectionsAsync()).Count; _templateCount = (await TemplateEngineRepository.GetAllTemplatesAsync()).Count; _apiKeyCount = (await InboundApiRepository.GetAllApiKeysAsync()).Count; } catch { // Non-fatal — leave counts at zero with the placeholder rendering. } _loaded = true; } }