Files
taskq/x/monitor/ui/index.html
hupeh 326f2a371c feat: 优化监控仪表盘 UI
- 添加 appbar 导航栏,支持 Chart/Queues 视图切换
- appbar 切换使用 history API,支持浏览器前进/后退
- 图表视图占满整个可视区域
- queue-modal 共享 appbar 样式
- 修复 queue tab count 字段名大小写问题
- tooltip 跟随鼠标显示在右下方,移除箭头
- 图表 canvas 鼠标样式改为准星
- pause/resume 队列后刷新列表
- example 添加 flag 配置参数
2025-12-10 00:53:30 +08:00

64 lines
2.1 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TaskQ Monitor</title>
<script type="importmap">
{
"imports": {
"lit": "https://cdn.jsdelivr.net/npm/lit@3/+esm",
"lit/": "https://cdn.jsdelivr.net/npm/lit@3/",
"chart.js": "https://cdn.jsdelivr.net/npm/chart.js@4/+esm"
}
}
</script>
<script type="module" src="{{.RootPath}}/static/app.js"></script>
<link rel="stylesheet" href="{{.RootPath}}/static/styles.css">
<style>
.browser-warning {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #424242;
color: #e0e0e0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
padding: 40px;
text-align: center;
}
.browser-warning h1 {
color: #ef5350;
margin-bottom: 20px;
}
.browser-warning p {
margin-bottom: 15px;
line-height: 1.6;
}
.browser-warning a {
color: #42a5f5;
}
</style>
</head>
<body>
<div id="browser-warning" class="browser-warning">
<h1>Browser Not Supported</h1>
<p>TaskQ Monitor requires a modern browser with ES Module support.</p>
<p>Please upgrade to one of the following browsers:</p>
<p>
<a href="https://www.google.com/chrome/" target="_blank">Chrome 61+</a> |
<a href="https://www.mozilla.org/firefox/" target="_blank">Firefox 60+</a> |
<a href="https://www.apple.com/safari/" target="_blank">Safari 11+</a> |
<a href="https://www.microsoft.com/edge" target="_blank">Edge 79+</a>
</p>
</div>
<taskq-app root-path="{{.RootPath}}"></taskq-app>
<script nomodule>
document.getElementById('browser-warning').style.display = 'block';
document.querySelector('taskq-app').style.display = 'none';
</script>
</body>
</html>