Browse Source

Minor fixes

pull/9281/head
Maksym Dudnik 3 years ago
parent
commit
b4251f1411
  1. 3
      ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.ts
  2. 2
      ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts

3
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';
}
}

2
ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts

@ -124,7 +124,7 @@ export const GatewayConnectorDefaultTypesTranslates = new Map<string, string>([
['ftp', 'FTP'],
['socket', 'SOCKET'],
['xmpp', 'XMPP'],
['ocpp', 'OCCP'],
['ocpp', 'OCPP'],
['custom', 'CUSTOM']
]);

Loading…
Cancel
Save