From ba6de666a6bc7860cb272bc9f4357e8c0f188e85 Mon Sep 17 00:00:00 2001 From: "Sonsino, Ofir (os0695)" Date: Sun, 22 Apr 2018 17:51:39 +0300 Subject: Scale out use case Change-Id: If0d42935185d3e4393a2607916c3046b4ebe41c6 Issue-ID: VID-188 Signed-off-by: Sonsino, Ofir (os0695) --- .../new-change-management.controller.js | 28 +++- .../new-change-management.css | 171 +++++++++++++++++++++ .../new-change-management.html | 57 ++++++- 3 files changed, 251 insertions(+), 5 deletions(-) create mode 100644 vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.css (limited to 'vid-app-common/src/main/webapp/app/vid/scripts/modals') diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js index 2444646f..e337a527 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js @@ -9,6 +9,16 @@ var vm = this; vm.configUpdatePatternError = "Invalid file type. Please select a file with a CSV extension."; vm.configUpdateContentError = "Invalid file structure."; + vm.controllers = VIDCONFIGURATION.SCALE_OUT_CONTROLLERS; + vm.wizardStep = 1; + vm.nextStep = function(){ + vm.wizardStep++; + $(".modal-dialog").animate({"width":"1000px"},400,'linear'); + }; + vm.prevStep = function(){ + vm.wizardStep--; + $(".modal-dialog").animate({"width":"6000px"},400,'linear'); + }; vm.softwareVersionRegex = "[-a-zA-Z0-9\.]+"; @@ -49,6 +59,7 @@ _.each(response.data.vnfs, function (vnf) { if (newVNFName["invariant-id"] === vnf.invariantUuid) { availableVersions.push(extractVNFModel(vnf, response.data.service, newVNFName)); + newVNFName.vfModules = vnf.vfModules; } }); var versions = _.uniqBy(availableVersions, 'modelInfo.modelVersion'); @@ -132,7 +143,7 @@ }; - /***converting objects to scheduler format (taken from IST)***/ + /***converting objects to scheduler format (taken from IST) - was altered for Scale out support ***/ function extractChangeManagementCallbackDataStr(changeManagement) { console.log(changeManagement); var result = {}; @@ -173,7 +184,13 @@ requestParametersData = { payload: changeManagement.configUpdateFile } - } + }else if(workflowType=="VNF Scale Out"){ + requestParametersData = { + controllerType: changeManagement.controllerType + //userParams: { ..json.. } + //usePreload: false + } + } $log.info('SchedulerWidgetCtrl:extractChangeManagementCallbackDataStr info:: workflowType '+ workflowType); $log.info('SchedulerWidgetCtrl:extractChangeManagementCallbackDataStr info:: requestParametersData '+ requestParametersData); @@ -266,7 +283,8 @@ } else { //no scheduling support var dataToSo = extractChangeManagementCallbackDataStr(vm.changeManagement); - var vnfName = vm.changeManagement.vnfNames[0].name; + //TODO: foreach + var vnfName = vm.changeManagement.vnfNames[0].name; changeManagementService.postChangeManagementNow(dataToSo, vnfName); } }; @@ -525,6 +543,10 @@ vm.isConfigUpdate = function () { return vm.changeManagement.workflow === COMPONENT.WORKFLOWS.vnfConfigUpdate; } + + vm.isScaleOut = function () { + return vm.changeManagement.workflow === COMPONENT.WORKFLOWS.vnfScaleOut; + } vm.shouldShowVnfInPlaceFields = function () { return vm.changeManagement.workflow === COMPONENT.WORKFLOWS.vnfInPlace; diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.css b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.css new file mode 100644 index 00000000..4dc2d399 --- /dev/null +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.css @@ -0,0 +1,171 @@ +.scale-out-modules .table-row { + border: 1px solid #D2D2D2; + display: flex; +} +.scale-out-modules .table-row > div { + text-indent: 12px; + color: #5A5A5A; + font-size: 13px; + border-right: 1px solid #D2D2D2; + line-height: 30px; +} +.scale-out-modules .table-row > div:last-child { + border-right: none; +} +.scale-out-modules .table-row > div:nth-child(1) { + flex: 40px 0 0; +} +.scale-out-modules .table-row > div:nth-child(2) { + flex: 363px 1 0; +} +.scale-out-modules .table-row > div:nth-child(3) { + flex: 90px 0 0; +} +.scale-out-modules .table-row > div:nth-child(4), .scale-out-modules .table-row > div:nth-child(5) { + flex: 150px 0 0; +} +.scale-out-modules .table-row > div:nth-child(6), .scale-out-modules .table-row > div:nth-child(7) { + flex: 120px 0 0; +} +.scale-out-modules .table-header { + border-bottom: none; +} +.scale-out-modules .table-header > div { + background-color: #F2F2F2;"" + color: black; + font-size: 12px; +} +.scale-out-modules .modules-table:not(.open) + .table-row { + border-top: none; +} +.scale-out-modules .modules-table { + display: none; + margin-top: 10px; + margin-bottom: 15px; +} +.scale-out-modules .modules-table .table-row { + margin-left: 60px; +} +.scale-out-modules .modules-table .table-row > div:nth-child(1) { + flex: 539px 0 0; +} +.scale-out-modules .modules-table .table-row > div:nth-child(2) { + flex: 90px 0 0; +} +.scale-out-modules .modules-table .table-row > div:nth-child(3) { + flex: 90px 0 0; +} +.scale-out-modules .modules-table .table-row > div:nth-child(4) { + flex: 180px 0 0; +} +.scale-out-modules .modules-table .table-row > div:nth-child(5) { + flex: 110px 0 0; +} +.scale-out-modules .modules-table.open { + display: block; +} + + +/*LESS*/ +/* + +.scale-out-modules{ + + .table-row{ + border: 1px solid #D2D2D2; + display:flex; + + > div { + text-indent:12px; + color: #5A5A5A; + font-size:13px; + border-right:1px solid #D2D2D2; + line-height:30px; + + &:last-child { + border-right:none; + } + + &:nth-child(1){ + flex:40px 0 0; + } + &:nth-child(2){ + flex:363px 1 0; + } + &:nth-child(3){ + flex:90px 0 0; + } + &:nth-child(4), &:nth-child(5){ + flex:150px 0 0; + } + &:nth-child(6), &:nth-child(7){ + flex:120px 0 0; + } + } + + &.open > div { + line-height:29px; + border-top: 1px #009FDB solid; + border-bottom: 1px #009FDB solid; + &:last-child{ + box-shadow: 0px 0px 0px 0px red, 1px 0px 0px 0px #009FDB; + } + //box-sizing: border-box; + &:nth-child(1){ + border-color: green; + } + &:nth-child(2){ + color:#009FDB; + } + } + } + + .table-header{ + border-bottom:none; + + > div { + background-color:#F2F2F2; + color: black; + font-size:12px; + } + } + + .modules-table:not(.open) + .table-row { + border-top:none; + } + + .modules-table{ + display:none; + margin-top:10px; + margin-bottom:15px; + + .table-row { + margin-left:60px; + & > div{ + + &:nth-child(1){ + flex:539px 0 0; + } + &:nth-child(2){ + flex:90px 0 0; + } + &:nth-child(3){ + flex:90px 0 0; + } + &:nth-child(4){ + flex:180px 0 0; + } + &:nth-child(5){ + flex:110px 0 0; + } + } + } + + &.open{ + display:block; + } + } + +} + +*/ \ No newline at end of file diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html index 4473ee3b..e14af86d 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.html @@ -4,7 +4,7 @@
- + + + -- cgit 1.2.3-korg