feat(web): 接入工程基线页面与全局配置

This commit is contained in:
bruce
2026-09-09 13:01:36 +08:00
parent befd682675
commit 3eb331a6d7
9 changed files with 42 additions and 4 deletions
+1
View File
@@ -0,0 +1 @@
# 保留全局 Django 模板目录,具体模板将随业务页面逐步增加。
+1
View File
@@ -0,0 +1 @@
{% extends "base.html" %}{% block title %}个人资料 · JobRadar{% endblock %}{% block content %}<h1>个人资料</h1><p>用户名:{{ user.username }}</p><form method="post">{% csrf_token %}{{ form.as_p }}<button type="submit">保存</button></form>{% endblock %}
+1
View File
@@ -0,0 +1 @@
{% extends "base.html" %}{% block title %}{{ run.title }} · JobRadar{% endblock %}{% block content %}<h1>{{ run.title }}</h1><p>状态:{{ run.get_status_display }}</p><h2>运行事件</h2><ol>{% for event in run.events.all %}<li><time>{{ event.occurred_at }}</time> {{ event.summary }}</li>{% empty %}<li>暂无事件</li>{% endfor %}</ol><h2>工具调用</h2>{% for call in run.tool_calls.all %}<p>{{ call.tool_name }}:{{ call.get_status_display }}</p>{% empty %}<p>暂无工具调用</p>{% endfor %}{% endblock %}
+1
View File
@@ -0,0 +1 @@
{% extends "base.html" %}{% block title %}运行记录 · JobRadar{% endblock %}{% block content %}<h1>运行记录</h1>{% for run in page %}<article><h2><a href="{% url 'agent_runtime:run-detail' run.id %}">{{ run.title }}</a></h2><p>状态:{{ run.get_status_display }};创建于 <time>{{ run.created_at }}</time></p></article>{% empty %}<p>当前没有运行记录。第一阶段尚未开放真实 Agent 任务。</p>{% endfor %}{% if page.has_previous %}<a href="?page={{ page.previous_page_number }}">上一页</a>{% endif %}{% if page.has_next %}<a href="?page={{ page.next_page_number }}">下一页</a>{% endif %}{% endblock %}
+5
View File
@@ -0,0 +1,5 @@
<!doctype html>
<html lang="zh-CN">
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>{% block title %}JobRadar{% endblock %}</title><link rel="stylesheet" href="/static/css/app.css"></head>
<body><a class="skip" href="#main">跳到主要内容</a><header><strong>JobRadar · 职途雷达</strong>{% if user.is_authenticated %}<nav><a href="{% url 'agent_runtime:run-list' %}">运行记录</a><a href="{% url 'accounts:profile' %}">个人资料</a><form method="post" action="{% url 'accounts:logout' %}">{% csrf_token %}<button>退出</button></form></nav>{% endif %}</header><main id="main">{% for message in messages %}<p class="message">{{ message }}</p>{% endfor %}{% block content %}{% endblock %}</main></body>
</html>
+1
View File
@@ -0,0 +1 @@
{% extends "base.html" %}{% block title %}登录 · JobRadar{% endblock %}{% block content %}<h1>登录</h1><form method="post">{% csrf_token %}{{ form.as_p }}{% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %}<button type="submit">登录</button></form>{% endblock %}