diff options
Diffstat (limited to 'vid-webpack-master/src')
28 files changed, 219 insertions, 116 deletions
diff --git a/vid-webpack-master/src/app/app.routing.ts b/vid-webpack-master/src/app/app.routing.ts index 779d17e3c..eaf4e9ca4 100644 --- a/vid-webpack-master/src/app/app.routing.ts +++ b/vid-webpack-master/src/app/app.routing.ts @@ -6,12 +6,20 @@ import {SupportComponent} from "./support/support.component"; import {HealthStatusRoutes} from "./healthStatus/health-status.routing"; import {VlanTaggingRoutes} from "./vlanTagging/vlan-tagging.routing"; import {InstantiationStatusRoutes} from "./instantiationStatus/InstantiationStatus.routing"; +import {InstantiationTemplatesModalComponent} from "./shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component"; const routes: Routes = [ ...DrawingBoardRoutes, ...HealthStatusRoutes, ...VlanTaggingRoutes, ...InstantiationStatusRoutes, { + path: 'instantiationTemplatesPopup', + component: InstantiationTemplatesModalComponent, + resolve: { + flags: FlagsResolve + } + }, + { path: 'servicePopup', component: GenericFormPopupComponent, resolve: { diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts index 1b71d9098..634fa6271 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts @@ -96,7 +96,7 @@ export class DrawingBoardHeaderService{ showEditService(mode: DrawingBoardModes, serviceModelId: string): boolean{ const serviceInstance = this.store.getState().service.serviceInstance; - return mode === DrawingBoardModes.CREATE || ((mode === DrawingBoardModes.RETRY_EDIT || mode === DrawingBoardModes.EDIT)&& + return mode === DrawingBoardModes.CREATE || ((mode === DrawingBoardModes.RETRY_EDIT || mode === DrawingBoardModes.EDIT || mode === DrawingBoardModes.RECREATE )&& !_.isNil(serviceInstance) && !_.isNil(serviceInstance[serviceModelId])&& serviceInstance[serviceModelId].action === ServiceInstanceActions.Create); } diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/network/network.model.info.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/network/network.model.info.spec.ts index 089f812a7..f26ab0cf1 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/network/network.model.info.spec.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/network/network.model.info.spec.ts @@ -311,13 +311,21 @@ describe('Network Model Info', () => { const instance = getNetworkInstance(); let actualNetworkInfo = networkModel.getInfo(model, instance); let expectedNetworkInfo = [ + ModelInformationItem.createInstance("Min instances", "0"), + ModelInformationItem.createInstance("Max instances", "1"), ModelInformationItem.createInstance('Network role', "network role 1, network role 2"), ModelInformationItem.createInstance("Route target id", null), - ModelInformationItem.createInstance("Route target role", null) + ModelInformationItem.createInstance("Route target role", null), ]; expect(actualNetworkInfo).toEqual(expectedNetworkInfo); }); + test('When there is no max Max instances text is: Unlimited (default)', () => { + let actualVNFInfo = networkModel.getInfo({just:"not empty"},null); + const maxInstancesItem = actualVNFInfo.find((item)=> item.label == 'Max instances'); + expect(maxInstancesItem.values[0]).toEqual('Unlimited (default)'); + }); + function getNetworkModel() { return { "customizationUuid": "94fdd893-4a36-4d70-b16a-ec29c54c184f", diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/network/network.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/network/network.model.info.ts index 3ba4a2c4b..486ac93c0 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/network/network.model.info.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/network/network.model.info.ts @@ -7,10 +7,7 @@ import {SharedTreeService} from "../../shared.tree.service"; import {InputType} from "../../../../../shared/models/inputTypes"; import {NgRedux} from "@angular-redux/store"; import {AppState} from "../../../../../shared/store/reducers"; -import { - GenericFormPopupComponent, - PopupType -} from "../../../../../shared/components/genericFormPopup/generic-form-popup.component"; +import {GenericFormPopupComponent, PopupType} from "../../../../../shared/components/genericFormPopup/generic-form-popup.component"; import {DialogService} from "ng2-bootstrap-modal"; import {NetworkPopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/network/network.popup.service"; import * as _ from "lodash"; @@ -22,11 +19,7 @@ import {IframeService} from "../../../../../shared/utils/iframe.service"; import {SdcUiServices} from "onap-ui-angular"; import {DuplicateService} from "../../../duplicate/duplicate.service"; import {ServiceInstanceActions} from "../../../../../shared/models/serviceInstanceActions"; -import { - deleteActionNetworkInstance, - undoDeleteActionNetworkInstance, - updateNetworkPosition -} from "../../../../../shared/storeUtil/utils/network/network.actions"; +import {deleteActionNetworkInstance, undoDeleteActionNetworkInstance, updateNetworkPosition} from "../../../../../shared/storeUtil/utils/network/network.actions"; import {IModalConfig} from "onap-ui-angular/dist/modals/models/modal-config"; import {ComponentInfoType} from "../../../component-info/component-info-model"; import {ModelInformationItem} from "../../../../../shared/components/model-information/model-information.component"; @@ -265,10 +258,15 @@ export class NetworkModelInfo implements ILevelNodeInfo { } getInfo(model, instance): ModelInformationItem[] { - const modelInformation = !_.isEmpty(model) && !_.isEmpty(model.properties) ? [ - ModelInformationItem.createInstance("Network role", model.properties.network_role)] : []; - ModelInformationItem.createInstance("Min instances", !_.isNull(model.min) ? String(model.min) : null), - ModelInformationItem.createInstance("Max instances", !_.isNull(model.max) ? String(model.max) : null) + const modelInformation = !_.isEmpty(model) ? [ + ModelInformationItem.createInstance("Min instances", !_.isNull(model.min) ? String(model.min) : null), + this._sharedTreeService.createMaximumToInstantiateModelInformationItem(model) + ] : []; + + if (!_.isEmpty(model) && !_.isEmpty(model.properties)) { + modelInformation.push(ModelInformationItem.createInstance("Network role", model.properties.network_role)) + } + const instanceInfo = !_.isEmpty(instance) ? [ ModelInformationItem.createInstance("Route target id", instance.routeTargetId ? instance.routeTargetId : null), ModelInformationItem.createInstance("Route target role", instance.routeTargetRole ? instance.routeTargetRole : null)] : diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts index 225d84b4c..85e57613a 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts @@ -17,6 +17,8 @@ import {AaiService} from "../../../../../shared/services/aaiService/aai.service" import {HttpClient, HttpHandler} from "@angular/common/http"; import {FeatureFlagsService} from "../../../../../shared/services/featureFlag/feature-flags.service"; import {VfModuleUpgradePopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service"; +import {instance, mock, when} from "ts-mockito"; +import each from "jest-each"; class MockAppStore<T> { getState() { @@ -44,7 +46,8 @@ describe('VFModule Model Info', () => { let _vfModuleUpgradePopupService : VfModuleUpgradePopupService; let _iframeService : IframeService; let _componentInfoService : ComponentInfoService; - let _featureFlagsService : FeatureFlagsService; + let mockFeatureFlagsService: FeatureFlagsService = mock(FeatureFlagsService); + let mockFeatureFlagsServiceInstance: FeatureFlagsService = instance(mockFeatureFlagsService); beforeAll(done => (async () => { @@ -62,7 +65,7 @@ describe('VFModule Model Info', () => { AaiService, HttpClient, HttpHandler, - {provide: FeatureFlagsService, useClass: MockFeatureFlagsService}, + {provide: FeatureFlagsService, useValue: mockFeatureFlagsServiceInstance}, ComponentInfoService ] }); @@ -70,9 +73,9 @@ describe('VFModule Model Info', () => { injector = getTestBed(); _sharedTreeService = injector.get(SharedTreeService); - _componentInfoService = injector.get(ComponentInfoService) - _featureFlagsService = injector.get(FeatureFlagsService); - vfModuleModel = new VFModuleModelInfo(_dynamicInputsService, _sharedTreeService, _dialogService, _vfModulePopupService, _vfModuleUpgradePopupService, _iframeService,_featureFlagsService, MockNgRedux.getInstance(),_componentInfoService); + _componentInfoService = injector.get(ComponentInfoService); + vfModuleModel = new VFModuleModelInfo(_dynamicInputsService, _sharedTreeService, _dialogService, _vfModulePopupService, _vfModuleUpgradePopupService, + _iframeService, mockFeatureFlagsServiceInstance, MockNgRedux.getInstance(),_componentInfoService); })().then(done).catch(done.fail)); @@ -474,12 +477,39 @@ describe('VFModule Model Info', () => { let expectedVNFInfo = [ ModelInformationItem.createInstance('Base module', false), ModelInformationItem.createInstance('Min instances', "0"), - ModelInformationItem.createInstance("Max instances", null), + ModelInformationItem.createInstance("Max instances", 'Unlimited (default)'), ModelInformationItem.createInstance('Initial instances count',"0") ]; expect(actualVNFInfo).toEqual(expectedVNFInfo); }); + each([ + ["maxCountInstances 3, currentNodeCount 1, flag on",{maxCountInstances:3}, 1, {FLAG_2002_UNLIMITED_MAX: true}, false], + ["maxCountInstances 3, currentNodeCount 3, flag on",{maxCountInstances:3}, 3, {FLAG_2002_UNLIMITED_MAX: true}, true], + ["no maxCountInstances, currentNodeCount 0, flag off",{}, 0, {FLAG_2002_UNLIMITED_MAX: false}, false], + ["no maxCountInstances, currentNodeCount 1, flag off",{}, 1, {FLAG_2002_UNLIMITED_MAX: false}, true], + ["no maxCountInstances, currentNodeCount 1, no flags",{}, 1, null, true], + ["no maxCountInstances, currentNodeCount 0, flag on",{}, 0, {FLAG_2002_UNLIMITED_MAX: true}, false], + ["no maxCountInstances, currentNodeCount 1, flag on",{}, 1, {FLAG_2002_UNLIMITED_MAX: true}, false], + ["no maxCountInstances, currentNodeCount 1000, flag on",{}, 1000, {FLAG_2002_UNLIMITED_MAX: true}, false], + ]).test('isVFModuleReachedLimit: %s', (desc, properties, currentNodeCount, flags, expected) => { + + const node = { data: { + name : 'vfModuleName' + }}; + + const serviceHierarchy = { + servicedId :{ + vfModules : { + vfModuleName : { + properties + }}}}; + + when(mockFeatureFlagsService.getAllFlags()).thenReturn(flags); + + expect(vfModuleModel.isVFModuleReachedLimit(node, serviceHierarchy, 'servicedId', currentNodeCount)).toEqual(expected); + }); + function getVFModule(){ return { "uuid":"522159d5-d6e0-4c2a-aa44-5a542a12a830", 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 e182b8a6f..1e4a22c45 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 @@ -8,10 +8,7 @@ import {VfModuleInstance} from "../../../../../shared/models/vfModuleInstance"; import {VfModule} from "../../../../../shared/models/vfModule"; import {NgRedux} from "@angular-redux/store"; import {ITreeNode} from "angular-tree-component/dist/defs/api"; -import { - GenericFormPopupComponent, - PopupType -} from "../../../../../shared/components/genericFormPopup/generic-form-popup.component"; +import {GenericFormPopupComponent, PopupType} from "../../../../../shared/components/genericFormPopup/generic-form-popup.component"; import {DialogService} from "ng2-bootstrap-modal"; import {VfModulePopuopService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service"; import {AppState} from "../../../../../shared/store/reducers"; @@ -19,19 +16,13 @@ import {MessageBoxData} from "../../../../../shared/components/messageBox/messag import {MessageBoxService} from "../../../../../shared/components/messageBox/messageBox.service"; import {AvailableNodeIcons} from "../../../available-models-tree/available-models-tree.service"; import {IframeService} from "../../../../../shared/utils/iframe.service"; -import { - deleteActionVfModuleInstance, deleteVFModuleField, - removeVfModuleInstance, - undoDeleteVfModuleInstance, - undoUgradeVFModule, updateVFModuleField, - updateVFModulePosition, - upgradeVFModule -} from "../../../../../shared/storeUtil/utils/vfModule/vfModule.actions"; +import {deleteActionVfModuleInstance, deleteVFModuleField, removeVfModuleInstance, undoDeleteVfModuleInstance, undoUgradeVFModule, updateVFModulePosition, upgradeVFModule} from "../../../../../shared/storeUtil/utils/vfModule/vfModule.actions"; import {ComponentInfoService} from "../../../component-info/component-info.service"; import {ComponentInfoType} from "../../../component-info/component-info-model"; import {ModelInformationItem} from "../../../../../shared/components/model-information/model-information.component"; import {VfModuleUpgradePopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service"; import {FeatureFlagsService, Features} from "../../../../../shared/services/featureFlag/feature-flags.service"; +import {Utils} from "../../../../../shared/utils/utils"; export class VFModuleModelInfo implements ILevelNodeInfo { constructor(private _dynamicInputsService: DynamicInputsService, @@ -301,12 +292,16 @@ export class VFModuleModelInfo implements ILevelNodeInfo { } isVFModuleReachedLimit(node: any, serviceHierarchy: any, serviceModelId: string, currentNodeCount: number): boolean { - let maxNodes: number = 1; + const flags = this._featureFlagsService.getAllFlags(); let vnfModules = serviceHierarchy[serviceModelId].vfModules; - if (vnfModules[node.data.name]) { - maxNodes = vnfModules[node.data.name].properties.maxCountInstances || 1; + const maxInstances = vnfModules[node.data.name] + ? Utils.getMaxVfModule(vnfModules[node.data.name].properties, flags) + : null; + if (_.isNil(maxInstances)) { + return false; } - return !(maxNodes > currentNodeCount); + + return !(maxInstances > currentNodeCount); } getMenuAction(node: ITreeNode, serviceModelId: string): { [methodName: string]: { method: Function, visible: Function, enable: Function } } { @@ -423,7 +418,7 @@ export class VFModuleModelInfo implements ILevelNodeInfo { const modelInformation = !_.isEmpty(model) && !_.isEmpty(model.properties) ? [ ModelInformationItem.createInstance("Base module", model.properties.baseModule), ModelInformationItem.createInstance("Min instances", !_.isNull(model.properties.minCountInstances) ? String(model.properties.minCountInstances) : null), - ModelInformationItem.createInstance("Max instances", !_.isNull(model.properties.maxCountInstances) ? String(model.properties.maxCountInstances) : null), + this._sharedTreeService.createMaximumToInstantiateModelInformationItem(model), ModelInformationItem.createInstance("Initial instances count", !_.isNull(model.properties.initialCount) ? String(model.properties.initialCount) : null) ] : []; diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.spec.ts index d89280f0a..3ac6076dc 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.spec.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.spec.ts @@ -23,6 +23,7 @@ import {AaiService} from "../../../../../shared/services/aaiService/aai.service" import {HttpClient, HttpHandler} from "@angular/common/http"; import {FeatureFlagsService} from "../../../../../shared/services/featureFlag/feature-flags.service"; import {VfModuleUpgradePopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service"; + class MockFeatureFlagsService extends FeatureFlagsService{ getAllFlags(): { [p: string]: boolean } { return {}; @@ -467,6 +468,12 @@ describe('Vnf Model Info', () => { expect(actualVNFInfo).toEqual(expectedVNFInfo); }); + test('When there is no max Max instances text is: Unlimited (default)', () => { + let actualVNFInfo = vnfModel.getInfo({just:"not empty"},null); + const maxInstancesItem = actualVNFInfo.find((item)=> item.label == 'Max instances'); + expect(maxInstancesItem.values[0]).toEqual('Unlimited (default)'); + }); + function getVNFModel(){ return { "name":"VF_vGeraldine", 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 c1255f57c..a5a85c41a 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 @@ -9,10 +9,7 @@ import {SharedTreeService} from "../../shared.tree.service"; import {NgRedux} from "@angular-redux/store"; import {AppState} from "../../../../../shared/store/reducers"; import {DefaultDataGeneratorService} from "../../../../../shared/services/defaultDataServiceGenerator/default.data.generator.service"; -import { - GenericFormPopupComponent, - PopupType -} from "../../../../../shared/components/genericFormPopup/generic-form-popup.component"; +import {GenericFormPopupComponent, PopupType} from "../../../../../shared/components/genericFormPopup/generic-form-popup.component"; import {DialogService} from 'ng2-bootstrap-modal'; import {VnfPopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service"; import {VfModulePopuopService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service"; @@ -26,13 +23,7 @@ import {changeInstanceCounter, removeInstance} from "../../../../../shared/store import {MessageBoxData} from "../../../../../shared/components/messageBox/messageBox.data"; import {MessageBoxService} from "../../../../../shared/components/messageBox/messageBox.service"; import {ServiceInstanceActions} from "../../../../../shared/models/serviceInstanceActions"; -import { - deleteActionVnfInstance, - undoDeleteActionVnfInstance, - undoUpgradeVnf, - updateVnfPosition, - upgradeVnf -} from "../../../../../shared/storeUtil/utils/vnf/vnf.actions"; +import {deleteActionVnfInstance, undoDeleteActionVnfInstance, 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"; import {ComponentInfoType} from "../../../component-info/component-info-model"; @@ -326,8 +317,8 @@ export class VnfModelInfo implements ILevelNodeInfo { getInfo(model, instance): ModelInformationItem[] { const modelInformation = !_.isEmpty(model) ? [ - ModelInformationItem.createInstance("Min instances", !_.isNull(model.min) ? String(model.min) : null), - ModelInformationItem.createInstance("Max instances", !_.isNull(model.max) ? String(model.max) : null) + ModelInformationItem.createInstance("Min instances", !_.isNil(model.min) ? String(model.min) : null), + this._sharedTreeService.createMaximumToInstantiateModelInformationItem(model) ] : []; const instanceInfo = !_.isEmpty(instance) ? [ diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts index b330b72dc..504dc86bd 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts @@ -186,6 +186,14 @@ describe('Shared Tree Service', () => { "type": instanceTypeMock }); }); + each([ + ['undefined', 'Unlimited (default)', {}], + ['null', 'Unlimited (default)', {max:null}], + ['3', '3', {max:3}], + ]). + test("when there is %s max instances in model , shell return %s text", (desc, expected, model) =>{ + expect(service.createMaximumToInstantiateModelInformationItem(model).values[0]).toBe(expected); + }); test('shouldShowDeleteInstanceWithChildrfenModal should not open modal if all childs with action None', () => { let foo = () => { diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts index b8eddbbf7..7f5b6e33c 100644 --- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts +++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts @@ -14,6 +14,7 @@ import {undoUpgradeService, upgradeService} from "../../../shared/storeUtil/util import {VNFMethods} from "../../../shared/storeUtil/utils/vnf/vnf.actions"; import {FeatureFlagsService, Features} from "../../../shared/services/featureFlag/feature-flags.service"; import {Utils} from "../../../shared/utils/utils"; +import {Constants} from "../../../shared/utils/constants"; @Injectable() export class SharedTreeService { @@ -368,4 +369,11 @@ export class SharedTreeService { const modelInfoItemsWithoutEmpty = _.filter(modelInfoItems, function(item){ return !item.values.every(_.isNil)}); return new ComponentInfoModel(type, modelInfoItemsWithoutEmpty, [], instance != null); } + + createMaximumToInstantiateModelInformationItem(model): ModelInformationItem { + return ModelInformationItem.createInstance( + "Max instances", + !_.isNil(model.max) ? String(model.max) : Constants.ModelInfo.UNLIMITED_DEFAULT + ); + } } diff --git a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts index 4bfedd913..229beb443 100644 --- a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts +++ b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.service.ts @@ -13,6 +13,7 @@ import {Router, UrlTree} from "@angular/router"; import {of} from "rxjs"; import {MsoService} from "../shared/services/msoService/mso.service"; import {ServiceAction} from "../shared/models/serviceInstanceActions"; +import {InstantiationBase} from "../shared/models/serviceBase"; export let PENDING : string = "pending"; export let INPROGRESS : string = "in_progress"; @@ -112,21 +113,21 @@ export class InstantiationStatusComponentService { window.parent.location.assign('../../serviceModels.htm#/instantiate?' + query); } - navigateToNewViewEdit(item: ServiceInfoModel, mode: DrawingBoardModes): void{ + navigateToNewViewEdit(item: InstantiationBase, mode: DrawingBoardModes): void { this._store.dispatch(updateDrawingBoardStatus(mode)); const viewEditUrlTree:UrlTree = this.getNewViewEditUrlTree(item, mode); this._router.navigateByUrl(viewEditUrlTree); window.parent.location.assign(this.getViewEditUrl(viewEditUrlTree)); } - getNewViewEditUrlTree(item: ServiceInfoModel, mode: DrawingBoardModes): UrlTree { + getNewViewEditUrlTree(item: InstantiationBase, mode: DrawingBoardModes): UrlTree { return this._router.createUrlTree( ['/servicePlanning/' + mode], { queryParams: mode==DrawingBoardModes.RECREATE ? this.getRecreateQueryParams(item) : - this.getDefaultViewEditQueryParams(item) + this.getDefaultViewEditQueryParams(<ServiceInfoModel> item) }); } @@ -140,7 +141,7 @@ export class InstantiationStatusComponentService { }; } - private getRecreateQueryParams(item: ServiceInfoModel) { + private getRecreateQueryParams(item: InstantiationBase) { return { serviceModelId: item.serviceModelId, jobId: item.jobId diff --git a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts index 58227c9eb..4f84b7125 100644 --- a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts +++ b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.ts @@ -59,8 +59,8 @@ export class InstantiationStatusComponent implements OnInit { visible: () => true, }, { - name: "Recreate", - dataTestId: "context-menu-recreate", + name: "Create another one", + dataTestId: "context-menu-create-another-one", className: "fa-clone", click: (item: ServiceInfoModel) => this.instantiationStatusComponentService.recreate(item), enabled: (item: ServiceInfoModel) => this.instantiationStatusComponentService.isRecreateEnabled(item), diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html index f9da42607..f9a11eab1 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html @@ -61,7 +61,7 @@ (click)="openTemplateModal()" ><span>Template</span></button> <button - *ngIf=isInstantiationStatusFilterFlagOn() + *ngIf="isShowPreviousInstantiationBtn" [attr.data-tests-id]="'ShowPreviousInstancesButton'" type="button" class="btn btn-success submit" (click)="formPopupDetails.onOtherAction(formPopupDetails.that, dynamicForm)"> diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.scss b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.scss index 5057b44a5..18416dae6 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.scss +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.scss @@ -134,7 +134,7 @@ $grid-border: 1px #d2d2d2 solid; } .submit { - width: 120px; + min-width: 120px; height: 36px; background: #009fdb; border-radius: 2px; diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts index 159871f45..3939e44ff 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts @@ -46,6 +46,7 @@ export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole type: PopupType; uuidData: UUIDData; showTemplateBtn: boolean = false; + isShowPreviousInstantiationBtn: boolean = false; isUpdateMode: boolean; node: ITreeNode = null; hasGeneralApiError: boolean = false; @@ -85,29 +86,7 @@ export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole .subscribe(params => { console.log('changed'); if (params['serviceModelId'] && params['isCreate'] == "true") { - this._genericFormPopupService.initReduxOnCreateNewService().then((serviceModelId: string) => { - this.uuidData = <any>{ - bulkSize: 1, - isMacro: this._store.getState().service.serviceHierarchy[serviceModelId].service.vidNotions.instantiationType === 'Macro', - type: PopupType.SERVICE, - serviceId: serviceModelId, - popupService: this._servicePopupService, - }; - this.showTemplateBtn = !!this._store.getState().global.flags["FLAG_2004_INSTANTIATION_TEMPLATES_POPUP"]; - - this.uuidData.popupService.closeDialogEvent.subscribe((that) => { - this.closeDialog(that); - }); - - this.formPopupDetails = this.uuidData.popupService.getGenericFormPopupDetails( - this.uuidData['serviceId'], - null, - null, - this.node, - this.uuidData, - false - ); - }); + this.onInitForCreateNewServicePopup(); } }); @@ -125,6 +104,34 @@ export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole } } + private onInitForCreateNewServicePopup() { + this._genericFormPopupService.initReduxOnCreateNewService().then((serviceModelId: string) => { + this.uuidData = <any>{ + bulkSize: 1, + isMacro: this._store.getState().service.serviceHierarchy[serviceModelId].service.vidNotions.instantiationType === 'Macro', + type: PopupType.SERVICE, + serviceId: serviceModelId, + popupService: this._servicePopupService, + }; + this.showTemplateBtn = !!this._store.getState().global.flags["FLAG_2004_INSTANTIATION_TEMPLATES_POPUP"]; + + this.isShowPreviousInstantiationBtn = !!this._store.getState().global.flags["FLAG_2004_TEMP_BUTTON_TO_INSTANTIATION_STATUS_FILTER"]; + + this.uuidData.popupService.closeDialogEvent.subscribe((that) => { + this.closeDialog(that); + }); + + this.formPopupDetails = this.uuidData.popupService.getGenericFormPopupDetails( + this.uuidData['serviceId'], + null, + null, + this.node, + this.uuidData, + false + ); + }); + } + hasSomeError(formPopupDetails: FormPopupDetails, form: FormGroup): boolean { if (_.isNil(formPopupDetails)) return false; else { @@ -148,9 +155,6 @@ export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole this._dialogService.addDialog(InstantiationTemplatesModalComponent, {}); } - isInstantiationStatusFilterFlagOn() { - return FeatureFlagsService.getFlagState(Features.FLAG_2004_TEMP_BUTTON_TO_INSTANTIATION_STATUS_FILTER, this._store); - } } diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.spec.ts index a3c83263c..ebabc89b7 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.spec.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.spec.ts @@ -2032,4 +2032,8 @@ describe('Basic popup service', () => { }, 'modelType', 'modelName'); expect(result).toBeUndefined(); }); + + test('when there is no max instances in model , shell return maximum item with Unlimited text', () =>{ + expect(service.createMaximumToInstantiateModelInformationItem({}).values[0]).toEqual('Unlimited (default)'); + }); }); diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.ts index c18b20d7e..f8b40dd99 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/basic.popup.service.ts @@ -11,6 +11,8 @@ import {VfModule} from "../../../models/vfModule"; import {VNFModel} from "../../../models/vnfModel"; import {VnfGroupModel} from "../../../models/vnfGroupModel"; import {FeatureFlagsService} from "../../../services/featureFlag/feature-flags.service"; +import {ModelInformationItem} from "../../model-information/model-information.component"; +import {Constants} from "../../../utils/constants"; @Injectable() export class BasicPopupService { @@ -38,7 +40,7 @@ export class BasicPopupService { return new VNFModel(rawModel, flags); } case 'vfModules' : { - return new VfModule(rawModel); + return new VfModule(rawModel, flags); } case 'networks' : { return new NetworkModel(rawModel, flags); @@ -53,4 +55,14 @@ export class BasicPopupService { let dynamic = this._defaultDataGeneratorService.getArbitraryInputs(this._store.getState().service.serviceHierarchy[serviceId][type][modelName].inputs); return this._basicControlGenerator.getDynamicInputsByType(dynamic, serviceId, storeKey, type ); } + + createMaximumToInstantiateModelInformationItem(model): ModelInformationItem { + return new ModelInformationItem( + "Maximum to instantiate", + "max", + [!_.isNil(model.max) ? model.max.toString() : Constants.ModelInfo.UNLIMITED_DEFAULT], + "", + true + ); + } } diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service.ts index 20336e5eb..3119cc8f8 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service.ts @@ -81,7 +81,7 @@ export abstract class VfModulePopupServiceBase { new ModelInformationItem("Service type", "serviceType", [this.serviceModel.serviceType]), new ModelInformationItem("Service role", "serviceRole", [this.serviceModel.serviceRole]), new ModelInformationItem("Minimum to instantiate", "min", this.model.min == undefined ? ['0'] : [this.model.min.toString()], "", true), - new ModelInformationItem("Maximum to instantiate", "max", this.model.max == undefined ? ['1'] : [this.model.max.toString()], "", true), + this._basicPopupService.createMaximumToInstantiateModelInformationItem(this.model), new ModelInformationItem("Recommended to instantiate", "initial", [this.model.initial]) ]; }); diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.ts index b23f74530..3e117ca74 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.ts @@ -96,8 +96,8 @@ export class VnfPopupService implements GenericPopupInterface{ new ModelInformationItem("Invariant UUID", "invariantUuid", [this.model.invariantUuid], Constants.ServicePopup.TOOLTIP_INVARIANT_UUID, true), new ModelInformationItem("Service type", "serviceType", [this.serviceModel.serviceType]), new ModelInformationItem("Service role", "serviceRole", [this.serviceModel.serviceRole]), - new ModelInformationItem("Minimum to instantiate", "vnf-min", [!_.isNil(this.model.min) ? this.model.min.toString() : '0'], "", false), - new ModelInformationItem("Maximum to instantiate", "vnf-max", [!_.isNil(this.model.max) ? this.model.max.toString() : '1'], "", false) + new ModelInformationItem("Minimum to instantiate", "min", [!_.isNil(this.model.min) ? this.model.min.toString() : '0'], "", false), + this._basicPopupService.createMaximumToInstantiateModelInformationItem(this.model) ]; }) } diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html index c231c6081..86c46ab3b 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html @@ -23,12 +23,15 @@ </div> </div> <div class="col-md-6"> - <input - (keypress)="onFilterKeypress($event)" - class="filter-input form-control input-text" - placeholder="Filter..."> + <div class="col-md-6"> + </div> + <div class="col-md-6"> + <input + class="filter-input form-control input-text" + placeholder="Filter..." + [(ngModel)]="filterText"> + </div> </div> - </div> <div class="row" style="margin-left: 0;margin-right: 0;padding: 20px;"> <table id="member-table" class="table table-bordered" style="table-layout: fixed"> @@ -37,7 +40,7 @@ <th class="header-title" id="header-userId">User ID</th> <th class="header-title" id="header-createDate" style="width: 21ch;">Date</th> <th class="header-title" id="header-instanceName" style="max-width: 50ch;">Instance Name</th> - <th class="header-title" id="header-instantiationStatus">Instantiation Status</th> + <th class="header-title" id="header-instantiationStatus" style="width: 30ch;">Instantiation Status</th> <th class="header-title" id="header-summary">Summary</th> <th class="header-title" id="header-region">Region</th> <th class="header-title" id="header-tenant">Tenant</th> @@ -46,9 +49,9 @@ </thead> <tbody> <tr class="member-table-row" - *ngFor="let item of filterTableData;" - (click)="selectedJobId = item.jobId" - [ngClass]="{'selected' : selectedJobId === item.jobId}" + *ngFor="let item of filterTableData | searchFilter: filterText ;" + (click)="selectedInstantiation = item" + [ngClass]="{'selected' : selectedInstantiation && selectedInstantiation.jobId === item.jobId}" [attr.data-tests-id]="'row-' + item.jobId"> <td> <div> @@ -145,7 +148,7 @@ </div> <div class="col-md-6" style="padding: 15px;padding-right: 35px;"> <button - [disabled]="selectedJobId === null" + [disabled]="selectedInstantiation && selectedInstantiation.jobId === null" [attr.data-tests-id]="'LoadTemplateButton'" type="button" class="btn btn-primary submit" (click)="loadTemplate()"><span>Load Template</span> diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.scss b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.scss index ef8d01a75..267d2cee0 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.scss +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.scss @@ -166,7 +166,11 @@ $grid-border: 1px #d2d2d2 solid; .filter-input { float: right; - width: 25%; + width: 50%; + } + + .details-item { + text-align: right; } @@ -187,6 +191,6 @@ $grid-border: 1px #d2d2d2 solid; } .member-table-row.selected { - background: #009fdbb5 !important; + background: #8080808f !important; } } diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts index 56abe5b4c..7b16b6677 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts @@ -5,6 +5,8 @@ import {ActivatedRoute} from "@angular/router"; import {ServiceInfoService} from "../../../server/serviceInfo/serviceInfo.service"; import {InstantiationTemplatesModalService} from "./instantiation.templates.modal.service"; import {InstantiationTemplatesRowModel} from "./instantiation.templates.row.model"; +import {DrawingBoardModes} from "../../../../drawingBoard/service-planning/drawing-board.modes"; +import {InstantiationStatusComponentService} from "../../../../instantiationStatus/instantiationStatus.component.service"; @Component({ selector: 'template-modal', @@ -14,21 +16,24 @@ import {InstantiationTemplatesRowModel} from "./instantiation.templates.row.mode export class InstantiationTemplatesModalComponent extends DialogComponent<string, boolean> implements OnInit, OnDestroy { - selectedJobId : string = null; + selectedInstantiation: InstantiationTemplatesRowModel = null; templateModalComponentService: InstantiationTemplatesModalService; originalTableData: InstantiationTemplatesRowModel[] = []; filterTableData : InstantiationTemplatesRowModel[] = []; + filterText: string; constructor(dialogService: DialogService, private _iframeService: IframeService, private _serviceInfoService: ServiceInfoService, private _templateModalComponentService: InstantiationTemplatesModalService, + private _instantiationStatusComponentService: InstantiationStatusComponentService, private _route: ActivatedRoute) { super(dialogService); this.templateModalComponentService = _templateModalComponentService; } ngOnInit(): void { + this.filterText = ''; this._route .queryParams .subscribe(params => { @@ -40,16 +45,17 @@ export class InstantiationTemplatesModalComponent extends DialogComponent<string } loadTemplate = () => { + this._instantiationStatusComponentService.navigateToNewViewEdit(this.selectedInstantiation, DrawingBoardModes.RECREATE) }; - onFilterKeypress = (event : KeyboardEvent) => { - //event.target.value - console.log(event.altKey); - }; - closeModal(): void { + this._iframeService.removeClassCloseModal('content'); this.dialogService.removeDialog(this); + setTimeout(() => { + window.parent.postMessage("closeIframe", "*"); + }, 15); + } } diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.ts index 7126da36a..8377ccf42 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.service.ts @@ -3,6 +3,7 @@ import {InstantiationTemplatesRowModel} from "./instantiation.templates.row.mode @Injectable() export class InstantiationTemplatesModalService { + convertResponseToUI = (jobsResponse: any[]): InstantiationTemplatesRowModel[] => { let tableRows: InstantiationTemplatesRowModel[] = []; @@ -12,4 +13,5 @@ export class InstantiationTemplatesModalService { return tableRows; }; + } diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.row.model.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.row.model.ts index 08982cc67..f4609ee35 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.row.model.ts +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.row.model.ts @@ -1,8 +1,8 @@ import * as moment from 'moment'; import * as _ from 'lodash'; +import {InstantiationBase} from "../../../models/serviceBase"; -export class InstantiationTemplatesRowModel { - readonly jobId: string; +export class InstantiationTemplatesRowModel extends InstantiationBase{ readonly userId ?: string; readonly createDate ?: string; readonly instanceName ?: string; @@ -13,7 +13,7 @@ export class InstantiationTemplatesRowModel { readonly aicZone?: string; constructor(data) { - this.jobId = data.jobId; + super(data); this.userId = !_.isNil(data.created) ? data.userId : null; this.createDate = !_.isNil(data.created) ? moment(data.created).format("YYYY-MM-DD HH:mm:ss") : null; this.instanceName = this.getInstanceName(data.serviceInstanceName); @@ -22,7 +22,6 @@ export class InstantiationTemplatesRowModel { this.region = this.getRegion(data.regionId, data.owningEntityName); this.tenant = !_.isNil(data.tenantName) ? data.tenantName : null; this.aicZone = !_.isNil(data.aicZoneName) ? data.aicZoneName : null; - } diff --git a/vid-webpack-master/src/app/shared/models/serviceBase.ts b/vid-webpack-master/src/app/shared/models/serviceBase.ts new file mode 100644 index 000000000..afa8a8136 --- /dev/null +++ b/vid-webpack-master/src/app/shared/models/serviceBase.ts @@ -0,0 +1,11 @@ +export class InstantiationBase { + readonly jobId: string; + readonly serviceModelId: string; + + constructor(data?) { + if(data){ + this.jobId = data.jobId; + this.serviceModelId = data.serviceModelId; + } + } +} diff --git a/vid-webpack-master/src/app/shared/models/vfModule.ts b/vid-webpack-master/src/app/shared/models/vfModule.ts index c75202124..8f92ba428 100644 --- a/vid-webpack-master/src/app/shared/models/vfModule.ts +++ b/vid-webpack-master/src/app/shared/models/vfModule.ts @@ -1,4 +1,5 @@ import {NodeModel, NodeModelResponseInterface} from "./nodeModel"; +import {Utils} from "../utils/utils"; export interface Properties{ @@ -23,7 +24,7 @@ export class VfModule extends NodeModel { modelCustomizationName: string; volumeGroupAllowed : boolean; - constructor(vf?: VFModuleResponseInterface) { + constructor(vf?: VFModuleResponseInterface, flags?: { [key: string]: boolean }) { super(vf); if(vf){ this.customizationUuid = vf.customizationUuid; @@ -32,7 +33,7 @@ export class VfModule extends NodeModel { } if (vf && vf.properties) { this.min = vf.properties.minCountInstances; - this.max = vf.properties.maxCountInstances; + this.max = Utils.getMaxVfModule(vf.properties, flags); this.initial = vf.properties.initialCount; this.rollbackOnFailure = true } diff --git a/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.model.ts b/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.model.ts index a507e073e..fa26a61a6 100644 --- a/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.model.ts +++ b/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.model.ts @@ -1,7 +1,8 @@ import {ServiceStatus} from '../../../instantiationStatus/instantiationStatus.component.service'; import {ServiceAction} from "../../models/serviceInstanceActions"; +import {InstantiationBase} from "../../models/serviceBase"; -export class ServiceInfoModel { +export class ServiceInfoModel extends InstantiationBase{ id: number; created: Date; modified: Date; @@ -28,12 +29,10 @@ export class ServiceInfoModel { subscriberId: string; serviceInstanceId: string; serviceInstanceName: string; - serviceModelId: string; serviceModelName: string; serviceModelVersion: string; templateId: string; auditUserId: string; - jobId: string; action: ServiceAction; isRetryEnabled: boolean; } diff --git a/vid-webpack-master/src/app/shared/utils/constants.ts b/vid-webpack-master/src/app/shared/utils/constants.ts index 4f11cd1be..f793e05db 100644 --- a/vid-webpack-master/src/app/shared/utils/constants.ts +++ b/vid-webpack-master/src/app/shared/utils/constants.ts @@ -297,4 +297,8 @@ export module Constants { export class LegacyRegion { public static MEGA_REGION = ['AAIAIC25']; } + + export class ModelInfo { + public static UNLIMITED_DEFAULT = 'Unlimited (default)'; + } } |