Changeset 11030 for branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/LoginRequired/UserTask.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/Views/LoginRequired/UserTask.cshtml
r11020 r11030 6 6 7 7 <h1>Task Information for User: @Model.UserName</h1> 8 <section> 9 <fieldset id="filters"> 8 <button id="TaskInformationButton" class="tabButton">Task Information</button> 9 <button id="TaskOverviewButton" class="tabButton">Task Overview</button> 10 <section id="TaskInformationTab" class="tabSection"> 11 <fieldset id="FilterChoices"> 12 <legend>Filter by</legend> 13 <label>Date</label> 14 <input type="checkbox" name="filterChoice" value="Date" checked="checked"> 15 <label>Job Name</label> 16 <input type="checkbox" name="filterChoice" value="JobName"> 17 <label>Task State</label> 18 <input type="checkbox" name="filterChoice" value="TaskState"> 19 <label>Limit</label> 20 <select id="Limit"> 21 <option>10</option> 22 <option>50</option> 23 <option selected="selected">100</option> 24 <option>200</option> 25 </select> 26 </fieldset> 27 <fieldset id="Filters"> 10 28 <legend>Filters</legend> 11 <label>Start</label> 12 @Html.TextBox("Start", (DateTime.Now - new TimeSpan(1, 0, 0, 0)).ToString("yyyy-MM-dd"), new { @class = "date" }) 13 <label>End</label> 14 @Html.TextBox("End", (DateTime.Now + new TimeSpan(1, 0, 0, 0)).ToString("yyyy-MM-dd"), new { @class = "date" }) 29 <fieldset id="FilterDate" class="filterContainer"> 30 <legend>Date</legend> 31 <label>Start</label> 32 @Html.TextBox("InfoStart", (DateTime.Now - new TimeSpan(1, 0, 0, 0)).ToString("yyyy-MM-dd"), new { @class = "date" }) 33 <label>End</label> 34 @Html.TextBox("InfoEnd", (DateTime.Now + new TimeSpan(1, 0, 0, 0)).ToString("yyyy-MM-dd"), new { @class = "date" }) 35 </fieldset> 36 <fieldset id="FilterJobName" class="filterContainer"> 37 <legend>Job Name</legend> 38 @Html.DropDownList("JobNames") 39 </fieldset> 40 <fieldset id="FilterTaskState" class="filterContainer"> 41 <legend>Task State</legend> 42 @Html.DropDownList("TaskStates") 43 </fieldset> 15 44 <button id="Apply">Apply</button> 16 45 </fieldset> 46 <button id="ScrollTop">^</button> 47 <section id="TasksContainer" class="tabDataContainer"></section> 17 48 </section> 18 <section id="TasksContainer"> 49 <section id="TaskOverviewTab" class="tabSection"> 50 <fieldset id="TaskOverviewFilter" class="usersField"> 51 <legend>Filters</legend> 52 <label id="TaskOverviewFilterFirst">Start</label> 53 @Html.TextBox("OverviewStart", (DateTime.Now - new TimeSpan(1, 0, 0, 0)).ToString("yyyy-MM-dd"), new { @class = "date" }) 54 <label>End</label> 55 @Html.TextBox("OverviewEnd", (DateTime.Now + new TimeSpan(1, 0, 0, 0)).ToString("yyyy-MM-dd"), new { @class = "date" }) 56 </fieldset> 57 <section id="TaskStatsContainer" class="tabDataContainer taskOverview"></section> 19 58 </section> 20 59 … … 27 66 @Scripts.Render("~/bundles/jqueryui") 28 67 @Scripts.Render("~/Scripts/CollapsingSection.js") 68 @Scripts.Render("~/Scripts/jquery.scrollstop.js") 29 69 @Scripts.Render("~/Scripts/jqPlot/jquery.jqplot") 30 70 @Scripts.Render("~/Scripts/jqPlot/plugins/jqplot.barRenderer.min.js") … … 40 80 } 41 81 }); 82 $("#Apply").click(function () { 83 TaskInformation(); 84 }); 85 42 86 $(document).ready(function () { 43 $(" .date").datepicker({87 $("#InfoStart, #InfoEnd").datepicker({ 44 88 dateFormat: "yy-mm-dd", 45 onSelect: function () { filterTasks(); } 89 onSelect: function () { TaskInformation(); } 90 }); 91 $("#OverviewStart, #OverviewEnd").datepicker({ 92 dateFormat: "yy-mm-dd", 93 onSelect: function () { TaskOverview(); } 46 94 }); 47 95 }); 48 $("#Apply").click(function () { 49 filterTasks(); 96 97 $("[name='filterChoice']").click(function () { 98 var filterName = $(this).val(); 99 if ($(this).is(':checked')) { 100 $("#Filter" + filterName).css("display", "inline-block"); 101 } 102 else { 103 $("#Filter" + filterName).css("display", "none"); 104 } 50 105 }); 51 106 52 function filterTasks() { 53 startDate = $('#Start').val(); 54 endDate = $('#End').val(); 107 var userName = "@Model.UserName"; 108 var limit = $('#Limit').val(); 109 var startDate = $('#InfoStart').val(); 110 var endDate = $('#InfoEnd').val(); 111 var jobId; 112 var taskState; 113 var pageNumber; 55 114 56 @ChartHelper.TasksForUser("TasksContainer","Task",Url.Action("GetUserTask", "ChartData"),"userName","startDate","endDate") 57 @ChartHelper.ResizeTasks("Task") 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 = $('#TaskState').val(); 130 } 131 @ExceptionHelper.UserExceptions("TasksContainer",Url.Action("TaskExceptions", "ExceptionData"),"userName","limit","startDate","endDate","jobId","taskState") 132 @ChartHelper.TasksForUser("TasksContainer","Task",Url.Action("NumberPages", "ChartData"),Url.Action("GetUserTask", "ChartData"),"TaskInformation","userName","limit","startDate","endDate","jobId","taskState","pageNumber") 133 pageNumber = null; 58 134 } 59 135 60 var userName = "@Model.UserName"; 61 var startDate = $('#Start').val(); 62 var endDate = $('#End').val(); 136 function TaskOverview() { 137 startDate = $('#OverviewStart').val(); 138 endDate = $('#OverviewEnd').val(); 139 @AdminHelper.UserTaskStats("TaskStatsContainer",Url.Action("TaskStats", "AdminData"),"userName","startDate","endDate") 140 } 63 141 64 @ChartHelper.TasksForUser("TasksContainer","Task",Url.Action("GetUserTask", "ChartData"),"userName","startDate","endDate") 142 $(".tabButton").click(function () { 143 var sender = $(this).attr('id'); 144 $(".tabButton").css({ 'border-bottom': '1px solid #8297F5', 'background': 'none' }); 145 $(this).css({ 'border-bottom': '1px solid #E0E6FF', 'background-color': '#E0E6FF' }); 146 $(".tabSection").css('display', 'none'); 147 $("#" + sender.slice(0, -6) + "Tab").css('display', 'block'); 148 }) 149 150 TaskInformation(); 65 151 @ChartHelper.ResizeTasks("Task") 152 @ExceptionHelper.ScrollToException() 66 153 </script> 67 68 154 }
Note: See TracChangeset
for help on using the changeset viewer.