- Timestamp:
- 07/30/14 16:41:08 (10 years ago)
- Location:
- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/AdminHelper.cshtml
r11222 r11246 50 50 url: "@(new HtmlString(url))?start=" + @start + "&end=" + @end + "&userName=" + @userName, datatype: "json", success: function (userResult) { 51 51 $("#" + "@destinationTag").html(""); 52 var appendUnits; 52 53 for (var i = 0; i < userResult.length; i++) { 54 if(userResult[i].Key == "Total Waiting Time" || userResult[i].Key == "Total Transfer Time" || userResult[i].Key == "Total Runtime") { 55 appendUnits = " seconds"; 56 } 57 else if (userResult[i].Key == "Memory Required") { 58 appendUnits = " KB"; 59 } 60 else { 61 appendUnits = ""; 62 } 53 63 $("#" + "@destinationTag").append('<label class="barLabel">' + userResult[i].Key + '</label>'); 54 $("#" + "@destinationTag").append('<div class="outerBar"><div class="innerBar" id="InnerBar' + i + '"><label class="innerBarText">' + +userResult[i].Value.toFixed(4) + '</label></div></div><label class="outerBarText" id="OuterText' + i + '">' + +overallResult[i].Value.toFixed(4) + '</label>'); 64 $("#" + "@destinationTag").append( 65 '<div class="outerBar">' + 66 '<div class="innerBar" id="InnerBar' + i + '">' + 67 '<label class="innerBarText">' + +userResult[i].Value.toFixed(2) + appendUnits + '</label>' + 68 '</div>' + 69 '</div>' + 70 '<label class="outerBarText" id="OuterText' + i + '">' + +overallResult[i].Value.toFixed(2) + appendUnits + '</label>' 71 ); 55 72 $("#InnerBar" + i).css('width',((userResult[i].Value/overallResult[i].Value)*100).toFixed(2) + '%'); 56 73 } … … 71 88 $.ajax({ 72 89 url: "@(new HtmlString(url))?taskId=" + taskId, datatype: "json", success: function (result) { 90 var appendUnits; 73 91 var appendString = '<table class="moreInfoTable"><tr>'; 74 92 for (var i = 0; i < result.length; i++) { 93 if (result[i].Key == "Memory Required") { 94 appendUnits = " KB"; 95 } 96 else { 97 appendUnits = ""; 98 } 75 99 if(i % 2 == 0 && i != 0) { 76 100 appendString += '</tr><tr>'; 77 101 } 78 102 appendString += '<td class="taskInfoCell"><label class="taskInfoKey">' + result[i].Key + '</label>'; 79 appendString += '<label class="taskInfoValue">' + +result[i].Value.toFixed( 4)+ '</label></td>';103 appendString += '<label class="taskInfoValue">' + +result[i].Value.toFixed(2) + appendUnits + '</label></td>'; 80 104 } 81 105 appendString += '</tr></table>' … … 93 117 } 94 118 95 @helper MoreSlaveInfo(string url )119 @helper MoreSlaveInfo(string url, string startDate, string endDate) 96 120 { 97 121 <text> 98 122 function MoreSlaveInfo(caller) { 123 CheckFilters(); 99 124 if($(caller).siblings('.moreInfoTable').length == 0) { 100 125 var slaveId = $(caller).attr('id'); 126 var GetRequest = "?slaveId=" + slaveId; 127 @if (startDate != null) { 128 @:if(@(startDate)!=null) { 129 @:GetRequest += "&start=" + @startDate; 130 @:} 131 } 132 @if (endDate != null) { 133 @:if(@(endDate)!=null) { 134 @:GetRequest += "&end=" + @endDate; 135 @:} 136 } 101 137 $.ajax({ 102 url: "@(new HtmlString(url)) ?slaveId=" + slaveId, datatype: "json", success: function (result) {138 url: "@(new HtmlString(url))" + GetRequest, datatype: "json", success: function (result) { 103 139 var appendString = '<table class="moreInfoTable"><tr>'; 104 140 for (var i = 0; i < result[0].length; i++) { -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ChartHelper.cshtml
r11222 r11246 36 36 } 37 37 38 @helper LineChartTime(string destinationTag, string url, string title = "", double? minY = null, double? maxY = null, string axisYFormat = null) { 38 @helper LineChartTime(string destinationTag, string url, string title = "", double? minY = null, double? maxY = null, string axisYFormat = null) 39 { 39 40 <script> 40 41 var @(destinationTag)Plot = $.jqplot("@destinationTag", "@url", { … … 89 90 } 90 91 91 @helper RefreshChart(string destinationTag, string url, string startDate, string endDate, double? minY=null, double? maxY=null) { 92 @helper RefreshChart(string destinationTag, string url, string startDate, string endDate, double? minY = null, double? maxY = null) 93 { 92 94 <text> 93 95 $.ajax({url: "@(new HtmlString(url))?start=" + @startDate + "&end=" + @endDate, datatype: "json", success: function(result) { … … 97 99 //Resets only the xaxis, still need to resize y with given min/max 98 100 @(destinationTag)Plot.replot({resetAxes:true}); 99 @if(minY != null) { 101 @if (minY != null) 102 { 100 103 //If min Y was provided set the plot's min Y value 101 104 @:@(destinationTag)Plot.axes.yaxis.min = @minY; 102 105 } 103 @if(maxY != null) { 106 @if (maxY != null) 107 { 104 108 //If max Y was provided set the plot's max Y value 105 109 @:@(destinationTag)Plot.axes.yaxis.max = @maxY; … … 162 166 <text> 163 167 if(@(records).length > @limit) { 164 $("#@container").append('<label class="pageTitle">Page: </label>')168 var appendPages = '<section class="pageContainer"><label class="pageTitle">Page: </label>'; 165 169 var pages = Math.floor(@(records).length/@(limit)) + 1; 166 170 for(var i=0; i < pages; i++) { 167 $("#" + "@container").append('<a id="@(container)Page' + (i + 1) + '" class="page">' + (i + 1) + '</a>') 168 } 171 appendPages += '<a id="@(container)Page' + (i + 1) + '" class="page">' + (i + 1) + '</a>'; 172 } 173 appendPages += '</section>'; 174 $("#@container").append(appendPages); 169 175 if(@currentPage != null) { 170 176 $("#@(container)Page" + @currentPage).css('color','#F7921D'); … … 190 196 } 191 197 192 @helper Task sForUser(string destinationTag, string url, string functionName, string userName, string limit, string startDate = null, string endDate = null, string jobId = null, string taskState = null, string pageNumber = null)198 @helper TaskContainers(string destinationTag, string url, string functionName, string userName, string limit, string startDate = null, string endDate = null, string jobId = null, string taskState = null, string pageNumber = null) 193 199 { 194 200 <text> … … 235 241 } 236 242 else { 237 var waitTime;238 var transferTime;239 var runTime;240 var seriesDescriptions = ["Time waiting","Time transferring","Time calculating"];241 242 243 //Checks if multipage display, if it is then trims results to 243 244 //the results for the page to be displayed 244 245 @ChartHelper.NumberPages("result", limit, destinationTag, functionName, pageNumber) 245 246 246 //Globally accesible, for use when resizing, eliminates extra DB request247 window["numberTasks"] = result.length;248 249 247 //Set display of all errors to none, errors matching the tasks will be reset below 250 248 $("#@(destinationTag)").find(".errorContainer, .errorTitle, .errorTask, .errorMessage").css('display','none'); … … 252 250 //Set variable for tracking jobId and open first job grouping 253 251 var currentJob = result[0].JobId; 254 $("#@(destinationTag)").append('<section class="jobTaskGroup" id="' + result[0].JobId + '"><h1>' + result[0].JobName + '</h1></section>');255 252 256 253 //For each result create a seperate collapsable section with a chart and info label 257 254 for(var i = 0; i < result.length; i++){ 258 if(currentJob != result[i].JobId) { 259 $("#@(destinationTag)").append('<section class="jobTaskGroup" id="' + result[i].JobId + '"><h1>' + result[i].JobName + '</h1></section>'); 255 if(currentJob != result[i].JobId || i == 0) { 256 $("#@(destinationTag)").append( 257 '<section class="jobTaskGroup" id="' + result[i].JobId + '">' + 258 '<h1>' + result[i].JobName + '</h1>' + 259 '<section class="chartContainer">' + 260 '<h1 class="title" id="@(destinationTag)' + result[i].JobId + 'PlotTitle">Job Overview - ' + result[i].JobName + '</h1>' + 261 '<button class="collapse" onclick="LoadJob(this)">+</button>' + 262 '<div id="@(destinationTag)JobOverviewPlot' + i + '"></div>' + 263 '<label id="@(destinationTag)JobOverviewPlotInfo' + i + '"></label>' + 264 '</section>' + 265 '</section>' 266 ); 267 CollapsedByDefault(document.getElementById("@(destinationTag)JobOverviewPlot" + i)); 260 268 currentJob = result[i].JobId; 261 269 } … … 263 271 '<section class="chartContainer">' + 264 272 '<h1 class="title" id="@(destinationTag)' + result[i].TaskId + 'PlotTitle">Task ' + result[i].TaskId + '</h1>' + 265 '<button class="collapse" onclick=" CollapseSection(this)">+</button>' +273 '<button class="collapse" onclick="LoadTask(this)">+</button>' + 266 274 '<div id="@(destinationTag)Plot' + i + '"></div>' + 267 275 '<label id="@(destinationTag)PlotInfo' + i + '"></label>' + 268 276 '<a id="' + result[i].TaskId + '" class="moreInfo" onclick="MoreTaskInfo(this)">More Info</a>' + 269 277 '</section>' 270 ) 278 ); 271 279 //Re-enables the error display if any of the tasks on the page have Ids matching 272 280 //those of errors … … 280 288 } 281 289 }); 282 waitTime = [result[i].TotalWaiting]; 283 transferTime = [result[i].TotalTransfer]; 284 runTime = [result[i].TotalRuntime]; 285 window["@(destinationTag)Plot" + i] = $.jqplot("@(destinationTag)Plot" + i, [waitTime,transferTime,runTime], { 290 CollapsedByDefault(document.getElementById("@(destinationTag)Plot" + i)); 291 } 292 } 293 }}); 294 </text> 295 } 296 297 @helper LoadJob(string url) 298 { 299 <text> 300 function LoadJob(caller) { 301 CheckFilters(); 302 if($(caller).next().html()=="") { 303 var plotName = $(caller).next().attr('id'); 304 //Set current job id 305 var jobId = $(caller).parent().parent().attr('id'); 306 var GetRequest = "?jobId=" + jobId; 307 308 $.ajax({ async: false, url: "@(new HtmlString(url))" + GetRequest, datatype: "json", success: function(result) { 309 CollapseSection(caller); 310 var seriesDescription = ['Waiting','Transferring','Calculating','Finished','Error']; 311 window[plotName] = $.jqplot(plotName, [[result.Wait],[result.Transfer],[result.Calculate],[result.Finish],[result.Error]], { 286 312 seriesDefaults:{ 287 313 renderer:$.jqplot.BarRenderer, 288 314 shadowAngle: 135, 289 pointLabels: {show: true, formatString: '%. 3f'}315 pointLabels: {show: true, formatString: '%.0f'} 290 316 }, 291 317 series:[ 292 {label:'Waiting'}, 293 {label:'Transferring'}, 294 {label:'Calculating'} 318 {label:seriesDescription[0]}, 319 {label:seriesDescription[1]}, 320 {label:seriesDescription[2]}, 321 {label:seriesDescription[3]}, 322 {label:seriesDescription[4]} 295 323 ], 296 324 legend: { … … 306 334 }, 307 335 yaxis: { 308 pad : 0336 padMax: 1.5 309 337 } 310 338 }, … … 315 343 /* Bind a datalistener to each chart and display details of clicked 316 344 upon data in the label below the chart */ 317 $("#" + "@(destinationTag)Plot" + i).bind('jqplotDataClick', function (ev, seriesIndex, pointIndex, data) {318 $(this).next("label").html( seriesDescriptions[seriesIndex] + ": " + data[1]);345 $("#" + plotName).bind('jqplotDataClick', function (ev, seriesIndex, pointIndex, data) { 346 $(this).next("label").html("Tasks " + seriesDescription[seriesIndex] + ": " + data[1]); 319 347 }); 320 321 CollapsedByDefault(document.getElementById("@(destinationTag)Plot" + i)); 322 } 323 } 324 }}); 348 }}); 349 } 350 else { 351 CollapseSection(caller); 352 } 353 } 354 </text> 355 } 356 357 @helper LoadTask(string url) 358 { 359 <text> 360 function LoadTask(caller) { 361 CheckFilters(); 362 if($(caller).next().html()=="") { 363 var plotName = $(caller).next().attr('id'); 364 //Set current slave id 365 var currentTask = $(caller).siblings('a.moreInfo').attr('id'); 366 var GetRequest = "?taskId=" + currentTask; 367 368 $.ajax({ async: false, url: "@(new HtmlString(url))" + GetRequest, datatype: "json", success: function(result) { 369 var waitTime; 370 var transferTime; 371 var runTime; 372 var seriesDescriptions = ["Time waiting","Time transferring","Time calculating"]; 373 CollapseSection(caller); 374 for(i = 0; i < result.length; i++) { 375 waitTime = [result[i].TotalWaiting]; 376 transferTime = [result[i].TotalTransfer]; 377 runTime = [result[i].TotalRuntime]; 378 window[plotName] = $.jqplot(plotName, [waitTime,transferTime,runTime], { 379 seriesDefaults:{ 380 renderer:$.jqplot.BarRenderer, 381 shadowAngle: 135, 382 pointLabels: {show: true, formatString: '%.3f'} 383 }, 384 series:[ 385 {label:'Waiting'}, 386 {label:'Transferring'}, 387 {label:'Calculating'} 388 ], 389 legend: { 390 show: true, 391 location: 'e', 392 placement: 'outside' 393 }, 394 axes: { 395 xaxis: { 396 renderer: $.jqplot.CategoryAxisRenderer, 397 showLabel: false, 398 pad: 0 399 }, 400 yaxis: { 401 pad: 0 402 } 403 }, 404 cursor: { 405 showTooltip: false 406 } 407 }); 408 /* Bind a datalistener to each chart and display details of clicked 409 upon data in the label below the chart */ 410 $("#" + plotName).bind('jqplotDataClick', function (ev, seriesIndex, pointIndex, data) { 411 $(this).next("label").html(seriesDescriptions[seriesIndex] + ": " + data[1].toFixed(4) + " seconds"); 412 }); 413 } 414 }}); 415 } 416 else { 417 CollapseSection(caller); 418 } 419 } 325 420 </text> 326 421 } … … 467 562 } 468 563 469 @helper Slave InfoChart(string destinationTag, string url, string limit, bool singleSlave, string startDate = null, string endDate = null, string userName = null, string functionName = null, string pageNumber = null, string slaveId = null)564 @helper SlaveContainers(string destinationTag, string url, string limit, bool singleSlave, string startDate = null, string endDate = null, string userName = null, string functionName = null, string pageNumber = null, string slaveId = null) 470 565 { 471 566 <text> … … 515 610 @:} 516 611 } 517 $.ajax({ 518 async: false, url: "@(new HtmlString(url))" + GetRequest, datatype: "json", success: function(result) { 519 520 //Set chart names for use in creation below, must be set identically in 521 //ResizeSlaves 612 $.ajax({ async: false, url: "@(new HtmlString(url))" + GetRequest, datatype: "json", success: function(result) { 613 //Set chart names for use in creation below, must be set identically in LoadSlave and ResizeSlaves 522 614 var slaveChartNames = ["TotalUsedCores","TotalUsedMemory","CPUUtilization"]; 523 615 524 var destTag = eval("@(destinationTag)"); 525 if(typeof eval("@(destinationTag)") != "string") { 526 destTag = "@(destinationTag)"; 616 @if (!singleSlave) { 617 @:$('#@(destinationTag)').html(""); 618 619 //Checks if multipage display, if it is then trims results to 620 //the results for the page to be displayed 621 @ChartHelper.NumberPages("result", limit, destinationTag, functionName, pageNumber) 622 623 624 @:var destTag = "@(destinationTag)"; 625 } 626 else { 627 @:var destTag = @(destinationTag); 527 628 } 528 629 529 630 if(result.length == 0) { 530 @if (!singleSlave) { 631 @if (!singleSlave) 632 { 531 633 @:$('#' + destTag).html(""); 532 634 } … … 537 639 ) 538 640 } 539 else { 540 var time = new Date(); 541 542 @if (!singleSlave) 641 642 for(i = 0; i < result.length; i++) { 643 $('#' + destTag).append( 644 '<section class="chartContainer">' + 645 '<h1 class="title" id="' + destTag + result[i][0].SlaveID + 'PlotTitle">Slave ' + result[i][0].ClientName + '</h1>' + 646 '<button class="collapse" onclick="LoadSlave(this)">+</button>' + 647 '<div id="' + destTag + slaveChartNames[0] + 'Plot' + result[i][0].SlaveID + '"></div>' + 648 '<div id="' + destTag + slaveChartNames[1] + 'Plot' + result[i][0].SlaveID + '"></div>' + 649 '<div id="' + destTag + slaveChartNames[2] + 'Plot' + result[i][0].SlaveID + '"></div>' + 650 '<a id="' + result[i][0].SlaveID + '" class="moreInfo" onclick="MoreSlaveInfo(this)">More Info</a>' + 651 '</section>'); 652 for(k = 0; k < slaveChartNames.length; k++) { 653 CollapsedByDefault(document.getElementById(destTag + slaveChartNames[k] + "Plot" + result[i][0].SlaveID)); 654 } 655 } 656 }}); 657 </text> 658 } 659 660 @helper LoadSlave(string url, string limit, string startDate = null, string endDate = null, string userName = null, string pageNumber = null) { 661 <text> 662 function LoadSlave(caller) { 663 CheckFilters(); 664 if($(caller).next().html()=="") { 665 var destTag = $(caller).parent().parent().attr('id'); 666 //Set current slave id 667 var currentSlave = $(caller).siblings('a.moreInfo').attr('id'); 668 var GetRequest = "?slaveId=" + currentSlave; 669 @if (startDate != null) 543 670 { 544 @:$('#' + destTag).html(""); 545 546 //Checks if multipage display, if it is then trims results to 547 //the results for the page to be displayed 548 @ChartHelper.NumberPages("result", limit, destinationTag, functionName, pageNumber) 549 } 550 551 for(i = 0; i < result.length; i++) { 671 @:if(@(startDate)!=null) { 672 @:GetRequest += "&start=" + @startDate; 673 @:} 674 } 675 @if (endDate != null) 676 { 677 @:if(@(endDate)!=null) { 678 @:GetRequest += "&end=" + @endDate; 679 @:} 680 } 681 @if (userName != null) 682 { 683 @:if(@(userName)!=null) { 684 @:GetRequest += "&userName=" + @userName; 685 @:} 686 } 687 $.ajax({ async: false, url: "@(new HtmlString(url))" + GetRequest, datatype: "json", success: function(result) { 688 //Set chart names for use in creation below, must be set identically in SlaveContainers and ResizeSlaves 689 var slaveChartNames = ["TotalUsedCores","TotalUsedMemory","CPUUtilization"]; 690 CollapseSection(caller); 691 var time = new Date(); 552 692 var coreSeries = []; 553 693 coreSeries[0] = []; … … 558 698 var cpuSeries = []; 559 699 cpuSeries[0] = []; 560 $('#' + destTag).append( 561 '<section class="chartContainer">' + 562 '<h1 class="title" id="' + destTag + result[i][0].SlaveID + 'PlotTitle">Slave ' + result[i][0].ClientName + '</h1>' + 563 '<button class="collapse" onclick="CollapseSection(this)">+</button>' + 564 '<div id="' + destTag + slaveChartNames[0] + 'Plot' + i + '"></div>' + 565 '<div id="' + destTag + slaveChartNames[1] + 'Plot' + i + '"></div>' + 566 '<div id="' + destTag + slaveChartNames[2] + 'Plot' + i + '"></div>' + 567 '<a id="' + result[i][0].SlaveID + '" class="moreInfo" onclick="MoreSlaveInfo(this)">More Info</a>' + 568 '</section>'); 569 for(j = 0; j < result[i].length; j++) { 570 time.setTime(result[i][j].Time.replace(/\D/g,'')); 571 coreSeries[0].push([time.toUTCString(),result[i][j].TotalCores]); 572 coreSeries[1].push([time.toUTCString(),result[i][j].UsedCores]); 573 memorySeries[0].push([time.toUTCString(),(result[i][j].TotalMemory / 1000)]); 574 memorySeries[1].push([time.toUTCString(),(result[i][j].UsedMemory / 1000)]); 575 cpuSeries[0].push([time.toUTCString(),result[i][j].CPUUtilization]); 576 } 577 if(result[i].length > 1) { 578 @ChartHelper.LineChartGivenSeries("destTag + slaveChartNames[0]", "i", "coreSeries", "Total/Used Cores") 579 @ChartHelper.LineChartGivenSeries("destTag + slaveChartNames[1]", "i", "memorySeries", "Total/Used Memory", 0) 580 @ChartHelper.LineChartGivenSeries("destTag + slaveChartNames[2]", "i", "cpuSeries", "CPU Utilization", 0, 100, "%.1f%%") 700 for(i = 0; i < result.length; i++) { 701 time.setTime(result[i].Time.replace(/\D/g,'')); 702 coreSeries[0].push([time.toUTCString(),result[i].TotalCores]); 703 coreSeries[1].push([time.toUTCString(),result[i].UsedCores]); 704 memorySeries[0].push([time.toUTCString(),(result[i].TotalMemory / 1000)]); 705 memorySeries[1].push([time.toUTCString(),(result[i].UsedMemory / 1000)]); 706 cpuSeries[0].push([time.toUTCString(),result[i].CPUUtilization]); 707 } 708 if(result.length > 1) { 709 @ChartHelper.LineChartGivenSeries("destTag + slaveChartNames[0]", "currentSlave", "coreSeries", "Total/Used Cores") 710 @ChartHelper.LineChartGivenSeries("destTag + slaveChartNames[1]", "currentSlave", "memorySeries", "Total/Used Memory", 0) 711 @ChartHelper.LineChartGivenSeries("destTag + slaveChartNames[2]", "currentSlave", "cpuSeries", "CPU Utilization", 0, 100, "%.1f%%") 581 712 } 582 713 else { 583 @ChartHelper.BarChartGivenSeries("destTag + slaveChartNames[0]", " i", "coreSeries", "Total/Used Cores")584 @ChartHelper.BarChartGivenSeries("destTag + slaveChartNames[1]", " i", "memorySeries", "Total/Used Memory", 0)585 @ChartHelper.BarChartGivenSeries("destTag + slaveChartNames[2]", " i", "cpuSeries", "CPU Utilization", 0, 100, "%.1f%%")586 } 587 for(k = 0; k < slaveChartNames.length; k++) {588 CollapsedByDefault(document.getElementById(destTag + slaveChartNames[k] + "Plot" + i));589 }590 }591 } 592 } });714 @ChartHelper.BarChartGivenSeries("destTag + slaveChartNames[0]", "currentSlave", "coreSeries", "Total/Used Cores") 715 @ChartHelper.BarChartGivenSeries("destTag + slaveChartNames[1]", "currentSlave", "memorySeries", "Total/Used Memory", 0) 716 @ChartHelper.BarChartGivenSeries("destTag + slaveChartNames[2]", "currentSlave", "cpuSeries", "CPU Utilization", 0, 100, "%.1f%%") 717 } 718 }}); 719 } 720 else { 721 CollapseSection(caller); 722 } 723 } 593 724 </text> 594 725 } … … 686 817 </text> 687 818 } 819 820 @helper UserTasks(string url, string insertAfter, string taskState) { 821 <text> 822 var GetRequest = "?taskState=@(taskState)"; 823 824 $.ajax({ async: false, url: "@(new HtmlString(url))" + GetRequest, datatype: "json", success: function(result) { 825 if(result.length==0) { 826 $("@(insertAfter)").after( 827 '<section class="chartContainer">' + 828 '<h1 class="title">No users currently have any tasks ' + @(taskState) + '!</h1>' + 829 '</section>' 830 ) 831 } 832 else { 833 $("@(insertAfter)").after( 834 '<section class="chartContainer">' + 835 '<h1 class="title" id="UserTask@(taskState)PlotTitle">@(taskState) Tasks</h1>' + 836 '<button class="collapse" onclick="CollapseSection(this)">-</button>' + 837 '<div id="UserTask@(taskState)Plot" class="noXTicks"></div>' + 838 '</section>' 839 ); 840 } 841 var userTasks = []; 842 var userNames = []; 843 for (i=0; i < result.length; i++) { 844 userTasks[i] = [result[i].Value]; 845 userNames[i] = { label: result[i].Key }; 846 } 847 window["UserTask@(taskState)Plot"] = $.jqplot("UserTask@(taskState)Plot", userTasks, { 848 title: "Users with @(taskState) Tasks", 849 seriesDefaults:{ 850 renderer:$.jqplot.BarRenderer, 851 shadowAngle: 135, 852 pointLabels: {show: true, formatString: '%.3f'} 853 }, 854 series: userNames, 855 legend: { 856 show: true, 857 location: 'e', 858 placement: 'outside' 859 }, 860 axes: { 861 xaxis: { 862 renderer: $.jqplot.CategoryAxisRenderer, 863 showTicks: false, 864 pad: 0 865 }, 866 yaxis: { 867 padMax: 1.5 868 } 869 }, 870 cursor: { 871 showTooltip: false 872 } 873 }); 874 }}); 875 </text> 876 } -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ExceptionHelper.cshtml
r11222 r11246 18 18 *@ 19 19 20 @helper UserExceptions(string destinationTag, string url, string limit, stringuserName = null, string startDate = null, string endDate = null, string jobId = null, string taskState = null, string slaveId=null)20 @helper UserExceptions(string destinationTag, string url, string userName = null, string startDate = null, string endDate = null, string jobId = null, string taskState = null, string slaveId=null) 21 21 { 22 22 <text> … … 88 88 } 89 89 90 $.ajax({async: false, url: "@(new HtmlString(url))" + GetRequest, datatype: "json", success: function(result) { 90 $.ajax({async: false, url: "@(new HtmlString(url))" + GetRequest, datatype: "json", 91 error: function(xhr,err) { 92 alert("readyState: "+xhr.readyState+"\nstatus: "+xhr.status); 93 alert("responseText: "+xhr.responseText); 94 }, 95 success: function(result) { 91 96 $("#" + "@destinationTag").html(""); 92 97 if(result.Key.length > 0) { … … 96 101 '<label class="errorMessage underline">Error</label>'; 97 102 for (var i = 0; i < result.Key.length; i++) { 98 ErrorHTML += '<a class="errorTask" onclick="ScrollTo(this)">' + result.Key[i] + '</a>' + 99 '<label class="errorMessage">' + result.Value[i] + '</label>'; 103 ErrorHTML += '<a class="errorTask" onclick="ScrollTo(this)">' + result.Key[i] + '</a>'; 104 if(result.Value[i].length > 100) { 105 ErrorHTML += '<a class="errorMessage shortVerison" onclick="ShowFullError(this)">Click to show full message</a>'; 106 ErrorHTML += '<label class="errorMessage longVersion">' + result.Value[i] + '</label>'; 107 } 108 else { 109 ErrorHTML += '<label class="errorMessage">' + result.Value[i] + '</label>'; 110 } 100 111 } 101 112 ErrorHTML += '</section>'; … … 118 129 function ScrollTo(caller) { 119 130 var taskErrorId = $(caller).parent().parent().attr('id') + $(caller).html() + "PlotTitle"; 120 OpenOnError(document.getElementById(taskErrorId));131 $("#" + taskErrorId).parent().find("button").click(); 121 132 $('html, body').animate({ 122 133 scrollTop: $("#" + taskErrorId).parent().offset().top … … 238 249 function ShowSlaveInfo(caller) { 239 250 var taskSlaveId = $(caller).attr('id'); 251 CheckFilters(); 240 252 if($(caller).parent().parent().children(".chartContainer").length == 0) { 241 @ChartHelper.SlaveInfoChart("caller.parentNode.parentNode.id",url,limit,true,startDate,endDate,null,null,null,"taskSlaveId") 253 var destinationTag = $(caller).parent().parent().attr('id'); 254 @ChartHelper.SlaveContainers("destinationTag",url,limit,true,startDate,endDate,null,null,null,"taskSlaveId") 242 255 } 243 256 else { … … 247 260 </text> 248 261 } 262 263 @helper ShowFullError() { 264 <text> 265 function ShowFullError(caller) { 266 $(caller).css('display','none'); 267 $(caller).next().css('display','inline-block'); 268 } 269 </text> 270 } -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Content/Site.css
r11222 r11246 94 94 .errorTask { 95 95 margin-left: 2%; 96 } 97 98 a.errorTask { 96 vertical-align: top; 97 } 98 99 a.errorTask, .shortVerison { 99 100 cursor: pointer; 101 } 102 103 .shortVerison { 104 text-decoration: underline; 100 105 } 101 106 … … 294 299 295 300 /* Multi-page Task Styles */ 301 .pageContainer { 302 width: 100%; 303 padding-left: 2%; 304 } 305 296 306 .pageTitle, .page { 297 307 margin-right: 1%; … … 300 310 } 301 311 302 .pageTitle {303 margin-left: 2%;304 }305 306 312 .page { 307 313 text-decoration: underline; 308 314 cursor: pointer; 315 display: inline-block; 309 316 } 310 317 … … 516 523 background-color: rgba(247,146,29,0.42); 517 524 } 525 526 .noXTicks .jqplot-xaxis { 527 display: none; 528 } 529 530 .currentStats table { 531 width: 66%; 532 margin: 2% 0% 0% 17%; 533 -webkit-border-radius: 5px; 534 -moz-border-radius: 5px; 535 border-radius: 5px; 536 border: 1px solid #8297F5; 537 } 538 539 .currentStats td:first-of-type, .currentStats td:nth-of-type(3) { 540 width: 35%; 541 padding-top: 1%; 542 padding-left: 1%; 543 } 544 545 .currentStats td:nth-of-type(2), .currentStats td:nth-of-type(4) { 546 width: 15%; 547 } 548 549 .currentStats tr:last-of-type td { 550 padding-bottom: 1%; 551 } 552 553 .currentStats tr td:nth-of-type(2) { 554 border-right: 1px solid #8297F5; 555 } 556 518 557 /* User Page Styles*/ 519 558 #TasksContainer div[id^="Task"] { -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/AdminDataController.cs
r11222 r11246 73 73 } 74 74 75 public JsonResult MoreSlaveInfo(string slaveId ) {75 public JsonResult MoreSlaveInfo(string slaveId, DateTime? start = null, DateTime? end = null) { 76 76 using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) 77 77 { 78 78 var moreInfo = (from slaves in db.FactClientInfos 79 where slaves.ClientId.ToString() == slaveId 79 where slaves.ClientId.ToString() == slaveId && 80 (!start.HasValue || slaves.Time >= start) && 81 (!end.HasValue || slaves.Time < end) 80 82 select new 81 83 { -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ChartDataController.cs
r11222 r11246 139 139 } 140 140 141 public JsonResult UserTask(string userName, DateTime? start = null, DateTime? end = null, string jobId = null, string taskState=null) { 142 using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) { 141 public JsonResult GetTasks(string userName, DateTime? start = null, DateTime? end = null, string jobId = null, string taskState = null) 142 { 143 using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) 144 { 143 145 TaskState? state = GetTaskState(taskState); 144 146 … … 157 159 JobId = jobs.JobId, 158 160 TaskId = tasks.TaskId, 161 StartDate = tasks.StartTime 162 }).OrderByDescending(s => s.StartDate).ToList(); 163 164 //Was overflowing default MaxJsonLength 165 //return Json(data, JsonRequestBehavior.AllowGet); 166 return new JsonResult() { Data = data, JsonRequestBehavior = JsonRequestBehavior.AllowGet, MaxJsonLength = Int32.MaxValue }; 167 } 168 } 169 170 public JsonResult TaskInfo(string taskId) 171 { 172 using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) 173 { 174 var data = 175 (from tasks in db.FactTasks 176 join jobs in db.DimJobs 177 on tasks.JobId equals jobs.JobId 178 where tasks.TaskId.ToString() == taskId 179 select new 180 { 159 181 TotalWaiting = tasks.TotalWaitingTime, 160 182 TotalTransfer = tasks.TotalTransferTime, … … 167 189 } 168 190 169 public JsonResult SlaveInfo(DateTime? start = null, DateTime? end = null, string userName = null, string slaveId=null)191 public JsonResult GetSlaves(DateTime? start = null, DateTime? end = null, string userName = null, string slaveId = null) 170 192 { 171 193 using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) … … 185 207 ClientName = clients.Name, 186 208 SlaveID = slaves.ClientId, 209 }).GroupBy(s => s.SlaveID).ToList(); 210 //Was overflowing default MaxJsonLength 211 //return Json(data, JsonRequestBehavior.AllowGet); 212 return new JsonResult() { Data = data, JsonRequestBehavior = JsonRequestBehavior.AllowGet, MaxJsonLength = Int32.MaxValue }; 213 } 214 } 215 216 public JsonResult SlaveInfo(string slaveId, DateTime? start = null, DateTime? end = null, string userName = null) { 217 using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) 218 { 219 var data = 220 (from slaves in db.FactClientInfos 221 join users in db.DimUsers 222 on slaves.UserId equals users.UserId 223 join clients in db.DimClients 224 on slaves.ClientId equals clients.Id 225 where slaves.ClientId.ToString() == slaveId && 226 (!start.HasValue || slaves.Time >= start) && 227 (!end.HasValue || slaves.Time < end) && 228 (string.IsNullOrEmpty(userName) || users.Name == userName) 229 select new 230 { 231 ClientName = clients.Name, 232 SlaveID = slaves.ClientId, 187 233 Time = slaves.Time, 188 234 UsedCores = slaves.NumUsedCores, … … 191 237 TotalMemory = slaves.TotalMemory, 192 238 CPUUtilization = slaves.CpuUtilization 193 }).OrderByDescending(s => s.Time). GroupBy(s => s.SlaveID).ToList();239 }).OrderByDescending(s => s.Time).ToList(); 194 240 195 241 return Json(data, JsonRequestBehavior.AllowGet); 242 } 243 } 244 245 public JsonResult JobProgress(string jobId) { 246 using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) { 247 var data = 248 (from tasks in db.FactTasks 249 where tasks.JobId.ToString() == jobId 250 select new 251 { 252 State = tasks.TaskState 253 }).ToList(); 254 255 Dictionary<string, int> JobTasks = new Dictionary<string,int>(); 256 JobTasks.Add("Wait",0); 257 JobTasks.Add("Transfer", 0); 258 JobTasks.Add("Calculate", 0); 259 JobTasks.Add("Finish", 0); 260 JobTasks.Add("Error", 0); 261 262 foreach(var record in data) { 263 switch (record.State) { 264 case TaskState.Waiting: 265 JobTasks["Wait"] += 1; 266 break; 267 case TaskState.Transferring: 268 JobTasks["Transfer"] += 1; 269 break; 270 case TaskState.Calculating: 271 JobTasks["Calculate"] += 1; 272 break; 273 case TaskState.Finished: 274 JobTasks["Finish"] += 1; 275 break; 276 case TaskState.Aborted: 277 case TaskState.Failed: 278 JobTasks["Error"] += 1; 279 break; 280 } 281 } 282 283 return Json(JobTasks, JsonRequestBehavior.AllowGet); 284 } 285 } 286 287 public JsonResult UserTasks(string taskState) { 288 TaskState? state = GetTaskState(taskState); 289 List<KeyValuePair<string, int>> numberTasksByUser = new List<KeyValuePair<string,int>>(); 290 using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) { 291 var userTasks = (from tasks in db.FactTasks 292 join jobs in db.DimJobs 293 on tasks.JobId equals jobs.JobId 294 where tasks.TaskState == state 295 select new 296 { 297 UserID = jobs.UserId, 298 UserName = jobs.UserName, 299 State = tasks.TaskState 300 }).GroupBy(j => j.UserID).ToList(); 301 302 foreach (var user in userTasks) { 303 numberTasksByUser.Add(new KeyValuePair<string, int>(user.First().UserName, user.Count())); 304 } 305 return Json(numberTasksByUser, JsonRequestBehavior.AllowGet); 196 306 } 197 307 } -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ExceptionDataController.cs
r11222 r11246 36 36 data.ForEach(t => Task.Add(t.TaskID.ToString())); 37 37 data.ForEach(e => Error.Add(e.ErrorMessage)); 38 39 return Json(new KeyValuePair<List<string>, List<string>>(Task, Error), JsonRequestBehavior.AllowGet); 38 39 //Was overflowing default MaxJsonLength 40 //return Json(new KeyValuePair<List<string>, List<string>>(Task, Error), JsonRequestBehavior.AllowGet); 41 return new JsonResult() { Data = new KeyValuePair<List<string>, List<string>>(Task, Error), JsonRequestBehavior = JsonRequestBehavior.AllowGet, MaxJsonLength = Int32.MaxValue }; 40 42 } 41 43 } 42 44 43 public JsonResult SlaveExceptions( string limit,DateTime? start = null, DateTime? end = null, string clientId = null) {45 public JsonResult SlaveExceptions(DateTime? start = null, DateTime? end = null, string clientId = null) { 44 46 using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) { 45 47 var data = … … 73 75 ); 74 76 } 75 return Json(results, JsonRequestBehavior.AllowGet); 77 //Was overflowing default MaxJsonLength 78 //return Json(results, JsonRequestBehavior.AllowGet); 79 return new JsonResult() { Data = results, JsonRequestBehavior = JsonRequestBehavior.AllowGet, MaxJsonLength = Int32.MaxValue }; 76 80 } 77 81 } -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/HomeController.cs
r11053 r11246 21 21 22 22 using System; 23 using System.Collections.Generic; 23 24 using System.Linq; 24 25 using System.Web.Mvc; -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Models/OverallStatistics.cs
r9617 r11246 1 namespace HeuristicLab.Services.Hive.Statistics.Models { 1 using System; 2 using System.Collections.Generic; 3 namespace HeuristicLab.Services.Hive.Statistics.Models { 2 4 public class OverallStatus { 3 5 public int OverallCurrentlyAvailableCores { get; set; } -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/Home/Index.cshtml
r11196 r11246 6 6 7 7 <h1>Current Status</h1> 8 <section class="currentStats"> 9 <table> 10 <tr> 11 <td>Overall Available Cores</td> 12 <td>@Model.OverallCurrentlyAvailableCores</td> 13 <td>System-wide Waiting Tasks</td> 14 <td>@Model.CurrentlyJobsWaiting</td> 15 </tr> 16 <tr> 17 <td>Real Available Cores</td> 18 <td>@Model.CurrentlyAvailableCores</td> 19 <td>Overall Average CPU Utilization</td> 20 <td>@Model.OverallCpuUtilization</td> 21 </tr> 22 <tr> 23 <td>Used Cores</td> 24 <td>@Model.CurrentlyUsedCores</td> 25 <td>Real Average CPU Utilization</td> 26 <td>@Model.AvailableCpuUtilization</td> 27 </tr> 28 </table> 29 </section> 8 30 <section class="chartContainer"> 9 31 <h1 class="title">Current Hive Status</h1> … … 13 35 <div id="CurrentTotalUsedMemory"></div> 14 36 </section> 15 16 37 <section class="chartContainer"> 17 38 <h1 class="title">Historic Hive Status</h1> … … 49 70 50 71 @Scripts.Render("~/Scripts/jqPlot/jquery.jqplot") 72 @Scripts.Render("~/Scripts/jqPlot/plugins/jqplot.barRenderer.min.js") 73 @Scripts.Render("~/Scripts/jqPlot/plugins/jqplot.categoryAxisRenderer.min.js") 74 @Scripts.Render("~/Scripts/jqPlot/plugins/jqplot.pointLabels.min.js") 51 75 @ChartHelper.AjaxDataRenderer() 52 76 … … 80 104 RefreshCharts(); 81 105 }); 106 107 @ChartHelper.UserTasks(Url.Action("UserTasks", "ChartData"), "section.currentStats", "Calculating"); 108 @ChartHelper.UserTasks(Url.Action("UserTasks", "ChartData"), "section.currentStats", "Waiting"); 82 109 }); 83 110 -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/LoginRequired/Admin.cshtml
r11222 r11246 2 2 3 3 @{ 4 ViewBag.Title = "Admin"; 5 } 6 7 @if(!Model.IsAdmin) { 4 ViewBag.Title = "Admin"; 5 } 6 7 @if (!Model.IsAdmin) 8 { 8 9 <h1>The user you are logged in as: @Model.UserName, is not an administrator.</h1> 9 10 } 10 else { 11 else 12 { 11 13 <!--[if gte IE 9]> 12 14 <style type="text/css"> … … 227 229 //User Overview 228 230 function RefreshUser() { 229 CheckFilters( "User");230 @ExceptionHelper.UserExceptions("TasksContainer", Url.Action("TaskExceptions", "ExceptionData"), " limit", "selectedUser", "startDate", "endDate", "jobId", "taskState")231 @ChartHelper.Task sForUser("TasksContainer",Url.Action("UserTask", "ChartData"), "RefreshUser", "selectedUser", "limit", "startDate", "endDate", "jobId", "taskState", "pageNumber")231 CheckFilters(); 232 @ExceptionHelper.UserExceptions("TasksContainer", Url.Action("TaskExceptions", "ExceptionData"), "selectedUser", "startDate", "endDate", "jobId", "taskState") 233 @ChartHelper.TaskContainers("TasksContainer", Url.Action("GetTasks", "ChartData"), "RefreshUser", "selectedUser", "limit", "startDate", "endDate", "jobId", "taskState", "pageNumber") 232 234 pageNumber = null; 233 235 } … … 235 237 //Task Overview 236 238 $("#TaskUserList").change(function () { 239 CheckFilters(); 237 240 RefreshTask(); 238 241 }); 239 242 240 243 function RefreshTask() { 241 CheckFilters( "Task");244 CheckFilters(); 242 245 @AdminHelper.UserTaskStats("TaskStatsContainer", Url.Action("TaskStats", "AdminData"), "selectedUser", "startDate", "endDate") 243 246 } … … 245 248 //Slave Overview 246 249 function RefreshSlave() { 247 CheckFilters( "Slave");248 @ChartHelper.Slave InfoChart("SlavesContainer", Url.Action("SlaveInfo", "ChartData"), "limit", false, "startDate", "endDate", "selectedUser", "RefreshSlave", "pageNumber")250 CheckFilters(); 251 @ChartHelper.SlaveContainers("SlavesContainer", Url.Action("GetSlaves", "ChartData"), "limit", false, "startDate", "endDate", "selectedUser", "RefreshSlave", "pageNumber") 249 252 pageNumber = null; 250 253 } … … 256 259 257 260 function RefreshException() { 258 CheckFilters("Exception"); 259 @ExceptionHelper.UserExceptions("ExceptionContainer",Url.Action("TaskExceptions","ExceptionData"),"limit",null,"startDate","endDate",null,null,"selectedSlave") 260 @ExceptionHelper.ErrorsOnSlaves("ExceptionContainer",Url.Action("SlaveExceptions","ExceptionData"),"limit","startDate","endDate","selectedSlave","RefreshException","pageNumber") 261 } 262 @ExceptionHelper.ShowSlaveInfo(Url.Action("SlaveInfo","ChartData"),"limit","startDate","endDate") 261 CheckFilters(); 262 @ExceptionHelper.UserExceptions("ExceptionContainer", Url.Action("TaskExceptions", "ExceptionData"), null, "startDate", "endDate", null, null, "selectedSlave") 263 @ExceptionHelper.ErrorsOnSlaves("ExceptionContainer", Url.Action("SlaveExceptions", "ExceptionData"), "limit", "startDate", "endDate", "selectedSlave", "RefreshException", "pageNumber") 264 } 263 265 264 266 //General Chart Methods 265 function CheckFilters( currentTab) {267 function CheckFilters() { 266 268 startDate = null; 267 269 endDate = null; 268 switch( currentTab) {269 case "User ":270 switch($('.tabSection:visible').attr('id')) { 271 case "UserOverviewTab": 270 272 selectedUser = $("#UserList").val(); 271 273 jobId = null; … … 283 285 } 284 286 break; 285 case "Task ":287 case "TaskOverviewTab": 286 288 selectedUser = $("#TaskUserList").val(); 287 289 startDate = $('#TaskStart').val(); 288 290 endDate = $('#TaskEnd').val(); 289 291 break; 290 case "Slave ":292 case "SlaveOverviewTab": 291 293 selectedUser = null; 292 294 limit = $("#SlaveLimit").val(); … … 299 301 } 300 302 break; 301 case "Exception ":303 case "ExceptionOverviewTab": 302 304 selectedSlave = null; 305 selectedUser = null; 303 306 limit = $("#ExceptionLimit").val(); 304 307 if ($("[value='ExceptionDate']").is(":checked")) { … … 313 316 314 317 @ChartHelper.ResizeCharts() 318 @ChartHelper.LoadTask(Url.Action("TaskInfo", "ChartData")) 319 @ChartHelper.LoadJob(Url.Action("JobProgress", "ChartData")) 320 @ChartHelper.LoadSlave(Url.Action("SlaveInfo", "ChartData"), "limit", "startDate", "endDate", "selectedUser", "pageNumber") 315 321 @ExceptionHelper.ScrollToException() 316 @AdminHelper.MoreTaskInfo(Url.Action("MoreTaskInfo","AdminData")) 317 @AdminHelper.MoreSlaveInfo(Url.Action("MoreSlaveInfo","AdminData")) 322 @ExceptionHelper.ShowFullError() 323 @ExceptionHelper.ShowSlaveInfo(Url.Action("GetSlaves", "ChartData"), "limit", "startDate", "endDate") 324 @AdminHelper.MoreTaskInfo(Url.Action("MoreTaskInfo", "AdminData")) 325 @AdminHelper.MoreSlaveInfo(Url.Action("MoreSlaveInfo", "AdminData"), "startDate", "endDate") 318 326 </script> 319 327 } -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/LoginRequired/UserTask.cshtml
r11222 r11246 114 114 115 115 function TaskInformation() { 116 limit = $('#Limit').val(); 117 startDate = null; 118 endDate = null; 119 jobId = null; 120 taskState = null; 121 if ($("[value='Date']").is(":checked")) { 122 startDate = $('#InfoStart').val(); 123 endDate = $('#InfoEnd').val(); 124 } 125 if ($("[value='JobName']").is(':checked')) { 126 jobId = $('#JobNames').val(); 127 } 128 if ($("[value='TaskState']").is(':checked')) { 129 taskState = $('#TaskStates').val(); 130 } 131 @ExceptionHelper.UserExceptions("TasksContainer",Url.Action("TaskExceptions", "ExceptionData"),"limit","userName","startDate","endDate","jobId","taskState") 132 @ChartHelper.TasksForUser("TasksContainer",Url.Action("UserTask", "ChartData"),"TaskInformation","userName","limit","startDate","endDate","jobId","taskState","pageNumber") 116 CheckFilters(); 117 @ExceptionHelper.UserExceptions("TasksContainer",Url.Action("TaskExceptions", "ExceptionData"),"userName","startDate","endDate","jobId","taskState") 118 @ChartHelper.TaskContainers("TasksContainer",Url.Action("GetTasks", "ChartData"),"TaskInformation","userName","limit","startDate","endDate","jobId","taskState","pageNumber") 133 119 pageNumber = null; 134 120 } 135 121 136 122 function TaskOverview() { 137 startDate = $('#OverviewStart').val(); 138 endDate = $('#OverviewEnd').val(); 123 CheckFilters(); 139 124 @AdminHelper.UserTaskStats("TaskStatsContainer",Url.Action("TaskStats", "AdminData"),"userName","startDate","endDate") 140 125 } … … 148 133 }) 149 134 135 //General Chart Methods 136 function CheckFilters() { 137 startDate = null; 138 endDate = null; 139 switch ($('.tabSection:visible').attr('id')) { 140 case "TaskInformationTab": 141 limit = $('#Limit').val(); 142 jobId = null; 143 taskState = null; 144 if ($("[value='Date']").is(":checked")) { 145 startDate = $('#InfoStart').val(); 146 endDate = $('#InfoEnd').val(); 147 } 148 if ($("[value='JobName']").is(':checked')) { 149 jobId = $('#JobNames').val(); 150 } 151 if ($("[value='TaskState']").is(':checked')) { 152 taskState = $('#TaskStates').val(); 153 } 154 break; 155 case "TaskOverviewTab": 156 startDate = $('#OverviewStart').val(); 157 endDate = $('#OverviewEnd').val(); 158 break; 159 } 160 } 150 161 TaskInformation(); 151 162 @ChartHelper.ResizeCharts() 163 @ChartHelper.LoadTask(Url.Action("TaskInfo", "ChartData")) 164 @ChartHelper.LoadJob(Url.Action("JobProgress", "ChartData")) 152 165 @ExceptionHelper.ScrollToException() 166 @ExceptionHelper.ShowFullError() 153 167 @AdminHelper.MoreTaskInfo(Url.Action("MoreTaskInfo","AdminData")) 154 168 </script>
Note: See TracChangeset
for help on using the changeset viewer.