in AzureCT/ServerSide/DisplayAvailability.js [61:126]
$('Job', xml).each(function (i) {
jobID = $(this).find('ID').text();
// Pull Job Header info into variables
if (jobID == headerJobID) {
currentStartTime = $(this).find('StartTime').text();
currentEndTime = $(this).find('EndTime').text();
currentTarget = $(this).find('Target').text();
currentTimeoutSeconds = $(this).find('TimeoutSeconds').text();
currentCallCount = $(this).find('CallCount').text();
currentSuccessRate = $(this).find('SuccessRate').text();
currentJobMin = $(this).find('JobMin').text();
currentJobMax = $(this).find('JobMax').text();
currentJobMedian = $(this).find('JobMedian').text();
var t1 = new Date(currentStartTime);
var t2 = new Date(currentEndTime);
var dif = (t2 - t1) / 1000;
var runDays = Math.floor(dif / 86400);
var rem = dif - (runDays * 86400);
var runHours = Math.floor(rem / 3600);
var rem = rem - (runHours * 3600);
var runMinutes = Math.floor(rem / 60);
var runSeconds = rem - (runMinutes * 60);
if ((+runDays) == (+1)) { var unitDays = 'Day'; } else { var unitDays = 'Days'; };
currentJobDuration = runDays + ' ' + unitDays + ', ' + pad(runHours) + ':' + pad(runMinutes) + ':' + pad(runSeconds) + ' (hh:mm:ss)';
myHTMLOutput = '';
myHTMLOutput += '<table id="SummaryTable">';
myHTMLOutput += '<tr><td class="SumHead" colspan=6 style="text-align:left;">Job Details:</td></tr>';
myHTMLOutput += '<tr>';
myHTMLOutput += '<td>Start Time:</td>';
myHTMLOutput += '<td>' + dateString(t1, 'noMilli') + '</td>';
myHTMLOutput += '<td>End Time:</td>';
myHTMLOutput += '<td>' + dateString(t2, 'noMilli') + '</td>';
myHTMLOutput += '<td>Job Duration:</td>';
myHTMLOutput += '<td>' + currentJobDuration + '</td>';
myHTMLOutput += '</tr>';
myHTMLOutput += '<tr>';
myHTMLOutput += '<td>Target IP:</td>';
myHTMLOutput += '<td>' + currentTarget + '</td>';
myHTMLOutput += '<td>Calls Sent:</td>';
myHTMLOutput += '<td>' + currentCallCount + ' (' + currentSuccessRate + '%) Successful</td>';
myHTMLOutput += '<td>Timeout Value:</td>';
myHTMLOutput += '<td>' + currentTimeoutSeconds + ' Seconds</td>';
myHTMLOutput += '</tr>';
myHTMLOutput += '<tr><td class="SumHead" colspan="6" style="text-align:left;">Results Summary:</td></tr>';
myHTMLOutput += '<tr>';
myHTMLOutput += '<td>Min:</td>';
myHTMLOutput += '<td>' + currentJobMin + ' ms</td>';
myHTMLOutput += '<td>Max:</td>';
myHTMLOutput += '<td>' + currentJobMax + ' ms</td>';
myHTMLOutput += '<td>Median:</td>';
myHTMLOutput += '<td>' + currentJobMedian + ' ms</td>';
myHTMLOutput += '</tr>';
myHTMLOutput += '</table>';
$("#SummaryDiv").html(myHTMLOutput);
};
});