From: Jérôme Benoit Date: Tue, 7 Dec 2021 15:31:02 +0000 (+0100) Subject: Merge branch 'master' into fix-template X-Git-Tag: v1.1.38~1^2^2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=9ab62ed05a70a1feda05803f085a449ce35a4f14;hp=50a47a9af06068a6523583f60124cf464336c04d;p=e-mobility-charging-stations-simulator.git Merge branch 'master' into fix-template --- diff --git a/src/assets/config-template.json b/src/assets/config-template.json index 7bee3ccd..a0c0526a 100644 --- a/src/assets/config-template.json +++ b/src/assets/config-template.json @@ -4,7 +4,8 @@ ], "distributeStationsToTenantsEqually": true, "performanceStorage": { - "enabled": true + "enabled": true, + "type": "jsonfile" }, "chargingStationsPerWorker": 1, "workerProcess": "workerSet", diff --git a/src/utils/Configuration.ts b/src/utils/Configuration.ts index 6777e8cc..bf25445c 100644 --- a/src/utils/Configuration.ts +++ b/src/utils/Configuration.ts @@ -61,7 +61,9 @@ export default class Configuration { storageConfiguration = { ...Configuration.objectHasOwnProperty(Configuration.getConfig().performanceStorage, 'enabled') && { enabled: Configuration.getConfig().performanceStorage.enabled }, - ...Configuration.objectHasOwnProperty(Configuration.getConfig().performanceStorage, 'type') && { type: Configuration.getConfig().performanceStorage.type }, + ...Configuration.objectHasOwnProperty(Configuration.getConfig().performanceStorage, 'type') + ? { type: Configuration.getConfig().performanceStorage.type } + : { type: StorageType.JSON_FILE }, ...Configuration.objectHasOwnProperty(Configuration.getConfig().performanceStorage, 'uri') ? { uri: Configuration.getConfig().performanceStorage.uri } : { uri: this.getDefaultPerformanceStorageUri(Configuration.getConfig()?.performanceStorage?.type ?? StorageType.JSON_FILE) }