@page "/test"
@using System.Net;
@using PanoptesFrontend.Data
@using PanoptesFrontend.Services
@using System.Text.Json;
@using Microsoft.AspNetCore.Components.Web
@inject IHttpService httpService
@inject IJSRuntime JSRuntime
@if (tables != null | graphs != null)
{
@foreach (var component in tables)
{
}
@foreach (var component in graphs)
{
}
}
@code {
private TableComponent[] tables;
private GraphComponent[] graphs;
private string module = "localhost:8080";
protected async override Task OnInitializedAsync()
{
var schema = await httpService.GetAsync($"http://localhost:10000/{module}/schema");
tables = schema.tables;
graphs = schema.graphs;
}
}