- Timestamp:
- 03/30/16 17:30:01 (9 years ago)
- Location:
- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/JobController.cs
r13739 r13740 138 138 139 139 vm.userJobs = clientWeb.Jobs.ToList(); 140 ViewBag.Title = "Jobs";140 ViewBag.Title = vm.message + " - Jobs"; 141 141 return View("Index", vm); 142 142 } … … 161 161 fillUploadsPaths(upper, -1); 162 162 ViewBag.Name = serviceClient.ClientCredentials.UserName.UserName; 163 ViewBag.Title = "Upload ed files";163 ViewBag.Title = "Uploads"; 164 164 return View("Uploads", upper); 165 165 } … … 181 181 UploadedJobViewModel upper = new UploadedJobViewModel(); 182 182 fillUploadsPaths(upper, index); 183 184 ViewBag.Title = "Uploaded files"; 183 if(index != -1) 184 ViewBag.Title = upper.DisplayDatePaths[index] + " - Uploads"; 185 else 186 ViewBag.Title = "Add files - Uploads"; 185 187 return View("Uploads", upper); 186 188 } … … 244 246 fillUploadsPaths(upper, index); 245 247 upper.message = message; 246 ViewBag.Title = " Uploaded files";248 ViewBag.Title = "File deleted - Uploads"; 247 249 248 250 return View("Uploads", upper); … … 288 290 serve.setTasks(); 289 291 ViewBag.JobsCount = serve.Job.Job.JobCount; 290 ViewBag.Title = serve.vm.SelectedTask.ItemTask.Name + " - Open file";292 ViewBag.Title = serve.vm.SelectedTask.ItemTask.Name + " - Uploads"; 291 293 ViewBag.SessionId = HttpContext.Session.GetString("UserId"); 292 294 return View("OpenFile", serve.vm); … … 378 380 } 379 381 } 380 ViewBag.Title = "Upload complete ";382 ViewBag.Title = "Upload complete - Uploads"; 381 383 return RedirectToAction("Uploads", "Job"); 382 384 -
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/ResourceController.cs
r13739 r13740 24 24 { 25 25 weblog = WebLoginService.Instance; 26 _environment = env; 27 } 28 private void init() 29 { 26 30 var u = HttpContext.Session.GetString("UserId"); 27 31 if (u == null || u == "" || Guid.Parse(u) == Guid.Empty) … … 32 36 clientWeb = new HiveClientWeb(serviceLocator, userId); 33 37 } 34 else { 38 else 39 { 35 40 userId = Guid.Parse(u); 36 37 41 serviceLocator = weblog.getServiceLocator(userId); 38 42 serviceClient = serviceLocator.getHiveServiceClient(); 39 43 clientWeb = weblog.getClientWeb(userId); 40 44 } 41 42 _environment = env;43 45 } 44 46 public IActionResult Index() 45 47 { 48 init(); 46 49 if (serviceLocator.CheckLogin()) 47 50 { -
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/UserController.cs
r13739 r13740 1 using HeuristicLab.Clients.Hive.WebJobManager.Services; 1 using HeuristicLab.Clients.Access.Administration; 2 using HeuristicLab.Clients.Hive.WebJobManager.Services; 3 using HeuristicLab.Clients.Hive.WebJobManager.ViewModels.User; 2 4 using Microsoft.AspNet.Hosting; 3 5 using Microsoft.AspNet.Http; … … 11 13 namespace HeuristicLab.Clients.Hive.WebJobManager.Controllers 12 14 { 13 public class UserController : Controller15 public class UserController : Controller 14 16 { 15 17 private WebLoginService weblog; 16 18 private HiveServiceLocatorWeb serviceLocator; 17 private HiveServiceClient serviceClient; 18 private HiveClientWeb clientWeb; 19 private AccessAdministrationClient accessClient; 19 20 private Guid userId; 20 21 … … 24 25 { 25 26 weblog = WebLoginService.Instance; 27 _environment = env; 28 } 29 #region Users 30 private void init() 31 { 26 32 var u = HttpContext.Session.GetString("UserId"); 27 33 if (u == null || u == "" || Guid.Parse(u) == Guid.Empty) … … 29 35 userId = Guid.Empty; 30 36 serviceLocator = new HiveServiceLocatorWeb(); 31 serviceClient = serviceLocator.getHiveServiceClient();32 clientWeb = new HiveClientWeb(serviceLocator, userId);33 37 } 34 else { 38 else 39 { 35 40 userId = Guid.Parse(u); 36 37 41 serviceLocator = weblog.getServiceLocator(userId); 38 serviceClient = serviceLocator.getHiveServiceClient(); 39 clientWeb = weblog.getClientWeb(userId); 42 accessClient = weblog.getAccessAdminClient(userId); 40 43 } 41 42 _environment = env;43 44 } 44 45 public IActionResult Index() 45 46 { 47 init(); 46 48 if (serviceLocator.CheckLogin()) 47 49 { 48 49 ViewBag.Title = "User management"; 50 return View("Index"); 50 51 ViewBag.Title = "Users"; 52 // accessClient.RefreshUsers(); 53 UserViewModel vm = new UserViewModel(); 54 vm.users = new List<string>() { "Jean" }; 55 return View("Index", vm); 51 56 } 52 57 else … … 55 60 } 56 61 } 62 public IActionResult SelectUser(string id) 63 { 64 init(); 65 if (serviceLocator.CheckLogin()) 66 { 67 Guid curr = Guid.Parse(id); 68 UserViewModel vm = new UserViewModel(); 69 vm.users = new List<string>() { "Jean" }; 70 if (curr == Guid.Empty) 71 { 72 vm.SelectedUser = ""; 73 ViewBag.Title = "Add User"; 74 } 75 else 76 { 77 vm.SelectedUser = "Jean"; 78 ViewBag.Title = "Jean"; 79 } 80 ViewBag.Title += " - Users"; 81 return View("Index", vm); 82 } 83 else 84 { 85 return RedirectToAction("Index", "Home"); 86 } 87 } 88 #endregion 89 90 #region Groups 91 public IActionResult Groups() 92 { 93 init(); 94 if (serviceLocator.CheckLogin()) 95 { 96 97 ViewBag.Title = "Groups"; 98 // accessClient.RefreshUsers(); 99 100 return View("Groups"); 101 } 102 else 103 { 104 return RedirectToAction("Index", "Home"); 105 } 106 } 107 #endregion 108 #region Roles 109 public IActionResult Roles() 110 { 111 init(); 112 if (serviceLocator.CheckLogin()) 113 { 114 115 ViewBag.Title = "Roles"; 116 // accessClient.RefreshUsers(); 117 118 return View("Roles"); 119 } 120 else 121 { 122 return RedirectToAction("Index", "Home"); 123 } 124 } 125 #endregion 57 126 } 58 127 }
Note: See TracChangeset
for help on using the changeset viewer.