From 8571314406cb396dbe18eae1ad8da40884e6888b Mon Sep 17 00:00:00 2001 From: Rajani Karuturi Date: Wed, 20 May 2015 17:17:09 +0530 Subject: [PATCH] Fixed blocker issues reported by sonarqube in js files All of them are trailing comma in array or object more details @ https://analysis.apache.org/component_issues?id=org.apache.cloudstack%3Acloudstack#resolved=false|severities=BLOCKER|languages=js --- ui/scripts/accounts.js | 4 ++-- ui/scripts/configuration.js | 6 +++--- ui/scripts/docs.js | 2 +- ui/scripts/network.js | 2 +- ui/scripts/storage.js | 2 +- ui/scripts/system.js | 12 ++++++------ ui/scripts/templates.js | 9 ++++----- ui/scripts/ui-custom/instanceWizard.js | 2 +- ui/scripts/ui-custom/login.js | 2 +- ui/scripts/zoneWizard.js | 2 +- 10 files changed, 21 insertions(+), 22 deletions(-) diff --git a/ui/scripts/accounts.js b/ui/scripts/accounts.js index d539af4d354d..9e47d11bca68 100644 --- a/ui/scripts/accounts.js +++ b/ui/scripts/accounts.js @@ -1531,7 +1531,7 @@ label: 'label.name', validation: { required: true - }, + } }, publickey: { label: 'Public Key' @@ -1587,7 +1587,7 @@ data: items }); } - }, + } }, account: { label: 'label.account', diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js index 184e38a90986..5cb6f8d64686 100644 --- a/ui/scripts/configuration.js +++ b/ui/scripts/configuration.js @@ -2157,7 +2157,7 @@ label: 'label.disk.iops.write.rate' }, cacheMode: { - label: 'label.cache.mode', + label: 'label.cache.mode' }, tags: { label: 'label.storage.tags' @@ -3684,7 +3684,7 @@ fields[id.isEnabled] = { label: serviceDisplayName, - isBoolean: true, + isBoolean: true }; serviceFields.push(id.isEnabled); @@ -3734,7 +3734,7 @@ dependsOn: 'service.SourceNat.isEnabled', isBoolean: true } - },//end of fields + }//end of fields }, //end of createForm action: function(args) { diff --git a/ui/scripts/docs.js b/ui/scripts/docs.js index c8337e1ecd4c..53c31c2f36de 100755 --- a/ui/scripts/docs.js +++ b/ui/scripts/docs.js @@ -368,7 +368,7 @@ cloudStack.docs = { externalLink: '' }, helpDiskOfferingHypervisorSnapshotReserve: { - desc: 'Hypervisor snapshot reserve space as a percent of a volume (for managed storage using XenServer or VMware) (Ex. The value 25 means 25%.)).', + desc: 'Hypervisor snapshot reserve space as a percent of a volume (for managed storage using XenServer or VMware) (Ex. The value 25 means 25%.)).' }, helpDiskOfferingCacheMode: { desc: 'The write caching mode to use for disks created with this disk offering. This can improve write performance.', diff --git a/ui/scripts/network.js b/ui/scripts/network.js index 3ae3a731d35b..28fca5e0d65d 100755 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -677,7 +677,7 @@ data: null }); } - }, + } }, account: { label: 'label.account', diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index 618bd6647bb7..9cabaf9a83a3 100644 --- a/ui/scripts/storage.js +++ b/ui/scripts/storage.js @@ -810,7 +810,7 @@ } }, name: { - label: 'label.name', + label: 'label.name' } } }, diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 5e6adcfc8278..0f8fe6a9b381 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -3985,7 +3985,7 @@ }) }); } - }, + } }, actions: { enable: { @@ -7486,7 +7486,7 @@ actionFilter: networkProviderActionFilter('GloboDns') }); } - }, + } }, actions: { add: { @@ -12917,7 +12917,7 @@ label: 'label.api.version' }, retrycount: { - label: 'label.numretries', + label: 'label.numretries' }, retryinterval: { label: 'label.retry.interval' @@ -13073,7 +13073,7 @@ label: 'label.api.version' }, retrycount: { - label: 'label.numretries', + label: 'label.numretries' }, retryinterval: { label: 'label.retry.interval' @@ -15710,7 +15710,7 @@ $.extend(data, { agentusername: args.data.agentUsername, agentpassword: args.data.agentPassword, - agentport: args.data.agentPort, + agentport: args.data.agentPort }); } } @@ -20286,7 +20286,7 @@ var jid = json[apiCmdRes].jobid; args.response.success({ _custom: { - jobId: jid, + jobId: jid } }); } diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js index 521e022e9792..a535d8a2fd94 100644 --- a/ui/scripts/templates.js +++ b/ui/scripts/templates.js @@ -992,7 +992,7 @@ //***** updateTemplatePermissions ***** var data = { - id: args.context.templates[0].id, + id: args.context.templates[0].id //zoneid: args.context.templates[0].zoneid //can't update template/ISO in only one zone. It always get updated in all zones. }; @@ -1148,7 +1148,7 @@ notification: { poll: pollAsyncJobResult } - }, + } }, tabs: { @@ -1726,8 +1726,7 @@ templatetype: { label: 'label.type' - }, - + } }], @@ -2134,7 +2133,7 @@ //***** updateIsoPermissions ***** var data = { - id: args.context.isos[0].id, + id: args.context.isos[0].id //zoneid: args.context.isos[0].zoneid //can't update template/ISO in only one zone. It always get updated in all zones. }; //if args.data.ispublic is undefined(i.e. checkbox is hidden), do not pass ispublic to API call. diff --git a/ui/scripts/ui-custom/instanceWizard.js b/ui/scripts/ui-custom/instanceWizard.js index 4f8c2e85652d..0a5370e53cb0 100644 --- a/ui/scripts/ui-custom/instanceWizard.js +++ b/ui/scripts/ui-custom/instanceWizard.js @@ -407,7 +407,7 @@ ['featuredisos', 'instance-wizard-featured-isos'], ['communityisos', 'instance-wizard-community-isos'], ['myisos', 'instance-wizard-my-isos'], - ['sharedisos', 'instance-wizard-shared-isos'], + ['sharedisos', 'instance-wizard-shared-isos'] //['isos', 'instance-wizard-all-isos'] ] ).each(function() { diff --git a/ui/scripts/ui-custom/login.js b/ui/scripts/ui-custom/login.js index 1f82c8299822..194c8812c305 100644 --- a/ui/scripts/ui-custom/login.js +++ b/ui/scripts/ui-custom/login.js @@ -142,7 +142,7 @@ }, error: function(xhr) { $login.find('#saml-login').hide(); - }, + } }); // Select language diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js index 2ae056b8a336..30fee38e90ea 100755 --- a/ui/scripts/zoneWizard.js +++ b/ui/scripts/zoneWizard.js @@ -471,7 +471,7 @@ desc: 'message.tooltip.internal.dns.2', validation: { ipv4: true - }, + } }, hypervisor: { label: 'label.hypervisor',