54 lines
1.8 KiB
HTML
54 lines
1.8 KiB
HTML
<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>监控配置</title>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<h1>Syscall Monitor</h1>
|
|
<nav>
|
|
<a href="{{ url_for('index') }}">实时监控</a>
|
|
<a href="{{ url_for('config_page') }}">配置</a>
|
|
</nav>
|
|
</header>
|
|
<main>
|
|
<div class="card">
|
|
<h3 style="margin-top:0">添加监控项</h3>
|
|
<form method="post" action="{{ url_for('config_page') }}">
|
|
<input type="hidden" name="action" value="add">
|
|
<input type="text" name="name" placeholder="syscall 名称,例如 openat" required>
|
|
<button type="submit" class="primary">添加</button>
|
|
</form>
|
|
<p class="muted">名称需为内核 syscall 名(可参考 <code>man syscalls</code>)。新增后会立即出现在监控页面。</p>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h3 style="margin-top:0">当前监控项 ({{ syscalls|length }})</h3>
|
|
{% if syscalls %}
|
|
<table>
|
|
<thead><tr><th>名称</th><th style="text-align:right">操作</th></tr></thead>
|
|
<tbody>
|
|
{% for name in syscalls %}
|
|
<tr>
|
|
<td><span class="tag">{{ name }}</span></td>
|
|
<td style="text-align:right">
|
|
<form method="post" action="{{ url_for('config_page') }}" class="inline">
|
|
<input type="hidden" name="action" value="remove">
|
|
<input type="hidden" name="name" value="{{ name }}">
|
|
<button type="submit" class="danger">移除</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<p class="muted">尚无监控项。</p>
|
|
{% endif %}
|
|
</div>
|
|
</main>
|
|
</body>
|
|
</html>
|