From 8d99c73386ca2d44ccbb774a29b778bf84b87f28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20X=2E=20F=C3=BCrst?= Date: Fri, 2 Aug 2024 14:15:48 +0000 Subject: [PATCH] Wenn SID angegeben, dann die SID wieder in die URL schreiben Version agepasst Lokale Testeinstelleung (lauch.json) angepasst --- .vscode/launch.json | 2 +- package.json | 4 ++-- public/javascripts/global.js | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 7de3d0f..7744cbe 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -13,7 +13,7 @@ ], "program": "${workspaceFolder}/bin/www.js", "env": { - "APIHOST": "http://192.168.178.127:3005", + // "APIHOST": "http://192.168.178.127:3005", // "MONGOHOST": "reception", // "MONGOUSRP": "admin:mongo4noise", // "MONGOAUTH": "true", diff --git a/package.json b/package.json index 6d32aff..c9b722f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "laerm-web-sensorapi", - "version": "3.1.2", - "date": "2023-12-08 14:30 UTC", + "version": "3.1.3", + "date": "2024-08-02 14:15 UTC", "private": true, "scripts": { "start": "node bin/www.js >>/var/log/noise.log 2>&1" diff --git a/public/javascripts/global.js b/public/javascripts/global.js index bb4e39e..646b260 100644 --- a/public/javascripts/global.js +++ b/public/javascripts/global.js @@ -190,7 +190,11 @@ import * as utils from "./chart_utilities.js"; params.seldate = 'heute' } console.log(currentLang) - history.pushState({}, '', '/') + if (parseInt(sysparams.csid) !== -1) { + history.pushState({}, '', `/${sysparams.csid}`) + } else { + history.pushState({}, '', '/') + } dt.showDate(true, params) // and show date/time every minute