From b932a9d99ed92e0dd016b3b7652a4cec8e742337 Mon Sep 17 00:00:00 2001 From: Anjali Walsatwar Date: Wed, 11 Apr 2018 07:58:25 +0530 Subject: code needs to be formatted code needs to be formatted Issue-ID: VNFSDK-245 Change-Id: I09e450ca7e66fda29634c66c24fc9a282eb04ed2 Signed-off-by: Anjali Walsatwar --- .../functionalTest/functionalTestCtrl.js | 44 ++++--- .../onboarding/functionalTest/view.html | 22 ++-- .../onboarding/lifeCycle/lifeCycleCtrl.js | 46 ++++---- .../serviceUpload/onboarding/lifeCycle/view.html | 34 +++--- .../serviceUpload/onboarding/onBoardingService.js | 14 +-- .../home/serviceUpload/onboarding/onboarding.html | 6 +- .../home/serviceUpload/onboarding/onboarding.js | 126 ++++++++++----------- .../serviceUpload/onboarding/onboardingSuccess.js | 22 ++-- .../onboarding/validation/validationCtrl.js | 44 +++---- .../serviceUpload/onboarding/validation/view.html | 92 +++++++-------- .../modules/home/serviceUpload/serviceUpload.html | 41 ++++--- .../home/serviceUpload/serviceUploadCtrl.js | 48 ++++---- .../home/serviceUpload/serviceUploadService.js | 18 +-- 13 files changed, 284 insertions(+), 273 deletions(-) (limited to 'vnfmarket/src/main') diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/functionalTest/functionalTestCtrl.js b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/functionalTest/functionalTestCtrl.js index a9d12db3..709ceb2c 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/functionalTest/functionalTestCtrl.js +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/functionalTest/functionalTestCtrl.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function() { +(function () { 'use strict'; /** @@ -24,11 +24,9 @@ * Controller of the app */ - angular - .module('vnfmarket') - .controller('functionalTestOnboardingCtrl', functionalTest); + angular.module('vnfmarket').controller('functionalTestOnboardingCtrl', functionalTest); - functionalTest.$inject = [ 'vnfConfig', 'baseUrlConfig', '$mdDialog', 'functionalTestService', '$stateParams']; + functionalTest.$inject = ['vnfConfig', 'baseUrlConfig', '$mdDialog', 'functionalTestService', '$stateParams']; /* * recommend @@ -36,9 +34,9 @@ * and bindable members up top. */ - function functionalTest(vnfConfig, baseUrlConfig, $mdDialog, functionalTestService,$stateParams) { + function functionalTest(vnfConfig, baseUrlConfig, $mdDialog, functionalTestService, $stateParams) { var vm = this; - vm.csarId = $stateParams.csarId; + vm.csarId = $stateParams.csarId; console.log("functionalTest") vm.filter = { "search": '', @@ -51,7 +49,7 @@ vm.pagination = [5, 10, 15, { label: 'All', - value: function() { + value: function () { return vm.validations.length ? vm.validations.length : 0; } }]; @@ -73,26 +71,26 @@ limitSelect: true, pageSelect: true }; - vm.getvalidations = function(){ + vm.getvalidations = function () { console.log(vm.functionalTests) } - - - vm.hide = function(answer) { + + + vm.hide = function (answer) { $mdDialog.hide(answer); }; - - - vm.getFunctionTestDetails = function() { - functionalTestService.getFunctionTestDetails(vm.csarId).then(function(response){ - vm.validations = response.data; - }) - } - - vm.getFunctionTestDetails(); - - vm.cancel = function() { + + + vm.getFunctionTestDetails = function () { + functionalTestService.getFunctionTestDetails(vm.csarId).then(function (response) { + vm.validations = response.data; + }) + } + + vm.getFunctionTestDetails(); + + vm.cancel = function () { $mdDialog.cancel(); }; } diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/functionalTest/view.html b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/functionalTest/view.html index 7a626ff6..b251f2ab 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/functionalTest/view.html +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/functionalTest/view.html @@ -4,24 +4,24 @@

{{'common.tabs.functionTest.title' | translate}}


- +

- + - @@ -29,15 +29,15 @@ {{'common.tabs.functionTest.descTHead' | translate}} {{'common.tabs.functionTest.descTHead' | translate}} - - + - - +
+ {{'common.tabs.functionTest.testTHead' | translate}} {{'common.tabs.functionTest.testTHead' | translate}} + {{'common.tabs.functionTest.resultTHead' | translate}} {{'common.tabs.functionTest.resultTHead' | translate}}
{{validation.name}}{{validation.name}} @@ -49,11 +49,13 @@ {{validation.status}}{{validation.status}}
- -
+ +
\ No newline at end of file diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/lifeCycle/lifeCycleCtrl.js b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/lifeCycle/lifeCycleCtrl.js index 60f9e3fd..715ca31b 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/lifeCycle/lifeCycleCtrl.js +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/lifeCycle/lifeCycleCtrl.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function() { +(function () { 'use strict'; /** @@ -28,7 +28,7 @@ .module('vnfmarket') .controller('lifeCycleOnboardingCtrl', lifeCycle); - lifeCycle.$inject = [ 'vnfConfig', 'baseUrlConfig', '$mdDialog']; + lifeCycle.$inject = ['vnfConfig', 'baseUrlConfig', '$mdDialog']; /* * recommend @@ -36,7 +36,7 @@ * and bindable members up top. */ - function lifeCycle(vnfConfig, baseUrlConfig,$mdDialog) { + function lifeCycle(vnfConfig, baseUrlConfig, $mdDialog) { var vm = this; console.log("functionalTest") vm.filter = { @@ -50,7 +50,7 @@ vm.pagination = [5, 10, 15, { label: 'All', - value: function() { + value: function () { return vm.lifeCycleTests.length ? vm.lifeCycleTests.length : 0; } }]; @@ -72,32 +72,32 @@ limitSelect: true, pageSelect: true }; - vm.getTests = function(){ + vm.getTests = function () { console.log(vm.lifeCycleTests) } - - - vm.hide = function(answer) { + + + vm.hide = function (answer) { $mdDialog.hide(answer); }; - vm.cancel = function() { + vm.cancel = function () { $mdDialog.cancel(); }; - vm.lifeCycleTests = [{ - "step" : "Lifecycle step-1", - "parameter" : "Lifecycle Parameter1", - "result" : "pass" - }, - { - "step" : "Lifecycle step-2", - "parameter" : "Lifecycle Parameter2", - "result" : "pass" - },{ - "step" : "Lifecycle step-3", - "parameter" : "Parameter3", - "result" : "pass" - }] + vm.lifeCycleTests = [{ + "step": "Lifecycle step-1", + "parameter": "Lifecycle Parameter1", + "result": "pass" + }, + { + "step": "Lifecycle step-2", + "parameter": "Lifecycle Parameter2", + "result": "pass" + }, { + "step": "Lifecycle step-3", + "parameter": "Parameter3", + "result": "pass" + }] } })(); \ No newline at end of file diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/lifeCycle/view.html b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/lifeCycle/view.html index e74436f3..692e78e5 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/lifeCycle/view.html +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/lifeCycle/view.html @@ -4,48 +4,50 @@

{{'common.tabs.lifeCycle.title' | translate}}

- - + + - - - - + - +
- {{'common.tabs.lifeCycle.stepTHead' | translate}} + + {{'common.tabs.lifeCycle.stepTHead' | translate}} {{'common.tabs.lifeCycle.stepTHead' | translate}} - {{'common.tabs.lifeCycle.ParamTHead' | translate}} + + {{'common.tabs.lifeCycle.ParamTHead' | translate}} {{'common.tabs.lifeCycle.ParamTHead' | translate}} - {{'common.tabs.lifeCycle.ResultTHead' | translate}} + + {{'common.tabs.lifeCycle.ResultTHead' | translate}} {{'common.tabs.lifeCycle.ResultTHead' | translate}}
- {{test.step}}{{test.step}} + {{test.step}}{{test.step}} - {{test.parameter}}{{test.parameter}} + {{test.parameter}}{{test.parameter}} - {{test.result}}{{test.result}} + {{test.result}}{{test.result}}
- -
+ +
\ No newline at end of file diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/onBoardingService.js b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/onBoardingService.js index b73cd5a7..abc788c3 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/onBoardingService.js +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/onBoardingService.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function() { +(function () { 'use strict'; /** @@ -40,8 +40,8 @@ method = vnfConfig.api.home.getFunctionalList.method; url = url.replace(":csarId", csarId); - url += "?operTypeId="+operTypeId; - url += "&operId="+operId; + url += "?operTypeId=" + operTypeId; + url += "&operId=" + operId; /*var response = @@ -73,9 +73,9 @@ //defer.resolve(response); httpService.apiRequest(url, method) - .then(function(response) { + .then(function (response) { defer.resolve(response); - }, function(error) { + }, function (error) { defer.reject(error); }); return defer.promise; @@ -144,9 +144,9 @@ httpService.apiRequest(url, method) - .then(function(response) { + .then(function (response) { defer.resolve(response); - }, function(error) { + }, function (error) { defer.reject(error); }); return defer.promise; diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/onboarding.html b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/onboarding.html index 57e65451..040b2e45 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/onboarding.html +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/onboarding.html @@ -7,7 +7,9 @@
-
1
+
+ 1 +
- - - - - + diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/serviceUploadCtrl.js b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/serviceUploadCtrl.js index 7a2fdaaa..6d141ce1 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/serviceUploadCtrl.js +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/serviceUploadCtrl.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function() { +(function () { 'use strict'; /** @@ -36,24 +36,24 @@ * and bindable members up top. */ - function ServiceUpload(serviceUploadService, $scope, vnfConfig, $mdDialog, $mdToast, $rootScope, $interval, baseUrlConfig,$state, isUpload, csarId) { + function ServiceUpload(serviceUploadService, $scope, vnfConfig, $mdDialog, $mdToast, $rootScope, $interval, baseUrlConfig, $state, isUpload, csarId) { var vm = this; - vm.isUpload = isUpload; - vm.csarId = csarId + vm.isUpload = isUpload; + vm.csarId = csarId vm.apiInfo = 0; vm.status = "Idle"; vm.promise = null; vm.service = {}; - vm.hide = function(answer) { + vm.hide = function (answer) { $mdDialog.hide(answer); }; - vm.cancel = function() { + vm.cancel = function () { $mdDialog.cancel(); }; - vm.answer = function(answer) { + vm.answer = function (answer) { vm.status = "progress"; var dataObj = vm.service, file = vm.service.file, @@ -70,31 +70,31 @@ "Content-Type": undefined } - vm.promise = $interval(function() { + vm.promise = $interval(function () { if ($rootScope.progressBar >= 80 && vm.status !== "success") { vm.apiInfo = 80; } else { vm.apiInfo = parseInt($rootScope.progressBar, 10); } }, 500); - - if(vm.isUpload){ - var filename = vm.service.file.name; - serviceUploadService.postServiceUpload(fd, headers) - .then(function(response) { - vm.hide("Uploading") - $state.go('home.onboarding', {"csarId": response.data.csarId, "csarName": filename}); - }); - } else { - serviceUploadService.repostServiceUpload(fd, headers, vm.csarId) - .then(function(response) { - vm.hide("Uploading") - $state.go('home.onboarding', {"csarId": response.data.csarId, "csarName": filename}); - }); - } + + if (vm.isUpload) { + var filename = vm.service.file.name; + serviceUploadService.postServiceUpload(fd, headers) + .then(function (response) { + vm.hide("Uploading") + $state.go('home.onboarding', { "csarId": response.data.csarId, "csarName": filename }); + }); + } else { + serviceUploadService.repostServiceUpload(fd, headers, vm.csarId) + .then(function (response) { + vm.hide("Uploading") + $state.go('home.onboarding', { "csarId": response.data.csarId, "csarName": filename }); + }); + } }; - $scope.$on("$destroy", function() { + $scope.$on("$destroy", function () { if (vm.promise) { $interval.cancel(vm.promise); } diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/serviceUploadService.js b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/serviceUploadService.js index a938c097..458a98b6 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/serviceUploadService.js +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/serviceUploadService.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function() { +(function () { 'use strict'; /** @@ -32,7 +32,7 @@ function serviceUpload($q, vnfConfig, httpService) { return { postServiceUpload: postServiceUpload, - repostServiceUpload: repostServiceUpload + repostServiceUpload: repostServiceUpload }; function postServiceUpload(data, headers) { @@ -42,25 +42,25 @@ var defer = $q.defer() httpService.apiRequestWithProgress(url, method, apiData, headers) - .then(function(response) { + .then(function (response) { defer.resolve(response); - }, function(error) { + }, function (error) { defer.reject(error); }); return defer.promise; } - - function repostServiceUpload(data, headers, csarId) { + + function repostServiceUpload(data, headers, csarId) { var url = vnfConfig.api.home.repostServiceUpload.url, method = vnfConfig.api.home.repostServiceUpload.method, apiData = data; - url = url.replace(":csarId", csarId) + url = url.replace(":csarId", csarId) var defer = $q.defer() httpService.apiRequestWithProgress(url, method, apiData, headers) - .then(function(response) { + .then(function (response) { defer.resolve(response); - }, function(error) { + }, function (error) { defer.reject(error); }); return defer.promise; -- cgit 1.2.3-korg