From 70b62934c17605c5c8c3c9aee4bba71a0f9c52a8 Mon Sep 17 00:00:00 2001 From: Jordan Wright Date: Mon, 26 Dec 2016 17:27:00 -0600 Subject: [PATCH] Now displaying errors in the campaign results. Fixes #456 --- static/js/app/campaign_results.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/static/js/app/campaign_results.js b/static/js/app/campaign_results.js index 90403b6b..f4aed2d3 100644 --- a/static/js/app/campaign_results.js +++ b/static/js/app/campaign_results.js @@ -259,10 +259,12 @@ function renderTimeline(data) { ' ' + '
' + escapeHtml(event.message) + ' ' + moment(event.time).format('MMMM Do YYYY h:mm a') + '' - if (event.details && event.message == "Submitted Data") { - results += '
' - results += '
View Details
' + if (event.details) { + if (event.message == "Submitted Data") { + results += '
' + results += '
View Details
' + } details = JSON.parse(event.details) if (details.payload) { results += '
' @@ -281,6 +283,7 @@ function renderTimeline(data) { results += '
' } if (details.error) { + results += '
View Details
' results += '
' results += 'Error ' + details.error results += '
'