aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models
diff options
context:
space:
mode:
authorEinat Vinouze <einat.vinouze@intl.att.com>2019-08-27 16:01:01 +0300
committerIttay Stern <ittay.stern@att.com>2019-09-09 07:01:36 +0000
commite1f7974f0badbd4440d5b7ea5f1b1cb2d4973818 (patch)
tree46be9cdc44cbb475527bc3c43df23d16f7579d29 /vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models
parente25b88b5a7a0f3bf63ca7160a441b53145484bcc (diff)
Adding feature: Replace vfmodule
Issue-ID: VID-603 Change-Id: I59068a0979d6fb733e4243c8f78921f396dc9d17 Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com> Signed-off-by: Amichai Hemli <amichai.hemli@intl.att.com> Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models')
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts34
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts20
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vrf/vrfModal/networkStep/network.step.service.ts6
3 files changed, 51 insertions, 9 deletions
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts
index bfe1d0082..47a6dcb50 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts
@@ -23,10 +23,12 @@ import {
deleteActionVfModuleInstance,
removeVfModuleInstance,
undoDeleteVfModuleInstance,
- updateVFModulePosition
+ undoUgradeVFModule,
+ updateVFModulePosition,
+ upgradeVFModule
} from "../../../../../shared/storeUtil/utils/vfModule/vfModule.actions";
import {ComponentInfoService} from "../../../component-info/component-info.service";
-import {ComponentInfoModel, ComponentInfoType} from "../../../component-info/component-info-model";
+import {ComponentInfoType} from "../../../component-info/component-info-model";
import {ModelInformationItem} from "../../../../../shared/components/model-information/model-information.component";
export class VFModuleModelInfo implements ILevelNodeInfo {
@@ -353,10 +355,32 @@ export class VFModuleModelInfo implements ILevelNodeInfo {
},
visible: (node) => this._sharedTreeService.shouldShowUndoDelete(node),
enable: (node, serviceModelId) => this._sharedTreeService.shouldShowUndoDelete(node) && this._sharedTreeService.shouldShowDelete(node.parent) && !this._sharedTreeService.isServiceOnDeleteMode(serviceModelId)
- }
+ },
+ upgrade : {
+ method : (node, serviceModelId) => {
+ this._sharedTreeService.upgradeBottomUp(node, serviceModelId);
+ this._store.dispatch(upgradeVFModule(node.data.modelName, node.parent.data.vnfStoreKey, serviceModelId, node.data.dynamicModelName));
+ },
+ visible: (node,serviceModelId) => {
+ return this._sharedTreeService.shouldShowUpgrade(node, serviceModelId);
+ },
+ enable: (node, serviceModelId) => {
+ return this._sharedTreeService.shouldShowUpgrade(node, serviceModelId);
+ }
+ },
+ undoUpgrade: {
+ method: (node, serviceModelId) => {
+ this._sharedTreeService.undoUpgradeBottomUp(node, serviceModelId);
+ this._store.dispatch(undoUgradeVFModule(node.data.modelName, node.parent.data.vnfStoreKey, serviceModelId, node.data.dynamicModelName));
+ },
+ visible: (node) => {
+ return this._sharedTreeService.shouldShowUndoUpgrade(node);
+ },
+ enable: (node) => {
+ return this._sharedTreeService.shouldShowUndoUpgrade(node);
+ }
+ },
};
-
-
}
updatePosition(that , node, instanceId, parentStoreKey): void {
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts
index 2bdeda083..ebcba162e 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts
@@ -29,7 +29,9 @@ import {ServiceInstanceActions} from "../../../../../shared/models/serviceInstan
import {
deleteActionVnfInstance,
undoDeleteActionVnfInstance,
- updateVnfPosition
+ undoUpgradeVnf,
+ updateVnfPosition,
+ upgradeVnf
} from "../../../../../shared/storeUtil/utils/vnf/vnf.actions";
import * as _ from 'lodash';
import {IModalConfig} from "onap-ui-angular/dist/modals/models/modal-config";
@@ -278,7 +280,21 @@ export class VnfModelInfo implements ILevelNodeInfo {
},
visible: (node) => this._sharedTreeService.shouldShowUndoDelete(node),
enable: (node, serviceModelId) => this._sharedTreeService.shouldShowUndoDelete(node) && !this._sharedTreeService.isServiceOnDeleteMode(serviceModelId)
- }
+ },
+ upgrade: {
+ method: (node, serviceModelId) => {
+ this._store.dispatch(upgradeVnf(node.data.vnfStoreKey, serviceModelId));
+ },
+ visible: () => false,
+ enable: () => false
+ },
+ undoUpgrade: {
+ method: (node, serviceModelId) => {
+ this._store.dispatch(undoUpgradeVnf(node.data.vnfStoreKey, serviceModelId));
+ },
+ visible: () => false,
+ enable: () => false
+ },
}
}
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vrf/vrfModal/networkStep/network.step.service.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vrf/vrfModal/networkStep/network.step.service.ts
index 9cd928e8f..f303434a8 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vrf/vrfModal/networkStep/network.step.service.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vrf/vrfModal/networkStep/network.step.service.ts
@@ -8,7 +8,9 @@ import {
} from "../../../../../../../shared/storeUtil/utils/global/global.actions";
import {ElementsTableService} from "../../../../../../../shared/components/searchMembersModal/members-table/elements-table.service";
import {
- ICriteria, ISearchField, ITableContent,
+ ICriteria,
+ ISearchField,
+ ITableContent,
ModalInformation
} from "../../../../../../../shared/components/searchMembersModal/members-table/element-table-row.model";
import {Observable, of} from "rxjs";
@@ -76,7 +78,7 @@ export class NetworkStepService {
getNetworks = (serviceInstance): Observable<any[]> => {
let cloudRegion = serviceInstance.lcpCloudRegionId;
- let tenantId = serviceInstance.tenantName;
+ let tenantId = serviceInstance.tenantId;
return this._aaiService.retrieveActiveNetwork(cloudRegion, tenantId).map((networks: NetworkModalRow[]) => {
this.generateRolesOptions(networks);
return this.sortElementsResultByField(networks, this.uniqObjectField);