diff options
Diffstat (limited to 'catalog-ui/src/app/models/components/resource.ts')
-rw-r--r-- | catalog-ui/src/app/models/components/resource.ts | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/catalog-ui/src/app/models/components/resource.ts b/catalog-ui/src/app/models/components/resource.ts index 9f7a123486..cd839786c5 100644 --- a/catalog-ui/src/app/models/components/resource.ts +++ b/catalog-ui/src/app/models/components/resource.ts @@ -41,6 +41,7 @@ export class Resource extends Component { public payloadData:string; public payloadName:string; public importedFile:FileUploadModel; + public resourceVendorModelNumber:string; // Onboarding parameters public csarUUID:string; @@ -59,6 +60,7 @@ export class Resource extends Component { this.resourceType = component.resourceType; this.csarUUID = component.csarUUID; this.csarVersion = component.csarVersion; + this.resourceVendorModelNumber = component.resourceVendorModelNumber; this.filterTerm = this.name + ' ' + this.description + ' ' + (this.tags ? this.tags.toString() : '') + ' ' + this.version + ' ' + this.resourceType; if (component.categories && component.categories[0] && component.categories[0].subcategories && component.categories[0].subcategories[0]) { component.mainCategory = component.categories[0].name; @@ -80,6 +82,7 @@ export class Resource extends Component { this.csarUUID = componentMetadata.csarUUID; this.csarVersion = componentMetadata.csarVersion; this.derivedFrom = componentMetadata.derivedFrom; + this.resourceVendorModelNumber = componentMetadata.resourceVendorModelNumber; this.setComponentDisplayData(); }; @@ -88,7 +91,7 @@ export class Resource extends Component { }; public isComplex = ():boolean => { - return this.resourceType === ResourceType.VF; + return this.resourceType === ResourceType.VF || this.resourceType === ResourceType.PNF || this.resourceType === ResourceType.CVFC; }; public isVl = ():boolean => { @@ -160,17 +163,18 @@ export class Resource extends Component { }; public toJSON = ():any => { - this.componentService = undefined; - this.filterTerm = undefined; - this.iconSprite = undefined; - this.mainCategory = undefined; - this.subCategory = undefined; - this.selectedInstance = undefined; - this.showMenu = undefined; - this.$q = undefined; - this.selectedCategory = undefined; - this.importedFile = undefined; - return this; + let temp = angular.copy(this); + temp.componentService = undefined; + temp.filterTerm = undefined; + temp.iconSprite = undefined; + temp.mainCategory = undefined; + temp.subCategory = undefined; + temp.selectedInstance = undefined; + temp.showMenu = undefined; + temp.$q = undefined; + temp.selectedCategory = undefined; + temp.importedFile = undefined; + return temp; }; } |