Web UI: Refine documentation and code cleanup
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 26 Aug 2022 12:10:05 +0000 (14:10 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 26 Aug 2022 12:10:05 +0000 (14:10 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
package-lock.json
package.json
rollup.config.mjs
src/ui/web/README.md
src/ui/web/package-lock.json
src/ui/web/package.json
src/ui/web/src/views/ChargingStationsView.vue
src/ui/web/start.js

index c568b04a205b5bdfb09eec6cf698d8dbade428e5..98351356fceb6255b82836262f7f7576f850f2ba 100644 (file)
@@ -72,7 +72,7 @@
         "rollup-plugin-terser": "^7.0.2",
         "rollup-plugin-ts": "^3.0.2",
         "ts-node": "^10.9.1",
-        "typescript": "^4.7.4"
+        "typescript": "^4.8.2"
       },
       "engines": {
         "node": ">=16.0.0",
       }
     },
     "node_modules/typescript": {
-      "version": "4.7.4",
-      "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
-      "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
+      "version": "4.8.2",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz",
+      "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==",
       "dev": true,
       "bin": {
         "tsc": "bin/tsc",
       }
     },
     "typescript": {
-      "version": "4.7.4",
-      "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
-      "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
+      "version": "4.8.2",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz",
+      "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==",
       "dev": true
     },
     "ua-parser-js": {
index d3a818a19eeb2bf17595a440a0776623d89bc71e..942ad001de9980ef14430fcbb194483ea06ebe70 100644 (file)
     "rollup-plugin-terser": "^7.0.2",
     "rollup-plugin-ts": "^3.0.2",
     "ts-node": "^10.9.1",
-    "typescript": "^4.7.4"
+    "typescript": "^4.8.2"
   }
 }
index eda73627360a8e99c73e3e1f09819482c2bc6809..2f1c5d69f5691999189e53d8e3a9bbef39686500 100644 (file)
@@ -41,7 +41,6 @@ export default {
     'basic-ftp',
     'chalk',
     'crypto',
-    'express',
     'fs',
     'mnemonist/lru-map-with-delete',
     'moment',
index 0074019751293ef42ea6f3a7a96fb2f0a94a00b0..04d8532a04b124eb0d750b62bb0ddd9b5fc92d8b 100644 (file)
@@ -10,13 +10,13 @@ npm install
 
 For both solution you can then follow the link displayed in the terminal at the end of compilation
 
-#### Compiles and run without development tools
+#### Compiles and run for production
 
 ```
 npm start
 ```
 
-#### Compiles and hot-reloads for development
+#### Compiles and run for development
 
 ```
 npm run serve
@@ -33,7 +33,3 @@ npm run build
 ```
 npm run lint
 ```
-
-### Customize configuration
-
-See [Configuration Reference](https://cli.vuejs.org/config/).
index 1890e232fd559d411c2770664d1f0b7ade326127..73b6f99ba70fbd4874c257a4c741acb70dbe9595 100644 (file)
@@ -39,7 +39,7 @@
         "eslint-plugin-vue": "^9.4.0",
         "lint-staged": "^13.0.3",
         "prettier": "^2.7.1",
-        "typescript": "~4.7.4",
+        "typescript": "^4.8.2",
         "vue-eslint-parser": "^9.0.3"
       }
     },
       }
     },
     "node_modules/typescript": {
-      "version": "4.7.4",
-      "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
-      "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
+      "version": "4.8.2",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz",
+      "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==",
       "dev": true,
       "bin": {
         "tsc": "bin/tsc",
       }
     },
     "typescript": {
-      "version": "4.7.4",
-      "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
-      "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
+      "version": "4.8.2",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz",
+      "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==",
       "dev": true
     },
     "unbzip2-stream": {
index 5c0a56bc18b80917adb27c79e82c23df52b8ccd1..dd3ed56b9e5a47cd85c146239478474d345196be 100644 (file)
@@ -41,7 +41,7 @@
     "eslint-plugin-vue": "^9.4.0",
     "lint-staged": "^13.0.3",
     "prettier": "^2.7.1",
-    "typescript": "~4.7.4",
+    "typescript": "^4.8.2",
     "vue-eslint-parser": "^9.0.3"
   },
   "_id": "webui@0.1.0",
index 9a5a2ce1d95a7bd8e0ddfd6495ad257abf4a5539..0c781566f6022bc150e84f7f7068e1bffe734616 100644 (file)
@@ -46,8 +46,8 @@ const state: State = reactive({
 async function load(): Promise<void> {
   if (state.isLoading === true) return;
   state.isLoading = true;
-  const list = await UIClientInstance.listChargingStations();
-  state.chargingStations = list as unknown as Record<string, ChargingStationData>;
+  const chargingStationsList = await UIClientInstance.listChargingStations();
+  state.chargingStations = chargingStationsList as unknown as Record<string, ChargingStationData>;
   state.isLoading = false;
 }
 
index e804fc11484b6cf2c7a36f604bd070fa69b7f6c5..0078cb5e6d0cb2a1364ec8a145f21f6a486bf241 100644 (file)
@@ -4,7 +4,7 @@ const path = require('path'),
   serveStatic = require('serve-static');
 
 const PORT = process.env.PORT || 3030,
-  uiPath = path.join(__dirname, './dist/');
+  uiPath = path.join(__dirname, './dist');
 
 const serve = serveStatic(uiPath);
 
@@ -12,4 +12,4 @@ const server = http.createServer(function onRequest(req, res) {
   serve(req, res, finalhandler(req, res));
 });
 
-server.listen(PORT, () => console.info(`http://localhost:${PORT}`));
+server.listen(PORT, () => console.info(`App running at: http://localhost:${PORT}`));