diff --git a/smp-angular/src/app/common/components/smp-warning-panel/smp-warning-panel.component.html b/smp-angular/src/app/common/components/smp-warning-panel/smp-warning-panel.component.html index 21e451f241f81349fa837b320d881433d89c7045..5dda43cc757c73861c63cb18c2e60a0c449e5406 100644 --- a/smp-angular/src/app/common/components/smp-warning-panel/smp-warning-panel.component.html +++ b/smp-angular/src/app/common/components/smp-warning-panel/smp-warning-panel.component.html @@ -1,6 +1,6 @@ -<div [innerHTML]="innerHtml" +<div [ngClass]="{ 'smp-warning-panel': label, - 'smp-warning-panel-padding': padding && (!!label || !!innerHtml), + 'smp-warning-panel-padding': padding && !!label, 'alert-info': type === 'info', 'alert-success': type === 'success', 'alert-warning': type === 'warning', diff --git a/smp-angular/src/app/common/components/smp-warning-panel/smp-warning-panel.component.ts b/smp-angular/src/app/common/components/smp-warning-panel/smp-warning-panel.component.ts index 55d545d17210f9ebad078280212b4212c5a41b53..7ca12d58545fe0f7b6c89601189ac3bdb2ce00e3 100644 --- a/smp-angular/src/app/common/components/smp-warning-panel/smp-warning-panel.component.ts +++ b/smp-angular/src/app/common/components/smp-warning-panel/smp-warning-panel.component.ts @@ -7,7 +7,6 @@ import { Component, Input } from '@angular/core'; export class SmpWarningPanelComponent { @Input() padding:boolean = true; @Input() label:string; - @Input() innerHtml:string; @Input() icon:string; @Input() type:string = 'warning'; diff --git a/smp-angular/src/app/system-settings/admin-domain/domain-panel/domain-panel.component.html b/smp-angular/src/app/system-settings/admin-domain/domain-panel/domain-panel.component.html index 054a5f31f1f55103a6a0a9de2e3e6991acadf1ad..a8c3e301d0020f20b58719aed23a0f5e398cbee8 100644 --- a/smp-angular/src/app/system-settings/admin-domain/domain-panel/domain-panel.component.html +++ b/smp-angular/src/app/system-settings/admin-domain/domain-panel/domain-panel.component.html @@ -5,7 +5,7 @@ <smp-warning-panel *ngIf="showWarning" icon="warning" type="warning" - [innerHtml]="showWarningMessage"></smp-warning-panel> + [label]="showWarningMessage"></smp-warning-panel> <mat-form-field style="width:100%"> <mat-label>Domain Code</mat-label> <input matInput diff --git a/smp-angular/src/app/system-settings/admin-domain/domain-sml-panel/domain-sml-integration-panel.component.ts b/smp-angular/src/app/system-settings/admin-domain/domain-sml-panel/domain-sml-integration-panel.component.ts index b7150a7cb6fac9ca2eeb56c917f149b1f0029da3..9e0a731fefc958c2948c7459a4271a799917fe6f 100644 --- a/smp-angular/src/app/system-settings/admin-domain/domain-sml-panel/domain-sml-integration-panel.component.ts +++ b/smp-angular/src/app/system-settings/admin-domain/domain-sml-panel/domain-sml-integration-panel.component.ts @@ -10,6 +10,7 @@ import {ConfirmationDialogComponent} from "../../../common/dialogs/confirmation- import {SMLResult} from "../../domain/sml-result.model"; import {SmlIntegrationService} from "../../domain/sml-integration.service"; import {GlobalLookups} from "../../../common/global-lookups"; +import {HttpErrorHandlerService} from "../../../common/error/http-error-handler.service"; @Component({ @@ -65,6 +66,7 @@ export class DomainSmlIntegrationPanelComponent implements BeforeLeaveGuard { constructor(private domainService: AdminDomainService, private alertService: AlertMessageService, + private httpErrorHandlerService: HttpErrorHandlerService, protected smlIntegrationService: SmlIntegrationService, protected lookups: GlobalLookups, private dialog: MatDialog, @@ -235,6 +237,9 @@ export class DomainSmlIntegrationPanelComponent implements BeforeLeaveGuard { } }, err => { + if (this.httpErrorHandlerService.logoutOnInvalidSessionError(err)) { + return; + } // this.searchTable.showSpinner = false; this.alertService.exception('Error occurred while registering domain:' + domain.domainCode, err); } @@ -260,6 +265,9 @@ export class DomainSmlIntegrationPanelComponent implements BeforeLeaveGuard { } , err => { + if (this.httpErrorHandlerService.logoutOnInvalidSessionError(err)) { + return; + } // this.searchTable.showSpinner = false; this.alertService.exception('Error occurred while unregistering domain:' + domain.domainCode, err); }