From 24ce28e83cb4faf805a88f0cb4c98a73ed633a57 Mon Sep 17 00:00:00 2001 From: Luji7 Date: Sun, 22 Oct 2017 16:03:20 +0800 Subject: Fix create dialog para issue. Change-Id: I2ec050b14e3b17f73e1b44e18db3d62690dcb75d Issue-id: USECASEUI-53 Signed-off-by: Luji7 --- .../uui/fusion/scripts/controller/lcmController.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/lcmController.js') diff --git a/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/lcmController.js b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/lcmController.js index 3f67584d..498f93e0 100644 --- a/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/lcmController.js +++ b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/lcmController.js @@ -110,7 +110,7 @@ app.controller('lcmCtrl', ['$scope', '$uibModal', '$log', '$http', '$timeout', ' function($scope, $uibModalInstance, ServiceTemplateService, customer, serviceType) { var ctrl = this; - ctrl.templates = ServiceTemplateService.getAllServiceTemplates(function (t) { + ServiceTemplateService.getAllServiceTemplates(function (t) { ctrl.templates = t; }); @@ -118,6 +118,7 @@ app.controller('lcmCtrl', ['$scope', '$uibModal', '$log', '$http', '$timeout', ' var paras = serviceTemplate.inputs.map(function (input) { return { name: input.name, + type: input.type, description: input.description, defaultValue: input.defaultValue, isRequired: input.isRequired, @@ -129,6 +130,7 @@ app.controller('lcmCtrl', ['$scope', '$uibModal', '$log', '$http', '$timeout', ' var nestedParas = nestedTemplate.inputs.map(function (input) { return { name: input.name, + type: input.type, description: input.description, defaultValue: input.defaultValue, isRequired: input.isRequired, @@ -137,9 +139,6 @@ app.controller('lcmCtrl', ['$scope', '$uibModal', '$log', '$http', '$timeout', ' }); return { nodeTemplateName: nestedTemplate.name, - location: { - name: nestedTemplate.name + " location",// ??? - }, parameters: nestedParas }; }); @@ -147,14 +146,19 @@ app.controller('lcmCtrl', ['$scope', '$uibModal', '$log', '$http', '$timeout', ' var service = { serviceName: ctrl.service.serviceName, serviceDescription: ctrl.service.serviceDescription, - location: { - name: "local host" // ??? - }, parameters: paras, segments: segmentsPara }; ctrl.service = service; }; + ctrl.service = { + serviceName: '', + serviceDescription: '', + parameters: [], + segments: [] + }; + ctrl.sdnControllers = []; + ctrl.locations = []; ctrl.serviceTemplateChanged = function (template) { console.log('serviceTemplateChanged invoked... ' + template); @@ -190,6 +194,10 @@ app.controller('lcmCtrl', ['$scope', '$uibModal', '$log', '$http', '$timeout', ' ServiceTemplateService.getAllVimInfo(function (vims) { ctrl.locations = vims; }); + + ServiceTemplateService.getAllSdnControllers(function (sdnControllers) { + ctrl.sdnControllers = sdnControllers; + }); }] ).controller('packageOnboardCtrl',['$scope', '$uibModalInstance', 'ServiceTemplateService','onboardPackage', function($scope, $uibModalInstance, ServiceTemplateService, onboardPackage) { -- cgit 1.2.3-korg