- Timestamp:
- 07/24/14 09:16:42 (10 years ago)
- Location:
- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3
- Files:
-
- 158 added
- 6 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/AdminHelper.cshtml
r11030 r11222 18 18 *@ 19 19 20 @helper UserList(string destinationTag, string url, bool multiline) { 20 @helper UserList(string destinationTag, string url, bool multiline) 21 { 21 22 <script> 22 23 $.ajax({ 23 24 url: "@(new HtmlString(url))", datatype: "json", success: function (result) { 24 25 $("#" + "@destinationTag").html(""); 25 @if(multiline) { 26 @if (multiline) 27 { 26 28 @:$("#" + "@destinationTag").attr("size", result.length); 27 29 } 28 else { 30 else 31 { 29 32 @:$("#" + "@destinationTag").append("<option></option>"); 30 33 } … … 39 42 @helper UserTaskStats(string destinationTag, string url, string userName, string start, string end) 40 43 { 41 if (userName != "" || userName != null) { 44 if (userName != "" || userName != null) 45 { 42 46 <text> 43 47 $.ajax({ … … 58 62 } 59 63 } 64 65 @helper MoreTaskInfo(string url) 66 { 67 <text> 68 function MoreTaskInfo(caller) { 69 if($(caller).siblings('.moreInfoTable').length == 0) { 70 var taskId = $(caller).attr('id'); 71 $.ajax({ 72 url: "@(new HtmlString(url))?taskId=" + taskId, datatype: "json", success: function (result) { 73 var appendString = '<table class="moreInfoTable"><tr>'; 74 for (var i = 0; i < result.length; i++) { 75 if(i % 2 == 0 && i != 0) { 76 appendString += '</tr><tr>'; 77 } 78 appendString += '<td class="taskInfoCell"><label class="taskInfoKey">' + result[i].Key + '</label>'; 79 appendString += '<label class="taskInfoValue">' + +result[i].Value.toFixed(4) + '</label></td>'; 80 } 81 appendString += '</tr></table>' 82 $(caller).parent().append(appendString); 83 } 84 }); 85 $(caller).html("Less Info"); 86 } 87 else { 88 $(caller).siblings('.moreInfoTable').remove(); 89 $(caller).html("More Info"); 90 } 91 } 92 </text> 93 } 94 95 @helper MoreSlaveInfo(string url) 96 { 97 <text> 98 function MoreSlaveInfo(caller) { 99 if($(caller).siblings('.moreInfoTable').length == 0) { 100 var slaveId = $(caller).attr('id'); 101 $.ajax({ 102 url: "@(new HtmlString(url))?slaveId=" + slaveId, datatype: "json", success: function (result) { 103 var appendString = '<table class="moreInfoTable"><tr>'; 104 for (var i = 0; i < result[0].length; i++) { 105 appendString += '<th class="slaveInfoHeader">' + result[0][i].Key + '</th>' 106 } 107 appendString += '</tr>'; 108 for (var j = 0; j < result.length; j++) { 109 appendString += '<tr>'; 110 for (var k = 0; k < result[j].length; k++) { 111 appendString += '<td class="slaveInfoCell"><label class="slaveInfoValue">' + result[j][k].Value + '</label></td>'; 112 } 113 appendString += '</tr>'; 114 } 115 appendString += '</table>' 116 $(caller).parent().append(appendString); 117 } 118 }); 119 $(caller).html("Less Info"); 120 } 121 else { 122 $(caller).siblings('.moreInfoTable').remove(); 123 $(caller).html("More Info"); 124 } 125 } 126 </text> 127 } -
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++) { -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ExceptionHelper.cshtml
r11084 r11222 102 102 $("#" + "@destinationTag").append(ErrorHTML); 103 103 } 104 else if("@(destinationTag)" == "ExceptionContainer") { 105 $("#@(destinationTag)").append( 106 '<section class="chartContainer">' + 107 '<h1 class="title">No errors found for the specified filters!</h1>' + 108 '</section>' 109 ) 110 } 104 111 } 105 112 }); … … 144 151 @helper ShowErrors(string destinationTag) { 145 152 <text> 146 $("#@(destinationTag)"). children(".errorContainer, .errorTitle, .errorTask, .errorMessage").css('display','inline-block');153 $("#@(destinationTag)").find(".errorContainer, .errorTitle, .errorTask, .errorMessage").css('display','inline-block'); 147 154 </text> 148 155 } … … 200 207 '<button class="collapse" onclick="CollapseSection(this)">+</button>' + 201 208 '<label id="' + result[i][0] + 'ErrorMessage">Error Message: ' + result[i][1] + '</label>' + 202 '<label id="' + result[i][0] + 'Client">Slave: <a onclick="ShowSlaveInfo(this)">' + result[i][2] + '</a></label>' + 203 '<label id="' + result[i][0] + 'User">User Name: ' + result[i][3] + '</label>' + 204 '<label id="' + result[i][0] + 'Date">Date/Time: ' + result[i][4] + '</label>' + 209 '<label id="' + result[i][0] + 'Client">Slave: <a id="' + result[i][2] + '" onclick="ShowSlaveInfo(this)">' + result[i][3] + '</a></label>' + 210 '<label id="' + result[i][0] + 'User">User Name: ' + result[i][4] + '</label>' + 211 '<label id="' + result[i][0] + 'Job">Job Name: ' + result[i][5] + '</label>' + 212 '<label id="' + result[i][0] + 'Date">Date/Time: ' + result[i][6] + '</label>' + 205 213 '</section>' 206 214 ); … … 229 237 //Opens a sub-container with slave information 230 238 function ShowSlaveInfo(caller) { 239 var taskSlaveId = $(caller).attr('id'); 231 240 if($(caller).parent().parent().children(".chartContainer").length == 0) { 232 @ChartHelper.SlaveInfoChart("caller.parentNode.parentNode.id",url,limit,true,startDate,endDate,null,null,null," $(caller).html()")241 @ChartHelper.SlaveInfoChart("caller.parentNode.parentNode.id",url,limit,true,startDate,endDate,null,null,null,"taskSlaveId") 233 242 } 234 243 else { -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Content/Site.css
r11084 r11222 535 535 } 536 536 537 .chartContainer > label:first-of-type, .moreTaskInfo { 538 margin-bottom: 1%; 539 display: block; 540 } 541 542 .chartContainer > label, .moreInfo { 543 color: #666666; 544 } 545 546 .moreInfo { 547 margin-top: 2%; 548 text-decoration: underline; 549 } 550 551 .moreInfo:hover { 552 color: #F7921D; 553 cursor: pointer; 554 } 555 556 .moreInfoTable { 557 width: 96%; 558 margin: 2% 0% 0% 2%; 559 -webkit-border-radius: 5px; 560 -moz-border-radius: 5px; 561 border-radius: 5px; 562 border: 1px solid #8297F5; 563 } 564 565 .taskInfoCell { 566 width: 50%; 567 padding-top: 1%; 568 padding-left: 1%; 569 } 570 571 .moreInfoTable tr:last-of-type .taskInfoCell { 572 padding-bottom: 1%; 573 } 574 575 .moreInfoTable .taskInfoCell:first-of-type { 576 border-right: 1px solid #8297F5; 577 } 578 579 .taskInfoKey, .taskInfoValue { 580 margin: 1% 0% 0% 0%; 581 display: inline-block; 582 color: #666666; 583 } 584 585 .taskInfoKey { 586 width: 70%; 587 } 588 589 .taskInfoValue { 590 width: 28%; 591 text-align: right; 592 } 593 594 .jobTaskGroup { 595 margin: 2% 0% 3% 1%; 596 -webkit-border-radius: 5px; 597 -moz-border-radius: 5px; 598 border-radius: 5px; 599 border: 2px solid #8297F5; 600 background-color: #C9DCF0; 601 } 602 603 .jobTaskGroup > h1{ 604 margin: -1% 30% 0% 1%; 605 padding: 0.5% 1%; 606 -webkit-border-radius: 3px; 607 -moz-border-radius: 3px; 608 border-radius: 3px; 609 border: 1px solid #8297F5; 610 background-color: #FAFAFA; 611 font-size: 1.6em; 612 display: block; 613 } 614 615 .jobTaskGroup section { 616 background-color: #FAFAFA; 617 } 618 537 619 /* Admin Page Styles */ 538 620 .usersField .filterChoices { … … 606 688 } 607 689 690 #SlavesContainer .chartContainer div:last-of-type { 691 margin-bottom: 1%; 692 } 693 694 .slaveInfoHeader, .slaveInfoCell { 695 width: 16%; 696 } 697 698 .slaveInfoHeader:first-of-type, .slaveInfoCell:first-of-type { 699 width: 20%; 700 } 701 702 .slaveInfoCell { 703 border-right: 1px solid #8297F5; 704 } 705 706 .slaveInfoCell:last-of-type { 707 border-right: none; 708 } 709 710 .slaveInfoValue { 711 padding-left: 48%; 712 } 713 714 .slaveInfoCell:first-of-type .slaveInfoValue { 715 padding-left: 0%; 716 } 717 608 718 #ExceptionContainer .chartContainer label { 609 719 margin: 1% 0 1% 1%; … … 614 724 } 615 725 726 .chartContainer .chartContainer { 727 font-size: 0.8em; 728 } 729 616 730 .chartContainer .chartContainer h1 { 617 font-size: 1em; 731 font-size: 1.6em; 732 } 733 734 .chartContainer .chartContainer > div { 735 font-size: 1.3em; 736 margin-bottom: 2%; 618 737 } 619 738 -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/AdminDataController.cs
r11030 r11222 24 24 } 25 25 26 public JsonResult TaskStats(DateTime start, DateTime end, string userName=null) 27 { 28 using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) 29 { 26 public JsonResult TaskStats(DateTime start, DateTime end, string userName=null) { 27 using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) { 30 28 var taskStats = (from tasks in db.FactTasks 31 29 join jobs in db.DimJobs … … 35 33 (string.IsNullOrEmpty(userName) || jobs.UserName == userName) 36 34 select new { tasks.TotalWaitingTime, tasks.TotalTransferTime, tasks.TotalRuntime, tasks.NumCalculationRuns, 37 tasks.CoresRequired, tasks.MemoryRequired , tasks.TaskSize, tasks.ResultSize})35 tasks.CoresRequired, tasks.MemoryRequired}) 38 36 .ToList(); 39 37 … … 45 43 FullStats.Add(new KeyValuePair<string, double>("Cores Required", taskStats.Sum(c => c.CoresRequired))); 46 44 FullStats.Add(new KeyValuePair<string, double>("Memory Required", taskStats.Sum(m => m.MemoryRequired))); 47 FullStats.Add(new KeyValuePair<string, double>("Task Size", taskStats.Sum(ts => ts.TaskSize)));48 FullStats.Add(new KeyValuePair<string, double>("Result Size", taskStats.Sum(rs => Convert.ToDouble(rs.ResultSize))));49 45 50 46 return Json(FullStats, JsonRequestBehavior.AllowGet); 51 47 } 52 48 } 49 50 public JsonResult MoreTaskInfo(string taskId) { 51 using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) 52 { 53 var moreInfo = (from tasks in db.FactTasks 54 where tasks.TaskId.ToString() == taskId 55 select new 56 { 57 tasks.TotalWaitingTime, 58 tasks.TotalTransferTime, 59 tasks.TotalRuntime, 60 tasks.NumCalculationRuns, 61 tasks.CoresRequired, 62 tasks.MemoryRequired, 63 }) 64 .ToList(); 65 66 List<KeyValuePair<string, double>> AllInfo = new List<KeyValuePair<string, double>>(); 67 AllInfo.Add(new KeyValuePair<string, double>("Number Calculation Runs", moreInfo.Sum(n => n.NumCalculationRuns))); 68 AllInfo.Add(new KeyValuePair<string, double>("Cores Required", moreInfo.Sum(c => c.CoresRequired))); 69 AllInfo.Add(new KeyValuePair<string, double>("Memory Required", moreInfo.Sum(m => m.MemoryRequired))); 70 71 return Json(AllInfo, JsonRequestBehavior.AllowGet); 72 } 73 } 74 75 public JsonResult MoreSlaveInfo(string slaveId) { 76 using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) 77 { 78 var moreInfo = (from slaves in db.FactClientInfos 79 where slaves.ClientId.ToString() == slaveId 80 select new 81 { 82 slaves.Time, 83 slaves.TotalTimeIdle, 84 slaves.TotalTimeCalculating, 85 slaves.TotalTimeTransferring, 86 slaves.TotalTimeOffline, 87 slaves.TotalTimeUnavailable 88 }).ToList(); 89 90 List<List<KeyValuePair<string, string>>> AllInfo = new List<List<KeyValuePair<string, string>>>(); 91 List<List<KeyValuePair<string, string>>> DistinctInfo = new List<List<KeyValuePair<string, string>>>(); 92 for(var i=0; i < moreInfo.Count; i++) { 93 List<KeyValuePair<string, string>> newRow = new List<KeyValuePair<string, string>>(); 94 newRow.Add(new KeyValuePair<string, string>("Time", moreInfo.ElementAt(i).Time.ToShortDateString() + " " + moreInfo.ElementAt(i).Time.ToShortTimeString())); 95 newRow.Add(new KeyValuePair<string, string>("Time Idle", moreInfo.ElementAt(i).TotalTimeIdle.ToString())); 96 newRow.Add(new KeyValuePair<string, string>("Time Calculating", moreInfo.ElementAt(i).TotalTimeCalculating.ToString())); 97 newRow.Add(new KeyValuePair<string, string>("Time Transferring", moreInfo.ElementAt(i).TotalTimeTransferring.ToString())); 98 newRow.Add(new KeyValuePair<string, string>("Time Offline", moreInfo.ElementAt(i).TotalTimeOffline.ToString())); 99 newRow.Add(new KeyValuePair<string, string>("Time Unavailable", moreInfo.ElementAt(i).TotalTimeUnavailable.ToString())); 100 AllInfo.Add(newRow); 101 } 102 103 //Ensures that only records with changes in Traffic or Time fields are included 104 List<KeyValuePair<string, string>> lastRecord = null; 105 //Initilized to true to ensure first record is automatically included 106 bool isDistinct = true; 107 foreach (List<KeyValuePair<string, string>> row in AllInfo) { 108 //Ignores check for first row 109 if (lastRecord != null) { 110 isDistinct = false; 111 //Cycles through values of current row and lastRecord 112 for (var j=0; j < row.Count; j++) { 113 //Disregards time field from distinct checks 114 if (row.ElementAt(j).Key != "Time") { 115 //If values differ then row is distinct, break loop 116 if (row.ElementAt(j).Value != lastRecord.ElementAt(j).Value) { 117 isDistinct = true; 118 break; 119 } 120 } 121 } 122 } 123 lastRecord = row; 124 if (isDistinct) { 125 DistinctInfo.Add(row); 126 } 127 } 128 129 return Json(DistinctInfo, JsonRequestBehavior.AllowGet); 130 } 131 } 53 132 } 54 133 } -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ChartDataController.cs
r11084 r11222 139 139 } 140 140 141 public JsonResult UserTask(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 { 145 TaskState state = GetTaskState(taskState); 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)) { 143 TaskState? state = GetTaskState(taskState); 144 146 145 var data = 147 146 (from tasks in db.FactTasks … … 155 154 select new 156 155 { 157 TaskID = tasks.TaskId, 156 JobName = jobs.JobName, 157 JobId = jobs.JobId, 158 TaskId = tasks.TaskId, 158 159 TotalWaiting = tasks.TotalWaitingTime, 159 160 TotalTransfer = tasks.TotalTransferTime, … … 162 163 }).OrderByDescending(s => s.StartDate).ToList(); 163 164 164 List<KeyValuePair<string, List<double>>> results = new List<KeyValuePair<string, List<double>>>(); 165 166 for (int i = 0; i < data.Count; i++) { 167 results.Add( 168 new KeyValuePair<string, List<double>>( 169 data[i].TaskID.ToString(),new List<double>{data[i].TotalWaiting,data[i].TotalTransfer,data[i].TotalRuntime} 170 ) 171 ); 172 } 173 174 return Json(results, JsonRequestBehavior.AllowGet); 165 return Json(data, JsonRequestBehavior.AllowGet); 175 166 } 176 167 } … … 184 175 join users in db.DimUsers 185 176 on slaves.UserId equals users.UserId 177 join clients in db.DimClients 178 on slaves.ClientId equals clients.Id 186 179 where (!start.HasValue || slaves.Time >= start) && 187 180 (!end.HasValue || slaves.Time < end) && … … 190 183 select new 191 184 { 185 ClientName = clients.Name, 192 186 SlaveID = slaves.ClientId, 193 187 Time = slaves.Time, … … 203 197 } 204 198 205 private static TaskState GetTaskState(string taskState) {206 TaskState state = TaskState.Finished;199 private static TaskState? GetTaskState(string taskState) { 200 TaskState? state; 207 201 switch (taskState) 208 202 { … … 230 224 case "Waiting": 231 225 state = TaskState.Waiting; 226 break; 227 default : 228 state = null; 232 229 break; 233 230 } -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ExceptionDataController.cs
r11084 r11222 12 12 { 13 13 using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) { 14 TaskState state = GetTaskState(taskState);14 TaskState? state = GetTaskState(taskState); 15 15 var data = 16 16 (from tasks in db.FactTasks … … 47 47 join jobs in db.DimJobs 48 48 on tasks.JobId equals jobs.JobId 49 join clients in db.DimClients 50 on tasks.LastClientId equals clients.Id 49 51 where tasks.Exception != null && 50 52 !tasks.Exception.Equals(string.Empty) && … … 56 58 ErrorMessage = tasks.Exception, 57 59 ClientID = tasks.LastClientId, 60 ClientName = clients.Name, 58 61 UserName = jobs.UserName, 62 JobName = jobs.JobName, 59 63 StartDate = tasks.StartTime 60 64 }).OrderByDescending(s => s.StartDate).ToList(); … … 64 68 for (int i = 0; i < data.Count; i++) { 65 69 results.Add( 66 new List<string> { data[i].TaskID.ToString(), data[i].ErrorMessage, data[i].ClientID.ToString(), data[i].UserName, 67 data[i].StartDate.ToString("dd/MM/yyyy HH:mm")} 70 new List<string> { data[i].TaskID.ToString(), data[i].ErrorMessage, data[i].ClientID.ToString(), data[i].ClientName, 71 data[i].UserName, data[i].JobName, data[i].StartDate.ToString("dd/MM/yyyy HH:mm") 72 } 68 73 ); 69 74 } … … 72 77 } 73 78 74 private static TaskState GetTaskState(string taskState) {75 TaskState state = TaskState.Finished;79 private static TaskState? GetTaskState(string taskState) { 80 TaskState? state; 76 81 switch (taskState) { 77 82 case "Aborted": … … 99 104 state = TaskState.Waiting; 100 105 break; 106 default : 107 state = null; 108 break; 101 109 } 102 110 return state; -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/LoginRequiredController.cs
r11053 r11222 42 42 ViewBag.TaskStates = new SelectList(TaskStateList); 43 43 var SlaveList = (from slave in db.FactClientInfos 44 select slave.ClientId.ToString()).Distinct(); 45 ViewBag.Slaves = new SelectList(SlaveList); 44 join client in db.DimClients 45 on slave.ClientId equals client.Id 46 select new { 47 SlaveId = slave.ClientId.ToString(), 48 ClientName = client.Name 49 }).Distinct(); 50 ViewBag.Slaves = new SelectList(SlaveList, "SlaveId", "ClientName"); 46 51 } 47 52 -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Scripts/CollapsingSection.js
r11084 r11222 3 3 $(".collapse").click(function () { 4 4 if ($(this).html() == "-") { 5 $(this).parent().children("canvas, div, fieldset, label ").fadeOut();5 $(this).parent().children("canvas, div, fieldset, label, .chartContainer, a, table").fadeOut(); 6 6 $(this).html("+"); 7 7 } 8 8 else { 9 $(this).parent().children("canvas, div, fieldset, label ").fadeIn();9 $(this).parent().children("canvas, div, fieldset, label, .chartContainer, a, table").fadeIn(); 10 10 $(this).html("-"); 11 11 } … … 18 18 var jqCaller = $(caller); 19 19 if (jqCaller.html() == "-") { 20 jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer ").fadeOut();20 jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, a, table").fadeOut(); 21 21 jqCaller.html("+"); 22 22 } 23 23 else { 24 jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer ").fadeIn();24 jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, a, table").fadeIn(); 25 25 jqCaller.html("-"); 26 26 } … … 30 30 section */ 31 31 function CollapsedByDefault(caller) { 32 $(caller).parent().children("canvas, div, fieldset, label, .chartContainer ").hide();32 $(caller).parent().children("canvas, div, fieldset, label, .chartContainer, a, table").hide(); 33 33 } 34 34 … … 36 36 function OpenOnError(caller) { 37 37 var jqCaller = $(caller); 38 jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer ").fadeIn();38 jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, a, table").fadeIn(); 39 39 jqCaller.parent().children("button").html("-"); 40 40 } … … 45 45 var jqCaller = $(caller); 46 46 if (jqCaller.html() == "-") { 47 jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, .tabSection ").hide();47 jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, .tabSection, a, table").hide(); 48 48 jqCaller.html("+"); 49 49 } 50 50 else { 51 jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, .tabSection ").show();51 jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, .tabSection, a, table").show(); 52 52 jqCaller.html("-"); 53 53 } -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Scripts/jqPlot/plugins/jqplot.dateAxisRenderer.js
r9646 r11222 3 3 * Pure JavaScript plotting plugin using jQuery 4 4 * 5 * Version: 1.0.0b2_r1012 5 * Version: 1.0.8 6 * Revision: 1250 6 7 * 7 * Copyright (c) 2009-201 1Chris Leonello8 * Copyright (c) 2009-2013 Chris Leonello 8 9 * jqPlot is currently available for use in all personal or commercial projects 9 10 * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL … … 33 34 * A plugin for a jqPlot to render an axis as a series of date values. 34 35 * This renderer has no options beyond those supplied by the <Axis> class. 35 * It supplies it 's own tick formatter, so the tickOptions.formatter option36 * It supplies its own tick formatter, so the tickOptions.formatter option 36 37 * should not be overridden. 37 38 * … … 334 335 var threshold = 30; 335 336 var insetMult = 1; 337 var daTickInterval = null; 338 339 // if user specified a tick interval, convert to usable. 340 if (this.tickInterval != null) 341 { 342 // if interval is a number or can be converted to one, use it. 343 // Assume it is in SECONDS!!! 344 if (Number(this.tickInterval)) { 345 daTickInterval = [Number(this.tickInterval), 'seconds']; 346 } 347 // else, parse out something we can build from. 348 else if (typeof this.tickInterval == "string") { 349 var parts = this.tickInterval.split(' '); 350 if (parts.length == 1) { 351 daTickInterval = [1, parts[0]]; 352 } 353 else if (parts.length == 2) { 354 daTickInterval = [parts[0], parts[1]]; 355 } 356 } 357 } 336 358 337 359 var tickInterval = this.tickInterval; … … 401 423 //////// 402 424 425 // special case when there is only one point, make three tick marks to center the point 426 else if (this.min == null && this.max == null && db.min == db.max) 427 { 428 var onePointOpts = $.extend(true, {}, this.tickOptions, {name: this.name, value: null}); 429 var delta = 300000; 430 this.min = db.min - delta; 431 this.max = db.max + delta; 432 this.numberTicks = 3; 433 434 for(var i=this.min;i<=this.max;i+= delta) 435 { 436 onePointOpts.value = i; 437 438 var t = new this.tickRenderer(onePointOpts); 439 440 if (this._overrideFormatString && this._autoFormatString != '') { 441 t.formatString = this._autoFormatString; 442 } 443 444 t.showLabel = false; 445 t.showMark = false; 446 447 this._ticks.push(t); 448 } 449 450 if(this.showTicks) { 451 this._ticks[1].showLabel = true; 452 } 453 if(this.showTickMarks) { 454 this._ticks[1].showTickMarks = true; 455 } 456 } 403 457 // if user specified min and max are null, we set those to make best ticks. 404 458 else if (this.min == null && this.max == null) { 459 405 460 var opts = $.extend(true, {}, this.tickOptions, {name: this.name, value: null}); 461 406 462 // want to find a nice interval 407 463 var nttarget, … … 425 481 426 482 // If tickInterval is specified, we'll try to honor it. 427 // Not g auranteed to get this interval, but we'll get as close as483 // Not guaranteed to get this interval, but we'll get as close as 428 484 // we can. 429 485 // tickInterval will be used before numberTicks, that is if 430 486 // both are specified, numberTicks will be ignored. 431 487 else if (this.tickInterval) { 432 titarget = this.tickInterval;488 titarget = new $.jsDate(0).add(daTickInterval[0], daTickInterval[1]).getTime(); 433 489 } 434 490 435 491 // if numberTicks specified, try to honor it. 436 // Not g auranteed, but will try to get close.492 // Not guaranteed, but will try to get close. 437 493 else if (this.numberTicks) { 438 494 nttarget = this.numberTicks; … … 446 502 this._autoFormatString = ret[1]; 447 503 448 min = Math.floor(min/tempti) * tempti;449 504 min = new $.jsDate(min); 450 min = min.getTime();505 min = Math.floor((min.getTime() - min.getUtcOffset())/tempti) * tempti + min.getUtcOffset(); 451 506 452 507 nttarget = Math.ceil((max - min) / tempti) + 1; … … 606 661 } 607 662 608 // if user specified a tick interval, convert to usable. 609 if (this.tickInterval != null) 610 { 611 // if interval is a number or can be converted to one, use it. 612 // Assume it is in SECONDS!!! 613 if (Number(this.tickInterval)) { 614 this.daTickInterval = [Number(this.tickInterval), 'seconds']; 615 } 616 // else, parse out something we can build from. 617 else if (typeof this.tickInterval == "string") { 618 var parts = this.tickInterval.split(' '); 619 if (parts.length == 1) { 620 this.daTickInterval = [1, parts[0]]; 621 } 622 else if (parts.length == 2) { 623 this.daTickInterval = [parts[0], parts[1]]; 624 } 625 } 663 if (this.tickInterval != null && daTickInterval != null) { 664 this.daTickInterval = daTickInterval; 626 665 } 627 666 -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/LoginRequired/Admin.cshtml
r11084 r11222 88 88 <label>Limit</label> 89 89 <select id="SlaveLimit"> 90 <option> 10</option>90 <option>20</option> 91 91 <option>50</option> 92 92 <option selected="selected">100</option> … … 122 122 <label>Limit</label> 123 123 <select id="ExceptionLimit"> 124 <option>2 </option>124 <option>20</option> 125 125 <option>50</option> 126 126 <option selected="selected">100</option> … … 227 227 //User Overview 228 228 function RefreshUser() { 229 selectedUser = $("#UserList").val(); 230 limit = $("#UserLimit").val(); 231 startDate = null; 232 endDate = null; 233 jobId = null; 234 taskState = null; 235 if ($("[value='UserDate']").is(":checked")) { 236 startDate = $('#UserStart').val(); 237 endDate = $('#UserEnd').val(); 238 } 239 if ($("[value='JobName']").is(':checked')) { 240 jobId = $('#JobNames').val(); 241 } 242 if ($("[value='TaskState']").is(':checked')) { 243 taskState = $('#TaskState').val(); 244 } 229 CheckFilters("User"); 245 230 @ExceptionHelper.UserExceptions("TasksContainer", Url.Action("TaskExceptions", "ExceptionData"), "limit", "selectedUser", "startDate", "endDate", "jobId", "taskState") 246 231 @ChartHelper.TasksForUser("TasksContainer",Url.Action("UserTask", "ChartData"), "RefreshUser", "selectedUser", "limit", "startDate", "endDate", "jobId", "taskState", "pageNumber") … … 254 239 255 240 function RefreshTask() { 256 selectedUser = $("#TaskUserList").val(); 257 startDate = $('#TaskStart').val(); 258 endDate = $('#TaskEnd').val(); 241 CheckFilters("Task"); 259 242 @AdminHelper.UserTaskStats("TaskStatsContainer", Url.Action("TaskStats", "AdminData"), "selectedUser", "startDate", "endDate") 260 243 } … … 262 245 //Slave Overview 263 246 function RefreshSlave() { 264 selectedUser = null; 265 limit = $("#SlaveLimit").val(); 266 startDate = null; 267 endDate = null; 268 if ($("[value='SlaveDate']").is(":checked")) { 269 startDate = $('#SlaveStart').val(); 270 endDate = $('#SlaveEnd').val(); 271 } 272 if ($("[value='User']").is(':checked')) { 273 selectedUser = $('#SlaveUserList').val(); 274 } 247 CheckFilters("Slave"); 275 248 @ChartHelper.SlaveInfoChart("SlavesContainer", Url.Action("SlaveInfo", "ChartData"), "limit", false, "startDate", "endDate", "selectedUser", "RefreshSlave", "pageNumber") 276 249 pageNumber = null; … … 283 256 284 257 function RefreshException() { 285 selectedSlave = null; 286 limit = $("#ExceptionLimit").val(); 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") 263 264 //General Chart Methods 265 function CheckFilters(currentTab) { 287 266 startDate = null; 288 267 endDate = null; 289 if ($("[value='ExceptionDate']").is(":checked")) { 290 startDate = $('#ExceptionStart').val(); 291 endDate = $('#ExceptionEnd').val(); 268 switch(currentTab) { 269 case "User": 270 selectedUser = $("#UserList").val(); 271 jobId = null; 272 taskState = null; 273 limit = $("#UserLimit").val(); 274 if ($("[value='UserDate']").is(":checked")) { 275 startDate = $('#UserStart').val(); 276 endDate = $('#UserEnd').val(); 277 } 278 if ($("[value='JobName']").is(':checked')) { 279 jobId = $('#JobNames').val(); 280 } 281 if ($("[value='TaskState']").is(':checked')) { 282 taskState = $('#TaskStates').val(); 283 } 284 break; 285 case "Task": 286 selectedUser = $("#TaskUserList").val(); 287 startDate = $('#TaskStart').val(); 288 endDate = $('#TaskEnd').val(); 289 break; 290 case "Slave": 291 selectedUser = null; 292 limit = $("#SlaveLimit").val(); 293 if ($("[value='SlaveDate']").is(":checked")) { 294 startDate = $('#SlaveStart').val(); 295 endDate = $('#SlaveEnd').val(); 296 } 297 if ($("[value='User']").is(':checked')) { 298 selectedUser = $('#SlaveUserList').val(); 299 } 300 break; 301 case "Exception": 302 selectedSlave = null; 303 limit = $("#ExceptionLimit").val(); 304 if ($("[value='ExceptionDate']").is(":checked")) { 305 startDate = $('#ExceptionStart').val(); 306 endDate = $('#ExceptionEnd').val(); 307 } 308 if ($("[value='ExceptionSlave']").is(':checked')) { 309 selectedSlave = $('#Slaves').val(); 310 } 292 311 } 293 if ($("[value='ExceptionSlave']").is(':checked')) { 294 selectedSlave = $('#Slaves').val(); 295 } 296 @ExceptionHelper.UserExceptions("ExceptionContainer",Url.Action("TaskExceptions","ExceptionData"),"limit",null,"startDate","endDate",null,null,"selectedSlave") 297 @ExceptionHelper.ErrorsOnSlaves("ExceptionContainer",Url.Action("SlaveExceptions","ExceptionData"),"limit","startDate","endDate","selectedSlave","RefreshException","pageNumber") 298 } 299 @ExceptionHelper.ShowSlaveInfo(Url.Action("SlaveInfo","ChartData"),"limit","startDate","endDate") 300 301 //General Chart Methods 312 } 313 302 314 @ChartHelper.ResizeCharts() 303 315 @ExceptionHelper.ScrollToException() 316 @AdminHelper.MoreTaskInfo(Url.Action("MoreTaskInfo","AdminData")) 317 @AdminHelper.MoreSlaveInfo(Url.Action("MoreSlaveInfo","AdminData")) 304 318 </script> 305 319 } -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/LoginRequired/UserTask.cshtml
r11084 r11222 127 127 } 128 128 if ($("[value='TaskState']").is(':checked')) { 129 taskState = $('#TaskState ').val();129 taskState = $('#TaskStates').val(); 130 130 } 131 131 @ExceptionHelper.UserExceptions("TasksContainer",Url.Action("TaskExceptions", "ExceptionData"),"limit","userName","startDate","endDate","jobId","taskState") … … 151 151 @ChartHelper.ResizeCharts() 152 152 @ExceptionHelper.ScrollToException() 153 @AdminHelper.MoreTaskInfo(Url.Action("MoreTaskInfo","AdminData")) 153 154 </script> 154 155 } -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/packages.config
r9617 r11222 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <packages> 3 <package id="jqPlot" version="1.0.0" targetFramework="net40" /> 4 <package id="jQuery" version="1.8.2" targetFramework="net40" /> 5 <package id="jQuery.UI.Combined" version="1.8.24" targetFramework="net40" /> 6 <package id="jQuery.Validation" version="1.10.0" targetFramework="net40" /> 7 <package id="Microsoft.AspNet.Mvc" version="4.0.20710.0" targetFramework="net40" /> 3 <package id="Antlr" version="3.4.1.9004" targetFramework="net40" /> 4 <package id="jqPlot" version="1.0.8" targetFramework="net40" /> 5 <package id="jQuery" version="2.1.1" targetFramework="net40" /> 6 <package id="jQuery.UI.Combined" version="1.10.4" targetFramework="net40" /> 7 <package id="jQuery.Validation" version="1.13.0" targetFramework="net40" /> 8 <package id="Microsoft.AspNet.Mvc" version="4.0.30506.0" targetFramework="net40" /> 8 9 <package id="Microsoft.AspNet.Mvc.FixedDisplayModes" version="1.0.0" targetFramework="net40" /> 9 10 <package id="Microsoft.AspNet.Razor" version="2.0.20715.0" targetFramework="net40" /> 10 <package id="Microsoft.AspNet.Web.Optimization" version="1. 0.0" targetFramework="net40" />11 <package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net40" /> 11 12 <package id="Microsoft.AspNet.WebPages" version="2.0.20710.0" targetFramework="net40" /> 12 13 <package id="Microsoft.AspNet.WebPages.Data" version="2.0.20710.0" targetFramework="net40" /> 13 14 <package id="Microsoft.AspNet.WebPages.WebData" version="2.0.20710.0" targetFramework="net40" /> 14 <package id="Microsoft.jQuery.Unobtrusive.Ajax" version=" 2.0.30116.0" targetFramework="net40" />15 <package id="Microsoft.jQuery.Unobtrusive.Validation" version=" 2.0.30116.0" targetFramework="net40" />15 <package id="Microsoft.jQuery.Unobtrusive.Ajax" version="3.2.0" targetFramework="net40" /> 16 <package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.0" targetFramework="net40" /> 16 17 <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net40" /> 17 <package id="Modernizr" version="2.6.2" targetFramework="net40" /> 18 <package id="WebGrease" version="1.3.0" targetFramework="net40" /> 18 <package id="Modernizr" version="2.7.2" targetFramework="net40" /> 19 <package id="Newtonsoft.Json" version="5.0.8" targetFramework="net40" /> 20 <package id="WebGrease" version="1.6.0" targetFramework="net40" /> 19 21 </packages>
Note: See TracChangeset
for help on using the changeset viewer.