summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/components/dynamic-element
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-06-17 22:40:44 +0300
committerMichael Lando <ml636r@att.com>2017-06-18 07:20:49 +0300
commit4d97d5fac309ce0d66938e5ccd0349e2660d4e23 (patch)
tree3f921054f997d1962fa6f9db9a0119e31a851eea /catalog-ui/src/app/ng2/components/dynamic-element
parent89786d31f266a205857cae0177904c249ac6a512 (diff)
[sdc] update code of sdc
Change-Id: If9f37c80b659cb67b34d18e6c019defecca58b9a Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-ui/src/app/ng2/components/dynamic-element')
-rw-r--r--catalog-ui/src/app/ng2/components/dynamic-element/dynamic-element.component.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/catalog-ui/src/app/ng2/components/dynamic-element/dynamic-element.component.ts b/catalog-ui/src/app/ng2/components/dynamic-element/dynamic-element.component.ts
index 84ac46c4cf..0c74765944 100644
--- a/catalog-ui/src/app/ng2/components/dynamic-element/dynamic-element.component.ts
+++ b/catalog-ui/src/app/ng2/components/dynamic-element/dynamic-element.component.ts
@@ -24,6 +24,7 @@ export class DynamicElementComponent {
@Input() type: any;
@Input() name: string;
@Input() readonly:boolean;
+ @Input() path:string;//optional param. used only for for subnetpoolid type
value:any;
// Two way binding for value (need to write the "Change" word like this)
@@ -58,7 +59,11 @@ export class DynamicElementComponent {
this.cmpRef.instance.pattern = this.validation.validationPatterns.integer;
break;
case 'string':
- if (this.name.toUpperCase().indexOf("SUBNETPOOLID") !== -1) {
+ if (this.path && this.path.toUpperCase().indexOf("SUBNETPOOLID") !== -1) {
+ if(this.name.toUpperCase().indexOf("SUBNETPOOLID") == -1){//if it's an item of subnetpoolid list get the parent name
+ let pathArray = this.path.split("#");
+ this.name = pathArray[pathArray.length - 2];
+ }
this.createComponent(UiElementPopoverInputComponent);
}
else {