updated dynamic component layout
This commit is contained in:
parent
dcff10e984
commit
8bcb72b259
@ -8,37 +8,64 @@
|
|||||||
@inject IHttpService httpService
|
@inject IHttpService httpService
|
||||||
@inject IJSRuntime JSRuntime
|
@inject IJSRuntime JSRuntime
|
||||||
|
|
||||||
@if (tables != null | graphs != null)
|
@if (tables != null || graphs != null)
|
||||||
{
|
{
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
@if (graphs != null)
|
||||||
@foreach (var component in tables)
|
|
||||||
{
|
{
|
||||||
|
@for (int i = 0; i < graphs.Length; i += 2)
|
||||||
|
{
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="row">
|
||||||
|
@if (i < graphs.Length)
|
||||||
|
{
|
||||||
|
<div class="col-md-6">
|
||||||
<div class="card mb-3">
|
<div class="card mb-3">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<DynamicTable data="@component.Data" TableId="@component.Id" module="@moduleId"/>
|
<DynamicChart StatsList="@graphs[i].Stats"
|
||||||
</div>
|
SelectedChartType="@graphs[i].Graph"
|
||||||
</div>
|
ChartTitle="@graphs[i].Title"
|
||||||
}
|
ChartId="@graphs[i].Id"
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
@foreach (var component in graphs)
|
|
||||||
{
|
|
||||||
<div class="card mb-3">
|
|
||||||
<div class="card-body">
|
|
||||||
<DynamicChart StatsList="@component.Stats"
|
|
||||||
SelectedChartType="@component.Graph"
|
|
||||||
ChartTitle="@component.Title"
|
|
||||||
ChartId="@component.Id"
|
|
||||||
module="@moduleId"/>
|
module="@moduleId"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
@if (i + 1 < graphs.Length)
|
||||||
|
{
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="card mb-3">
|
||||||
|
<div class="card-body">
|
||||||
|
<DynamicChart StatsList="@graphs[i + 1].Stats"
|
||||||
|
SelectedChartType="@graphs[i + 1].Graph"
|
||||||
|
ChartTitle="@graphs[i + 1].Title"
|
||||||
|
ChartId="@graphs[i + 1].Id"
|
||||||
|
module="@moduleId"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (tables != null)
|
||||||
|
{
|
||||||
|
<div class="col-md-12">
|
||||||
|
@foreach (var table in tables)
|
||||||
|
{
|
||||||
|
<div class="card mb-3">
|
||||||
|
<div class="card-body">
|
||||||
|
<DynamicTable data="@table.Data" TableId="@table.Id" module="@moduleId"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -50,7 +77,7 @@
|
|||||||
|
|
||||||
protected async override Task OnInitializedAsync()
|
protected async override Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
var schema = await httpService.GetAsync<Schema>("http://localhost:10000/" + @moduleId + "/schema");
|
var schema = await httpService.GetAsync<Schema>("http://localhost:10000/" + moduleId + "/schema");
|
||||||
tables = schema.tables;
|
tables = schema.tables;
|
||||||
graphs = schema.graphs;
|
graphs = schema.graphs;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user