diff --git a/ui-ngx/src/app/shared/components/js-func.component.html b/ui-ngx/src/app/shared/components/js-func.component.html
index 39ff2846cd..fb38aa212d 100644
--- a/ui-ngx/src/app/shared/components/js-func.component.html
+++ b/ui-ngx/src/app/shared/components/js-func.component.html
@@ -31,7 +31,7 @@
{{ fullscreen ? 'fullscreen_exit' : 'fullscreen' }}
-
+
diff --git a/ui-ngx/src/app/shared/components/js-func.component.ts b/ui-ngx/src/app/shared/components/js-func.component.ts
index e0e176efd9..544bf5823d 100644
--- a/ui-ngx/src/app/shared/components/js-func.component.ts
+++ b/ui-ngx/src/app/shared/components/js-func.component.ts
@@ -31,7 +31,7 @@ import { ActionNotificationHide, ActionNotificationShow } from '@core/notificati
import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { UtilsService } from '@core/services/utils.service';
-import { isUndefined } from '@app/core/utils';
+import { guid, isUndefined } from '@app/core/utils';
import { TranslateService } from '@ngx-translate/core';
import { CancelAnimationFrame, RafService } from '@core/services/raf.service';
@@ -62,6 +62,8 @@ export class JsFuncComponent implements OnInit, OnDestroy, ControlValueAccessor,
private editorsResizeCaf: CancelAnimationFrame;
private editorResizeListener: any;
+ toastTargetId = `jsFuncEditor-${guid()}`;
+
@Input() functionName: string;
@Input() functionArgs: Array;
@@ -209,7 +211,7 @@ export class JsFuncComponent implements OnInit, OnDestroy, ControlValueAccessor,
{
message: this.validationError,
type: 'error',
- target: 'jsFuncEditor',
+ target: this.toastTargetId,
verticalPosition: 'bottom',
horizontalPosition: 'left'
}));
@@ -301,7 +303,7 @@ export class JsFuncComponent implements OnInit, OnDestroy, ControlValueAccessor,
if (this.errorShowed) {
this.store.dispatch(new ActionNotificationHide(
{
- target: 'jsFuncEditor'
+ target: this.toastTargetId
}));
this.errorShowed = false;
}
diff --git a/ui-ngx/src/app/shared/components/json-content.component.html b/ui-ngx/src/app/shared/components/json-content.component.html
index d072c674f4..53435c7151 100644
--- a/ui-ngx/src/app/shared/components/json-content.component.html
+++ b/ui-ngx/src/app/shared/components/json-content.component.html
@@ -36,7 +36,7 @@
{{ fullscreen ? 'fullscreen_exit' : 'fullscreen' }}
-
diff --git a/ui-ngx/src/app/shared/components/json-content.component.ts b/ui-ngx/src/app/shared/components/json-content.component.ts
index ed949a6bb0..4dabd93b9b 100644
--- a/ui-ngx/src/app/shared/components/json-content.component.ts
+++ b/ui-ngx/src/app/shared/components/json-content.component.ts
@@ -33,6 +33,7 @@ import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { ContentType, contentTypesMap } from '@shared/models/constants';
import { CancelAnimationFrame, RafService } from '@core/services/raf.service';
+import { guid } from '@core/utils';
@Component({
selector: 'tb-json-content',
@@ -60,6 +61,8 @@ export class JsonContentComponent implements OnInit, ControlValueAccessor, Valid
private editorsResizeCaf: CancelAnimationFrame;
private editorResizeListener: any;
+ toastTargetId = `jsonContentEditor-${guid()}`;
+
@Input() label: string;
@Input() contentType: ContentType;
@@ -220,7 +223,7 @@ export class JsonContentComponent implements OnInit, ControlValueAccessor, Valid
{
message: errorInfo,
type: 'error',
- target: 'jsonContentEditor',
+ target: this.toastTargetId,
verticalPosition: 'bottom',
horizontalPosition: 'left'
}));
@@ -233,7 +236,7 @@ export class JsonContentComponent implements OnInit, ControlValueAccessor, Valid
if (this.errorShowed) {
this.store.dispatch(new ActionNotificationHide(
{
- target: 'jsonContentEditor'
+ target: this.toastTargetId
}));
this.errorShowed = false;
}
diff --git a/ui-ngx/src/app/shared/components/json-object-edit.component.html b/ui-ngx/src/app/shared/components/json-object-edit.component.html
index 755c517aca..b4bfa17293 100644
--- a/ui-ngx/src/app/shared/components/json-object-edit.component.html
+++ b/ui-ngx/src/app/shared/components/json-object-edit.component.html
@@ -38,7 +38,7 @@
{{ fullscreen ? 'fullscreen_exit' : 'fullscreen' }}
-