fix: 修改前端样式
This commit is contained in:
parent
86f731b76c
commit
ee338d2a09
3
db.go
3
db.go
@ -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"
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user