From 49378476c220fb9b223e2b0548ea9d01fdabe186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20X=2E=20F=C3=BCrst?= Date: Thu, 19 Dec 2024 15:50:15 +0000 Subject: [PATCH] Senor-Label richtiger Umbruch --- .gitignore | 3 ++- charts/preparecharts.js | 2 +- charts/utilities.js | 2 +- deploy.sh | 2 +- package.json | 4 ++-- public/javascripts/chart_utilities.js | 13 ++++++++----- routes/index.js | 2 +- 7 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 747d431..41dad0d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules -log \ No newline at end of file +log +.env \ No newline at end of file diff --git a/charts/preparecharts.js b/charts/preparecharts.js index bcf5b7f..ae6c2f6 100644 --- a/charts/preparecharts.js +++ b/charts/preparecharts.js @@ -128,7 +128,7 @@ export const liveData = (params, values, req) => { }, max: utils.noise_ymax, // min: utils.noise_ymin, - min: 20, + min: 10, // opposite: true, tickAmount: 11, useHTML: true, diff --git a/charts/utilities.js b/charts/utilities.js index 63fb1e4..3e6c114 100644 --- a/charts/utilities.js +++ b/charts/utilities.js @@ -5,7 +5,7 @@ import { translate as trans } from '../routes/index.js' let language = 'en' export const colors = {'eq': '#0000FF', 'max': '#FF0000', 'min': '#008000', 'peaks': '#DAA520'}; -export const noise_ymin = 30; +export const noise_ymin = 20; export const noise_ymax = 120; export function createGlobObtions() { diff --git a/deploy.sh b/deploy.sh index b2a8df8..3637bc5 100755 --- a/deploy.sh +++ b/deploy.sh @@ -28,7 +28,7 @@ shift $((OPTIND-1)) ./build_and_copy.sh localhost -# docker tag $name docker.citysensor.de/$name +docker tag $name docker.citysensor.de/$name:latest dat=`date +%Y%m%d%H%M` docker tag $name docker.citysensor.de/$name:V_$dat docker push docker.citysensor.de/$name diff --git a/package.json b/package.json index 1958a45..7d0795c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "laerm-web-sensorapi", - "version": "3.2.2", - "date": "2024-09-01 13:15 UTC", + "version": "3.2.3", + "date": "2024-12-18 16:00 UTC", "private": true, "scripts": { "start": "node bin/www.js >>/var/log/noise.log 2>&1" diff --git a/public/javascripts/chart_utilities.js b/public/javascripts/chart_utilities.js index 1fe00b5..0d040e4 100644 --- a/public/javascripts/chart_utilities.js +++ b/public/javascripts/chart_utilities.js @@ -163,16 +163,19 @@ export function calcDays(data, isyear) { export async function addSensorID2chart(chart, sensor, width) { let indoor = sensor.indoor || false let addr = await addAddress(sensor.sid) + chart.renderer.rect((width/2)-200,65,400,150,0) + .attr({ + zIndex: 3 + }).add() let sens = chart.renderer.label( - `Sensor: ${sensor.sid} ${indoor ? ' (indoor)' : ''}    ${addr.street}, ${addr.plz} ${addr.city}`, - width / 2 - 100, 65, - 'text', 0, 0, true) + `Sensor:  ${sensor.sid} ${indoor ? ' (indoor)' : ''}

${addr.street}
${addr.plz} ${addr.city}`, + width / 2 - 150, 70) .css({ - fontSize: '12pt', + fontSize: '14pt', 'font-weight': 'bold', }) .attr({ - zIndex: 2, + zIndex: 3, }).add(); } diff --git a/routes/index.js b/routes/index.js index db02591..89566d4 100644 --- a/routes/index.js +++ b/routes/index.js @@ -1,5 +1,5 @@ import express from 'express' -import pkg from '../package.json' assert { type: "json" } +import pkg from '../package.json' with { type: "json" } import { setLanguage } from '../charts/utilities.js' const router = express.Router()