summaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/testStructure.json
blob: db9569006457bff07e28fbe0e5376fad2b43cf57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
    "distributionID": "a2872f55-8628-4486-8548-7b132c9a47db",
    "serviceName": "Service-CxSvc",
    "serviceVersion": "1.0",
    "serviceUUID": "bad955c3-29b2-4a27-932e-28e942cc6480",
    "serviceInvariantUUID": "b16a9398-ffa3-4041-b78c-2956b8ad9c7b",
    "serviceDescription": "Demo",
    "serviceArtifacts": [
        {
            "artifactName": "service-CxSvc-csar.csar",
            "artifactVersion": "1",
            "artifactType": "Workflows",
            "artifactDescription": "Workflows Container",
            "artifactTimeout": "0",
            "artifactURL": "service-CxSvc-csar.csar",
            "artifactUUID": "396cfd49-0f4b-4fec-9f33-0fd7e90d5a22",
            "artifactChecksum": "MWQ3Y2FmMWExNDQyYWI2N2YwNjEwZGUzN2IzMzI3NjE="
        }
    ]
}
ass="p">{MessageBoxService} from "../../../shared/components/messageBox/messageBox.service"; import * as _ from "lodash"; import { SdcUiCommon} from "onap-ui-angular"; import {SharedTreeService} from "../objectsToTree/shared.tree.service"; import {VrfModel} from "../../../shared/models/vrfModel"; import {clearAllGenericModalhelper} from "../../../shared/storeUtil/utils/global/global.actions"; export class AvailableNodeIcons { addIcon: boolean; vIcon: boolean; constructor(addIcon: boolean, vIcon: boolean) { this.addIcon = addIcon; this.vIcon = vIcon; } } @Injectable() export class AvailableModelsTreeService { constructor(private _defaultDataGeneratorService: DefaultDataGeneratorService, private store: NgRedux<AppState>, public _shareTreeService : SharedTreeService) { } shouldOpenDialog(type: string, dynamicInputs: any, isEcompGeneratedNaming: boolean): boolean { if (!isEcompGeneratedNaming || this._defaultDataGeneratorService.requiredFields[type].length > 0) { return true; } if (dynamicInputs) { for(let input of dynamicInputs) { if (input.isRequired && _.isEmpty(input.value)) { return true; } } } return false; } getOptionalVNFs(serviceUUID: string, vnfOriginalModelName : string) : any[] { let result = []; if(!_.isNil(this.store.getState().service.serviceInstance) && !_.isNil(this.store.getState().service.serviceInstance[serviceUUID])){ const serviceVNFsInstances = this.store.getState().service.serviceInstance[serviceUUID].vnfs; for(let vnfKey in serviceVNFsInstances){ if(serviceVNFsInstances[vnfKey].originalName === vnfOriginalModelName){ serviceVNFsInstances[vnfKey].vnfStoreKey = vnfKey; result.push(serviceVNFsInstances[vnfKey]); } } } return result; } addingAlertAddingNewVfModuleModal() : void { let messageBoxData : MessageBoxData = new MessageBoxData( "Select a parent", // modal title "There are multiple instances on the right side that can contain this vf-module Please select the VNF instance, to add this vf-module to, on the right side and then click the + sign", SdcUiCommon.ModalType.warning, SdcUiCommon.ModalSize.medium, [ {text:"Close", size:"medium", closeModal:true} ]); MessageBoxService.openModal.next(messageBoxData); } shouldOpenVRFModal(nodes, serviceModelId: string , service) { for(const node of nodes){ if(node.type === 'VRF' && service.serviceInstance[serviceModelId].existingVRFCounterMap && !service.serviceInstance[serviceModelId].existingVRFCounterMap[node.modelUniqueId]){ const vrfModel : VrfModel = node.getModel(node.name, node, service.serviceInstance[serviceModelId]); const vrfCounter : number = service.serviceInstance[serviceModelId].existingVRFCounterMap[node.modelUniqueId]; console.log('vrfCounter', vrfCounter); if(vrfModel.min > 0 && (_.isNil(vrfCounter) || vrfCounter === 0)){ node.data = node; this.store.dispatch(clearAllGenericModalhelper()); return node; } } } return null; } }