summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/components/modals/onboarding-modal/onboarding-modal.component.ts
diff options
context:
space:
mode:
authorandre.schmid <andre.schmid@est.tech>2021-04-15 18:47:55 +0100
committerAndré Schmid <andre.schmid@est.tech>2021-04-20 10:30:55 +0000
commit39b533344f0a86401f5c41025cfdcf3139934569 (patch)
tree2a6b48a5368525aaf0d167c43afade6a5c532f30 /catalog-ui/src/app/ng2/components/modals/onboarding-modal/onboarding-modal.component.ts
parentcd12a2ac6ddc43493c4ba0685dfc75f11bf2aa6b (diff)
Fix VSP update for checked-in resources
Checkout the VF (if checked-in) related to the VSP before loading the VF workspace. Change-Id: I9576fd5b429fdae2ac00de5bfbd38e183b93be59 Issue-ID: SDC-3560 Signed-off-by: André Schmid <andre.schmid@est.tech>
Diffstat (limited to 'catalog-ui/src/app/ng2/components/modals/onboarding-modal/onboarding-modal.component.ts')
-rw-r--r--catalog-ui/src/app/ng2/components/modals/onboarding-modal/onboarding-modal.component.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/catalog-ui/src/app/ng2/components/modals/onboarding-modal/onboarding-modal.component.ts b/catalog-ui/src/app/ng2/components/modals/onboarding-modal/onboarding-modal.component.ts
index 10d7f67860..1e07c8b2ef 100644
--- a/catalog-ui/src/app/ng2/components/modals/onboarding-modal/onboarding-modal.component.ts
+++ b/catalog-ui/src/app/ng2/components/modals/onboarding-modal/onboarding-modal.component.ts
@@ -18,6 +18,12 @@ export interface ImportVSPdata {
componentCsar: Resource;
previousComponent?: Resource;
type: string;
+ actionType: ImportVSPActionType;
+}
+
+export enum ImportVSPActionType {
+ IMPORT_VSP,
+ UPDATE_VSP
}
// tslint:disable-next-line:interface-name
@@ -118,13 +124,14 @@ export class OnboardingModalComponent implements OnInit {
}
importOrUpdateCsar = (): void => {
- const selectedComponentConverted = this.onBoardingService.convertMetaDataToComponent(this.selectedComponent);
+ const selectedComponentConverted: Resource = this.onBoardingService.convertMetaDataToComponent(this.selectedComponent);
const componentFromServerConverted = this.componentFromServer ?
this.onBoardingService.convertMetaDataToComponent(this.componentFromServer) : undefined;
const importVSPdata: ImportVSPdata = {
componentCsar: selectedComponentConverted,
previousComponent: componentFromServerConverted,
- type: ComponentType.RESOURCE.toLowerCase()
+ type: ComponentType.RESOURCE.toLowerCase(),
+ actionType: this.isCsarComponentExists ? ImportVSPActionType.UPDATE_VSP : ImportVSPActionType.IMPORT_VSP
};
this.closeModalEvent.emit(importVSPdata);
}