summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/drawingBoard/service-planning/duplicate/duplicate.service.ts
diff options
context:
space:
mode:
authorYoav Schneiderman <yoav.schneiderman@intl.att.com>2019-12-30 16:27:14 +0200
committerIttay Stern <ittay.stern@att.com>2019-12-31 10:26:19 +0200
commit7b10265c43a1097b730516e19177ad2ae419b808 (patch)
treeb00eb6790a80625b9fd68f5c43a01f5c4f67a81b /vid-webpack-master/src/app/drawingBoard/service-planning/duplicate/duplicate.service.ts
parent88898c121c8e405d8c6445d54f3fdc23675c0305 (diff)
Add more VNFs after loading a template + Remove + Duplicate
Issue-ID: VID-738 Change-Id: I1a9ed50ba672e8317aeb9074e561cc8d70aad24d Signed-off-by: Yoav Schneiderman <yoav.schneiderman@intl.att.com> Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/duplicate/duplicate.service.ts')
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/duplicate/duplicate.service.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/duplicate/duplicate.service.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/duplicate/duplicate.service.ts
index 847790de9..c8338cbfc 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/duplicate/duplicate.service.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/duplicate/duplicate.service.ts
@@ -13,11 +13,14 @@ import {changeInstanceCounter, duplicateBulkInstances} from "../../../shared/sto
import {IModalConfig} from "onap-ui-angular/dist/modals/models/modal-config";
import {FeatureFlagsService} from "../../../shared/services/featureFlag/feature-flags.service";
import {Utils} from "../../../shared/utils/utils";
+import {SharedTreeService} from "../objectsToTree/shared.tree.service";
@Injectable()
export class DuplicateService {
- constructor(private _logService: LogService, private _store: NgRedux<AppState>, modalService: SdcUiServices.ModalService) {
+ constructor(private _logService: LogService,
+ private sharedTreeService : SharedTreeService,
+ private _store: NgRedux<AppState>, modalService: SdcUiServices.ModalService) {
this.modalService = modalService;
}
@@ -123,7 +126,7 @@ export class DuplicateService {
newObjects[uniqueStoreKey] = clone;
}
this.store.dispatch(duplicateBulkInstances(this.currentServiceId, newObjects, this.existingNames, node));
- this.store.dispatch(changeInstanceCounter(toClone.modelInfo.modelUniqueId, this.currentServiceId, this.numberOfDuplicates, node));
+ this.store.dispatch(changeInstanceCounter(this.sharedTreeService.modelUniqueId(toClone), this.currentServiceId, this.numberOfDuplicates, node));
this._logService.info("Duplicate " + this.storeKey + " serviceId: " + this.currentServiceId + "number of duplicate: " + this.numberOfDuplicates, toClone);
}