Skip to content

Commit

Permalink
Fix for #277
Browse files Browse the repository at this point in the history
  • Loading branch information
ck-c8y committed Oct 31, 2024
1 parent 7033d89 commit 6e1a67c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
13 changes: 9 additions & 4 deletions dynamic-mapping-ui/src/shared/connector-configuration.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ export class ConnectorConfigurationService {
);
this.startConnectorConfigurations();
this.sharedConnectorConfigurations$ = this.connectorConfigurations$.pipe(
// tap(() => console.log('Further up I')),
shareReplay(1),
tap(() => console.log('Further up I')),
// shareReplay(1),
// tap(() => console.log('Further up II')),
switchMap((configurations: ConnectorConfiguration[]) => {
// console.log('Further up III');
return combineLatest([
from([configurations]),
from(this.getConnectorStatus())
Expand All @@ -80,7 +82,8 @@ export class ConnectorConfigurationService {
}));
})
);
})
}),
shareReplay(1)
);
}

Expand All @@ -107,7 +110,9 @@ export class ConnectorConfigurationService {
this.connectorConfigurations$ = merge(
from(this.getConnectorConfigurations()),
this.triggerConfigurations$.pipe(
switchMap(() => from(this.getConnectorConfigurations()))
switchMap(() => {
return from(this.getConnectorConfigurations());
})
)
).pipe(
// tap(() => console.log('Something happened')),
Expand Down
6 changes: 3 additions & 3 deletions dynamic-mapping-ui/src/shared/connector-status.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ export class ConnectorStatusService {
private statusLogs$: Observable<ConnectorStatusEvent[]>;

getStatusLogs(): Observable<ConnectorStatusEvent[]> {
console.log('Calling: getStatusLogs');
// console.log('Calling: getStatusLogs');
return this.statusLogs$;
}

async startConnectorStatusLogs() {
console.log('Calling: startConnectorStatusLogs');
// console.log('Calling: startConnectorStatusLogs');
if (!this.statusLogs$) {
await this.initConnectorLogsRealtime();
}
Expand All @@ -99,7 +99,7 @@ export class ConnectorStatusService {
// this._agentId
// );
const filteredConnectorStatus$ = this.triggerLogs$.pipe(
tap((x) => console.log('TriggerLogs In', x)),
// tap((x) => console.log('TriggerLogs In', x)),
switchMap((x) => {
const filter = {
pageSize: 5,
Expand Down

0 comments on commit 6e1a67c

Please sign in to comment.