Skip to content

Commit

Permalink
fix(console): use portalConfig service instead of portalSettings
Browse files Browse the repository at this point in the history
https://gravitee.atlassian.net/browse/APIM-6929
(cherry picked from commit 870dff2)

# Conflicts:
#	gravitee-apim-console-webui/src/management/api/component/gio-form-listeners/gio-form-listeners-context-path/gio-form-listeners-context-path.component.ts
#	gravitee-apim-console-webui/src/management/api/component/gio-form-listeners/gio-form-listeners-context-path/gio-form-listeners-context-path.module.spec.ts
#	gravitee-apim-console-webui/src/management/api/component/gio-form-listeners/gio-form-listeners-context-path/gio-form-listeners-context-path.stories.ts
#	gravitee-apim-console-webui/src/management/api/creation-v4/api-creation-v4.component.spec.ts
  • Loading branch information
phiz71 authored and mergify[bot] committed Jan 16, 2025
1 parent 3b6fcd6 commit affa02a
Show file tree
Hide file tree
Showing 8 changed files with 1,768 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { filter, map, observeOn, startWith, take, takeUntil, tap } from 'rxjs/op
import { FocusMonitor } from '@angular/cdk/a11y';
import { asyncScheduler, Observable, Subject } from 'rxjs';

import { PortalSettingsService } from '../../../../../services-ngx/portal-settings.service';
import { PortalConfigurationService } from '../../../../../services-ngx/portal-configuration.service';
import { PathV4 } from '../../../../../entities/management-api-v2';
import { ApiV2Service } from '../../../../../services-ngx/api-v2.service';
import { contextPathModePathSyncValidator } from '../../../../../shared/validators/context-path/context-path-sync-validator.directive';
Expand Down Expand Up @@ -76,6 +76,7 @@ export class GioFormListenersContextPathComponent implements OnInit, OnDestroy,
private readonly fm: FocusMonitor,
private readonly elRef: ElementRef,
protected readonly apiV2Service: ApiV2Service,
<<<<<<< HEAD
private readonly portalSettingsService: PortalSettingsService,
) {}

Expand All @@ -87,6 +88,17 @@ export class GioFormListenersContextPathComponent implements OnInit, OnDestroy,
});

this.portalSettingsService
=======
private readonly portalConfigurationService: PortalConfigurationService,
) {
this.mainForm = new FormGroup({
listeners: this.listenerFormArray,
});
}

ngOnInit(): void {
this.portalConfigurationService
>>>>>>> 870dff2b6c (fix(console): use portalConfig service instead of portalSettings)
.get()
.pipe(takeUntil(this.unsubscribe$))
.subscribe((settings) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,16 @@ describe('GioFormListenersContextPathModule', () => {

const expectGetPortalSettings = () => {
const settings: PortalSettings = { portal: { entrypoint: 'localhost' } };
<<<<<<< HEAD
httpTestingController
.expectOne({
url: `${CONSTANTS_TESTING.env.baseURL}/settings`,
method: 'GET',
})
.flush(settings);
=======
httpTestingController.expectOne({ url: `${CONSTANTS_TESTING.env.baseURL}/portal`, method: 'GET' }).flush(settings);
>>>>>>> 870dff2b6c (fix(console): use portalConfig service instead of portalSettings)
};

const expectApiVerify = (inError = false) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@ import { HttpClientModule } from '@angular/common/http';
import { GioFormListenersContextPathComponent } from './gio-form-listeners-context-path.component';
import { GioFormListenersContextPathModule } from './gio-form-listeners-context-path.module';

<<<<<<< HEAD
import { PortalSettingsService } from '../../../../../services-ngx/portal-settings.service';
import { ApiV2Service } from '../../../../../services-ngx/api-v2.service';
=======
import { PortalConfigurationService } from '../../../../../services-ngx/portal-configuration.service';
import { ApiService } from '../../../../../services-ngx/api.service';
>>>>>>> 870dff2b6c (fix(console): use portalConfig service instead of portalSettings)

export default {
title: 'API / Listeners / HTTP / Form listeners context path',
Expand All @@ -33,8 +38,13 @@ export default {
moduleMetadata({
imports: [BrowserAnimationsModule, GioFormListenersContextPathModule, FormsModule, ReactiveFormsModule, HttpClientModule],
providers: [
<<<<<<< HEAD
{ provide: PortalSettingsService, useValue: { get: () => of({ portal: { entrypoint: '' } }) } },
{ provide: ApiV2Service, useValue: { verifyPath: () => of() } },
=======
{ provide: PortalConfigurationService, useValue: { get: () => of({ portal: { entrypoint: '' } }) } },
{ provide: ApiService, useValue: { verify: () => of() } },
>>>>>>> 870dff2b6c (fix(console): use portalConfig service instead of portalSettings)
],
}),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { of } from 'rxjs';
import { GioFormListenersVirtualHostComponent } from './gio-form-listeners-virtual-host.component';
import { GioFormListenersVirtualHostModule } from './gio-form-listeners-virtual-host.module';

import { PortalSettingsService } from '../../../../../services-ngx/portal-settings.service';
import { PortalConfigurationService } from '../../../../../services-ngx/portal-configuration.service';
import { ApiService } from '../../../../../services-ngx/api.service';
export default {
title: 'API / Listeners / HTTP / Form listeners virtual host',
Expand All @@ -31,7 +31,7 @@ export default {
moduleMetadata({
imports: [BrowserAnimationsModule, GioFormListenersVirtualHostModule, FormsModule, ReactiveFormsModule],
providers: [
{ provide: PortalSettingsService, useValue: { get: () => of({ portal: { entrypoint: '' } }) } },
{ provide: PortalConfigurationService, useValue: { get: () => of({ portal: { entrypoint: '' } }) } },
{ provide: ApiService, useValue: { verify: () => of() } },
],
}),
Expand Down
Loading

0 comments on commit affa02a

Please sign in to comment.