diff options
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models')
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); |