@* HeuristicLab * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL) * * This file is part of HeuristicLab. * * HeuristicLab is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * HeuristicLab is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with HeuristicLab. If not, see . *@ @helper UserList(string destinationTag, string url, bool multiline) { } @helper UserTaskStats(string destinationTag, string url, string userName, string start, string end) { if (userName != "" || userName != null) { $.ajax({ url: "@(new HtmlString(url))?start=" + @start + "&end=" + @end, datatype: "json", success: function (overallResult) { $.ajax({ url: "@(new HtmlString(url))?start=" + @start + "&end=" + @end + "&userName=" + @userName, datatype: "json", success: function (userResult) { $("#" + "@destinationTag").html(""); var appendUnits; for (var i = 0; i < userResult.length; i++) { if(userResult[i].Key == "Total Waiting Time" || userResult[i].Key == "Total Transfer Time" || userResult[i].Key == "Total Runtime") { appendUnits = " seconds"; } else if (userResult[i].Key == "Memory Required") { appendUnits = " KB"; } else { appendUnits = ""; } $("#" + "@destinationTag").append(''); $("#" + "@destinationTag").append( '
' + '
' + '' + '
' + '
' + '' ); $("#InnerBar" + i).css('width',((userResult[i].Value/overallResult[i].Value)*100).toFixed(2) + '%'); } } }); } });
} } @helper MoreTaskInfo(string url) { function MoreTaskInfo(caller) { if($(caller).siblings('.moreInfoTable').length == 0) { var taskId = $(caller).attr('id'); $.ajax({ url: "@(new HtmlString(url))?taskId=" + taskId, datatype: "json", success: function (result) { var appendUnits; var appendString = ''; for (var i = 0; i < result.length; i++) { if (result[i].Key == "Memory Required") { appendUnits = " KB"; } else { appendUnits = ""; } if(i % 2 == 0 && i != 0) { appendString += ''; } appendString += ''; } appendString += '
'; appendString += '
' $(caller).parent().append(appendString); } }); $(caller).html("Less Info"); } else { $(caller).siblings('.moreInfoTable').remove(); $(caller).html("More Info"); } }
} @helper MoreSlaveInfo(string url, string startDate, string endDate) { function MoreSlaveInfo(caller) { CheckFilters(); if($(caller).siblings('.moreInfoTable').length == 0) { var slaveId = $(caller).attr('id'); var GetRequest = "?slaveId=" + slaveId; @if (startDate != null) { @:if(@(startDate)!=null) { @:GetRequest += "&start=" + @startDate; @:} } @if (endDate != null) { @:if(@(endDate)!=null) { @:GetRequest += "&end=" + @endDate; @:} } $.ajax({ url: "@(new HtmlString(url))" + GetRequest, datatype: "json", success: function (result) { var appendString = ''; for (var i = 0; i < result[0].length; i++) { appendString += '' } appendString += ''; for (var j = 0; j < result.length; j++) { appendString += ''; for (var k = 0; k < result[j].length; k++) { appendString += ''; } appendString += ''; } appendString += '
' + result[0][i].Key + '
' $(caller).parent().append(appendString); } }); $(caller).html("Less Info"); } else { $(caller).siblings('.moreInfoTable').remove(); $(caller).html("More Info"); } }
}