华荣三照明、合信、荣欣八组合馈电
This commit is contained in:
51
templates/history.html
Normal file
51
templates/history.html
Normal file
@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>历史报警</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
}
|
||||
.container {
|
||||
width: 80%;
|
||||
height: 80%;
|
||||
overflow-y: scroll;
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
}
|
||||
.message {
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
.clear-button {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>历史数据: {{ topic }}</h1>
|
||||
<div class="container">
|
||||
{% for message in historical_data %}
|
||||
<div class="message">
|
||||
<p>报警编号: {{ message[2] }}</p>
|
||||
<p>报警信息: {{ message[3] }}</p>
|
||||
<p>小车状态: {{ message[4] }}</p>
|
||||
<p>时间: {{ message[5] }}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<form action="{{ url_for('clear_history', topic=topic) }}" method="post" class="clear-button">
|
||||
<button type="submit">清除历史记录</button>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user