Skip to content

Commit

Permalink
Server airgap samples
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <[email protected]>
  • Loading branch information
tolusha committed Aug 5, 2024
1 parent d4327a7 commit 45cab91
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions packages/dashboard-frontend/src/services/bootstrap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,22 +331,24 @@ export default class Bootstrap {
undefined,
);

const airGapedSampleURL = new URL('/dashboard/api/airgap-sample', window.location.origin).href;
await requestRegistriesMetadata(airGapedSampleURL, false)(
this.store.dispatch,
this.store.getState,
undefined,
);

const serverConfig = this.store.getState().dwServerConfig.config;
const devfileRegistry = serverConfig.devfileRegistry;
const internalDevfileRegistryUrl = serverConfig.devfileRegistryURL;
if (
devfileRegistry?.disableInternalRegistry !== undefined &&
devfileRegistry?.disableInternalRegistry !== true &&
internalDevfileRegistryUrl
devfileRegistry?.disableInternalRegistry !== true
) {
await requestRegistriesMetadata(internalDevfileRegistryUrl, false)(
if (internalDevfileRegistryUrl) {
await requestRegistriesMetadata(internalDevfileRegistryUrl, false)(
this.store.dispatch,
this.store.getState,
undefined,
);
}

const airGapedSampleURL = new URL('/dashboard/api/airgap-sample', window.location.origin)
.href;
await requestRegistriesMetadata(airGapedSampleURL, false)(
this.store.dispatch,
this.store.getState,
undefined,
Expand Down

0 comments on commit 45cab91

Please sign in to comment.