zhaolei
7 days ago 921de2254ff5712a44ed8575ee8efe34252f6603
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
@inherits ExceptionsBase
 
<div class="card">
    <div class="card-header">
        <span>查询结果</span>
    </div>
    <div class="card-body">
        <Table Id="exception" TItem="Bootstrap.DataAccess.Exceptions" ShowToolBar="true" ShowSearch="true" ShowAdvancedSearch="false" ShowRefresh="true" QueryModel="QueryModel" EditModel="DataContext" OnQuery="Query">
            <TableHeader>
                <LgbTableHeader TItem="DateTime" @bind-Value="@context.LogTime" class="text-nowrap datetime"></LgbTableHeader>
                <LgbTableHeader TItem="string" @bind-Value="@context.ErrorPage"></LgbTableHeader>
                <LgbTableHeader TItem="string" @bind-Value="@context.UserId" class="text-nowrap"></LgbTableHeader>
                <LgbTableHeader TItem="string" @bind-Value="@context.UserIp" class="text-nowrap"></LgbTableHeader>
                <LgbTableHeader TItem="string" @bind-Value="@context.ExceptionType"></LgbTableHeader>
                <LgbTableHeader TItem="string" @bind-Value="@context.Message"></LgbTableHeader>
            </TableHeader>
            <RowTemplate>
                <td>@context.LogTime</td>
                <td class="text-nowrap">@context.ErrorPage</td>
                <td>@context.UserId</td>
                <td>@context.UserIp</td>
                <td class="text-nowrap">@context.ExceptionType</td>
                <td>@context.Message</td>
            </RowTemplate>
            <TableToolbarTemplate>
                <TableToolbarButton class="btn btn-danger" Icon="fa fa-file-text-o" Title="服务器日志" OnClick="ShowDetail" />
            </TableToolbarTemplate>
        </Table>
    </div>
</div>
 
<Modal @ref="Modal" Id="exception-detail" Title="程序异常日志窗口" Size="ModalSize.Large">
    <ModalBody>
        <form class="form-inline">
            <div class="row">
                @foreach (var item in Items)
                {
                    <div class="form-group col-md-3 col-sm-4 col-6">
                        <a href="#" @onclick:preventDefault OnClick="e => ShowLog(item)">@item</a>
                    </div>
                }
            </div>
        </form>
    </ModalBody>
    <ModalFooter>
        <button type="button" class="btn btn-secondary" data-dismiss="modal">
            <i class="fa fa-times"></i>
            <span>关闭</span>
        </button>
    </ModalFooter>
</Modal>