@* 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 += '