- private getSupervisionURL(): string {
- const supervisionUrls = Utils.cloneObject<string | string[]>(this.stationInfo.supervisionURL ? this.stationInfo.supervisionURL : Configuration.getSupervisionURLs());
- let indexUrl = 0;
+ private warnDeprecatedTemplateKey(
+ template: ChargingStationTemplate,
+ key: string,
+ chargingStationId: string,
+ logMsgToAppend = ''
+ ): void {
+ if (!Utils.isUndefined(template[key])) {
+ const logPrefixStr = ` ${chargingStationId} |`;
+ logger.warn(
+ `${Utils.logPrefix(logPrefixStr)} Deprecated template key '${key}' usage in file '${
+ this.stationTemplateFile
+ }'${logMsgToAppend && '. ' + logMsgToAppend}`
+ );
+ }
+ }
+
+ private convertDeprecatedTemplateKey(
+ template: ChargingStationTemplate,
+ deprecatedKey: string,
+ key: string
+ ): void {
+ if (!Utils.isUndefined(template[deprecatedKey])) {
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
+ template[key] = template[deprecatedKey];
+ delete template[deprecatedKey];
+ }
+ }
+
+ private getConfiguredSupervisionUrl(): URL {
+ const supervisionUrls = Utils.cloneObject<string | string[]>(
+ this.stationInfo.supervisionUrls ?? Configuration.getSupervisionUrls()
+ );