Changeset 11246 for branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/LoginRequired
- Timestamp:
- 07/30/14 16:41:08 (10 years ago)
- Location:
- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/LoginRequired
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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.