Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/24/14 09:16:42 (10 years ago)
Author:
mroscoe
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ChartHelper.cshtml

    r11196 r11222  
    250250        $("#@(destinationTag)").find(".errorContainer, .errorTitle, .errorTask, .errorMessage").css('display','none');
    251251
     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
    252256        //For each result create a seperate collapsable section with a chart and info label
    253257        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(
    255263            '<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>' +
    257265              '<button class="collapse" onclick="CollapseSection(this)">+</button>' +
    258266              '<div id="@(destinationTag)Plot' + i + '"></div>' +
    259267              '<label id="@(destinationTag)PlotInfo' + i + '"></label>' +
     268              '<a id="' + result[i].TaskId + '" class="moreInfo" onclick="MoreTaskInfo(this)">More Info</a>' +
    260269            '</section>'
    261270          )
     
    263272          //those of errors
    264273          $(".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");
    268277              $(".errorContainer, .errorTitle, .underline","#@(destinationTag)").css('display','inline-block');
    269278              $(this).css('display','inline-block');
     
    271280            }
    272281          });
    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];
    276285          window["@(destinationTag)Plot" + i] = $.jqplot("@(destinationTag)Plot" + i, [waitTime,transferTime,runTime], {
    277286            seriesDefaults:{
     
    307316            upon data in the label below the chart */
    308317          $("#" + "@(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]);
    310319          });
    311320
     
    551560        $('#' + destTag).append(
    552561          '<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>' +
    554563            '<button class="collapse" onclick="CollapseSection(this)">+</button>' +
    555564            '<div id="' + destTag + slaveChartNames[0] + 'Plot' + i + '"></div>' +
    556565            '<div id="' + destTag + slaveChartNames[1] + 'Plot' + i + '"></div>' +
    557566            '<div id="' + destTag + slaveChartNames[2] + 'Plot' + i + '"></div>' +
     567            '<a id="' + result[i][0].SlaveID + '" class="moreInfo" onclick="MoreSlaveInfo(this)">More Info</a>' +
    558568          '</section>');
    559569        for(j = 0; j < result[i].length; j++) {
Note: See TracChangeset for help on using the changeset viewer.