Browse Source

isCisConnectorSynced adjustments

pull/11350/head
mpetrov 2 years ago
parent
commit
9a239f2c2e
  1. 8
      ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.ts

8
ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.ts

@ -372,9 +372,11 @@ export class GatewayConnectorComponent extends PageComponent implements AfterVie
} }
const sharedIndex = this.sharedAttributeData.findIndex(data => { const sharedIndex = this.sharedAttributeData.findIndex(data => {
const sharedData = data.value; const sharedData = data.value;
return sharedData.name === connectorData.name const hasSameName = sharedData.name === connectorData.name;
&& sharedData.ts && sharedData.ts <= connectorData.ts const hasEmptyConfig = isEqual(sharedData.configurationJson, {}) && hasSameName;
&& isEqual(sharedData.value, connectorData.value); const hasSameConfig =isEqual(sharedData.configurationJson, connectorData.configurationJson);
const isRecentlyCreated = sharedData.ts && sharedData.ts <= connectorData.ts;
return hasSameName && isRecentlyCreated && (hasSameConfig || hasEmptyConfig);
}); });
return sharedIndex !== -1; return sharedIndex !== -1;
} }

Loading…
Cancel
Save