@page "/module/{moduleId}" @using System.Net; @using PanoptesFrontend.Data @using PanoptesFrontend.Services @using System @using System.Text.Json @using Microsoft.AspNetCore.Components.Web @inject IHttpService httpService @inject IJSRuntime JSRuntime @if (tables != null || graphs != null) {
@if (graphs != null) { @for (int i = 0; i < graphs.Length; i += 2) {
@if (i < graphs.Length) {
} @if (i + 1 < graphs.Length) {
}
} } @if (tables != null) {
@foreach (var table in tables) {
}
}
} @code { private TableComponent[] tables; private GraphComponent[] graphs; [Parameter] public string moduleId { get; set; } protected async override Task OnInitializedAsync() { var panoptesHost = Environment.GetEnvironmentVariable("PANOPTESHOST"); var schema = await httpService.GetAsync($"http://{panoptesHost}/{moduleId}/schema"); tables = schema.tables; graphs = schema.graphs; } }