diff options
author | zhaoxiangjun666 <xjzhaop@isoftstone.com> | 2020-09-10 14:01:50 +0800 |
---|---|---|
committer | zhaoxiangjun666 <xjzhaop@isoftstone.com> | 2020-09-21 20:39:48 +0800 |
commit | a8d3e1b8c759c21227690a425552a245da883e97 (patch) | |
tree | 4e9731f7e7c4df8088187e7501a0d9a8a516f215 /catalog-ui/src/app/models/components/component.ts | |
parent | 591810df468a8e2c59569e701f514bff61203940 (diff) |
Support for Test Topology Auto Design- Service Import
Add some test code and use lombok in catalog-model
Test Topology Auto Design (NFV Testing Automatic Platform)
Delete useless test code and add test code for new function
Issue-ID: SDC-3179
Issue-ID: SDC-3085
Signed-off-by: zhaoxiangjun666 <xjzhaop@isoftstone.com>
Change-Id: I7f555633a00848c273014caa18ea0e30d0b22113
Diffstat (limited to 'catalog-ui/src/app/models/components/component.ts')
-rw-r--r-- | catalog-ui/src/app/models/components/component.ts | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/catalog-ui/src/app/models/components/component.ts b/catalog-ui/src/app/models/components/component.ts index b76d29c8c6..a0706b4157 100644 --- a/catalog-ui/src/app/models/components/component.ts +++ b/catalog-ui/src/app/models/components/component.ts @@ -233,6 +233,11 @@ export abstract class Component implements IComponent { this.handleTags(); return this.componentService.createComponent(this); }; + + public importComponentOnServer = (): ng.IPromise<Component> => { + this.handleTags(); + return this.componentService.importComponent(this); + }; public updateComponent = ():ng.IPromise<Component> => { this.handleTags(); @@ -243,8 +248,12 @@ export abstract class Component implements IComponent { return this.componentService.validateName(newName, subtype); }; - public downloadArtifact = (artifactId:string):ng.IPromise<IFileDownload> => { - return this.componentService.downloadArtifact(this.uniqueId, artifactId); + public downloadArtifact = (artifactId: string): ng.IPromise<IFileDownload> => { + if(this.vendorName === 'IsService'){ + return this.componentService.downloadArtifact(this.uniqueId, artifactId, this.vendorName); + }else{ + return this.componentService.downloadArtifact(this.uniqueId, artifactId); + } }; public addOrUpdateArtifact = (artifact:ArtifactModel):ng.IPromise<ArtifactModel> => { |