From 26dfad5d7cce00539db69f7283933be7228ceda9 Mon Sep 17 00:00:00 2001 From: James Laska Date: Tue, 15 Jul 2014 08:14:41 -0400 Subject: [PATCH] Correct jshint failure by adjusting indentation This change will need to be adjusted when the surrounding conditional is uncommented. --- awx/ui/static/js/helpers/EventViewer.js | 82 ++++++++++++------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/awx/ui/static/js/helpers/EventViewer.js b/awx/ui/static/js/helpers/EventViewer.js index 41f3a14007..8d4f82f3d6 100644 --- a/awx/ui/static/js/helpers/EventViewer.js +++ b/awx/ui/static/js/helpers/EventViewer.js @@ -209,51 +209,51 @@ angular.module('EventViewerHelper', ['ModalDialog', 'Utilities', 'EventsViewerFo keys.forEach(function(key) { var label; //if (EventsViewerForm.fields[key] && EventsViewerForm.fields[key].section === section) { - label = EventsViewerForm.fields[key].label; - if (Empty(obj[key])) { - // exclude empty items + label = EventsViewerForm.fields[key].label; + if (Empty(obj[key])) { + // exclude empty items + } + else if (typeof obj[key] === "boolean" || typeof obj[key] === "number" || typeof obj[key] === "string") { + found = true; + html += "" + label + ":"; + if (key === "status") { + html += " " + obj[key]; } - else if (typeof obj[key] === "boolean" || typeof obj[key] === "number" || typeof obj[key] === "string") { - found = true; - html += "" + label + ":"; - if (key === "status") { - html += " " + obj[key]; - } - else if (key === "start" || key === "end" || key === "created") { - if (!/Z$/.test(obj[key])) { - //sec = parseInt(obj[key].substr(obj[key].length - 6, 6),10) / 1000); - //obj[key] = obj[key].replace(/\d{6}$/,sec) + 'Z'; - obj[key] = obj[key].replace(/\ /,'T') + 'Z'; - html += $filter('date')(obj[key], 'MM/dd/yy HH:mm:ss.sss'); - } - else { - html += $filter('date')(obj[key], 'MM/dd/yy HH:mm:ss'); - } - } - else if (key === "host_name" && obj.host_id) { - html += "" + obj[key] + ""; + else if (key === "start" || key === "end" || key === "created") { + if (!/Z$/.test(obj[key])) { + //sec = parseInt(obj[key].substr(obj[key].length - 6, 6),10) / 1000); + //obj[key] = obj[key].replace(/\d{6}$/,sec) + 'Z'; + obj[key] = obj[key].replace(/\ /,'T') + 'Z'; + html += $filter('date')(obj[key], 'MM/dd/yy HH:mm:ss.sss'); } else { - html += obj[key]; + html += $filter('date')(obj[key], 'MM/dd/yy HH:mm:ss'); } + } + else if (key === "host_name" && obj.host_id) { + html += "" + obj[key] + ""; + } + else { + html += obj[key]; + } - html += "\n"; - } - else if (typeof obj[key] === "object" && Array.isArray(obj[key])) { - found = true; - html += "" + label + ":"; - obj[key].forEach(function(row) { - html += "[" + row + "],"; - }); - html = html.replace(/,$/,''); - html += "\n"; - } - else if (typeof obj[key] === "object") { - found = true; - html += "" + label + ":\n" + parseJSON(obj[key]) + "\n"; - } + html += "\n"; + } + else if (typeof obj[key] === "object" && Array.isArray(obj[key])) { + found = true; + html += "" + label + ":"; + obj[key].forEach(function(row) { + html += "[" + row + "],"; + }); + html = html.replace(/,$/,''); + html += "\n"; + } + else if (typeof obj[key] === "object") { + found = true; + html += "" + label + ":\n" + parseJSON(obj[key]) + "\n"; + } //} }); html += "\n"; @@ -293,4 +293,4 @@ angular.module('EventViewerHelper', ['ModalDialog', 'Utilities', 'EventsViewerFo html = "
" + val + "
\n"; $('#' + id).empty().html(html); }; - }]); \ No newline at end of file + }]);