diff options
author | Anjali Walsatwar <anjali.walsatwar@huawei.com> | 2018-04-11 08:10:00 +0530 |
---|---|---|
committer | Anjali Walsatwar <anjali.walsatwar@huawei.com> | 2018-04-11 08:10:00 +0530 |
commit | 4dc32df42eadbae49aa83356080ca324a6fc6dfc (patch) | |
tree | 12a6f43582065c61296ccfbcbf4b5644dc5728f5 /vnfmarket/src/main | |
parent | 6ede8fedb4ad777e38da609534d549da2d1174fd (diff) |
code needs to be formatted
code needs to be formatted
Issue-ID: VNFSDK-245
Change-Id: Ie45ab07bd5cdfd3de5cb57b5acb413b7e2fb2d0e
Signed-off-by: Anjali Walsatwar <anjali.walsatwar@huawei.com>
Diffstat (limited to 'vnfmarket/src/main')
4 files changed, 44 insertions, 43 deletions
diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDelete/serviceDelete-test.js b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDelete/serviceDelete-test.js index 2fb828a1..05bb3664 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDelete/serviceDelete-test.js +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDelete/serviceDelete-test.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function() { +(function () { 'use strict'; /** @@ -23,39 +23,39 @@ * # homeTest * Test of the app */ - angular - .module('vnfmarket') - .constant("serviceDetails", { - "csarId": "26b4d6c4-a157-43c0-8ebc-9d6af1d6c40c", - "name": "clearwater_vnf", - "downloadUri": "null/files/catalog-http/NFAR/Canonical/clearwater_vnf/v1.0/clearwater_vnf.csar", - "report": "/Demo/reports/b3232e0c-3843-4df8-88e7-734cf2d7a97c/report.html", - "size": "1.8 MB", - "version": "v1.0", - "provider": "Canonical", - "type": "NFAR", - "format": "yaml", - "deletionPending": false, - "createTime": "2017-02-22 08:59:06", - "modifyTime": "2017-02-22 08:59:06", - "shortDesc": "", - "details": "", - "remarks": "" - }) + angular + .module('vnfmarket') + .constant("serviceDetails", { + "csarId": "26b4d6c4-a157-43c0-8ebc-9d6af1d6c40c", + "name": "clearwater_vnf", + "downloadUri": "null/files/catalog-http/NFAR/Canonical/clearwater_vnf/v1.0/clearwater_vnf.csar", + "report": "/Demo/reports/b3232e0c-3843-4df8-88e7-734cf2d7a97c/report.html", + "size": "1.8 MB", + "version": "v1.0", + "provider": "Canonical", + "type": "NFAR", + "format": "yaml", + "deletionPending": false, + "createTime": "2017-02-22 08:59:06", + "modifyTime": "2017-02-22 08:59:06", + "shortDesc": "", + "details": "", + "remarks": "" + }) - describe('Home - serviceDeleteCtrl', function() { + describe('Home - serviceDeleteCtrl', function () { var controller = null, $scope = null, $location, service, httpBackend, config, state, blah; - beforeEach(function() { + beforeEach(function () { module('vnfmarket'); }); beforeEach(module('ui.router')); beforeEach(module('md.data.table')); beforeEach(module('pascalprecht.translate')); - beforeEach(inject(function($controller, $rootScope, serviceDeleteService, $httpBackend, vnfConfig, serviceDetails) { + beforeEach(inject(function ($controller, $rootScope, serviceDeleteService, $httpBackend, vnfConfig, serviceDetails) { $scope = $rootScope.$new(); service = serviceDeleteService; httpBackend = $httpBackend; @@ -66,11 +66,11 @@ }); })); - it('Should serviceDeleteCtrl must be defined', function() { + it('Should serviceDeleteCtrl must be defined', function () { expect(controller).toBeDefined(); }); - it('Delete service for a valid scenario', function() { + it('Delete service for a valid scenario', function () { var csarId = "26b4d6c4-a157-43c0-8ebc-9d6af1d6c40c", url = config.common.baseUrl + config.api.home.serviceDelete.url; url = url.replace(":csarId", csarId); httpBackend.whenDELETE(url).respond(200, {}); @@ -78,7 +78,7 @@ var returnData = {}; httpBackend.expectDELETE(url).respond(returnData); - service.serviceDelete(csarId).then(function(response) { + service.serviceDelete(csarId).then(function (response) { expect(response.status).toBeDefined(); expect(response.status).toBe(200); }); diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDelete/serviceDelete.html b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDelete/serviceDelete.html index 29e27823..aede2b0e 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDelete/serviceDelete.html +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDelete/serviceDelete.html @@ -27,12 +27,13 @@ <md-dialog-content>
<div class="md-dialog-content">
- <div class="fullWidth center">
- <div class="row">
- <div class="col-xs-2 col-sm-2 col-md-1 col-lg-1 deleteIconSize glyphicon glyphicon-warning-sign icon_warning"></div>
- <div class="msg col-xs-10 col-sm-10 col-md-11 col-lg-11" style="text-align:left;vertical-align: middle;">{{'module.marketplace.serviceDelete.confirmationMesaage' | translate}} "{{ vm.serviceDetails.name }}"?</div>
- </div>
+ <div class="fullWidth center">
+ <div class="row">
+ <div class="col-xs-2 col-sm-2 col-md-1 col-lg-1 deleteIconSize glyphicon glyphicon-warning-sign icon_warning"></div>
+ <div class="msg col-xs-10 col-sm-10 col-md-11 col-lg-11" style="text-align:left;vertical-align: middle;">{{'module.marketplace.serviceDelete.confirmationMesaage' | translate}} "{{ vm.serviceDetails.name
+ }}"?</div>
</div>
+ </div>
</md-dialog-content>
<md-dialog-actions layout="row" class="row deleteAction">
diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDelete/serviceDeleteCtrl.js b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDelete/serviceDeleteCtrl.js index 5eafe9e8..3fd1a295 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDelete/serviceDeleteCtrl.js +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDelete/serviceDeleteCtrl.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and
* limitations under the License.
*/
-(function() {
+(function () {
'use strict';
/**
@@ -40,24 +40,24 @@ var vm = this;
vm.serviceDetails = serviceDetails;
- vm.hide = function() {
+ vm.hide = function () {
$mdDialog.hide();
};
- vm.cancel = function() {
+ vm.cancel = function () {
$mdDialog.cancel();
};
- vm.answer = function(answer) {
+ vm.answer = function (answer) {
serviceDeleteService.serviceDelete(vm.serviceDetails.csarId)
- .then(function(response) {
+ .then(function (response) {
$mdDialog.hide(response);
$mdToast.show(
$mdToast.simple()
- .textContent('Service deleted successfully')
- .position("bottom right")
- .action('Ok')
- .theme('success-toast')
+ .textContent('Service deleted successfully')
+ .position("bottom right")
+ .action('Ok')
+ .theme('success-toast')
);
});
};
diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDelete/serviceDeleteService.js b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDelete/serviceDeleteService.js index cf58d8a5..3d12cb0b 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDelete/serviceDeleteService.js +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDelete/serviceDeleteService.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -(function() { +(function () { 'use strict'; /** @@ -40,9 +40,9 @@ url = url.replace(":csarId", csarId) var defer = $q.defer() httpService.apiRequest(url, method) - .then(function(response) { + .then(function (response) { defer.resolve(response); - }, function(error) { + }, function (error) { defer.reject(error); }); return defer.promise; |