@namespace ThingsGateway.AdminServer



@using BootstrapBlazor.Components
@using Microsoft.AspNetCore.Authorization
@using ThingsGateway.Admin.Application

<div class="row g-2 mx-1 form-inline">

    <div class="col-12  col-md-6">

        <Card IsShadow=true class="m-2 flex-fill" Color="Color.Primary">
            <HeaderTemplate>
                @Localizer["Shortcuts"]
            </HeaderTemplate>

            <BodyTemplate>
                @foreach (var menu in AppContext.UserWorkbenchOutputs ?? new List<SysResource>())
                {
                    <TabLink class="mx-2" Url="@menu.Href" target="@menu.Target.ToString()" Icon="@menu.Icon" Text="@menu.Title" />
                }
            </BodyTemplate>
        </Card>
    </div>

    <div class="col-12  col-md-6">

        <Card IsShadow=true class="m-2 flex-fill">
            <HeaderTemplate>
                @Localizer["OperLog"]
            </HeaderTemplate>

            <BodyTemplate>
                <Timeline Items="Items"></Timeline>
            </BodyTemplate>
        </Card>

    </div>
</div>

<div class="row g-2 mx-1 form-inline">
    <div class="col-12  col-md-12">
        <Card IsShadow=true class="m-2 flex-fill" Color="Color.Primary">
            <HeaderTemplate>
                @Localizer["HardwareInfoChart"]
            </HeaderTemplate>

            <BodyTemplate>
                <Chart @ref=CPULineChart OnInitAsync="OnCPUInit" Height="var(--line-chart-height)" Width="100%" OnAfterInitAsync="()=>{chartInit=true;return Task.CompletedTask;}" />
            </BodyTemplate>
        </Card>
    </div>
</div>



