Changeset 11030 for branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/AdminHelper.cshtml
- Timestamp:
- 06/20/14 16:20:02 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/AdminHelper.cshtml
r11020 r11030 37 37 } 38 38 39 @helper UserTaskStats(string destinationTag, string overallUrl, string userUrl, string userName, string start, string end)39 @helper UserTaskStats(string destinationTag, string url, string userName, string start, string end) 40 40 { 41 if (userName!="") {41 if (userName != "" || userName != null) { 42 42 <text> 43 43 $.ajax({ 44 url: "@(new HtmlString( overallUrl))?start=" + @start + "&end=" + @end, datatype: "json", success: function (overallResult) {44 url: "@(new HtmlString(url))?start=" + @start + "&end=" + @end, datatype: "json", success: function (overallResult) { 45 45 $.ajax({ 46 url: "@(new HtmlString(u serUrl))?userName=" + @userName + "&start=" + @start + "&end=" + @end, datatype: "json", success: function (userResult) {46 url: "@(new HtmlString(url))?start=" + @start + "&end=" + @end + "&userName=" + @userName, datatype: "json", success: function (userResult) { 47 47 $("#" + "@destinationTag").html(""); 48 48 for (var i = 0; i < userResult.length; i++) { 49 49 $("#" + "@destinationTag").append('<label class="barLabel">' + userResult[i].Key + '</label>'); 50 $("#" + "@destinationTag").append('<div class="outerBar"><div class="innerBar" id="InnerBar' + i + '"><p class="innerBarText">' + +userResult[i].Value.toFixed(4) + '</p></div><p class="outerBarText" id="OuterText' + i + '">' + +overallResult[i].toFixed(4) + '</p></div>'); 51 $("#InnerBar" + i).css('width',((userResult[i].Value/overallResult[i])*100).toFixed(2) + '%'); 52 $("#OuterText" + i).css('width',(98 - ((userResult[i].Value/overallResult[i])*100)).toFixed(2) + '%'); 50 $("#" + "@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>'); 51 $("#InnerBar" + i).css('width',((userResult[i].Value/overallResult[i].Value)*100).toFixed(2) + '%'); 53 52 } 54 53 }
Note: See TracChangeset
for help on using the changeset viewer.