Skip to content

Commit

Permalink
fix(Plugin): add hint on console in case microservice was not found
Browse files Browse the repository at this point in the history
  • Loading branch information
reey committed Mar 21, 2024
1 parent 900c055 commit d7d0960
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions frontend/src/app/cloud-http-proxy/cloud-http-proxy-available.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
map,
shareReplay,
switchMap,
tap,
} from 'rxjs/operators';
import { proxyContextPath } from './cloud-http-proxy.model';

Expand All @@ -39,9 +40,7 @@ export class CloudHttpProxyAvailabilityService {
map(() => this.ensureUserHasAllRoles()),
switchMap((hasRequiredRoles) =>
hasRequiredRoles
? combineLatest([
this.ensureMicroserviceIsPresent(),
])
? combineLatest([this.ensureMicroserviceIsPresent()])
: of([false])
),
map((res) => res.every((value) => !!value)),
Expand Down Expand Up @@ -83,18 +82,14 @@ export class CloudHttpProxyAvailabilityService {
map(
(apps) =>
!!apps.find(({ contextPath }) => contextPath === proxyContextPath)
)
);
}

async ensureTenantOptionEnabled(): Promise<boolean> {
return this.ensureOptionIsSetAsExpected(
this.systemOption,
{
category: 'remoteaccess',
key: 'pass-through.enabled',
},
true
),
tap((msPresent) => {
if (!msPresent) {
console.warn(
`Cloud http proxy feature not available as the "${proxyContextPath}" microservice was not found.`
);
}
})
);
}

Expand Down

0 comments on commit d7d0960

Please sign in to comment.