From 8de3ef3be914718dbfaa0815907919939fbb7ab9 Mon Sep 17 00:00:00 2001 From: Anjali Walsatwar Date: Wed, 11 Apr 2018 08:21:08 +0530 Subject: code needs to be formatted code needs to be formatted Issue-ID: VNFSDK-245 Change-Id: I1886e965b57fbcfe5f01d0078a1a91f405dc0c7a Signed-off-by: Anjali Walsatwar --- .../src/main/webapp/vnfmarket/app/app.config.js | 20 +- vnfmarket/src/main/webapp/vnfmarket/app/app.js | 2 +- .../app/modules/layouts/main-page/main-page.html | 114 ++++---- .../app/modules/layouts/main-page/mainPageCtrl.js | 4 +- .../app/modules/layouts/side-nav/sidenav.html | 58 ++-- .../app/modules/layouts/side-nav/sidenavCtrl.js | 6 +- .../vnfmarket/common/config/baseUrlConfig.js | 6 +- .../vnfmarket/common/config/configuration.js | 22 +- .../directives/autofocus/autofocusDirective.js | 2 +- .../directives/fileupload/fileuploadDirective.js | 6 +- .../webapp/vnfmarket/common/locale/locale-en.json | 311 ++++++++++----------- .../vnfmarket/common/services/httpService.js | 40 +-- .../vnfmarket/common/templates/serverError.html | 18 +- 13 files changed, 304 insertions(+), 305 deletions(-) diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/app.config.js b/vnfmarket/src/main/webapp/vnfmarket/app/app.config.js index ffe6e110..25c15212 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/app.config.js +++ b/vnfmarket/src/main/webapp/vnfmarket/app/app.config.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function() { +(function () { 'use strict'; /** @@ -65,16 +65,16 @@ 'A200': '#E1E4E5', 'A400': '#858CA8', 'A700': '#FFFFFF' - }); - - $mdThemingProvider.theme('default') - .primaryPalette('amazingPaletteName',{ - 'default' : 'A400', - 'hue-1' : "A700", - 'hue-2' : "100", - 'hue-3' : "A200" + }); + + $mdThemingProvider.theme('default') + .primaryPalette('amazingPaletteName', { + 'default': 'A400', + 'hue-1': "A700", + 'hue-2': "100", + 'hue-3': "A200" }).accentPalette('amazingPaletteName', { - 'hue-1' : 'A400' + 'hue-1': 'A400' }) $locationProvider.hashPrefix('!'); diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/app.js b/vnfmarket/src/main/webapp/vnfmarket/app/app.js index b582b622..95fa1078 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/app.js +++ b/vnfmarket/src/main/webapp/vnfmarket/app/app.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function() { +(function () { 'use strict'; /** diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/layouts/main-page/main-page.html b/vnfmarket/src/main/webapp/vnfmarket/app/modules/layouts/main-page/main-page.html index 57920a10..4821524d 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/layouts/main-page/main-page.html +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/layouts/main-page/main-page.html @@ -13,64 +13,64 @@ See the License for the specific language governing permissions and limitations under the License. --> - -
- - + +
+ + + +

+ vnfmarket +

+ + + + + + + more_vert -

- vnfmarket -

- - - - - - - more_vert - - - - - face - Profile - - - - - lock - Password - - - - - - power_settings_new - Logout - - - - -
-
- -
- - - -

- Back -

- - - - + + + + face + Profile + + + + + lock + Password + + + + + + power_settings_new + Logout + + + + +
+
+ +
+ + + +

+ Back +

+ + + + -
-
- - +
+
+ + - - + + \ No newline at end of file diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/layouts/main-page/mainPageCtrl.js b/vnfmarket/src/main/webapp/vnfmarket/app/modules/layouts/main-page/mainPageCtrl.js index c1430ffb..d82ce460 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/layouts/main-page/mainPageCtrl.js +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/layouts/main-page/mainPageCtrl.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - (function () { +(function () { 'use strict'; /** @@ -36,7 +36,7 @@ * and bindable members up top. */ - function Layout($mdSidenav, $cookies, $state, $mdToast, $mdDialog ) { + function Layout($mdSidenav, $cookies, $state, $mdToast, $mdDialog) { /*jshint validthis: true */ var vm = this; diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/layouts/side-nav/sidenav.html b/vnfmarket/src/main/webapp/vnfmarket/app/modules/layouts/side-nav/sidenav.html index 36aebb6e..99c3032c 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/layouts/side-nav/sidenav.html +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/layouts/side-nav/sidenav.html @@ -13,34 +13,32 @@ See the License for the specific language governing permissions and limitations under the License. --> - -
-
-
- -
-
-
-
-
+ +
+
+
+
- - - -
- -
-

{{ item.name }}

-
- - - -
- -
-

{{ item.title }}

-
-
+
+
+
+
+
+
+ + +
+ +
+

{{ item.name }}

+
+ + + +
+ +
+

{{ item.title }}

+
+
\ No newline at end of file diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/layouts/side-nav/sidenavCtrl.js b/vnfmarket/src/main/webapp/vnfmarket/app/modules/layouts/side-nav/sidenavCtrl.js index 59bd9fae..5e17b5af 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/layouts/side-nav/sidenavCtrl.js +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/layouts/side-nav/sidenavCtrl.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - (function () { +(function () { 'use strict'; /** @@ -26,7 +26,7 @@ angular .module('vnfmarket') .controller('SidenavCtrl', SidenavCtrl) - // .controller('SettingsCtrl', SettingsCtrl); + // .controller('SettingsCtrl', SettingsCtrl); // Injecting Denpendencies @@ -47,7 +47,7 @@ $mdSidenav(menuId).toggle(); }; - vm.closeSidenav = function() { + vm.closeSidenav = function () { $mdSidenav('left').close(); }; diff --git a/vnfmarket/src/main/webapp/vnfmarket/common/config/baseUrlConfig.js b/vnfmarket/src/main/webapp/vnfmarket/common/config/baseUrlConfig.js index 72b9f5a9..4b14d978 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/common/config/baseUrlConfig.js +++ b/vnfmarket/src/main/webapp/vnfmarket/common/config/baseUrlConfig.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function() { +(function () { 'use strict'; /** @@ -28,8 +28,8 @@ .module('vnfmarket') .constant("baseUrlConfig", { "common": { - "ip" : "", //ses - "port" : "" //ses + "ip": "", //ses + "port": "" //ses } }) })(); \ No newline at end of file diff --git a/vnfmarket/src/main/webapp/vnfmarket/common/config/configuration.js b/vnfmarket/src/main/webapp/vnfmarket/common/config/configuration.js index 33faa97f..2adcc020 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/common/config/configuration.js +++ b/vnfmarket/src/main/webapp/vnfmarket/common/config/configuration.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function() { +(function () { 'use strict'; /** @@ -33,7 +33,7 @@ "url": "/onapapi/vnfsdk-marketplace/v1/PackageResource/csars", "method": "POST" }, - "repostServiceUpload": { + "repostServiceUpload": { "url": "/onapapi/vnfsdk-marketplace/v1/PackageResource/csars/:csarId/reupload", "method": "POST" }, @@ -53,15 +53,15 @@ "url": "/onapapi/vnfsdk-marketplace/v1/PackageResource/csars/:csarId", "method": "GET" }, - "getFunctionTestDetails" : { - "url" : "/onapapi/vnfsdk-marketplace/v1/PackageResource/csars/:csarId/operresult?operTypeId=functiontest", - "method" : "GET" - }, - "updateDownloadCount" :{ - "url" : "/onapapi/vnfsdk-marketplace/v1/PackageResource/csars/:csarId/downloaded", - "method" : "GET" - }, - "getOnBoardingSteps": { + "getFunctionTestDetails": { + "url": "/onapapi/vnfsdk-marketplace/v1/PackageResource/csars/:csarId/operresult?operTypeId=functiontest", + "method": "GET" + }, + "updateDownloadCount": { + "url": "/onapapi/vnfsdk-marketplace/v1/PackageResource/csars/:csarId/downloaded", + "method": "GET" + }, + "getOnBoardingSteps": { "url": "/onapapi/vnfsdk-marketplace/v1/PackageResource/csars/onboardsteps", "method": "GET" }, diff --git a/vnfmarket/src/main/webapp/vnfmarket/common/directives/autofocus/autofocusDirective.js b/vnfmarket/src/main/webapp/vnfmarket/common/directives/autofocus/autofocusDirective.js index 50b63dc7..9eeae641 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/common/directives/autofocus/autofocusDirective.js +++ b/vnfmarket/src/main/webapp/vnfmarket/common/directives/autofocus/autofocusDirective.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function() { +(function () { 'use strict'; /** diff --git a/vnfmarket/src/main/webapp/vnfmarket/common/directives/fileupload/fileuploadDirective.js b/vnfmarket/src/main/webapp/vnfmarket/common/directives/fileupload/fileuploadDirective.js index 2a1748e5..3f64841d 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/common/directives/fileupload/fileuploadDirective.js +++ b/vnfmarket/src/main/webapp/vnfmarket/common/directives/fileupload/fileuploadDirective.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function() { +(function () { 'use strict'; /** @@ -41,8 +41,8 @@ return directive; function link(scope, element, attrs) { - element.bind("change", function(changeEvent) { - scope.$apply(function() { + element.bind("change", function (changeEvent) { + scope.$apply(function () { scope.fileUpload = changeEvent.target.files[0]; }); }); diff --git a/vnfmarket/src/main/webapp/vnfmarket/common/locale/locale-en.json b/vnfmarket/src/main/webapp/vnfmarket/common/locale/locale-en.json index d4be95e9..d086b9ac 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/common/locale/locale-en.json +++ b/vnfmarket/src/main/webapp/vnfmarket/common/locale/locale-en.json @@ -1,193 +1,188 @@ - { - "common" : { - "actions" : { - "save" : "Save", - "upload":"Upload", - "delete" : "Delete", - "close" : "Close", - "search" : "Search", - "download" :"Download", - "yes" : "Yes", - "no" : "No", - "update" :"Re Upload", - "clickHere" : "Click Here", - "getApp" : "get_app", - "fileUpload" : "file_upload", - "ok" : "Ok", - "return" : "Return", - "detail" : "See Details", - "backToList" : "Back to List", - "add" : "Add file" +{ + "common": { + "actions": { + "save": "Save", + "upload": "Upload", + "delete": "Delete", + "close": "Close", + "search": "Search", + "download": "Download", + "yes": "Yes", + "no": "No", + "update": "Re Upload", + "clickHere": "Click Here", + "getApp": "get_app", + "fileUpload": "file_upload", + "ok": "Ok", + "return": "Return", + "detail": "See Details", + "backToList": "Back to List", + "add": "Add file" }, - "message" : { - "statusTitle" : "Status : ", - "statusText" : "Status text : ", - "viewDetails" : "Click here to view details" + "message": { + "statusTitle": "Status : ", + "statusText": "Status text : ", + "viewDetails": "Click here to view details" }, - "tabs" : { - "validation" :{ - "title" : "Validation", - "stepTHead" : "Step", - "ParamTHead" : "Parameter", - "ResultTHead" : "Result" - }, - "lifeCycle" : { - "title" : "Lifecycle Test", - "stepTHead" : "Step", - "ParamTHead" : "Parameter", - "ResultTHead" : "Result" - }, - "functionTest": { - "title" : "Functional Test", - "testTHead" : "Test case", - "descTHead" : "Description", - "resultTHead" : "Test Result" - } - } + "tabs": { + "validation": { + "title": "Validation", + "stepTHead": "Step", + "ParamTHead": "Parameter", + "ResultTHead": "Result" + }, + "lifeCycle": { + "title": "Lifecycle Test", + "stepTHead": "Step", + "ParamTHead": "Parameter", + "ResultTHead": "Result" + }, + "functionTest": { + "title": "Functional Test", + "testTHead": "Test case", + "descTHead": "Description", + "resultTHead": "Test Result" + } + } }, - "module" : { - "marketplace" : { - "serviceDelete" : { - "title" : "Delete Service", - "confirmationMesaage" : "Are you sure that you want to delete " - + "module": { + "marketplace": { + "serviceDelete": { + "title": "Delete Service", + "confirmationMesaage": "Are you sure that you want to delete " }, - "serviceUpload" : { - "title" : "Upload Service", - "updateTitle" : "Re Upload", - "fields" : { - "fileUpload" : { - "label" : "Select File", - "noFileSelected" : "No file selected" + "serviceUpload": { + "title": "Upload Service", + "updateTitle": "Re Upload", + "fields": { + "fileUpload": { + "label": "Select File", + "noFileSelected": "No file selected" }, - "shortDescription" : { - "placeholder" : "Short Description" + "shortDescription": { + "placeholder": "Short Description" }, - "details" : { - "placeholder" : "Details" + "details": { + "placeholder": "Details" }, - "remarks" : { - "placeholder" : "Remarks" + "remarks": { + "placeholder": "Remarks" }, - "funcTestReport" : { - "label":"Function Test Report: " + "funcTestReport": { + "label": "Function Test Report: " } }, - "messages" : { - "onUploading" : "Please wait, Upload is in progress", - "onSuccessful" : "Service upload successful" + "messages": { + "onUploading": "Please wait, Upload is in progress", + "onSuccessful": "Service upload successful" }, - "onBoarding" : { - "onBoardProcessTitle" : "Onboarding Process" - }, - "onBoardingSuccess" : { - "successTitle" : "Onboarding is successful" - } - + "onBoarding": { + "onBoardProcessTitle": "Onboarding Process" + }, + "onBoardingSuccess": { + "successTitle": "Onboarding is successful" + } }, - "serviceDetails" : { - "title" : "Service Name : ", - "info" : { - "details" : "Details", - "remarks" : "Remarks", - "provider" : "Provider", - "serviceType" : "Service Type", - "csarId" : "CSAR Id", - "fileSize" : "File Size", - "funcTestReport" :"Function Test Report", - "reportTitle" : "Onboarding Report", - "typeLbl" : "Type", - "createLbl" : "Created At", - "modLbl" : "Last Modfied at" - + "serviceDetails": { + "title": "Service Name : ", + "info": { + "details": "Details", + "remarks": "Remarks", + "provider": "Provider", + "serviceType": "Service Type", + "csarId": "CSAR Id", + "fileSize": "File Size", + "funcTestReport": "Function Test Report", + "reportTitle": "Onboarding Report", + "typeLbl": "Type", + "createLbl": "Created At", + "modLbl": "Last Modfied at" }, - "tabs" : { - "validationTabTitle" : "Validation", - "lifecycleTabTitle" : "Lifecycle Test", - "functionalTabTitle" : "Function Test" - } - - + "tabs": { + "validationTabTitle": "Validation", + "lifecycleTabTitle": "Lifecycle Test", + "functionalTabTitle": "Function Test" + } }, - "sideNav" : { - "title" : "VNF Repository", - "marketplaceNav" : "VNF Repository" + "sideNav": { + "title": "VNF Repository", + "marketplaceNav": "VNF Repository" }, - "main" : { - "headerTitle" : "Welcome to VNF Repository", - "description" : "Market place for VNF-SDK does the following task:", - "pointOne" : "Upload and download of VNF products and offerings", - "pointTwo" : "Show the interface about other component in VNF-SDK", - "sortBy" : { - "title" : "Please select", - "label" : "Sort by ", - "options" : { - "name" : { - "key" :"Name", - "value" :"name" + "main": { + "headerTitle": "Welcome to VNF Repository", + "description": "Market place for VNF-SDK does the following task:", + "pointOne": "Upload and download of VNF products and offerings", + "pointTwo": "Show the interface about other component in VNF-SDK", + "sortBy": { + "title": "Please select", + "label": "Sort by ", + "options": { + "name": { + "key": "Name", + "value": "name" }, - "dateModified" : { - "key" :"Data Modified", - "value" : "date" + "dateModified": { + "key": "Data Modified", + "value": "date" }, - "downloads" : { - "key":"Downloads", - "value" : "downloads" + "downloads": { + "key": "Downloads", + "value": "downloads" } } }, - "search" :{ - "label" : "Search", - "placeholder" : "Search keyword", - "close" : "Close" + "search": { + "label": "Search", + "placeholder": "Search keyword", + "close": "Close" }, - "upload" : { - "label" : "Upload" + "upload": { + "label": "Upload" }, - "gridView" : { - "label" : "Grid View", - "serviceType" : { - "label" : "Type", + "gridView": { + "label": "Grid View", + "serviceType": { + "label": "Type", "value": "description" }, - "downloads" : { - "label" : "Downloads", - "value":"get_app", - "tooltip" : "Download history", - "buttonLabel" :"Downloads" + "downloads": { + "label": "Downloads", + "value": "get_app", + "tooltip": "Download history", + "buttonLabel": "Downloads" }, - "upload" : { - "tooltip" : "Uploads history", - "buttonLabel" : "Uploads" + "upload": { + "tooltip": "Uploads history", + "buttonLabel": "Uploads" }, - "moreDetails" : { - "label" : "More details" + "moreDetails": { + "label": "More details" }, - "title" : { - "label" : "Title" + "title": { + "label": "Title" } }, - "listView" : { - "label" : "List View", - "headers" : { - "name" : "Name", - "provider" : "Provider", - "description" : "Description", - "type" : "Type", - "size" : "Size", - "createdAt" : "Created at", - "lastModified" : "Last Modified at", - "donwloads" : "Downloads", - "actions" : "Actions" + "listView": { + "label": "List View", + "headers": { + "name": "Name", + "provider": "Provider", + "description": "Description", + "type": "Type", + "size": "Size", + "createdAt": "Created at", + "lastModified": "Last Modified at", + "donwloads": "Downloads", + "actions": "Actions" } }, - "refresh" : { - "label" : "Refresh" + "refresh": { + "label": "Refresh" }, - "emptyList" : { - "label" : "Service list is empty. Would you like to upload one? If yes,", - "anchor" : "Click here", - "labelContinued" : "to upload a new service" + "emptyList": { + "label": "Service list is empty. Would you like to upload one? If yes,", + "anchor": "Click here", + "labelContinued": "to upload a new service" } } } diff --git a/vnfmarket/src/main/webapp/vnfmarket/common/services/httpService.js b/vnfmarket/src/main/webapp/vnfmarket/common/services/httpService.js index bc077a10..dd9dda64 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/common/services/httpService.js +++ b/vnfmarket/src/main/webapp/vnfmarket/common/services/httpService.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function() { +(function () { 'use strict'; /** @@ -39,8 +39,8 @@ var defer = $q.defer() $http({ method: method, - //ses url: baseUrlConfig.common.ip + ":" + baseUrlConfig.common.port + url, - url:url, + //ses url: baseUrlConfig.common.ip + ":" + baseUrlConfig.common.port + url, + url: url, data: data, headers: headers }).then(function successCallback(response) { @@ -50,15 +50,15 @@ }, function errorCallback(error) { var parentEl = angular.element(document.body); $mdDialog.show({ - parent:parentEl, - templateUrl:'/onapui/vnfmarket/common/templates/serverError.html', - locals:{ - error:error + parent: parentEl, + templateUrl: '/onapui/vnfmarket/common/templates/serverError.html', + locals: { + error: error }, - skipHide:true, - controller:function($scope, $mdDialog, error){ + skipHide: true, + controller: function ($scope, $mdDialog, error) { $scope.error = error; - $scope.closeDialog= function(){ + $scope.closeDialog = function () { $mdDialog.hide(); } } @@ -74,13 +74,13 @@ var defer = $q.defer() $http({ method: method, - //ses url: baseUrlConfig.common.ip + ":" + baseUrlConfig.common.port + url, - url:url, + //ses url: baseUrlConfig.common.ip + ":" + baseUrlConfig.common.port + url, + url: url, data: data, headers: headers, transformRequest: angular.identity, uploadEventHandlers: { - progress: function(e) { + progress: function (e) { if (e.lengthComputable) { $rootScope.progressBar = (e.loaded / e.total) * 100; } @@ -93,15 +93,15 @@ }, function errorCallback(error) { var parentEl = angular.element(document.body); $mdDialog.show({ - parent:parentEl, - templateUrl:'/onapui/vnfmarket/common/templates/serverError.html', - locals:{ - error:error + parent: parentEl, + templateUrl: '/onapui/vnfmarket/common/templates/serverError.html', + locals: { + error: error }, - skipHide:true, - controller:function($scope, $mdDialog, error){ + skipHide: true, + controller: function ($scope, $mdDialog, error) { $scope.error = error; - $scope.closeDialog= function(){ + $scope.closeDialog = function () { $mdDialog.hide(); } } diff --git a/vnfmarket/src/main/webapp/vnfmarket/common/templates/serverError.html b/vnfmarket/src/main/webapp/vnfmarket/common/templates/serverError.html index 6d402765..9b8a540a 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/common/templates/serverError.html +++ b/vnfmarket/src/main/webapp/vnfmarket/common/templates/serverError.html @@ -27,15 +27,21 @@
-
-
-
-
-
{{'common.message.statusTitle' | translate }} {{error.status}}
-
{{'common.message.statusText' | translate }} {{error.statusText}}
+
+
+
+
+
+ {{'common.message.statusTitle' | translate }} + {{error.status}} +
+
+ {{'common.message.statusText' | translate }} + {{error.statusText}}
+
-- cgit 1.2.3-korg