summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/release-notes.rst39
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js2
-rw-r--r--vid-automation/src/test/resources/asyncInstantiation/templates__instance_template.json8
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts34
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts2
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts2
-rw-r--r--vid-webpack-master/cypress/support/elements/element.input.actions.ts2
-rw-r--r--vid-webpack-master/src/app/app.routing.ts8
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-header/drawing-board-header.service.ts2
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.spec.ts7
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts19
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html2
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.scss2
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts56
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.spec.ts4
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.ts12
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html17
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.scss8
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts12
-rw-r--r--vid-webpack-master/src/app/shared/utils/constants.ts4
20 files changed, 167 insertions, 75 deletions
diff --git a/docs/release-notes.rst b/docs/release-notes.rst
index 03f2a6edf..58fd74b8d 100644
--- a/docs/release-notes.rst
+++ b/docs/release-notes.rst
@@ -3,22 +3,41 @@
VID Release Notes
=================
+Version: El-Alto (6.0.x)
+------------------------
+**Known Issues**
+
+
+**Resolved Issues**
+
+
+**Security Notes**
+
+*Fixed Security Issues*
+
+*Known Security Issues*
+
+
+
Version: El-Alto (5.0.x)
---------------
+------------------------
+**Known Issues**
+
+ - `↗ <https://jira.onap.org/browse/VID-659>`__ VID generates always the same VF module name during scale out
**Resolved Issues**
- - `↗ <https://jira.onap.org/browse/VID-520>`_ Remove "Dissociate" button for Macro-orchestrated PNF resources
- - `↗ <https://jira.onap.org/browse/VID-517>`_ Added liquidBase for follow changes in DB
- - `↗ <https://jira.onap.org/browse/VID-488>`_ Added "Report" popup for common diagnosable cases
- - `↗ <https://jira.onap.org/browse/VID-358>`_ vid-mariadb-galera runs in high-availability mode
+ - `↗ <https://jira.onap.org/browse/VID-520>`__ Remove "Dissociate" button for Macro-orchestrated PNF resources
+ - `↗ <https://jira.onap.org/browse/VID-517>`__ Added liquidBase for follow changes in DB
+ - `↗ <https://jira.onap.org/browse/VID-488>`__ Added "Report" popup for common diagnosable cases
+ - `↗ <https://jira.onap.org/browse/VID-358>`__ vid-mariadb-galera runs in high-availability mode
**Security Notes**
*Fixed Security Issues*
- - `↗ <https://jira.onap.org/browse/OJSI-119>`_ Closed plain-text HTTP endpoint, port 30238
+ - `↗ <https://jira.onap.org/browse/OJSI-119>`__ Closed plain-text HTTP endpoint, port 30238
*Known Security Issues*
@@ -126,9 +145,9 @@ VID code has been formally scanned during build time using NexusIQ and all Criti
Quick Links:
-- `VID project page <https://wiki.onap.org/display/DW/Virtual+Infrastructure+Deployment+Project>`_
-- `Passing Badge information for VID <https://bestpractices.coreinfrastructure.org/en/projects/1658>`_
-- `Project Vulnerability Review Table for VID <https://wiki.onap.org/pages/viewpage.action?pageId=45300871>`_
+- `VID project page <https://wiki.onap.org/display/DW/Virtual+Infrastructure+Deployment+Project>`__
+- `Passing Badge information for VID <https://bestpractices.coreinfrastructure.org/en/projects/1658>`__
+- `Project Vulnerability Review Table for VID <https://wiki.onap.org/pages/viewpage.action?pageId=45300871>`__
**Other**
@@ -281,7 +300,7 @@ New Features
**Security Notes**
-VID code has been formally scanned during build time using NexusIQ and all Critical vulnerabilities have been addressed, items that remain open have been assessed for risk and determined to be false positive. The VID open Critical security vulnerabilities and their risk assessment have been documented as part of the `project <https://wiki.onap.org/pages/viewpage.action?pageId=28378623>`_.
+VID code has been formally scanned during build time using NexusIQ and all Critical vulnerabilities have been addressed, items that remain open have been assessed for risk and determined to be false positive. The VID open Critical security vulnerabilities and their risk assessment have been documented as part of the `project <https://wiki.onap.org/pages/viewpage.action?pageId=28378623>`__.
Quick Links:
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js b/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js
index ba9f0f533..9cdd5ceb9 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js
@@ -197,6 +197,7 @@ appDS2
WELCOME_PATH: "welcome.htm",
IS_PERMITTED_SUB_PATH: "&isPermitted=",
SERVICE_POPUP_IFRAME_URL: "app/ui/#/servicePopup?serviceModelId=",
+ INSTANTIATION_TEMPLATES_IFRAME_URL: "app/ui/#/instantiationTemplatesPopup?serviceModelId=",
SUB_INTERFACE_POPUP_IFRAME_URL: "app/ui/#/vlan?",
VERIFY_SERVICE_URL: "rest/models/services/verifyService",
@@ -264,6 +265,7 @@ appDS2
FLAG_FLASH_REPLACE_VF_MODULE: "FLAG_FLASH_REPLACE_VF_MODULE",
FLAG_FLASH_MORE_ACTIONS_BUTTON_IN_OLD_VIEW_EDIT: "FLAG_FLASH_MORE_ACTIONS_BUTTON_IN_OLD_VIEW_EDIT",
FLAG_SHOW_ORCHESTRATION_TYPE: "FLAG_SHOW_ORCHESTRATION_TYPE",
+ FLAG_2004_INSTANTIATION_TEMPLATES_POPUP : "FLAG_2004_INSTANTIATION_TEMPLATES_POPUP"
}
};
diff --git a/vid-automation/src/test/resources/asyncInstantiation/templates__instance_template.json b/vid-automation/src/test/resources/asyncInstantiation/templates__instance_template.json
index a8417e3a9..83f4cbda1 100644
--- a/vid-automation/src/test/resources/asyncInstantiation/templates__instance_template.json
+++ b/vid-automation/src/test/resources/asyncInstantiation/templates__instance_template.json
@@ -42,7 +42,7 @@
"modelVersion": "1.0"
},
"productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "instanceName": "zolson57arlba007",
+ "instanceName": "hvf6arlba007",
"action": "Create",
"platformName": "xxx1",
"lcpCloudRegionId": "hvf6",
@@ -64,7 +64,7 @@
"modelType": "vfModule",
"modelVersion": "1"
},
- "instanceName": "zolson57arlba007_lba_Base_01",
+ "instanceName": "hvf6arlba007_lba_Base_01",
"action": "Create",
"lcpCloudRegionId": "hvf6",
"tenantId": "4914ab0ab3a743e58f0eefdacc1dde77",
@@ -87,7 +87,7 @@
"modelType": "vfModule",
"modelVersion": "1"
},
- "instanceName": "zolson57arlba007_lba_dj_01",
+ "instanceName": "hvf6arlba007_lba_dj_01",
"action": "Create",
"lcpCloudRegionId": "hvf6",
"tenantId": "4914ab0ab3a743e58f0eefdacc1dde77",
@@ -97,7 +97,7 @@
"rollbackOnFailure": true,
"trackById": "b134410e-3bc0-478e-883e-1b6bdf8a28df",
"isFailed": false,
- "volumeGroupInstanceName": "zolson57arlba007_lba_dj_01_vol",
+ "volumeGroupInstanceName": "hvf6arlba007_lba_dj_01_vol",
"usePreload": true
}
}
diff --git a/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
index afad68747..8f76908b9 100644
--- a/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
@@ -37,13 +37,45 @@ describe('Drawing Board: Instantiation Templates', function () {
// Then...
cy.drawingBoardTreeOpenContextMenuByElementDataTestId("node-21ae311e-432f-4c54-b855-446d0b8ded72-vProbe_NC_VNF 0")
.drawingBoardTreeClickOnContextMenuOptionByName('Edit')
+ .getElementByDataTestsId("instanceName").should('have.value', 'hvf6arlba007')
+ .getElementByDataTestsId("productFamily").should('contain', 'Emanuel')
+ .getElementByDataTestsId("tenant").should('contain', 'DN5242-Nov21-T1')
.getElementByDataTestsId("lcpRegion").should('contain', 'hvf6')
+ .getElementByDataTestsId("lineOfBusiness").should('contain', 'zzz1')
+ .getElementByDataTestsId("rollback").should('contain', 'Rollback')
+
+
+ .getElementByDataTestsId("cancelButton").click();
+
+ cy.drawingBoardTreeOpenContextMenuByElementDataTestId("node-c5b26cc1-a66f-4b69-aa23-6abc7c647c88-vprobe_nc_vnf0..VprobeNcVnf..FE_base_module..module-0")
+ .drawingBoardTreeClickOnContextMenuOptionByName('Edit')
+ .getElementByDataTestsId("instanceName").should('have.value', 'hvf6arlba007_lba_Base_01')
+ .getElementByDataTestsId("lcpRegion").should('contain', 'hvf6')
+ .getElementByDataTestsId("tenant").should('contain', 'DN5242-Nov21-T1')
+ .getElementByDataTestsId("rollback").should('contain', 'Rollback')
+
.getElementByDataTestsId("cancelButton").click();
+ cy.drawingBoardTreeOpenContextMenuByElementDataTestId("node-c09e4530-8fd8-418f-9483-2f57ce927b05-vprobe_nc_vnf0..VprobeNcVnf..FE_Add_On_Module_vlbagent_eph..module-1")
+ .drawingBoardTreeClickOnContextMenuOptionByName('Edit')
+ .getElementByDataTestsId("lcpRegion").should('contain', 'hvf6')
+ .getElementByDataTestsId("tenant").should('contain', 'DN5242-Nov21-T1')
+ .getElementByDataTestsId("rollback").should('contain', 'Rollback')
+ .getElementByDataTestsId("cancelButton").click();
+
+
+
assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd();
});
- });
+ it(`Edit the service`, function () {
+
+ loadDrawingBoardWithRecreateMode();
+
+ cy.openServiceContextMenu()
+ .getElementByDataTestsId("context-menu-header-edit-item").click({force : true})
+ });
+ });
});
});
diff --git a/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts
index d77460a69..59e15d325 100644
--- a/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts
@@ -331,7 +331,7 @@ describe('View only drawing board', function () {
['Model version', '2.0'],
['Model customization ID', '91415b44-753d-494c-926a-456a9172bbb9'],
['Min instances', '0'],
- //['Max instances', '1']
+ ['Max instances', 'Unlimited (default)']
];
const extraLabelsAndValuesForInstance = [['Instance type', 'VNF2_INSTANCE_TYPE'],['In maintenance','true'], ['Instance ID', 'VNF2_INSTANCE_ID']];
testComponentInfoByType('node-VF_vGeraldine 0', labelsAndValuesForModel,'VNF INFO',
diff --git a/vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts
index b1adff1e5..41ab83399 100644
--- a/vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts
@@ -66,7 +66,7 @@ describe('Vnf popup', function () {
cy.getElementByDataTestsId('model-item-label-vnf-min').contains('Minimum to instantiate');
cy.getElementByDataTestsId('model-item-value-vnf-min').contains('0');
cy.getElementByDataTestsId('model-item-label-vnf-max').contains('Maximum to instantiate');
- cy.getElementByDataTestsId('model-item-value-vnf-max').contains('1');
+ cy.getElementByDataTestsId('model-item-value-vnf-max').contains('Unlimited (default)');
})
});
diff --git a/vid-webpack-master/cypress/support/elements/element.input.actions.ts b/vid-webpack-master/cypress/support/elements/element.input.actions.ts
index 4e6b5e879..b52a35ede 100644
--- a/vid-webpack-master/cypress/support/elements/element.input.actions.ts
+++ b/vid-webpack-master/cypress/support/elements/element.input.actions.ts
@@ -42,7 +42,7 @@ function focusInput(id : string) : void {
test if input with id contains some text
****************************************/
function shouldInputContainsText(id : string, text : string) : void {
- cy.getElementByDataTestsId(id).contains('text')
+ cy.getElementByDataTestsId(id).contains(text)
}
Cypress.Commands.add('typeToInput', typeToInput);
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/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..ff86925f1 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";
@@ -40,6 +31,7 @@ import {ComponentInfoService} from "../../../component-info/component-info.servi
import {ModelInformationItem} from "../../../../../shared/components/model-information/model-information.component";
import {VfModuleUpgradePopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service";
import {FeatureFlagsService} from "../../../../../shared/services/featureFlag/feature-flags.service";
+import {Constants} from "../../../../../shared/utils/constants";
export class VnfModelInfo implements ILevelNodeInfo {
constructor(private _dynamicInputsService: DynamicInputsService,
@@ -326,8 +318,9 @@ 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),
+ ModelInformationItem.createInstance("Max instances", !_.isNil(model.max) ? String(model.max) :
+ Constants.ModelInfo.UNLIMITED_DEFAULT)
] : [];
const instanceInfo = !_.isEmpty(instance) ? [
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/vnf/vnf.popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.spec.ts
index 2f1904468..c4317f241 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.spec.ts
@@ -2334,6 +2334,10 @@ describe('vnf new popup service', () => {
expect(service.modelInformations[13].values).toEqual(['5']);
});
+ test('when there is no max instances in model , shell return maximum item with Unlimited text', () =>{
+ expect(service.createMaximumToInstantiateModelInformationItem({}).values[0]).toEqual('Unlimited (default)');
+ });
+
test('getSubLeftTitle new vnf popup should return service model name', () => {
service.uuidData = {
serviceId: '6e59c5de-f052-46fa-aa7e-2fca9d674c44',
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..283603275 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
@@ -97,11 +97,21 @@ export class VnfPopupService implements GenericPopupInterface{
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)
+ (this.createMaximumToInstantiateModelInformationItem(this.model))
];
})
}
+ createMaximumToInstantiateModelInformationItem(model) {
+ return new ModelInformationItem(
+ "Maximum to instantiate",
+ "vnf-max",
+ [!_.isNil(model.max) ? model.max.toString() : Constants.ModelInfo.UNLIMITED_DEFAULT],
+ "",
+ false
+ );
+ }
+
getSubLeftTitle(): string {
return "VNF MODEL: " + this._store.getState().service.serviceHierarchy[this.uuidData['serviceId']].vnfs[this.uuidData['modelName']].name;
}
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..19f641a56 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,7 +49,7 @@
</thead>
<tbody>
<tr class="member-table-row"
- *ngFor="let item of filterTableData;"
+ *ngFor="let item of filterTableData | searchFilter: filterText ;"
(click)="selectedJobId = item.jobId"
[ngClass]="{'selected' : selectedJobId === item.jobId}"
[attr.data-tests-id]="'row-' + item.jobId">
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..4d89750f9 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
@@ -18,6 +18,7 @@ export class InstantiationTemplatesModalComponent extends DialogComponent<string
templateModalComponentService: InstantiationTemplatesModalService;
originalTableData: InstantiationTemplatesRowModel[] = [];
filterTableData : InstantiationTemplatesRowModel[] = [];
+ filterText: string;
constructor(dialogService: DialogService,
private _iframeService: IframeService,
@@ -29,6 +30,7 @@ export class InstantiationTemplatesModalComponent extends DialogComponent<string
}
ngOnInit(): void {
+ this.filterText = '';
this._route
.queryParams
.subscribe(params => {
@@ -44,12 +46,12 @@ export class InstantiationTemplatesModalComponent extends DialogComponent<string
};
- 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/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)';
+ }
}