Code · 113 lines · 5697 bytes
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113@{
    ViewData["Title"] = "Beheer";
    ViewData["ActiveNav"] = "maintenance";
}
<div class="app">
    @await Html.PartialAsync("_Topbar")
    <div class="subheader" id="maintenanceTabs">
        <a href="#" class="subheader-tab active" data-tab="status">Achtergrondprocessen</a>
        <a href="#" class="subheader-tab" data-tab="metrics">Berichten per account</a>
        <a href="#" class="subheader-tab" data-tab="logs">Logs</a>
    </div>
    <div class="app-body">
        <div class="content">
            <div class="settings-page">
                <div class="settings-wrap settings-wrap-wide" data-tab-panel="status">
                    <section class="settings-section">
                        <h2>Achtergrondindexering</h2>
                        <div id="maintenanceStatus" class="settings-readonly"></div>
                    </section>

                    <section class="settings-section">
                        <h2>Geïndexeerde berichten</h2>
                        <div id="indexTotals" class="settings-readonly"></div>
                        <div class="folder-manage-table-wrap">
                            <table class="folder-manage-table">
                                <thead>
                                    <tr>
                                        <th>Account</th>
                                        <th>Geïndexeerde mappen</th>
                                        <th>Aantal berichten</th>
                                        <th>Grootte</th>
                                    </tr>
                                </thead>
                                <tbody id="indexSummaryBody"></tbody>
                            </table>
                        </div>
                    </section>

                    <section class="settings-section">
                        <h2>Cache</h2>
                        <div class="folder-manage-table-wrap">
                            <table class="folder-manage-table">
                                <thead>
                                    <tr>
                                        <th>Cache</th>
                                        <th>Aantal</th>
                                        <th>Grootte</th>
                                    </tr>
                                </thead>
                                <tbody id="cacheStatsBody"></tbody>
                            </table>
                        </div>
                    </section>
                </div>

                <div class="settings-wrap settings-wrap-wide" data-tab-panel="metrics" style="display:none;">
                    <section class="settings-section">
                        <h2>Berichten per account</h2>
                        <div class="folder-manage-toolbar">
                            <select id="metricsAccountFilter">
                                <option value="">Alle accounts</option>
                            </select>
                        </div>
                        <div class="folder-manage-table-wrap">
                            <table class="folder-manage-table">
                                <thead>
                                    <tr>
                                        <th>Account</th>
                                        <th>Map</th>
                                        <th>Aantal berichten</th>
                                        <th>Grootte</th>
                                    </tr>
                                </thead>
                                <tbody id="metricsBody"></tbody>
                            </table>
                        </div>
                    </section>
                </div>

                <div class="settings-wrap settings-wrap-wide" data-tab-panel="logs" style="display:none;">
                    <section class="settings-section">
                        <h2>Logs</h2>
                        <div class="folder-manage-toolbar">
                            <select id="logLevelFilter">
                                <option value="">Alle niveaus</option>
                                <option value="Trace">Trace</option>
                                <option value="Debug">Debug</option>
                                <option value="Information">Information</option>
                                <option value="Warning">Warning</option>
                                <option value="Error">Error</option>
                                <option value="Critical">Critical</option>
                            </select>
                            <input type="text" id="logCategoryFilter" placeholder="Categorie bevat..." />
                            <input type="number" id="logAccountFilter" placeholder="Account ID" style="width:110px" />
                            <input type="text" id="logSearchFilter" placeholder="Zoeken in bericht..." />
                            <a class="btn" href="#" id="logFilterBtn">Filteren</a>
                            <a class="btn" href="#" id="logClearBtn" style="margin-left:auto">Log wissen</a>
                        </div>
                        <div id="logsBody" class="logs-list"></div>
                        <div class="folder-manage-toolbar">
                            <a class="btn" href="#" id="logsPrevBtn">Vorige</a>
                            <span id="logsPageInfo"></span>
                            <a class="btn" href="#" id="logsNextBtn">Volgende</a>
                        </div>
                    </section>
                </div>
            </div>
        </div>
    </div>
</div>
@section Scripts {
    <script src="~/js/maintenance.js" asp-append-version="true"></script>
}