File size: 2,264 Bytes
e28c9e4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
{% extends "base.html" %}
{% block title %}管理员登录 | SCU 选课控制台{% endblock %}
{% block body_class %}auth-body admin-theme{% endblock %}
{% block content %}
<section class="auth-layout admin-layout">
    <div class="hero-panel reveal-up">
        <span class="eyebrow">Admin Console</span>
        <h1>统一查看所有用户、任务队列、并行数和实时日志。</h1>
        <p>
            管理员可以手动录入用户账号、查看全部课程目标、控制任务启停,并根据 Hugging Face Space 的资源情况调整并行数。
        </p>
        <div class="hero-metrics">
            <article>
                <strong>多位管理员</strong>
                <span>超级管理员可继续创建普通管理员</span>
            </article>
            <article>
                <strong>并发可控</strong>
                <span>任务并行度支持后台动态调整</span>
            </article>
            <article>
                <strong>全量透视</strong>
                <span>用户数据、任务结果和日志全部可见</span>
            </article>
        </div>
    </div>

    <div class="auth-card reveal-up delay-1 accent-amber">
        <div class="card-head compact">
            <span class="kicker">管理入口</span>
            <h2>管理员登录</h2>
            <p>超级管理员账号密码来自环境变量 <code>ADMIN</code><code>PASSWORD</code></p>
        </div>
        <form method="post" class="form-grid">
            <label class="field">
                <span>管理员账号</span>
                <input type="text" name="username" autocomplete="username" placeholder="输入管理员账号" required>
            </label>
            <label class="field">
                <span>管理员密码</span>
                <input type="password" name="password" autocomplete="current-password" placeholder="输入管理员密码" required>
            </label>
            <button type="submit" class="btn btn-secondary btn-lg">进入管理后台</button>
        </form>
        <div class="auth-footnote">
            普通学生无法从用户登录页看到此入口,管理员地址需单独访问。
        </div>
    </div>
</section>
{% endblock %}