fix: 修改前端样式

This commit is contained in:
fengyarnom 2025-05-15 19:06:59 +08:00
parent 86f731b76c
commit ee338d2a09
2 changed files with 134 additions and 108 deletions

3
db.go
View File

@ -9,12 +9,13 @@ import (
)
var db *sql.DB
const SCALING_FACTOR = 1000 // 浮点数到整数的转换因子
// 初始化数据库连接
func InitDB() error {
username := "root"
password := "root" // 请替换为你的实际密码
password := "root"
host := "localhost"
port := "3306"
dbName := "probe_db"

View File

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
@ -32,7 +32,8 @@
margin-bottom: 20px;
padding: 10px;
border: 1px solid #ddd;
border-radius: 1px;
border-radius: 4px;
background-color: #fff;
}
.control-group {
@ -42,18 +43,30 @@
}
select, input, button {
padding: 5px;
padding: 5px 10px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
}
button {
background-color: #007bff;
color: white;
border: none;
cursor: pointer;
transition: background-color 0.3s;
}
button:hover {
background-color: #0056b3;
}
.chart-container {
margin-bottom: 20px;
border: 1px solid #ddd;
border-radius: 1px;
padding: 10px;
border-radius: 4px;
padding: 15px;
background-color: #fff;
}
canvas {
@ -63,13 +76,17 @@
.table-container {
overflow-x: auto;
margin-bottom: 20px;
margin-top: 20px;
border: 1px solid #ddd;
border-radius: 5px;
padding: 10px;
border-radius: 4px;
background-color: #fff;
padding: 15px;
}
h2{
text-align:center;
color: #333;
margin-top: 0;
margin-bottom: 15px;
}
table {
@ -79,18 +96,23 @@
th, td {
border: 1px solid #ddd;
padding: 8px;
padding: 12px 8px;
text-align: left;
}
th {
background-color: #f8f8f8;
background-color: #f8f9fa;
font-weight: bold;
}
tr:nth-child(even) {
background-color: #f9f9f9;
}
tr:hover {
background-color: #f5f5f5;
}
.footer {
text-align: center;
padding: 10px;
@ -100,11 +122,14 @@
@media (max-width: 768px) {
.controls {
flex-direction: column;
align-items: stretch;
}
.control-group {
justify-content: space-between;
width: 100%;
}
select, input {
width: 100%;
}
}
</style>