summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2
diff options
context:
space:
mode:
authorIdan Amit <ia096e@intl.att.com>2018-01-28 14:01:47 +0200
committerMichael Lando <ml636r@att.com>2018-01-29 06:54:57 +0000
commit927fb189d16f96e031b5b92dc963ace22a1d6577 (patch)
treeeb88284e7b7675b4ba8c26e1d15d534376e82dd2 /catalog-ui/src/app/ng2
parentb03fa6198696e16b9b82ea07472752fb1c28f94c (diff)
Add query params options to iframe
Added query params support to the designers iframe Change-Id: I742b4717f5418deb6b7cc6bea143eb7521eed1c0 Issue-ID: SDC-959 Signed-off-by: Idan Amit <ia096e@intl.att.com>
Diffstat (limited to 'catalog-ui/src/app/ng2')
-rw-r--r--catalog-ui/src/app/ng2/components/ui/designer/designer-frame.component.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/catalog-ui/src/app/ng2/components/ui/designer/designer-frame.component.ts b/catalog-ui/src/app/ng2/components/ui/designer/designer-frame.component.ts
index b66008f022..b52696a287 100644
--- a/catalog-ui/src/app/ng2/components/ui/designer/designer-frame.component.ts
+++ b/catalog-ui/src/app/ng2/components/ui/designer/designer-frame.component.ts
@@ -1,4 +1,5 @@
import {Component, OnInit, Input} from "@angular/core";
+import { URLSearchParams } from '@angular/http';
import {Designer} from "app/models";
@Component({
@@ -10,9 +11,12 @@ import {Designer} from "app/models";
export class DesignerFrameComponent implements OnInit {
@Input() designer: Designer;
+ @Input() queryParams: Object;
designerUrl: string;
+ private urlSearchParams: URLSearchParams;
constructor() {
+ this.urlSearchParams = new URLSearchParams();
}
ngOnInit(): void {
@@ -21,5 +25,14 @@ export class DesignerFrameComponent implements OnInit {
this.designer.designerHost + ":" +
this.designer.designerPort +
this.designer.designerPath;
+
+ if (this.queryParams && !_.isEmpty(this.queryParams)) {
+ _.forOwn(this.queryParams, (value, key) => {
+ this.urlSearchParams.set(key, value);
+ });
+
+ this.designerUrl += '?';
+ this.designerUrl += this.urlSearchParams.toString();
+ }
}
}