Skip to content

Commit 06647b4

Browse files
fix(portal): fix OIDC login icon contrast when button color is unset
1 parent 205d292 commit 06647b4

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

gravitee-apim-console-webui/src/management/api/general-info/api-general-info-danger-zone/api-general-info-danger-zone.component.spec.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,6 @@ describe('ApiGeneralInfoDangerZoneComponent', () => {
285285
await confirmDialog.confirm();
286286

287287
httpTestingController.expectOne({ method: 'POST', url: `${CONSTANTS_TESTING.env.v2BaseURL}/apis/${API_ID}/_detach` }).flush({});
288-
httpTestingController
289-
.expectOne({ method: 'GET', url: `${CONSTANTS_TESTING.env.v2BaseURL}/apis/${API_ID}` })
290-
.flush(fakeApiV2({ id: API_ID, originContext: { origin: 'MANAGEMENT' } }));
291288
expect(routerNavigateSpy).not.toHaveBeenCalled();
292289

293290
expect(component.reloadDetails.emit).toHaveBeenCalled();

gravitee-apim-console-webui/src/management/api/general-info/api-general-info-danger-zone/api-general-info-danger-zone.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,8 @@ export class ApiGeneralInfoDangerZoneComponent implements OnChanges, OnDestroy,
339339
}
340340

341341
private updateOriginContextState(): void {
342-
this.isReadOnly = this.api.definitionVersion === 'V1' || this.api.originContext?.origin === 'KUBERNETES';
343-
this.canDetach = this.api.originContext?.origin === 'KUBERNETES';
342+
this.isReadOnly = this.api?.definitionVersion === 'V1' || this.api?.originContext?.origin === 'KUBERNETES';
343+
this.canDetach = this.api?.originContext?.origin === 'KUBERNETES';
344344
}
345345

346346
private canChangeApiLifecycle(api: Api): boolean {

gravitee-apim-console-webui/src/services-ngx/api-v2.service.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,10 @@ export class ApiV2Service {
8484
}
8585

8686
detach(apiId: string): Observable<void> {
87-
return this.http
88-
.post<void>(`${this.constants.env.v2BaseURL}/apis/${apiId}/_detach`, {})
89-
.pipe(switchMap(() => this.refreshLastApiFetch()));
87+
return this.http.post<void>(`${this.constants.env.v2BaseURL}/apis/${apiId}/_detach`, {}).pipe(
88+
switchMap(() => this.refreshLastApiFetch()),
89+
map(() => void 0),
90+
);
9091
}
9192

9293
start(apiId: string): Observable<void> {

0 commit comments

Comments
 (0)