Changeset 11222 for branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ChartHelper.cshtml
- Timestamp:
- 07/24/14 09:16:42 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ChartHelper.cshtml
r11196 r11222 250 250 $("#@(destinationTag)").find(".errorContainer, .errorTitle, .errorTask, .errorMessage").css('display','none'); 251 251 252 //Set variable for tracking jobId and open first job grouping 253 var currentJob = result[0].JobId; 254 $("#@(destinationTag)").append('<section class="jobTaskGroup" id="' + result[0].JobId + '"><h1>' + result[0].JobName + '</h1></section>'); 255 252 256 //For each result create a seperate collapsable section with a chart and info label 253 257 for(var i = 0; i < result.length; i++){ 254 $("#" + "@(destinationTag)").append( 258 if(currentJob != result[i].JobId) { 259 $("#@(destinationTag)").append('<section class="jobTaskGroup" id="' + result[i].JobId + '"><h1>' + result[i].JobName + '</h1></section>'); 260 currentJob = result[i].JobId; 261 } 262 $("#" + currentJob).append( 255 263 '<section class="chartContainer">' + 256 '<h1 class="title" id="@(destinationTag)' + result[i]. Key + 'PlotTitle">Task ' + result[i].Key+ '</h1>' +264 '<h1 class="title" id="@(destinationTag)' + result[i].TaskId + 'PlotTitle">Task ' + result[i].TaskId + '</h1>' + 257 265 '<button class="collapse" onclick="CollapseSection(this)">+</button>' + 258 266 '<div id="@(destinationTag)Plot' + i + '"></div>' + 259 267 '<label id="@(destinationTag)PlotInfo' + i + '"></label>' + 268 '<a id="' + result[i].TaskId + '" class="moreInfo" onclick="MoreTaskInfo(this)">More Info</a>' + 260 269 '</section>' 261 270 ) … … 263 272 //those of errors 264 273 $(".errorTask","#" + "@(destinationTag)").each(function() { 265 if($(this).html()==result[i]. Key) {266 $("#@(destinationTag)" + result[i]. Key+ "PlotTitle").css("color","red");267 $("#@(destinationTag)" + result[i]. Key+ "PlotTitle").append(" - ERROR");274 if($(this).html()==result[i].TaskId) { 275 $("#@(destinationTag)" + result[i].TaskId + "PlotTitle").css("color","red"); 276 $("#@(destinationTag)" + result[i].TaskId + "PlotTitle").append(" - ERROR"); 268 277 $(".errorContainer, .errorTitle, .underline","#@(destinationTag)").css('display','inline-block'); 269 278 $(this).css('display','inline-block'); … … 271 280 } 272 281 }); 273 waitTime = [result[i]. Value[0]];274 transferTime = [result[i]. Value[1]];275 runTime = [result[i]. Value[2]];282 waitTime = [result[i].TotalWaiting]; 283 transferTime = [result[i].TotalTransfer]; 284 runTime = [result[i].TotalRuntime]; 276 285 window["@(destinationTag)Plot" + i] = $.jqplot("@(destinationTag)Plot" + i, [waitTime,transferTime,runTime], { 277 286 seriesDefaults:{ … … 307 316 upon data in the label below the chart */ 308 317 $("#" + "@(destinationTag)Plot" + i).bind('jqplotDataClick', function (ev, seriesIndex, pointIndex, data) { 309 $(this). siblings("label").html(seriesDescriptions[seriesIndex] + ": " + data[1]);318 $(this).next("label").html(seriesDescriptions[seriesIndex] + ": " + data[1]); 310 319 }); 311 320 … … 551 560 $('#' + destTag).append( 552 561 '<section class="chartContainer">' + 553 '<h1 class="title" id="' + destTag + result[i][0].SlaveID + 'PlotTitle">Slave ' + result[i][0]. SlaveID+ '</h1>' +562 '<h1 class="title" id="' + destTag + result[i][0].SlaveID + 'PlotTitle">Slave ' + result[i][0].ClientName + '</h1>' + 554 563 '<button class="collapse" onclick="CollapseSection(this)">+</button>' + 555 564 '<div id="' + destTag + slaveChartNames[0] + 'Plot' + i + '"></div>' + 556 565 '<div id="' + destTag + slaveChartNames[1] + 'Plot' + i + '"></div>' + 557 566 '<div id="' + destTag + slaveChartNames[2] + 'Plot' + i + '"></div>' + 567 '<a id="' + result[i][0].SlaveID + '" class="moreInfo" onclick="MoreSlaveInfo(this)">More Info</a>' + 558 568 '</section>'); 559 569 for(j = 0; j < result[i].length; j++) {
Note: See TracChangeset
for help on using the changeset viewer.