DmitrMakeev commited on
Commit
2a80e81
·
verified ·
1 Parent(s): a20a690

Update plot_ph_week.html

Browse files
Files changed (1) hide show
  1. plot_ph_week.html +13 -10
plot_ph_week.html CHANGED
@@ -16,32 +16,33 @@
16
  height: 100vh;
17
  justify-content: flex-start;
18
  }
19
-
20
  h1 {
21
  margin-top: 20px;
22
  font-size: 24px;
23
  }
24
-
25
  .buttons {
26
  margin: 20px 0;
27
  }
28
-
29
  button {
30
  margin: 0 10px;
31
  padding: 10px 20px;
32
  font-size: 16px;
33
  }
34
-
35
  .graph-container {
36
  width: 90%;
37
  max-width: 1200px;
38
  margin-bottom: 30px;
39
  }
40
-
41
  .graph {
42
  width: 100%;
43
  height: 500px; /* Можешь подкорректировать высоту, если нужно */
44
  }
 
 
 
 
 
 
45
  </style>
46
  </head>
47
  <body>
@@ -71,7 +72,6 @@
71
 
72
  <script>
73
  const data = {{ data | tojson }}; // Данные из Flask
74
-
75
  // Рендерим графики с использованием Plotly.js
76
  Plotly.newPlot("ph_chart", [{
77
  x: data.dates,
@@ -93,7 +93,6 @@
93
  hovermode: "closest",
94
  showlegend: false // Отключаем легенду
95
  });
96
-
97
  Plotly.newPlot("ec_chart", [{
98
  x: data.dates,
99
  y: data.ec,
@@ -114,7 +113,6 @@
114
  hovermode: "closest",
115
  showlegend: false // Отключаем легенду
116
  });
117
-
118
  Plotly.newPlot("pump_chart", [
119
  {
120
  x: data.dates,
@@ -159,7 +157,13 @@
159
  </script>
160
 
161
  {% else %}
162
- <p>Данных за {{ week_number }}-ю неделю нет в базе данных.</p>
 
 
 
 
 
 
163
  {% endif %}
164
 
165
  <script>
@@ -174,4 +178,3 @@
174
 
175
  </body>
176
  </html>
177
-
 
16
  height: 100vh;
17
  justify-content: flex-start;
18
  }
 
19
  h1 {
20
  margin-top: 20px;
21
  font-size: 24px;
22
  }
 
23
  .buttons {
24
  margin: 20px 0;
25
  }
 
26
  button {
27
  margin: 0 10px;
28
  padding: 10px 20px;
29
  font-size: 16px;
30
  }
 
31
  .graph-container {
32
  width: 90%;
33
  max-width: 1200px;
34
  margin-bottom: 30px;
35
  }
 
36
  .graph {
37
  width: 100%;
38
  height: 500px; /* Можешь подкорректировать высоту, если нужно */
39
  }
40
+ .no-data-message {
41
+ font-size: 18px;
42
+ color: red;
43
+ text-align: center;
44
+ margin-top: 20px;
45
+ }
46
  </style>
47
  </head>
48
  <body>
 
72
 
73
  <script>
74
  const data = {{ data | tojson }}; // Данные из Flask
 
75
  // Рендерим графики с использованием Plotly.js
76
  Plotly.newPlot("ph_chart", [{
77
  x: data.dates,
 
93
  hovermode: "closest",
94
  showlegend: false // Отключаем легенду
95
  });
 
96
  Plotly.newPlot("ec_chart", [{
97
  x: data.dates,
98
  y: data.ec,
 
113
  hovermode: "closest",
114
  showlegend: false // Отключаем легенду
115
  });
 
116
  Plotly.newPlot("pump_chart", [
117
  {
118
  x: data.dates,
 
157
  </script>
158
 
159
  {% else %}
160
+ <div class="no-data-message">
161
+ {% if week_number == 1 %}
162
+ В базе данных записи отсутствуют. Обновите страницу, чтобы запустить систему.
163
+ {% else %}
164
+ Данных за {{ week_number }}-ю неделю нет в базе данных.
165
+ {% endif %}
166
+ </div>
167
  {% endif %}
168
 
169
  <script>
 
178
 
179
  </body>
180
  </html>