aboutsummaryrefslogtreecommitdiff
path: root/src/html/admin.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/html/admin.html')
-rw-r--r--src/html/admin.html37
1 files changed, 29 insertions, 8 deletions
diff --git a/src/html/admin.html b/src/html/admin.html
index a97af06..363f5c0 100644
--- a/src/html/admin.html
+++ b/src/html/admin.html
@@ -14,13 +14,17 @@
el: '#stats',
data: {
stats: { session: [], url: [] },
+ emails: [],
showSessionTable: false,
showUrlTable: false,
showLogData: false,
+ showEmailData: false,
},
created() {
fetch(new Request('/admin/stats')).then(response => response.json())
.then(response => this.stats = response);
+ fetch(new Request('/admin/emails')).then(response => response.json())
+ .then(response => this.emails = response);
}
});
}
@@ -57,12 +61,27 @@
</form>
</div>
</div>
+ <div>
+ <a href="/admin/chess" class="btn btn-primary">Chess</a>
+ </div>
<div id="stats">
<h1>Stats</h1>
<div>
<input type="checkbox" id="showSession" v-model="showSessionTable">
<label for="showSession">Show Session Stats</label>
</div>
+ <div>
+ <input type="checkbox" id="showUrl" v-model="showUrlTable">
+ <label for="showUrl">Show URL Stats</label>
+ </div>
+ <div>
+ <input type="checkbox" id="showLog" v-model="showLogData">
+ <label for="showLog">Show Log</label>
+ </div>
+ <div>
+ <input type="checkbox" id="showEmail" v-model="showEmailData">
+ <label for="showEmail">Show Emails</label>
+ </div>
<div v-if="showSessionTable">
{{stats.total}} total sessions
<table class="table session-table">
@@ -76,10 +95,6 @@
</tr>
</table>
</div>
- <div>
- <input type="checkbox" id="showUrl" v-model="showUrlTable">
- <label for="showUrl">Show URL Stats</label>
- </div>
<table class="table url-table" v-if="showUrlTable">
<tr>
<th>Method</th>
@@ -92,10 +107,6 @@
<td>{{item.c}}</td>
</tr>
</table>
- <div>
- <input type="checkbox" id="showLog" v-model="showLogData">
- <label for="showLog">Show Log</label>
- </div>
<table class="table log-table" v-if="showLogData">
<tr>
<th>Date</th>
@@ -111,6 +122,16 @@
<td>{{item.c}}</td>
</tr>
</table>
+ <table class="table" v-if="showEmailData">
+ <tr>
+ <th>Name</th>
+ <th>Address</th>
+ </tr>
+ <tr v-for="item in emails">
+ <td>{{item.name}}</td>
+ <td>{{item.address}}</td>
+ </tr>
+ </table>
</div>
</body>