diff --git a/src/main/java/cc/niushuai/gasweb/controller/ChartController.java b/src/main/java/cc/niushuai/gasweb/controller/ChartController.java index ddc6af8..2b46a30 100644 --- a/src/main/java/cc/niushuai/gasweb/controller/ChartController.java +++ b/src/main/java/cc/niushuai/gasweb/controller/ChartController.java @@ -109,7 +109,7 @@ public class ChartController { ChartResp co2 = new ChartResp("CO2浓度"); ChartResp ch4 = new ChartResp("CH4浓度"); ChartResp temperature = new ChartResp("环境温度"); - ChartResp rp2024_temperature = new ChartResp("rp2024温度"); + ChartResp RP2040_temperature = new ChartResp("RP2040温度"); for (Gas gas : allList) { @@ -120,14 +120,14 @@ public class ChartController { co2.getData().add(new ChartResp.Data(dateTime, gas.getCo2())); ch4.getData().add(new ChartResp.Data(dateTime, gas.getCh4())); temperature.getData().add(new ChartResp.Data(dateTime, gas.getTemperature())); - rp2024_temperature.getData().add(new ChartResp.Data(dateTime, gas.getRp2040Temperature())); + RP2040_temperature.getData().add(new ChartResp.Data(dateTime, gas.getRp2040Temperature())); } map.put("co", co); map.put("co2", co2); map.put("ch4", ch4); map.put("temperature", temperature); - map.put("rp2024_temperature", rp2024_temperature); + map.put("RP2040_temperature", RP2040_temperature); } } catch (Exception e) { log.error("fetch gas failed", e); diff --git a/src/main/resources/templates/index.ftl b/src/main/resources/templates/index.ftl index 66df775..e84d31e 100644 --- a/src/main/resources/templates/index.ftl +++ b/src/main/resources/templates/index.ftl @@ -126,7 +126,7 @@ rebuildChart(co2Chart, data.co2, 'ppm'); rebuildChart(ch4Chart, data.ch4, 'ppm'); rebuildChart(tempChart, data.temperature, '°C'); - rebuildChart(rp2040_tempChart, data.rp2024_temperature, '°C'); + rebuildChart(rp2040_tempChart, data.RP2040_temperature, '°C'); rebuildChart(ch2oChart, data.ch2o, 'ppb'); } });