diff options
author | 2021-08-27 16:11:39 -0400 | |
---|---|---|
committer | 2021-08-27 17:28:40 -0400 | |
commit | db784313b8ba29f5d4396c1cc96bb5f3c853677f (patch) | |
tree | f26c260919b39751747ad64e87b1a7932c222046 /gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskTab.js | |
parent | bcca60b3c9e50e93a0f309905049ddbbf45768ef (diff) |
Fix sonar issues in policy/gui
Issue-ID: POLICY-3077
Change-Id: Idcd08427cbff2cfdd8ba99db7cf32a0f5c978415
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Diffstat (limited to 'gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskTab.js')
-rw-r--r-- | gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskTab.js | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskTab.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskTab.js index 28d9379..9c79ad4 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskTab.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskTab.js @@ -2,6 +2,7 @@ * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. * Modifications Copyright (C) 2020-2021 Nordix Foundation. + * Modifications Copyright (C) 2021 Bell Canada. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,8 +38,8 @@ function taskTab_activate() { ajax_get(requestURL, function(data) { $("#taskTableBody").find("tr:gt(0)").remove(); - for (let i = 0; i < data.messages.message.length; i++) { - const task = JSON.parse(data.messages.message[i]).apexTask; + for (let value of data.messages.message) { + const task = JSON.parse(value).apexTask; const taskRow_tr = document.createElement("tr"); @@ -51,8 +52,7 @@ function taskTab_activate() { "</td>"; taskTableRow += "<td><table class='ebTable'><thead><tr class='headerRow'><th>Field Name</th><th>Field Type/Schema</th><th>Optional</th></tr></thead><tbody>"; - for (var f = 0; f < task.inputFields.entry.length; f++) { - var fieldEntry = task.inputFields.entry[f]; + for (let fieldEntry of task.inputFields.entry) { taskTableRow += "<tr><td>" + @@ -67,8 +67,7 @@ function taskTab_activate() { taskTableRow += "</tbody></table></td>"; taskTableRow += "<td><table class='ebTable'><thead><tr class='headerRow'><th>Field Name</th><th>Field Type/Schema</th><th>Optional</th></tr></thead><tbody>"; - for (var t = 0; t < task.outputFields.entry.length; t++) { - fieldEntry = task.outputFields.entry[t]; + for (let fieldEntry of task.outputFields.entry) { taskTableRow += "<tr><td>" + @@ -83,8 +82,7 @@ function taskTab_activate() { taskTableRow += "</tbody></table></td>"; taskTableRow += "<td><table class='ebTable'><thead><tr class='headerRow'><th>Parameter Name</th><th>Default Value</th></tr></thead><tbody>"; - for (var p = 0; p < task.taskParameters.entry.length; p++) { - var parameterEntry = task.taskParameters.entry[p]; + for (let parameterEntry of task.taskParameters.entry) { taskTableRow += "<tr><td>" + @@ -97,8 +95,7 @@ function taskTab_activate() { taskTableRow += "</tbody></table></td>"; taskTableRow += "<td><table class='ebTable'><tbody>"; - for (var c = 0; c < task.contextAlbumReference.length; c++) { - var contextAlbumReference = task.contextAlbumReference[c]; + for (let contextAlbumReference of task.contextAlbumReference) { taskTableRow += "<tr><td>" + |