small reworks in frontend and scripts, mostly finalized ansible deploy script -- still needs testing

This commit is contained in:
katsu 2025-02-12 17:50:58 +01:00
parent f41dfc4f86
commit e57f803a52
25 changed files with 440 additions and 90 deletions

View file

@ -1,3 +1,3 @@
VITE_MQTT_HOST=localhost #p01malina.local
VITE_MQTT_HOST=192.168.122.245
VITE_MQTT_PORT=8080
VITE_MQTT_SSL=false

View file

@ -28,3 +28,5 @@ coverage
*.sw?
*.tsbuildinfo
.vscode/

View file

@ -8,17 +8,19 @@
"name": "vju_display",
"version": "0.0.0",
"dependencies": {
"fs": "^0.0.1-security",
"paho-mqtt": "^1.1.0",
"vue": "^3.5.12",
"vue-paho-mqtt": "^0.6.5"
},
"devDependencies": {
"@tsconfig/node20": "^20.1.4",
"@types/node": "^20.17.0",
"@types/node": "^20.17.16",
"@vitejs/plugin-vue": "^5.1.4",
"@vue/tsconfig": "^0.5.1",
"npm-run-all2": "^7.0.1",
"typescript": "~5.6.0",
"vite": "^5.4.10",
"vite": "^5.4.14",
"vue-tsc": "^2.1.6"
}
},
@ -704,9 +706,9 @@
"license": "MIT"
},
"node_modules/@types/node": {
"version": "20.17.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.0.tgz",
"integrity": "sha512-a7zRo0f0eLo9K5X9Wp5cAqTUNGzuFLDG2R7C4HY2BhcMAsxgSPuRvAC1ZB6QkuUQXf0YZAgfOX2ZyrBa2n4nHQ==",
"version": "20.17.16",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.16.tgz",
"integrity": "sha512-vOTpLduLkZXePLxHiHsBLp98mHGnl8RptV4YAO3HfKO5UHjDvySGbxKtpYfy8Sx5+WKcgc45qNreJJRVM3L6mw==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -1044,6 +1046,12 @@
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
"license": "MIT"
},
"node_modules/fs": {
"version": "0.0.1-security",
"resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
"integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==",
"license": "ISC"
},
"node_modules/fsevents": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
@ -1392,9 +1400,9 @@
"license": "MIT"
},
"node_modules/vite": {
"version": "5.4.10",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.10.tgz",
"integrity": "sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==",
"version": "5.4.14",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.14.tgz",
"integrity": "sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==",
"dev": true,
"license": "MIT",
"dependencies": {

View file

@ -11,17 +11,19 @@
"type-check": "vue-tsc --build --force"
},
"dependencies": {
"fs": "^0.0.1-security",
"paho-mqtt": "^1.1.0",
"vue": "^3.5.12",
"vue-paho-mqtt": "^0.6.5"
},
"devDependencies": {
"@tsconfig/node20": "^20.1.4",
"@types/node": "^20.17.0",
"@types/node": "^20.17.16",
"@vitejs/plugin-vue": "^5.1.4",
"@vue/tsconfig": "^0.5.1",
"npm-run-all2": "^7.0.1",
"typescript": "~5.6.0",
"vite": "^5.4.10",
"vite": "^5.4.14",
"vue-tsc": "^2.1.6"
}
}

View file

@ -4,6 +4,7 @@ import { createApp } from 'vue'
import App from './App.vue'
import { createPahoMqttPlugin } from 'vue-paho-mqtt'
let urlParams = new URLSearchParams(window.location.search);
createApp(App)
.use(
createPahoMqttPlugin({
@ -13,9 +14,13 @@ createApp(App)
},
MqttOptions: {
host: import.meta.env.VITE_MQTT_HOST,
port: parseInt(import.meta.env.VITE_MQTT_PORT),
useSSL: ["1", "true", "True"].includes(import.meta.env.VITE_MQTT_SSL),
//host: import.meta.env.VITE_MQTT_HOST,
//host: "localhost",
host: urlParams.get('mqtt') || 'localhost',
port: 8080,
useSSL: false,
//port: parseInt(import.meta.env.VITE_MQTT_PORT),
//useSSL: ["1", "true", "True"].includes(import.meta.env.VITE_MQTT_SSL),
clientId: `vju-${Math.random() * 9999}`,
//mainTopic: '',
enableMainTopic: false

View file

@ -8,9 +8,15 @@ export default defineConfig({
plugins: [
vue(),
],
//base: './',
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
server: {
hmr: {
host: 'localhost'
}
}
})