diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.ts index e1688357f5..3951ac83da 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.ts @@ -486,6 +486,7 @@ export class GatewayConnectorComponent extends PageComponent implements AfterVie const connectorName = attribute.key; const connector = this.subscription && this.subscription.data .find(data => data && data.dataKey.name === `${connectorName}_ERRORS_COUNT`); - return (connector && this.activeConnectors.includes(connectorName)) ? connector.data[0][1] : 'Inactive'; + console.log(connector) + return (connector && this.activeConnectors.includes(connectorName)) ? (connector.data[0][1] || 0) : 'Inactive'; } } diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts index c08ee7dc89..d58c33079a 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts @@ -124,7 +124,7 @@ export const GatewayConnectorDefaultTypesTranslates = new Map([ ['ftp', 'FTP'], ['socket', 'SOCKET'], ['xmpp', 'XMPP'], - ['ocpp', 'OCCP'], + ['ocpp', 'OCPP'], ['custom', 'CUSTOM'] ]);