- Timestamp:
- 05/10/16 16:55:18 (9 years ago)
- Location:
- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/JobController.cs
r13827 r13841 104 104 //vm.selectedJob.RefreshAutomatically = true; 105 105 clientWeb.LoadJob(vm.selectedJob); 106 weblog.get FileOpener(userId).NewModel();107 weblog.get FileOpener(userId).Job = vm.selectedJob;106 weblog.getJobOpener(userId).NewModel(); 107 weblog.getJobOpener(userId).Job = vm.selectedJob; 108 108 ViewBag.Title = vm.selectedJob.Job.Name + " - Jobs"; 109 109 ViewBag.SessionId = HttpContext.Session.GetString("UserId"); … … 153 153 ViewBag.Name = serviceClient.ClientCredentials.UserName.UserName; 154 154 ViewBag.Title = "Uploads"; 155 //Recently opened 156 if (weblog.getFileOpener(userId).Job != null) 157 ViewBag.active = true; 155 158 return View("Uploads", upper); 156 159 } … … 175 178 else 176 179 ViewBag.Title = "Add files - Uploads"; 180 //Recently opened 181 if (weblog.getFileOpener(userId).Job != null) 182 ViewBag.active = true; 177 183 return View("Uploads", upper); 178 184 } … … 236 242 fillUploadsPaths(upper, index); 237 243 upper.message = message; 244 //recently opened 245 if (weblog.getFileOpener(userId).Job != null) 246 ViewBag.active = true; 238 247 ViewBag.Title = "File deleted - Uploads"; 239 248 … … 289 298 } 290 299 /// <summary> 300 /// Opens the last opened file in the fileopening service 301 /// </summary> 302 /// <returns></returns> 303 public IActionResult OpenRecent() 304 { 305 if (init()) 306 { 307 var serve = weblog.getFileOpener(userId); 308 ViewBag.JobsCount = serve.Job.Job.JobCount; 309 ViewBag.Title = serve.vm.SelectedTask.ItemTask.Name + " - Uploads"; 310 ViewBag.SessionId = HttpContext.Session.GetString("UserId"); 311 return View("OpenFile", serve.vm); 312 } 313 else 314 { 315 return RedirectToAction("Index", "Home"); 316 } 317 } 318 /// <summary> 291 319 /// Adds current opened file to hive, uses FileOpeningService singleton 292 320 /// </summary> … … 318 346 return RedirectToAction("Uploads", "Job"); 319 347 } 320 348 else 321 349 { 322 350 return RedirectToAction("Index", "Home"); -
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/UserController.cs
r13827 r13841 192 192 */ 193 193 } 194 195 public IActionResult ApproveUser(string id) 196 { 197 if (init()) 198 { 199 Guid curr = Guid.Parse(id); 200 201 UserViewModel vm = new UserViewModel(accessClient).refreshAll(); 202 203 var us = vm.getUserById(curr); 204 us.IsApproved = true; 205 accessClient.updateUser(us); 206 return RedirectToAction("SelectUser", new { id = id }); 207 208 } 209 else 210 { 211 return RedirectToAction("Index", "Home"); 212 } 213 } 194 214 /// <summary> 195 215 /// Delete a user
Note: See TracChangeset
for help on using the changeset viewer.