完成创建密钥功能

This commit is contained in:
2023-12-11 13:37:04 +08:00
parent bfef66d293
commit e42a2042a9
4 changed files with 107 additions and 6 deletions

61
templates/createKey.html Normal file
View File

@@ -0,0 +1,61 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>创建密钥</title>
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
background-color: #f7f7f7;
padding: 20px;
}
.container {
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
</style>
</head>
<body>
<div class="container">
<h2>创建单个密钥</h2>
<form method="post">
<span>密钥</span>
<input name="key" required>
<span>配额</span>
<input name="quota" required>
<button type="submit">创建</button>
</form>
</div>
<hr>
<div class="container">
<h2>批量创建密钥</h2>
<form method="post">
<input type="radio" id="type" name="type" value="uuid" checked="true">
<label for="type">使用UUID</label><br>
<span>个数</span>
<input name="number" required>
<span>配额</span>
<input name="quota" required>
<button type="submit">批量创建</button>
</form>
</div>
{% if resq != "null" %}
<hr>
<div class="container">
<h2>执行结果</h2>
{% for i in resq %}
<h4>{{ i }}</h4>
{% endfor %}
</div>
{% endif %}
<script>
</script>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<title>网站后台展示页</title>
<title>后台管理</title>
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
@@ -41,6 +41,10 @@
.red {
color: red;
}
.nodecoration{
text-decoration: none;
}
</style>
</head>
@@ -85,13 +89,13 @@
</thead>
<tbody>
<tr>
<td><a href="/admin/list">列出所有Key</a></td>
<td><a href="/admin/list" class="nodecoration">列出所有Key</a></td>
</tr>
<tr>
<td>查询密钥</td>
</tr>
<tr>
<td><a href="/admin/createkey">创建密钥</a></td>
<td><a href="/admin/createkey" class="nodecoration">创建密钥</a></td>
</tr>
<tr>
<td>阿巴阿巴</td>