diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..e3f1363 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# Deploy das übergeben docker-image (name) in das Registry +# +# V 1.0.0 2026-01-19 rxf +# - erste version + + +#set -x + +registry=docker.citysensor.de + +usage() +{ + echo "Usage ./deploy.sh name" + echo " Build docker container 'name' and deploy to $registry" + echo "Params:" + echo " -h show this usage" +} + +name=$1 + +while getopts h? o +do + case "$o" in + h) usage; exit 0;; + *) usage; exit 1;; + esac +done + +docker tag $name $registry/$name:latest +dat=`date +%Y%m%d%H%M` +docker tag $name $registry/$name:V_$dat +docker push $registry/$name \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 2a22f9e..294d1a3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,6 +16,7 @@ services: restart: unless-stopped spritzschema: + image: spritzschema build: context: . dockerfile: Dockerfile_spritzschema diff --git a/modules/mongointerface.js b/modules/mongointerface.js index ffa82c7..db0253c 100644 --- a/modules/mongointerface.js +++ b/modules/mongointerface.js @@ -27,6 +27,8 @@ let COLLECTION = 'spritzschema' erg = await putAPIdataOne(client, options) } else if (cmd === 'deldata') { erg = await delAPIdataOne(client, options) + } else if (cmd === 'geturl') { + erg = MONGO_URL } else { erg.err = "Unknown Call" } diff --git a/package.json b/package.json index 505385a..a46e5c0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "spritzschema", - "version": "1.3.0", - "date": "2026-01-18", + "version": "1.3.1", + "date": "2026-01-19", "type": "module", "private": true, "scripts": { diff --git a/public/javascripts/script.js b/public/javascripts/script.js index 6ad267d..53643f0 100644 --- a/public/javascripts/script.js +++ b/public/javascripts/script.js @@ -8,7 +8,10 @@ document.addEventListener('DOMContentLoaded', async function () { await initSchema('2023-05-01') } - let ret = await getData() + let ret = await fetch('debug') + let url = await ret.json() + + ret = await getData() let schema = ret.data if(curEinheit === 0) { curEinheit = schema.einheit @@ -20,6 +23,9 @@ document.addEventListener('DOMContentLoaded', async function () { async function markField (e) { let field = e.target; + if (field.id === 'inner') { + field = e.target.parentElement + } let d = schema.data[34].day field.setAttribute('aria-label','x'); // field.setAttribute('disabled','disabled'); diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index aaeba1e..11a3e15 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -76,14 +76,14 @@ footer { } #lowline { + color: black; width: 100%; clear: float; + padding-top: 30px; } #eh { - color: black; float: right; - margin-right: -20px; } #wtg { float: left; diff --git a/routes/index.js b/routes/index.js index 8478d2f..cdfa91e 100644 --- a/routes/index.js +++ b/routes/index.js @@ -24,6 +24,12 @@ router.get('/data', async function(req, res, next) { res.json(erg) }) +router.get('/debug', async function(req, res, next) { + const options = {} + let erg = await doMongo('geturl', options) + res.json(erg) +}) + router.post('/data', async function (req, res, next) { const options = {} options.data = req.body