Changeset 13827
- Timestamp:
- 05/03/16 17:13:50 (9 years ago)
- Location:
- branches/WebJobManager
- Files:
-
- 8 added
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/JobController.cs ¶
r13754 r13827 310 310 } 311 311 } 312 //TODO Work in progress 313 /* public async Task<IActionResult> DownloadFile(int index, int filedex) 314 { 315 if (((HiveServiceLocatorWeb)(HiveServiceLocatorWeb.Instance)).CheckLogin()) 316 { 317 UploadedJobViewModel upper = new UploadedJobViewModel(); 318 fillUploadsPaths(upper, index); 319 320 HttpContext.Response.ContentType = "APPLICATION/OCTET-STREAM"; 321 String Header = "Attachment; Filename=" + upper.DisplayFilesPaths[filedex]; 322 HttpContext.Response.Headers.Add("Content-Disposition", Header); 323 System.IO.FileInfo Dfile = new System.IO.FileInfo(upper.FullFilesPaths[filedex]); 324 await HttpContext.Response.WriteAsync(Dfile.FullName); 325 //HttpContext.Response.End(); 326 327 var message = upper.DisplayFilesPaths[filedex] + " has been downloaded"; 328 329 upper.message = message; 330 ViewBag.Title = "Downloaded file"; 331 332 return View("Uploads", upper); 333 } 312 [HttpPost] 313 public IActionResult saveToFile(string fname) 314 { 315 if (init()) 316 { 317 weblog.getFileOpener(userId).SaveToFile(fname); 318 return RedirectToAction("Uploads", "Job"); 319 } 334 320 else 335 { 336 HiveServiceLocatorWeb.SetLoginErrorMessage(); 337 return RedirectToAction("Index", "Home"); 338 } 339 }*/ 321 { 322 return RedirectToAction("Index", "Home"); 323 } 324 } 325 326 public FileResult DownloadFile(int index, int filedex) 327 { 328 if (init()) 329 { 330 UploadedJobViewModel upper = new UploadedJobViewModel(); 331 fillUploadsPaths(upper, index); 332 333 System.IO.FileInfo Dfile = new System.IO.FileInfo(upper.FullFilesPaths[filedex]); 334 var fileName = Dfile.Name; 335 byte[] fileBytes = System.IO.File.ReadAllBytes(upper.FullFilesPaths[filedex]); 336 return File(fileBytes, "application/x-msdownload", fileName); 337 } 338 else 339 { 340 return null; 341 } 342 } 340 343 341 344 #endregion -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/UserController.cs ¶
r13805 r13827 132 132 user.UserName = inpusername; 133 133 uid = accessClient.addUser(user); 134 accessClient.RefreshUsers(); 134 135 var newpass = accessClient.resetPassword(uid); 135 136 sendPassmail(accessClient.Users.Find(x => x.Id == uid), newpass); … … 172 173 public static void sendPassmail(Access.User u, string pass) 173 174 {/* 174 SmtpClient smtpClient = new SmtpClient("mail.MyWebsiteDomainName.com", 25); 175 176 smtpClient.Credentials = new System.Net.NetworkCredential("info@MyWebsiteDomainName.com", "myIDPassword"); 175 SmtpClient smtpClient = new SmtpClient("smtp.gmail.com",587); 177 176 smtpClient.UseDefaultCredentials = true; 177 smtpClient.Credentials = new System.Net.NetworkCredential("trac.heuristiclab@gmail.com", "||||||||||||"); 178 178 smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network; 179 179 smtpClient.EnableSsl = true; … … 181 181 182 182 //Setting From , To and CC 183 mail.From = new MailAddress(" info@MyWebsiteDomainName", "MyWeb Site");183 mail.From = new MailAddress("trac.heuristiclab@gmail.com", "HeuristicLab"); 184 184 mail.Subject = "Password changed - HeuristicLab Hive"; 185 mail.Body = "Hello " + u.FullName + ", " + 186 "Your password was changed through the HeuristicLab Hive web application." + 187 "The new password for " + u.UserName + " is '" + pass + "'."; 185 mail.Body = "Hello " + u.FullName + ", " + Environment.NewLine + Environment.NewLine+ 186 "Your password was changed through the HeuristicLab Hive web application." + Environment.NewLine+ 187 "The new password for " + u.UserName + " is ' " + pass + " '." + Environment.NewLine + Environment.NewLine + 188 "HeuristicLab Hive"; 188 189 mail.To.Add(new MailAddress(u.Email)); 189 190 -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs/ProgressHub.cs ¶
r13739 r13827 6 6 using System.Linq; 7 7 using System.Threading.Tasks; 8 using HeuristicLab.Data; 9 using System.Reflection; 8 10 9 11 namespace HeuristicLab.Clients.Hive.WebJobManager … … 26 28 userId = Guid.Empty; 27 29 } 28 else { 30 else 31 { 29 32 userId = Guid.Parse(uid); 30 33 fileopener = weblog.getFileOpener(userId); … … 51 54 if (name != null) 52 55 fileopener.Job.Job.Name = name; 53 if (resource != null && resource != "")56 if (resource != null && resource != "") 54 57 { 55 58 fileopener.Job.Job.ResourceNames += "/" + resource; … … 70 73 {//check if upper job 71 74 current.ItemTask.ComputeInParallel = !current.ItemTask.ComputeInParallel; 72 73 } 74 else { 75 76 } 77 else 78 { 75 79 for (var i = 0; i < arr.Length; i++) 76 80 { … … 89 93 90 94 } 91 else {//not deep enough, select right path 95 else 96 {//not deep enough, select right path 92 97 if (current.ItemTask.Item is BatchRun) 93 98 current = current.ChildHiveTasks[arr[i][1]]; // select right batch … … 115 120 116 121 } 117 else { 122 else 123 { 118 124 for (var i = 0; i < arr.Length; i++) 119 125 {//loop for depth … … 132 138 133 139 } 134 else {//not deep enough, choose right path 140 else 141 {//not deep enough, choose right path 135 142 if (current.ItemTask.Item is BatchRun) 136 143 current = current.ChildHiveTasks[arr[i][1]]; // select right batch … … 177 184 178 185 } 186 public void paraEdit(int[][] arr, string problem, string name, string type, string value) 187 { 188 189 190 loader(); 191 HiveTask current = fileopener.Job.HiveTasks.ToList()[0]; 192 if (arr.Length == 0) 193 {//check if upper job 194 if (current.ItemTask.Item is Algorithm) 195 { 196 searchEditPara(current, problem, name, type, value); 197 } 198 } 199 else 200 { 201 for (var i = 0; i < arr.Length; i++) 202 {//loop for depth 203 if (i == arr.Length - 1) 204 {//Right depth reached, change priority for current 205 if (current.ItemTask.Item is BatchRun) 206 { 207 current = current.ChildHiveTasks[arr[i][1]]; 208 } 209 else if (current.ItemTask.Item is Experiment) 210 { 211 current = current.ChildHiveTasks[arr[i][0]]; 212 } 213 if (current.ItemTask.Item is Algorithm) 214 { 215 searchEditPara(current, problem, name, type, value); 216 } 217 } 218 else 219 {//not deep enough, choose right path 220 if (current.ItemTask.Item is BatchRun) 221 current = current.ChildHiveTasks[arr[i][1]]; // select right batch 222 else if (current.ItemTask.Item is Experiment) 223 current = current.ChildHiveTasks[arr[i][0]]; // select right sub task from experiment 224 } 225 } 226 } 227 } 228 /// <summary> 229 /// Generic parameter setter 230 /// </summary> 231 /// <param name="curr">Current task to edit </param> 232 /// <param name="problem">Problem parameter or normal parameter</param> 233 /// <param name="name">Property name</param> 234 /// <param name="type">Datatype</param> 235 /// <param name="value">New value</param> 236 private void searchEditPara(HiveTask curr, string problem, string name, string type, string value) 237 { 238 var prob = problem == "True" ? true : false; 239 240 var dattype = Type.GetType(type); 241 if (dattype == null) 242 {//Use assemblies to find correct datatype 243 foreach (var a in AppDomain.CurrentDomain.GetAssemblies()) 244 { 245 dattype = a.GetType(type); 246 if (dattype != null) 247 break; 248 } 249 } 250 //find parse method 251 var parse = dattype.GetMethod("Parse", new[] { typeof(string) }); 252 253 if (parse != null) 254 { 255 //Parses string to correct datatype 256 var val = parse.Invoke(null, new object[] { value }); 257 258 //BUGGERS 259 if (name == "ReevaluateElites") 260 name = "ReevaluteElites"; 261 if (name == "DominateOnEqualQualities" || name == "PlusSelection" || name == "ReevaluteElites") 262 val = ((BoolValue)val).Value; 263 264 // if (name == "ReduceToPopulationSize") 265 //name += "Parameter"; 266 267 try 268 { 269 Algorithm alg = (Algorithm)curr.ItemTask.Item; 270 if (prob) 271 alg.Problem.GetType().GetProperty(name).SetValue(alg, val); 272 else 273 alg.GetType().GetProperty(name).SetValue(alg, val); 274 } 275 catch (NullReferenceException e) 276 { 277 Console.WriteLine("NullRefException: " + name + " - " + type); 278 } 279 catch(TargetException e) 280 { 281 Console.WriteLine("TargetException: " + name + " - " + type); 282 } 283 } 284 285 } 179 286 180 287 } -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Scripts/Hubs/ProgressHubber.js ¶
r13754 r13827 77 77 document.getElementById("prior" + id).className = "btn dropdown-toggle "; 78 78 } 79 80 81 function paraEdit(arr, problem, name, type, value) { 82 hubber.server.paraEdit(arr, problem, name, type, value); 83 } -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Scripts/Styling/StyleSheet.css ¶
r13795 r13827 159 159 background-color:#74a9d8 !important; 160 160 } 161 rect{ 162 -webkit-box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75); 163 -moz-box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75); 164 box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75); 165 } -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Jobs/FileOpeningService.cs ¶
r13740 r13827 1 1 using HeuristicLab.Clients.Hive.WebJobManager.ViewModels; 2 using HeuristicLab.Common; 3 using HeuristicLab.Optimization; 2 4 using Microsoft.AspNet.Hosting; 5 using Microsoft.AspNet.Mvc; 3 6 using System; 4 7 using System.Collections.Generic; 8 using System.IO; 5 9 using System.Linq; 6 10 using System.Threading; … … 41 45 vm = new FileOpeningViewModel(); 42 46 Job = new RefreshableJob(); 47 43 48 Job.Job.Name = "init"; 44 49 … … 75 80 return null; 76 81 } 82 public void SaveToFile(string file) 83 { 84 if(vm != null) 85 { 86 var uploads = Path.Combine(env.WebRootPath, "uploads", weblog.getServiceLocator(UserId).getHiveServiceClient().ClientCredentials.UserName.UserName, 87 "HiveChanged"); 88 Directory.CreateDirectory(uploads); 89 var cont = Job.HiveTasks.First().ItemTask.Item; 90 if (!file.EndsWith(".hl")) 91 file += ".hl"; 92 var fileloc = uploads + "\\" + file; 93 if(cont is Experiment) 94 ContentManager.Save((Experiment)cont, fileloc, false); 95 else if(cont is BatchRun) 96 ContentManager.Save((BatchRun)cont, fileloc, false); 97 else if(cont is Algorithm) 98 { 99 IAlgorithm t = (IAlgorithm)Job.HiveTasks.First().ItemTask.Item; 100 ContentManager.Save((IStorableContent)t, fileloc, false); 101 } 102 103 } 104 } 105 77 106 } 78 107 } -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Home/Index.cshtml ¶
r13733 r13827 1 1 2 2 @model HeuristicLab.Clients.Hive.WebJobManager.ViewModels.LoginViewModel 3 3 <!-- Login page --> 4 4 <div class="container"> 5 5 <div class="row" style="align-content:center"> 6 6 <div class="col-xs-offset-4 col-sm-4" > 7 <div class="form-login"> 7 <div class="form-login"> 8 8 <h4>Welcome to HeuristicLab Hive</h4> 9 9 <form asp-controller="Home" asp-action="Login" method="POST"> -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/Index.cshtml ¶
r13754 r13827 1 1 @using HeuristicLab.Clients.Hive.WebJobManager.ViewModels 2 2 @model JobViewModel 3 4 <!-- Displays the job manager overview --> 5 3 6 <div id="userId" style="display:none">@ViewBag.SessionId</div> 4 7 <div> 8 <!-- Main nav menu--> 5 9 @Html.Partial("Navbar", new NavbarViewModel("Job")) 6 10 11 <!-- Job menu--> 7 12 <ul class="nav nav-pills nav-justified"> 8 13 <li role="presentation" … … 38 43 39 44 } 40 else { 45 else 46 {<!-- Display side menu containing jobs. --> 41 47 <div class="col-sm-4"> 42 48 <div class="btn-group-vertical btn-block"> … … 78 84 style="padding:5px; padding-left:10px;"> 79 85 @if (Model.selectedJob != null) 80 { 86 { <!-- A job has been selected by the user, load info into view --> 81 87 <div class="panel panel-default" 82 88 style="border-width:2px!important;padding:17px; … … 84 90 <div class="row"> 85 91 <h2 style="padding-left:20px"> 92 <!-- Header of the job (title and delete button) --> 86 93 @Model.selectedJob.Job.Name 87 94 <a onclick="popUpDelete()" … … 93 100 Delete job 94 101 </a> 95 <a style="display:none; " 102 <!-- HIDDEN BUTTON FOR ASP ACTION --> 103 <a style="display:none; " 96 104 asp-action="Delete" 97 105 asp-route-id="@Model.selectedJob.Id" … … 100 108 101 109 <script type="text/javascript"> 102 function popUpDelete() { 110 function popUpDelete() {//Quick inline popup with hidden asp button 103 111 if (confirm("Are you sure you want to delete this job?") == true) { 104 112 document.getElementById("del").click(); … … 110 118 </h2> 111 119 <div class="col-sm-6" style="padding-left:30px"> 120 <!-- Information of the job --> 112 121 <p>Description: @Model.selectedJob.Job.Description</p> 113 122 <p>Resources: @Model.selectedJob.Job.ResourceNames</p> … … 138 147 <div class="row" style="text-align:center"> 139 148 @Html.Partial("_Graphlegend") 149 <!-- Main graph giving overview of all the jobs--> 140 150 <div id="graphMain" style="width:100%;height:0px"> 141 151 … … 151 161 </h3> 152 162 @foreach (var task in Model.selectedJob.HiveTasks) 153 { 163 {<!--Display all child jobs recursively --> 154 164 @Html.Partial("SelectedJobPartials/_TaskPartial", 155 165 new HeuristicLab.Clients.Hive.WebJobManager.Models.HiveTaskContainer(task)) … … 164 174 } 165 175 <script type="text/javascript"> 166 function showLoader() { 176 function showLoader() {//Shows load spinner 167 177 document.getElementById("content").style.display = "none"; 168 178 document.getElementById("loader").style.display = ""; 169 179 170 180 } 171 function showDeleter() { 181 function showDeleter() {//Shows delete spinner 172 182 document.getElementById("content").style.display = "none"; 173 183 document.getElementById("loader").style.display = ""; -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFile.cshtml ¶
r13754 r13827 3 3 @model HeuristicLab.Clients.Hive.WebJobManager.ViewModels.FileOpeningViewModel 4 4 5 5 <!-- Displays the contents of a file --> 6 <!-- Another body used for the side scroller menu--> 6 7 <body id="top" 7 8 class="row" … … 12 13 style="margin-bottom:500px;margin-left:1px;margin-right:1px;"> 13 14 <div id="userId" style="display:none">@ViewBag.SessionId</div> 15 <!-- Main nav menu --> 14 16 @Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("Job")) 15 17 18 <!-- Job menu--> 16 19 <ul class="nav nav-pills nav-justified"> 17 20 <li role="presentation" … … 30 33 </li> 31 34 </ul> 35 <!-- Back button --> 32 36 <div class="row" 33 37 style="margin-left:20px"> … … 38 42 </a> 39 43 </div> 40 44 <!-- Check model to select right partial, partial handles all subloading --> 41 45 <div class="col-md-9"> 42 46 @if (Model.SelectedAlgorithm != null) … … 55 59 56 60 } 57 61 <!-- Main menu for job creation --> 58 62 <hr style="border-color:gray; margin-top:50px" /> 59 <div id="finish" 60 style="text-align:center"> 61 <h2> 62 Hive job information 63 </h2> 64 <div class="row" 65 style="margin-bottom:20px"> 66 67 <div class="col-sm-6" 68 style="text-align:right"> 69 <h5>Job name</h5> 70 </div> 71 <div class="col-sm-6" 72 style="text-align:left"> 73 <div class="form-group"> 74 <div class="input-group"> 75 <input type="text" 76 class="form-control" 77 name="jname" 78 id="jname" 79 placeholder="Job name"> 80 </div> 63 <div class="row"> 64 <div id="finish" class="col-sm-8" 65 style="text-align:center; border-right:1px solid"> 66 <h2> 67 Hive job information 68 </h2> 69 <div class="row" 70 style="margin-bottom:20px"> 71 72 <div class="col-sm-6" 73 style="text-align:right"> 74 <h5>Job name</h5> 75 </div> 76 <div class="col-sm-6" 77 style="text-align:left"> 78 <div class="form-group"> 79 <div class="input-group"> 80 <input type="text" 81 class="form-control" 82 name="jname" 83 id="jname" 84 placeholder="Job name"> 85 </div> 86 </div> 87 </div> 88 </div> 89 <div class="row" 90 style="margin-bottom:20px"> 91 <div class="col-sm-6" 92 style="text-align:right"> 93 <h5> 94 Resources (optional) 95 </h5> 96 </div> 97 <div class="col-sm-6" 98 style="text-align:left"> 99 <div class="form-group"> 100 <div class="input-group"> 101 <input type="text" 102 class="form-control" 103 name="jresource" 104 id="jresource" 105 placeholder="(seperate with ;)"> 106 </div> 107 </div> 108 </div> 109 </div> 110 111 <div class="row"> 112 <h5 class="col-sm-6" 113 style="text-align:right;margin-top:20px"> 114 Set global job priority 115 </h5> 116 <div class="col-sm-6"> 117 <div class="btn-group pull-left" 118 style="margin:10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 119 text-shadow:2px 2px black;"> 120 <button type="button" 121 id="prior" 122 class="btn btn-info dropdown-toggle" 123 data-toggle="dropdown" 124 aria-haspopup="true" aria-expanded="false"> 125 Normal <span class="caret"></span> 126 </button> 127 <ul class="dropdown-menu" 128 style="text-shadow:none"> 129 <li><a onclick="changePriority([],0,'')">Low</a></li> 130 <li><a onclick="changePriority([],1,'')">Normal</a></li> 131 <li><a onclick="changePriority([],2,'')">Urgent</a></li> 132 <li><a onclick="changePriority([],3,'')">Critical</a></li> 133 </ul> 134 </div> 135 </div> 136 </div> 137 138 <!-- adding the job to hive and show progress bar --> 139 <a class="btn btn-lg btn-success" 140 id="fakehiveadd" 141 onclick="addtoHive()" 142 style="margin:10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 143 text-shadow:2px 2px black;"> 144 Add this job to Hive 145 </a> 146 <!-- HIDDEN BUTTON FOR ASP ACTION --> 147 <a class="btn btn-success " 148 id="realhiveadd" 149 asp-controller="Job" 150 asp-action="AddToHive" 151 style="display:none"></a> 152 153 <!-- Progress--> 154 155 <h4 id="result" style="display:none">Start uploading experiment...</h4> 156 <div class="progress" id="progdiv" style="display:none"> 157 158 <div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" 159 id="progress" 160 aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:10%"> 161 81 162 </div> 82 163 </div> 83 164 </div> 84 <div class="row" 85 style="margin-bottom:20px"> 86 <div class="col-sm-6" 87 style="text-align:right"> 88 <h5> 89 Resources (optional) 90 </h5> 91 </div> 92 <div class="col-sm-6" 93 style="text-align:left"> 94 <div class="form-group"> 95 <div class="input-group"> 96 <input type="text" 97 class="form-control" 98 name="jresource" 99 id="jresource" 100 placeholder="(seperate with ;)"> 101 </div> 102 </div> 103 </div> 104 </div> 105 106 <div class="row"> 107 <h5 class="col-sm-6" 108 style="text-align:right;margin-top:20px"> 109 Set global job priority 110 </h5> 111 <div class="col-sm-6"> 112 <div class="btn-group pull-left" 113 style="margin:10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 165 <div class="col-sm-4"> 166 <h4>Save to file</h4> 167 <form asp-controller="Job" 168 asp-action="saveToFile" 169 method="post"> 170 <div class="col-sm-6" 171 style="text-align:right"> 172 <h5>File name</h5> 173 </div> 174 <div class="col-sm-6" 175 style="text-align:left"> 176 <div class="form-group"> 177 <div class="input-group"> 178 <input type="text" 179 class="form-control" 180 name="fname" 181 id="fname" 182 required 183 placeholder="File name"> 184 </div> 185 </div> 186 </div> 187 <div class="row" 188 style="text-align:center"> 189 <h5>Directory: /HiveChanged</h5> 190 </div> 191 <button class="btn btn-success btn-block" type="submit" 192 style="margin:10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 114 193 text-shadow:2px 2px black;"> 115 <button type="button" 116 id="prior" 117 class="btn btn-info dropdown-toggle" 118 data-toggle="dropdown" 119 aria-haspopup="true" aria-expanded="false"> 120 Normal <span class="caret"></span> 121 </button> 122 <ul class="dropdown-menu" 123 style="text-shadow:none"> 124 <li><a onclick="changePriority([],0,'')">Low</a></li> 125 <li><a onclick="changePriority([],1,'')">Normal</a></li> 126 <li><a onclick="changePriority([],2,'')">Urgent</a></li> 127 <li><a onclick="changePriority([],3,'')">Critical</a></li> 128 </ul> 129 </div> 130 </div> 131 </div> 132 133 134 <a class="btn btn-lg btn-success" 135 id="fakehiveadd" 136 onclick="addtoHive()" 137 style="margin:10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 138 text-shadow:2px 2px black;"> 139 Add this job to Hive 140 </a> 141 142 143 144 <a class="btn btn-success " id="realhiveadd" asp-controller="Job" asp-action="AddToHive" style="display:none"></a> 145 <h4 id="result" style="display:none">Start uploading experiment...</h4> 146 <div class="progress" id="progdiv" style="display:none"> 147 148 <div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" 149 id="progress" 150 aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:10%"> 151 152 </div> 194 Save to file</button> 195 </form> 153 196 </div> 154 197 </div> 155 198 156 199 157 158 159 200 </div> 201 <!-- Side scrolling menu--> 160 202 <nav style="margin-top:50px; " 161 203 class="col-md-2" id="scrolly"> … … 166 208 <li><a href="#top"><i class="fa fa-angle-up"></i> Top</a></li> 167 209 @if (Model.SelectedAlgorithm != null) 168 { 210 {//Algortihm loaded 169 211 <li><a href="#algorithm">Algorithm parameters</a></li> 170 212 <li><a href="#problem">Problem parameters</a></li> 171 213 } 172 214 else 173 { 215 {//batch run or experiment 174 216 <li><a id="ctasks" href="#tasks">Child tasks </a></li> 175 217 <li><a onclick="shower()" href="#tasks"><i class="fa fa-eye"></i> Show all tasks</a></li> … … 210 252 collapser = function () { 211 253 $('.collapse').collapse('hide'); 212 254 //closes every collapse 213 255 } 214 256 shower = function () { 215 257 $('.collapse').collapse('show'); 216 258 //opens every collapse 217 259 } 218 260 </script> -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_Algorithm.cshtml ¶
r13754 r13827 1 @model HeuristicLab.Clients.Hive.WebJobManager.ViewModels.FileOpeningViewModel 2 @{System.Random randomizer = new Random(); 3 int randy = randomizer.Next(5000); } 1 @using HeuristicLab.Core; 4 2 5 3 4 @model HeuristicLab.Clients.Hive.WebJobManager.ViewModels.FileOpeningViewModel 5 @{System.Random randomizer = new Random(); 6 int randy = randomizer.Next(50000); } 7 8 <!-- Partial for opening an algorithm only file--> 6 9 <div style="margin-left:20px;margin-right:20px"> 7 10 <div class="row" style="text-align:center"> … … 12 15 <span class="label label-primary">Algorithm: @Model.SelectedTask.ItemTask.Name</span> 13 16 </h1> 14 17 15 18 </div> 16 19 … … 30 33 @foreach (var par in Model.SelectedAlgorithm.Parameters.OrderBy(x => x.Name)) 31 34 { 32 <tr>33 <td>@par.Name</td>34 35 35 <td>@par.ActualValue</td> 36 </tr> 37 36 @Html.Partial("OpenFilePartials/DataPartials/DataMaster", 37 new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.Jobs.DataPackageVM( par,"[]",0, false)) 38 38 } 39 39 </tbody> … … 58 58 @foreach (var prob in Model.SelectedAlgorithm.Problem.Parameters.OrderBy(x => x.Name)) 59 59 { 60 <tr> 61 <td>@prob.Name</td> 62 63 <td>@prob.ActualValue</td> 64 </tr> 60 @Html.Partial("OpenFilePartials/DataPartials/DataMaster", 61 new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.Jobs.DataPackageVM(prob, "[]", 0,true)) 65 62 66 63 } … … 69 66 </div> 70 67 </div> 71 68 72 69 73 70 </div> -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_AlgorithmSmall.cshtml ¶
r13733 r13827 1 1 @model HeuristicLab.Clients.Hive.WebJobManager.Models.AlgorithmContainer 2 @{int randomal = Model.randy.Next(5000 );2 @{int randomal = Model.randy.Next(50000); 3 3 var builder = "["; 4 4 foreach (var arr in Model.depth) … … 8 8 builder += "]"; 9 9 } 10 <!-- Partial for displaying a small version of an algorithm --> 11 10 12 <p class="text-center"> 11 13 <a class="btn btn-primary" … … 14 16 aria-expanded="false" 15 17 aria-controls="collapseExample@(randomal)" 16 style="margin:10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);18 style="margin:10px;margin-bottom:0; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 17 19 text-shadow:2px 2px black;"> 18 20 @Model.algo.Name … … 62 64 @foreach (var par in Model.algo.Parameters.OrderBy(x => x.Name)) 63 65 { 64 <tr> 65 <td>@par.Name</td> 66 67 <td>@par.ActualValue</td> 68 </tr> 66 @Html.Partial("OpenFilePartials/DataPartials/DataMaster", 67 new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.Jobs.DataPackageVM(par, builder, randomal, false)) 69 68 70 69 } … … 84 83 @foreach (var prob in Model.algo.Problem.Parameters.OrderBy(x => x.Name)) 85 84 { 86 <tr> 87 <td>@prob.Name</td> 88 89 <td>@prob.ActualValue</td> 90 </tr> 85 @Html.Partial("OpenFilePartials/DataPartials/DataMaster", 86 new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.Jobs.DataPackageVM(prob, builder, randomal, true)) 91 87 92 88 } -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_BatchRun.cshtml ¶
r13754 r13827 1 1 @model HeuristicLab.Clients.Hive.WebJobManager.ViewModels.FileOpeningViewModel 2 2 @{System.Random randomizer = new Random(); 3 int randy = randomizer.Next(5000); } 3 int randy = randomizer.Next(50000); } 4 5 <!-- Partial for displaying a Bach run file --> 6 4 7 <div style="margin-left:20px;margin-right:20px"> 5 8 <div class="row" style="text-align:center"> -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_BatchRunSmall.cshtml ¶
r13735 r13827 1 1 @model HeuristicLab.Clients.Hive.WebJobManager.Models.BatchRunContainer 2 2 @{ 3 int randombr = Model.randy.Next(5000 );3 int randombr = Model.randy.Next(50000); 4 4 var builder = "["; 5 5 foreach (var arr in Model.depth) … … 9 9 builder += "]"; 10 10 } 11 11 <!-- Partial for displaying a small version of a batch file--> 12 12 13 13 <p class="text-center"> … … 17 17 aria-expanded="false" 18 18 aria-controls="collapseExample@(randombr)" 19 style="margin:10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);19 style="margin:10px;margin-bottom:0; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 20 20 text-shadow:2px 2px black;"> 21 21 @Model.batch.Name -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_Experiment.cshtml ¶
r13754 r13827 1 1 @model HeuristicLab.Clients.Hive.WebJobManager.ViewModels.FileOpeningViewModel 2 2 @{System.Random randomizer = new Random(); 3 int randy = randomizer.Next(5000 ); }3 int randy = randomizer.Next(50000); } 4 4 5 5 <!-- Partial for displaying an experiment file--> 6 6 <div style="margin-left:20px;margin-right:20px; "> 7 7 <div class="row" style="text-align:center"> -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_ExperimentSmall.cshtml ¶
r13735 r13827 1 1 @model HeuristicLab.Clients.Hive.WebJobManager.Models.ExperimentContainer 2 @{int randomex = Model.randy.Next(5000 );2 @{int randomex = Model.randy.Next(50000); 3 3 var builder = "["; 4 4 foreach (var arr in Model.depth) … … 8 8 builder += "]"; 9 9 } 10 <!-- Partial for displaying a small version of an experiment--> 10 11 <p class="text-center"> 11 12 <a class="btn btn-danger" … … 14 15 aria-expanded="false" 15 16 aria-controls="collapseExample@(randomex)" 16 style="margin:10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);17 style="margin:10px; margin-bottom:0; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 17 18 text-shadow:2px 2px black;"> 18 19 @Model.exp.Name -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/SelectedJobPartials/_AlgTask.cshtml ¶
r13735 r13827 14 14 15 15 <div class="panel-heading" 16 data-toggle="collapse" 17 data-target="#panbody@(Model.hiveTask.Task.Id)" 16 18 17 onclick="redrawGraph('@(Model.hiveTask.Task.Id)')" 19 18 aria-expanded="false" … … 82 81 </tbody> 83 82 </table> 83 <a style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 84 text-shadow:2px 2px black;" 85 class="btn btn-info btn-block" 86 data-toggle="collapse" 87 data-target="#panbody@(Model.hiveTask.Task.Id)"><i class="fa fa-bar-chart-o"></i> Show graph</a> 84 88 </div> 85 89 <div class="panel-body " style="text-shadow:none"> -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/SelectedJobPartials/_BatchTask.cshtml ¶
r13740 r13827 13 13 14 14 <div class="panel-heading" 15 data-toggle="collapse"16 data-target="#panbody@(Model.hiveTask.Task.Id)"17 15 onclick="redrawGraph('@(Model.hiveTask.Task.Id)')" 18 16 aria-expanded="false" … … 93 91 </tbody> 94 92 </table> 93 <a style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 94 text-shadow:2px 2px black;" 95 class="btn btn-info btn-block" 96 data-toggle="collapse" 97 data-target="#panbody@(Model.hiveTask.Task.Id)"><i class="fa fa-bar-chart-o"></i>Show graph</a> 95 98 </div> 96 99 <div class="panel-body " style="text-shadow:none"> -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/SelectedJobPartials/_ExpTask.cshtml ¶
r13735 r13827 17 17 18 18 <div class="panel-heading" 19 data-toggle="collapse"20 data-target="#panbody@(Model.hiveTask.Task.Id)"21 19 onclick="redrawGraph('@(Model.hiveTask.Task.Id)')" 22 20 aria-expanded="false" … … 93 91 </tbody> 94 92 </table> 93 <a style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 94 text-shadow:2px 2px black;" 95 class="btn btn-info btn-block" 96 data-toggle="collapse" 97 data-target="#panbody@(Model.hiveTask.Task.Id)"><i class="fa fa-bar-chart-o"></i>Show graph</a> 95 98 </div> 96 99 <div class="panel-body " style="text-shadow:none"> -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/UploaderPartial/_UploaderPartial.cshtml ¶
r13741 r13827 4 4 box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);"> 5 5 6 <form method="post"7 asp-action="Uploader"8 asp-controller="Job" enctype="multipart/form-data">9 <input onchange="printFiles()"10 type="file"11 id="files"12 name="files"13 multiple accept=".hl"14 style="display:none" />15 6 16 <div onclick="firefilebutton()" 17 class="btn btn-info btn-lg btn-block" 18 style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 19 text-shadow:1px 1px black;"> 20 <i class="fa fa-folder-open-o"></i> Choose file(s) to upload to the server 21 </div> 7 <form method="post" 8 asp-action="Uploader" 9 asp-controller="Job" enctype="multipart/form-data"> 10 <input onchange="printFiles()" 11 type="file" 12 id="files" 13 name="files" 14 multiple accept=".hl" 15 style="display:none" /> 22 16 23 <div class="row" style="margin:10px"> 17 <div onclick="firefilebutton()" 18 class="btn btn-info btn-lg btn-block" 19 style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 20 text-shadow:1px 1px black;"> 21 <i class="fa fa-folder-open-o"></i> Choose file(s) to upload to the server 22 </div> 24 23 25 <div id="selectedfiles"> 26 <h3>Files</h3> 27 <p>No files selected: press the above button to choose files</p> 28 </div> 24 <div class="row" style="margin:10px"> 29 25 30 <button style="margin-bottom:10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 31 text-shadow:2px 2px black;" 32 type="button" 33 disabled 34 id="del" 35 class='btn btn-danger' 36 onclick='deletefiles()'> 37 <span class='glyphicon glyphicon-trash' aria-hidden='true'></span> 38 Remove files 39 </button> 26 <div id="selectedfiles"> 27 <h3>Files</h3> 28 <p>No files selected: press the above button to choose files</p> 29 </div> 40 30 41 <div 42 style="margin-top:20px;margin-bottom:20px"> 31 <button style="margin-bottom:10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 32 text-shadow:2px 2px black;" 33 type="button" 34 disabled 35 id="del" 36 class='btn btn-danger' 37 onclick='deletefiles()'> 38 <span class='glyphicon glyphicon-trash' aria-hidden='true'></span> 39 Remove files 40 </button> 43 41 44 <label for="basic-url">Directory name</label> 45 <div class="input-group"> 46 <span class="input-group-addon" 47 id="basic-addon3"> 48 .../uploads/@ViewBag.Name 49 </span> 50 <input 51 type="text" 52 disabled 53 class="form-control" 54 id="directory" 55 name="directory" 56 aria-describedby="basic-addon3" 57 value="@(DateTime.Now.ToString("yyyy.MM.dd"))" /> 58 </div> 59 </div> 60 <button style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 61 text-shadow:2px 2px black;" 62 disabled 63 id="upl" 64 class="btn btn-lg btn-block btn-success" 65 type="submit" 66 > 67 <i class="fa fa-plus-square"></i> Add to uploads 68 </button> 69 </div> 42 <div 43 style="margin-top:20px;margin-bottom:20px"> 44 45 <label for="basic-url">Directory name</label> 46 <div class="input-group"> 47 <span class="input-group-addon" 48 id="basic-addon3"> 49 .../uploads/@ViewBag.Name 50 </span> 51 <input 52 type="text" 53 disabled 54 class="form-control" 55 id="directory" 56 name="directory" 57 aria-describedby="basic-addon3" 58 value="@(DateTime.Now.ToString("yyyy.MM.dd"))" /> 59 </div> 60 </div> 61 <button style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 62 text-shadow:2px 2px black;" 63 disabled 64 id="upl" 65 class="btn btn-lg btn-block btn-success" 66 type="submit" 67 > 68 <i class="fa fa-plus-square"></i> Add to uploads 69 </button> 70 </div> 70 71 71 72 </form> -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/Uploads.cshtml ¶
r13742 r13827 1 1 @model HeuristicLab.Clients.Hive.WebJobManager.ViewModels.UploadedJobViewModel 2 2 3 4 <!-- Shows uploaded files and the uploader --> 3 5 <div> 4 6 … … 44 46 else { 45 47 <div class="col-sm-4"> 46 <div class="btn-group-vertical btn-block"> 48 <div class="btn-group btn-group-justified btn-block" 49 role="group" style="margin-bottom:-4px"> 50 47 51 <a class="btn btn-info btn-lg btn-block disabled" 48 style=" box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);52 style="width:6%; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 49 53 text-shadow:2px 2px black;"> 50 54 <i class="fa fa-cloud"></i> Uploads … … 59 63 style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 60 64 text-shadow:2px 2px black;"> 61 <i class="fa fa-cloud-upload"></i> Upload new file(s)65 <i class="fa fa-cloud-upload"></i> 62 66 </a> 67 </div> 68 <div class="btn-group-vertical btn-block"> 69 63 70 @for (int i = 0; i < Model.DisplayDatePaths.Count; i++) 64 71 { … … 72 79 </a> 73 80 } 74 75 81 </div> 76 82 </div> … … 100 106 { 101 107 <div class="col-sm-8"> 102 108 <h4>Click on a file to prepare it for upload to Hive</h4> 103 109 @for (int i = 0; i < Model.DisplayFilesPaths.Count; i++) 104 110 { 111 105 112 <div class="btn-group-justified btn-block"> 106 113 107 114 <a class="btn btn-default @(Model.DisplayFilesPaths[i].EndsWith(".hl") ? "" : "disabled" )" 108 115 asp-controller="Job" … … 111 118 asp-route-filedex="@i" 112 119 style="width:6%;box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);"> 113 @Model.DisplayFilesPaths[i] 120 <i class="fa fa-list-alt"></i> @Model.DisplayFilesPaths[i] 121 </a> 122 <a id="down" 123 style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 124 text-shadow:2px 2px black;" 125 class='btn btn-group btn-success' 126 asp-controller="Job" 127 asp-action="DownloadFile" 128 asp-route-index="@(Model.SelectedIndex)" 129 asp-route-filedex="@i"> 130 <span class='glyphicon glyphicon-download-alt' aria-hidden='true'></span> 114 131 </a> 115 132 <a id="del" … … 124 141 <span class='glyphicon glyphicon-trash' aria-hidden='true'></span> 125 142 </a> 143 126 144 </div> 127 145 } -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Resource/Index.cshtml ¶
r13805 r13827 41 41 class="btn pull-right" 42 42 style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 43 text-shadow:2px 2px black;font-weight:bold;margin-bottom:5px "43 text-shadow:2px 2px black;font-weight:bold;margin-bottom:5px;" 44 44 ng-class="{ 'btn-success': treeview.currentNode.IsDisposable, 'btn-warning': !treeview.currentNode.IsDisposable }" 45 45 ng-click="toggleDisposable()"> … … 60 60 ng-class="{ 'active': permissionview }" 61 61 ng-style="{ 'text-decoration': permissionview ? 'underline' : ''}"> 62 <a style="text-shadow:2px 2px black; color:white; font-weight:bold; border: 62 <a style="text-shadow:2px 2px black; color:white; font-weight:bold; border:1px solid white;" 63 63 href="" 64 64 ng-click="menuchange(1)"> … … 69 69 role="presentation" 70 70 ng-class="{ 'active': resaddview }" 71 ng-style="{ 71 ng-style="{'text-decoration': resaddview ? 'underline' : ''}"> 72 72 73 73 <a style="text-shadow:2px 2px black; color:white; font-weight:bold; border: 1px solid white;" … … 88 88 <p> 89 89 This shows only 90 <span style="text-decoration:underline ">direct members</span>90 <span style="text-decoration:underline;">direct members</span> 91 91 of the group (not members of subgroups). 92 92 </p> 93 <p><span style="color:lightgray;">Gray clients</span> are already subscribed to another group. White are ungrouped.</p> 93 94 <p>Adding a member will overwrite the current group it's a member in (if any)</p> 94 95 <p>Removing an existing member will make it revert to Ungrouped.</p> … … 97 98 style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 98 99 text-shadow:2px 2px black;">Reset to current members</a> 99 <div class="row" style="margin:5px ">100 <div class="row" style="margin:5px;"> 100 101 <h4>All resources</h4> 101 102 <label class="col-sm-3" 102 103 ng-style="{ 103 'background-color':client.add === true ? 'green' : '' }" 104 ng-repeat="client in clients | orderBy:['!add', 'Name' ] | filter:searchText"> 105 <input type="checkbox" 104 'background-color':client.add === true ? 'green' : '', 105 'color':client.ParentResourceId != null ? 'lightgray' : ''}" 106 ng-repeat="client in clients | orderBy:['!add', 'Name'] | filter:searchText"> 107 <input 108 type="checkbox" 106 109 name="addres" 107 110 value="{{client.Id}}" … … 110 113 </div> 111 114 </div> 112 <input style="display:none "115 <input style="display:none;" 113 116 type="text" 114 117 id="groupid" … … 163 166 class="row panel-heading" 164 167 style="padding:10px;"> 165 <table class="table" style="margin-bottom:0 px">168 <table class="table" style="margin-bottom:0;"> 166 169 <tbody> 167 170 <tr> … … 186 189 <td> 187 190 188 <input style="display:none " type="text" id="inpid" name="inpid" value="{{treeview.currentNode.Id}}" />191 <input style="display:none;" type="text" id="inpid" name="inpid" value="{{treeview.currentNode.Id}}" /> 189 192 <input type="checkbox" ng-model="checkDel" /> I want to delete this group 190 193 </td> … … 225 228 class="row" 226 229 style="padding:10px;"> 227 <input style="display:none " type="text" id="inpid" name="inpid" value="{{treeview.currentNode.Id}}" />228 229 <span style="padding:0 px" class="col-sm-4">Change group: </span>230 <input style="display:none;" type="text" id="inpid" name="inpid" value="{{treeview.currentNode.Id}}" /> 231 232 <span style="padding:0;" class="col-sm-4">Change group: </span> 230 233 231 234 <select class="form-control col-sm-5" … … 258 261 ui-calendar="uiConfig.calendar" 259 262 id="resourcecalendar" 260 style="font-size:medium "263 style="font-size:medium;" 261 264 class="span8 calendar" 262 265 ng-model="currentcal.down"></div> … … 304 307 <td> 305 308 <input type="checkbox" class="checkbox" ng-model="currentcal.down[0][selectedEventId].rec.recurrence" ng-change="setChanged(selectedEventId)" /> 306 <p ng-if="currentcal.down[0][selectedEventId].changed && currentcal.down[0][selectedEventId].rec.recurrence" style="color:darkred; font-weight:bold">309 <p ng-if="currentcal.down[0][selectedEventId].changed && currentcal.down[0][selectedEventId].rec.recurrence" style="color:darkred; font-weight:bold;"> 307 310 The recurrence itself will be made during saving, settings can be changed here. 308 311 </p> -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/User/Groups.cshtml ¶
r13805 r13827 156 156 <div class="form-group"> 157 157 <label class="col-sm-3 control-label"> 158 Members158 @Model.SelectedGroupMembers.Count members 159 159 </label> 160 160 <div class="col-sm-8 control-label" > -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/User/Index.cshtml ¶
r13805 r13827 221 221 <div class="form-group"> 222 222 <label class="col-sm-3 control-label"> 223 Member of 223 Member of @Model.SelectedUserSubscriptions.Count groups 224 224 </label> 225 225 <div class="col-sm-8 control-label" style="text-align:left"> … … 293 293 <div class="form-group"> 294 294 <label class="col-sm-3 control-label"> 295 Roles295 @Model.SelectedUserRoles.Count Roles 296 296 </label> 297 297 <div class="col-sm-8 control-label" style="text-align:left"> -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/User/Roles.cshtml ¶
r13805 r13827 157 157 <div class="form-group"> 158 158 <label class="col-sm-3 control-label"> 159 Users159 @Model.SelectedRoleEnrolled.Count Users 160 160 </label> 161 161 <div class="col-sm-8 control-label" style="text-align:left"> … … 189 189 </div> 190 190 <div class="form-group"> 191 <div class="col-sm-offset-3 col-sm-3"> 192 <button type="submit" 193 id="inpsaver" 194 disabled 195 class="btn btn-default" 196 onclick="showSaver()"> 197 <i class="fa fa-save"></i> Save changes 198 </button> 199 </div> 200 <div class="col-sm-5"> 191 192 <div class="col-sm-3"> 201 193 <a class="btn btn-danger pull-right" 202 194 asp-controller="User" -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/css/site.min.css ¶
r13805 r13827 1 @import url(http://fonts.googleapis.com/css?family=Roboto:400);.wrapper,h4{text-align:center}.label,sub,sup{vertical-align:baseline}[role=button],div[data-tree-model] li,div[data-tree-model] li i{cursor:pointer}.fc table,table{border-spacing:0}body,figure{margin:0}.btn-group>.btn-group,.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.dropdown-menu{float:left}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.pre-scrollable{max-height:340px}.fa,.glyphicon{-moz-osx-font-smoothing:grayscale}body{-webkit-font-smoothing:antialiased;font:400 14px Roboto,arial,sans-serif}.container{padding:25px;position:fixed}.form-login{background-color:#EDEDED;border-radius:15px;border-color:#d2d2d2;border-width:5px;box-shadow:0 1px 0 #cfcfcf;padding:10px 20px 20px;padding:10px 20px 20px}h4{border:0 solid #fff;border-bottom-width:1px;padding-bottom:10px}.panel-warning>.panel-heading{background-image:linear-gradient(to bottom,#eb9114 0,#f1b25b 100%)!important;color:#fff!important}.panel-danger>.panel-heading{background-image:linear-gradient(to bottom,#c12e2a 0,#d9534f 100%)!important;color:#fff!important}.label-as-badge{border-radius:1em}.bar-off{fill:#c2c2d6}.bar-off:hover{fill:#e0e0eb}.bar-wait{fill:#f0a742}.bar-wait:hover{fill:#f4bd71}.bar-trans{fill:#80d4ff}.bar-trans:hover{fill:#9df}.bar-calc{fill:#2f6fa6}.bar-calc:hover{fill:#3884c7}.bar-paus{fill:#47476b}.bar-paus:hover{fill:#5c5c8a}.bar-fin{fill:#5cb85c}.bar-fin:hover{fill:#71c171}.bar-abo{fill:#c2302c}.bar-abo:hover{fill:#d54944}.bar-fail{fill:#c2302c}.bar-fail:hover{fill:#d54944}rect.selection{stroke:gray;stroke-dasharray:4px;stroke-opacity:.5;fill:transparent}svg ::selection{background:0 0}svg ::-moz-selection{background:0 0}svg ::-webkit-selection{background:0 0}.btn-danger:focus,.btn-danger:hover,.btn-default:focus,.btn-default:hover,.btn-info:focus,.btn-info:hover,.btn-primary:focus,.btn-primary:hover,.btn-success:focus,.btn-success:hover,.btn-warning:focus,.btn-warning:hover{background-position:0 -15px}[animate-on-change]{transition:all 1s;-webkit-transition:all 1s}[animate-on-change].changed{background-color:#add8e6;transition:none;-webkit-transition:none}[animate-on-change].changedshut{background-color:#ffa07a;transition:none;-webkit-transition:none}.panel-heading .nav-justified.nav-pills li.active>a{background-color:#74a9d8!important} div[data-angular-treeview]{-moz-user-select:-moz-none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-weight:600;color:#fff;text-decoration:none;text-shadow:1px 1px #000}div[data-tree-model] ul{padding:5px;list-style:none;border:#778899;overflow:hidden}div[data-tree-model] li{position:relative;padding:0 0 0 20px;line-height:20px;margin-top:3px;border:#add8e6;border-radius:10px;box-shadow:2px 3px 5px rgba(0,0,0,.6),inset 1px 10px 300px 51px rgba(33,151,184,1)}div[data-tree-model] li .expanded{padding:1px 10px;background-image:url(../img/folder.png);background-repeat:no-repeat}div[data-tree-model] li .collapsed{padding:1px 10px;background-image:url(../img/folder-closed.png);background-repeat:no-repeat}div[data-tree-model] li .normal{padding:1px 10px;color:#000;background-image:url(../img/file.png);background-repeat:no-repeat}div[data-tree-model] li.selected{box-shadow:2px 3px 5px rgba(0,0,0,.6),inset 1px 10px 300px 51px #5cb85c!important}div[data-tree-model] span.selected{color:#fff!important;text-shadow:1px 1px #000!important;font-weight:700;padding:1px 5px}div[data-tree-model] li.changed{box-shadow:2px 3px 5px rgba(0,0,0,.6),inset 1px 10px 300px 51px rgba(250,250,210,1)}div[data-tree-model] span.changed{color:#000;text-shadow:1px 1px #fff;font-weight:700;padding:1px 5px}div[data-tree-model] span.loaded{text-decoration:underline;font-style:oblique}/*!1 @import url(http://fonts.googleapis.com/css?family=Roboto:400);.wrapper,h4{text-align:center}.label,sub,sup{vertical-align:baseline}[role=button],div[data-tree-model] li,div[data-tree-model] li i{cursor:pointer}.fc table,table{border-spacing:0}body,figure{margin:0}.btn-group>.btn-group,.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.dropdown-menu{float:left}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.pre-scrollable{max-height:340px}.fa,.glyphicon{-moz-osx-font-smoothing:grayscale}body{-webkit-font-smoothing:antialiased;font:400 14px Roboto,arial,sans-serif}.container{padding:25px;position:fixed}.form-login{background-color:#EDEDED;border-radius:15px;border-color:#d2d2d2;border-width:5px;box-shadow:0 1px 0 #cfcfcf;padding:10px 20px 20px;padding:10px 20px 20px}h4{border:0 solid #fff;border-bottom-width:1px;padding-bottom:10px}.panel-warning>.panel-heading{background-image:linear-gradient(to bottom,#eb9114 0,#f1b25b 100%)!important;color:#fff!important}.panel-danger>.panel-heading{background-image:linear-gradient(to bottom,#c12e2a 0,#d9534f 100%)!important;color:#fff!important}.label-as-badge{border-radius:1em}.bar-off{fill:#c2c2d6}.bar-off:hover{fill:#e0e0eb}.bar-wait{fill:#f0a742}.bar-wait:hover{fill:#f4bd71}.bar-trans{fill:#80d4ff}.bar-trans:hover{fill:#9df}.bar-calc{fill:#2f6fa6}.bar-calc:hover{fill:#3884c7}.bar-paus{fill:#47476b}.bar-paus:hover{fill:#5c5c8a}.bar-fin{fill:#5cb85c}.bar-fin:hover{fill:#71c171}.bar-abo{fill:#c2302c}.bar-abo:hover{fill:#d54944}.bar-fail{fill:#c2302c}.bar-fail:hover{fill:#d54944}rect.selection{stroke:gray;stroke-dasharray:4px;stroke-opacity:.5;fill:transparent}svg ::selection{background:0 0}svg ::-moz-selection{background:0 0}svg ::-webkit-selection{background:0 0}.btn-danger:focus,.btn-danger:hover,.btn-default:focus,.btn-default:hover,.btn-info:focus,.btn-info:hover,.btn-primary:focus,.btn-primary:hover,.btn-success:focus,.btn-success:hover,.btn-warning:focus,.btn-warning:hover{background-position:0 -15px}[animate-on-change]{transition:all 1s;-webkit-transition:all 1s}[animate-on-change].changed{background-color:#add8e6;transition:none;-webkit-transition:none}[animate-on-change].changedshut{background-color:#ffa07a;transition:none;-webkit-transition:none}.panel-heading .nav-justified.nav-pills li.active>a{background-color:#74a9d8!important}rect{-webkit-box-shadow:10px 10px 5px 0 rgba(0,0,0,.75);-moz-box-shadow:10px 10px 5px 0 rgba(0,0,0,.75);box-shadow:10px 10px 5px 0 rgba(0,0,0,.75)}div[data-angular-treeview]{-moz-user-select:-moz-none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-weight:600;color:#fff;text-decoration:none;text-shadow:1px 1px #000}div[data-tree-model] ul{padding:5px;list-style:none;border:#778899;overflow:hidden}div[data-tree-model] li{position:relative;padding:0 0 0 20px;line-height:20px;margin-top:3px;border:#add8e6;border-radius:10px;box-shadow:2px 3px 5px rgba(0,0,0,.6),inset 1px 10px 300px 51px rgba(33,151,184,1)}div[data-tree-model] li .expanded{padding:1px 10px;background-image:url(../img/folder.png);background-repeat:no-repeat}div[data-tree-model] li .collapsed{padding:1px 10px;background-image:url(../img/folder-closed.png);background-repeat:no-repeat}div[data-tree-model] li .normal{padding:1px 10px;color:#000;background-image:url(../img/file.png);background-repeat:no-repeat}div[data-tree-model] li.selected{box-shadow:2px 3px 5px rgba(0,0,0,.6),inset 1px 10px 300px 51px #5cb85c!important}div[data-tree-model] span.selected{color:#fff!important;text-shadow:1px 1px #000!important;font-weight:700;padding:1px 5px}div[data-tree-model] li.changed{box-shadow:2px 3px 5px rgba(0,0,0,.6),inset 1px 10px 300px 51px rgba(250,250,210,1)}div[data-tree-model] span.changed{color:#000;text-shadow:1px 1px #fff;font-weight:700;padding:1px 5px}div[data-tree-model] span.loaded{text-decoration:underline;font-style:oblique}/*! 2 2 * Bootstrap v3.3.6 (http://getbootstrap.com) 3 3 * Copyright 2011-2015 Twitter, Inc. -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/js/hubs/calendarhubber.js ¶
r13805 r13827 12 12 var hubber = $.connection.calendarHub; 13 13 14 vm.alertMessage = "No alerts"; 15 vm.currentcal = []; 16 $scope.permissionview = false; 17 $scope.resaddview = false; 18 vm.selectedEventId = -1; 19 vm.groups = []; 20 vm.clients = []; 14 vm.currentcal = [];//Reference to current calendar (treeview.currentNode.calendar) 15 $scope.permissionview = false;//Show permissions or not 16 $scope.resaddview = false;//Show add resources or not 17 vm.selectedEventId = -1;//Selected downtime (-1 for none) 18 vm.groups = []; //All resource groups 19 vm.clients = []; //All resources 21 20 vm.init = function () { 22 23 // $.connection.hub.logging = true;24 25 21 26 22 var v = document.getElementById("userId").innerHTML; 27 23 $.connection.hub.qs = { 'userid': v }; 24 //Connection string set to identify the unique session ID for the user 28 25 $.connection.hub.start().done(function () { 29 hubber.server.requestInfo(); 30 }); 26 hubber.server.requestInfo();//initial data request 27 }); 28 29 //Process all initial data needed (heavy load) 31 30 hubber.client.processData = function (data, users, groups) { 32 31 vm.data = JSON.parse(data); … … 37 36 $scope.$apply(); 38 37 }; 38 39 //Saving from current graph is done -> refresh it 39 40 hubber.client.savingCurrentDone = function () { 40 41 vm.calendarSaver = false; … … 42 43 $scope.$apply(); 43 44 }; 45 46 //Saving all graphs done -> clear everything 44 47 hubber.client.savingAllDone = function () { 45 48 vm.calendarSaver = false; … … 47 50 $scope.$apply(); 48 51 }; 52 53 //Dispose toggle refresh for current 49 54 hubber.client.processDispose = function (disp) { 50 55 vm.treeview.currentNode.IsDisposable = disp; … … 52 57 $scope.$apply(); 53 58 } 59 60 //Permissions refresh for specific resource 54 61 hubber.client.processPermissions = function (id, perm) { 55 62 var json = JSON.parse(perm); … … 60 67 $scope.$apply(); 61 68 } 69 70 //Process downtimes for a resource. Data conversion 62 71 hubber.client.processDowntime = function (id, down) { 63 72 var json = JSON.parse(down); … … 99 108 } 100 109 110 //Initial function to build the resource tree 111 $scope.buildTree = function () { 112 vm.tree = []; 113 vm.temptree = []; 114 vm.top = false; 115 var ungrouped = { 116 children: [], 117 Name: 'Ungrouped' 118 } 119 for (; vm.data.length > 0;) { 120 121 if (vm.data[0].ParentResourceId == null && vm.data[0].IsDisposable !== undefined) { 122 var curr = $scope.seekChildren(vm.data.splice(0, 1)[0]); 123 vm.clients.push(curr); 124 ungrouped.children.push(curr); 125 } 126 else if (vm.data[0].ParentResourceId == null) { 127 var curr = $scope.seekChildren(vm.data.splice(0, 1)[0]); 128 vm.groups.push(curr); 129 vm.tree.push(curr); 130 } 131 else { 132 var curr = $scope.seekChildren(vm.data.splice(0, 1)[0]); 133 if (curr.IsDisposable !== undefined) 134 vm.clients.push(curr); 135 else 136 vm.groups.push(curr); 137 vm.temptree.push(curr); 138 } 139 } 140 vm.tree.push(ungrouped); 141 142 };//End for hubber init 143 144 //menu navigation 145 $scope.menuchange = function (i) { 146 switch (i) { 147 case 0: 148 $scope.permissionview = false; 149 $scope.resaddview = false; 150 break; 151 case 1: 152 $scope.permissionview = true; 153 $scope.resaddview = false; 154 break; 155 case 2: 156 $scope.permissionview = false; 157 $scope.resaddview = true; 158 break; 159 } 160 } 161 162 //Seeks for children, used recursively for building the treeview 163 $scope.seekChildren = function (current) { 164 current.calendar = []; 165 current.children = []; 166 current.todelete = []; 167 current.changes = false; 168 current.collapsed = true; 169 for (var t = 0; t < vm.temptree.length;) { 170 if (current.Id == vm.temptree[t].ParentResourceId) { 171 current.children.push(vm.temptree.splice(t, 1)[0]); 172 } 173 else { 174 t++; 175 } 176 } 177 var childc = current.children.length;//Remembers count of children received from temp tree; 178 for (var t = 0; t < vm.data.length;) { 179 if (current.Id == vm.data[t].ParentResourceId) { 180 if (vm.data[t].IsDisposable !== undefined) 181 vm.clients.push(vm.data[t]); 182 else 183 vm.groups.push(vm.data[t]); 184 current.children.push(vm.data.splice(t, 1)[0]); 185 } 186 else { 187 t++; 188 } 189 } 190 for (var t = childc; t < current.children.length; t++) { 191 current.children[t] = $scope.seekChildren(current.children[t]); 192 } 193 return current; 194 } 195 196 //Change to another resource 101 197 $scope.$watch("treeview.currentNode", function (newValue, oldValue) { 102 198 $scope.currentcal = []; … … 105 201 $scope.selectedEventId = -1; 106 202 203 //Check if resource already has downtime data loaded 107 204 if ($scope.treeview.currentNode != null && $scope.treeview.currentNode.Id != undefined) { 108 205 if ($scope.treeview.currentNode.calendar.length === 0) { 206 //Reach out to server to receive resource data 109 207 hubber.server.requestPermissions(vm.treeview.currentNode.Id); 110 208 hubber.server.requestDownTime(vm.treeview.currentNode.Id); … … 114 212 $timeout(function () { 115 213 refreshPermissions(); 116 214 //set previously loaded data 117 215 $scope.currentcal = $scope.treeview.currentNode.calendar; 118 216 }, 0); … … 124 222 }); 125 223 } 224 225 //Resets the add resources menu 126 226 $scope.refreshAdds = function() { 127 227 for (var i = 0; i < $scope.clients.length; i++) { … … 133 233 } 134 234 } 235 236 //Resets the permissions menu 135 237 function refreshPermissions() { 136 238 for (var i = 0; i < $scope.permUsers.length; i++){ … … 149 251 } 150 252 } 253 254 //Add resource group show by clearing the tree 151 255 $scope.clearTreeSelect = function () { 152 256 if (vm.treeview.currentNode != undefined) { … … 156 260 } 157 261 } 158 $scope.buildTree = function () { 159 vm.tree = []; 160 vm.temptree = []; 161 vm.top = false; 162 var ungrouped = { 163 children: [], 164 Name: 'Ungrouped' 165 } 166 for (; vm.data.length > 0;) { 167 168 if (vm.data[0].ParentResourceId == null && vm.data[0].IsDisposable !== undefined) { 169 var curr = $scope.seekChildren(vm.data.splice(0, 1)[0]); 170 vm.clients.push(curr); 171 ungrouped.children.push(curr); 172 } 173 else if (vm.data[0].ParentResourceId == null) { 174 var curr = $scope.seekChildren(vm.data.splice(0, 1)[0]); 175 vm.groups.push(curr); 176 vm.tree.push(curr); 177 } 178 else { 179 var curr = $scope.seekChildren(vm.data.splice(0, 1)[0]); 180 if (curr.IsDisposable !== undefined) 181 vm.clients.push(curr); 182 else 183 vm.groups.push(curr); 184 vm.temptree.push(curr); 185 } 186 } 187 vm.tree.push(ungrouped); 188 189 }; 190 191 $scope.seekChildren = function (current) { 192 current.calendar = []; 193 current.children = []; 194 current.todelete = []; 195 current.changes = false; 196 current.collapsed = true; 197 for (var t = 0; t < vm.temptree.length;) { 198 if (current.Id == vm.temptree[t].ParentResourceId) { 199 current.children.push(vm.temptree.splice(t, 1)[0]); 200 } 201 else { 202 t++; 203 } 204 } 205 var childc = current.children.length;//Remembers count of children received from temp tree; 206 for (var t = 0; t < vm.data.length;) { 207 if (current.Id == vm.data[t].ParentResourceId) { 208 if (vm.data[t].IsDisposable !== undefined) 209 vm.clients.push(vm.data[t]); 210 else 211 vm.groups.push(vm.data[t]); 212 current.children.push(vm.data.splice(t, 1)[0]); 213 } 214 else { 215 t++; 216 } 217 } 218 for (var t = childc; t < current.children.length; t++) { 219 current.children[t] = $scope.seekChildren(current.children[t]); 220 } 221 return current; 222 } 262 263 //Reach out to server to toggle disposable for current calendar 223 264 $scope.toggleDisposable = function () { 224 265 $scope.calendarDispose = true; 225 266 hubber.server.toggleDisposable(vm.treeview.currentNode.Id); 226 267 } 268 269 //Pushes permissions to server 227 270 $scope.pushPermissions = function () { 228 271 var perms = []; … … 239 282 hubber.server.changePermissions(perms, node.Id); 240 283 } 284 285 //Collects all data from a single resource to save to the server 241 286 function collectInfoToSave(node, refresh, last) { 242 287 var arr = node.calendar.down[0]; … … 246 291 for (var i = 0; i < arr.length; i++) { 247 292 if (arr[i].id === '00000000-0000-0000-0000-000000000000') { 293 //NEW DOWNTIME 248 294 var t = arr[i].allDay.toString(); 249 295 toadd.push([ … … 263 309 } 264 310 else if (arr[i].changed === true) { 311 //EDIT EXISTING DOWNTIME 265 312 var t = arr[i].allDay.toString(); 266 313 toupd.push([ … … 282 329 hubber.server.saveCalendar(node.Id, todel, toadd, toupd, refresh, last); 283 330 } 331 332 //Save current calendar 284 333 $scope.saveCurrentCalendar = function () { 285 334 vm.calendarSaver = true; 286 collectInfoToSave(vm.treeview.currentNode, true, false); 335 collectInfoToSave(vm.treeview.currentNode, true, false);//true for refresh, false for save all 287 336 //true for refresh, false for showing it's only one calendar saved. 288 337 } 338 339 //Save all changed calendars 289 340 $scope.saveAllCalendars = function () { 290 341 … … 302 353 }).then(function (success) { 303 354 vm.calendarSaver = true; 355 304 356 for (var i = 0; i < $scope.allSave.length; i++) { 305 357 if (i >= $scope.allSave.length - 1) … … 312 364 313 365 } 366 367 //Checks treeview for edits and builds new array containing these (recurse for children) 314 368 function createSaveRequests(node) { 315 369 if (node.changes === true) … … 319 373 } 320 374 } 375 376 //Clears and refreshes calendar for current resource (delete current changes) 321 377 $scope.clearCurrentCalendar = function () { 322 378 … … 332 388 333 389 } 390 391 //Clears all calendars and refreshes current (Deletes all changes) 334 392 $scope.clearAllCalendars = function () { 335 393 ngDialog.openConfirm({ … … 346 404 347 405 } 406 407 //Function that clears all calendar (separate so dialog is not called when saveAll is finished) 348 408 function clearAllCalendarsFunc() { 349 409 $(".ng-binding.changed").removeClass('changed'); … … 360 420 $(".selected.ng-scope").addClass('loaded'); 361 421 } 422 423 //Recurse trough tree view 362 424 function clearCalendarsRecurse(node) { 363 425 … … 369 431 } 370 432 } 433 434 //Delete all downtimes from current resource 371 435 $scope.deleteAllEvents = function () { 372 436 vm.calendarDeleter = true; … … 386 450 }); 387 451 } 452 453 //Delete all past events 388 454 $scope.deleteAllPreviousEvents = function () { 389 455 vm.calendarDeleter = true; … … 408 474 } 409 475 410 476 //Sets the status of a downtime AND the current resource to changed 411 477 $scope.setChanged = function (id) { 412 478 if (id != -1) { … … 421 487 $(".selected").addClass('changed'); 422 488 } 423 //*Add event by click 489 490 //Adds event by click on empty space 424 491 $scope.calendarClick = function (date, jsEvent, view) { 425 492 … … 431 498 end.setHours(dat.getHours() + 2); 432 499 vm.treeview.currentNode.calendar.down[0].push({ 433 id: '00000000-0000-0000-0000-000000000000', 500 id: '00000000-0000-0000-0000-000000000000',//Makes it recognizable as new for the server 434 501 title: 'Unavailable', 435 502 start: dat, … … 453 520 454 521 } 522 523 //Finds array index for specific _id 455 524 function checkId(id) { 456 525 for (var i = 0; i < vm.treeview.currentNode.calendar.down[0].length ; i++) { … … 460 529 return -1; 461 530 } 462 / * alert on eventClick */531 //Set selected downtime 463 532 $scope.eventClick = function (date, jsEvent, view) { 464 533 vm.selectedEventId = checkId(date._id); 465 534 }; 535 //Sets selected downtime by clicking on the button at bottom on the page, moves to date 466 536 $scope.eventClickBtn = function (id) { 467 537 vm.selectedEventId = checkId(id); 468 538 vm.goToDate(); 469 539 }; 470 /* alert on Drop */ 540 541 //Drag and drop downtime 471 542 $scope.dragandDrop = function (event, delta, revertFunc, jsEvent, ui, view) { 472 543 vm.selectedEventId = checkId(event._id); … … 487 558 vm.treeview.currentNode.calendar.down[0][vm.selectedEventId].end = new Date(event.end); 488 559 }; 489 / * alert on Resize */560 //Resize downtime 490 561 $scope.resizeEvent = function (event, delta, revertFunc, jsEvent, ui, view) { 491 562 vm.selectedEventId = checkId(event._id); … … 495 566 }; 496 567 497 / * remove event */568 //Removes a downtime from client (existing downtime gets referenced in todelete 498 569 $scope.remove = function (index) { 499 570 vm.selectedEventId = -1; … … 506 577 507 578 }; 579 //Remove trough list view at bottom 508 580 $scope.removeList = function (id) { 509 581 var index = checkId(id); … … 517 589 518 590 }; 519 591 //Check if start is before end AND start is after now (recursion) 520 592 $scope.checkDateStartEnd = function () { 521 593 if ($scope.currentcal.down[0][vm.selectedEventId].rec.start > $scope.currentcal.down[0][vm.selectedEventId].rec.end || … … 528 600 $scope.currentcal.down[0][vm.selectedEventId].rec.start = new Date(); 529 601 } 530 //pushes all changes to other recurs602 //pushes all changes to other existing recurs and creates new downtimes where needed 531 603 $scope.pushRecurChanges = function (recid) { 532 604 ngDialog.openConfirm({ … … 539 611 plain: true 540 612 }).then(function (success) { 613 541 614 var arr = vm.treeview.currentNode.calendar.down[0]; 615 //Deep copy of downtime for referencing 542 616 var ob = $.extend(true, {}, arr[vm.selectedEventId]); 543 for (var i = 0; i < arr.length;) { 617 618 for (var i = 0; i < arr.length;) {//Go trough downtimes and find all recurrences 544 619 if (arr[i].rec.recid === recid) { 545 620 if (new Date(arr[i].start) < new Date(ob.rec.start) || 546 621 new Date(arr[i].end) > new Date(ob.rec.end) || 547 622 !ob.rec.days[new Date(arr[i].start).getDay()]) { 548 vm.remove(i); 623 //Downtime is out of recurrence boundaries 624 //Before start date OR After end date OR Not on right day of the week 625 vm.remove(i);//NO I++ -> REMOVE SPLICES ARRAY 549 626 vm.selectedEventId = -1; 550 627 551 628 } 552 629 else { 553 630 //Edit downtime when it is within the bounds 554 631 arr[i].start.setHours(ob.start.getHours(), ob.start.getMinutes()); 555 632 arr[i].end.setHours(ob.end.getHours(), ob.end.getMinutes()); … … 564 641 i++; 565 642 } 643 //init for new downtimes. 566 644 var start = new Date(ob.rec.start); 567 start.setHours(2, 0, 0, 0); 645 start.setHours(2, 0, 0, 0);//Beginning of the day + time conversion +02 568 646 var end = new Date(ob.rec.end); 569 end = new Date(end.setHours(24, 0, 0, 0) + 1000 * 3600 * 2); 570 571 loop1: 647 end = new Date(end.setHours(24, 0, 0, 0) + 1000 * 3600 * 2);//End of the day + time conversion +02 648 649 loop1: //Loop start to end with single day increment 572 650 for (var d = (start.getTime()) ; d < (end.getTime()) ;) { 573 651 var tog = ob.rec.days[new Date(d).getDay()]; 652 //Check if day of the week is included in recursion 574 653 if (tog) { 575 loop2: 654 loop2://Loop checking existing downtime array to see if day is already filled or not 576 655 for (var i = 0; i < arr.length; i++) { 577 656 … … 580 659 if (arr[i].start.getTime() >= d && 581 660 arr[i].end.getTime() <= dend) { 582 d += (1000 * 3600 * 24); 583 continue loop1; 661 d += (1000 * 3600 * 24);//add day to loop 1 662 continue loop1;//breaks out of loop2 and skips to next day 584 663 } 585 664 } 586 665 } 587 666 //Made it here = new event needed: init 588 667 var ts = new Date(d); 589 668 ts.setHours(new Date(ob.start).getHours(), new Date(ob.start).getMinutes()); … … 602 681 } 603 682 604 d += (1000 * 3600 * 24);// 1 day 605 606 } 607 }); 608 } 683 d += (1000 * 3600 * 24);// adds one day 684 685 } 686 }); 687 } 688 689 //Delete all bound recurrences 609 690 $scope.deleteAllRecurrences = function (recid) { 610 691 ngDialog.openConfirm({ … … 627 708 } 628 709 710 //Moves calendar to selected date 629 711 $scope.goToDate = function () { 630 712 $("#resourcecalendar").fullCalendar('gotoDate', vm.currentcal.down[0][vm.selectedEventId].start); 631 713 } 632 /* Render Tooltip */714 /* Renders Tooltip */ 633 715 $scope.eventRender = function (event, element, view) { 634 716 element.attr({ … … 638 720 //$compile(element)($scope); 639 721 }; 640 / * config object */722 //Calendar configuration 641 723 $scope.uiConfig = { 642 724 calendar: { … … 663 745 }; 664 746 665 $scope.menuchange = function (i) { 666 switch(i) { 667 case 0: 668 $scope.permissionview = false; 669 $scope.resaddview = false; 670 break; 671 case 1: 672 $scope.permissionview = true; 673 $scope.resaddview = false; 674 break; 675 case 2: 676 $scope.permissionview = false; 677 $scope.resaddview = true; 678 break; 679 } 680 } 747 681 748 682 749 683 750 684 751 }).filter('disp', function () { 685 return function (input) { 752 return function (input) {//Filter boolean to string 686 753 return input ? 'Disposable' : 'Not disposable'; 687 754 } 688 755 }).directive('animateOnChange', function ($timeout) { 689 return function (scope, element, attr) { 756 return function (scope, element, attr) {//Animation on downtime info to show change 690 757 scope.$watch(attr.animateOnChange, function (nv, ov) { 691 758 … … 695 762 $timeout(function () { 696 763 element.removeClass('changed'); 697 }, 250); // Could be enhanced to take duration as a parameter764 }, 250); 698 765 } 699 766 else { … … 701 768 $timeout(function () { 702 769 element.removeClass('changedshut'); 703 }, 250); // Could be enhanced to take duration as a parameter770 }, 250); 704 771 } 705 772 } -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/js/hubs/progresshubber.js ¶
r13754 r13827 1 function addtoHive(){var a=document.getElementById("jname").value,b=document.getElementById("jresource").value;a&&""!=a&&null!=a?(hubber.server.changeNameResource(a,b),document.getElementById("fakehiveadd").style.display="none",document.getElementById("progdiv").style.display="",document.getElementById("result").style.display="",document.getElementById("realhiveadd").click()):alert("Job name not set!")}function toggleChild(a,b){console.log(a+" toggled"),hubber.server.toggleChild(a),"none"==$("#childs"+b).css("display")?$("#childs"+b).css("display",""):$("#childs"+b).css("display","none"),$("body").click()}function changePriority(a,b,c){switch(console.log(a+" to priority "+b),hubber.server.changePriority(a,b),resetPrior(c),b){case 0:document.getElementById("prior"+c).className+="btn-default",document.getElementById("prior"+c).innerHTML="Low";break;case 1:document.getElementById("prior"+c).className+="btn-info",document.getElementById("prior"+c).innerHTML="Normal";break;case 2:document.getElementById("prior"+c).className+="btn-warning",document.getElementById("prior"+c).innerHTML="Urgent";break;case 3:document.getElementById("prior"+c).className+="btn-danger",document.getElementById("prior"+c).innerHTML="Critical"}document.getElementById("prior"+c).innerHTML+="<span class='caret'></span>"}function resetPrior(a){document.getElementById("prior"+a).className="btn dropdown-toggle "} var hubber=$.connection.progressHub;$(function(){var a=document.getElementById("userId").innerHTML;console.log(a),$.connection.hub.qs={userid:a},$.connection.hub.start().done(function(){$("#progress").css("width","0%"),$("#progress").attr("aria-valuenow",0),hubber.server.handleMessage("Looking for connection...")}),hubber.client.processMessage=function(a,b){b>$("#progress").attr("aria-valuenow")&&($("#progress").css("width",b+"%"),$("#progress").attr("aria-valuenow",b),$("#progress").html(b+"%"),$("#result").html(a))}});1 function addtoHive(){var a=document.getElementById("jname").value,b=document.getElementById("jresource").value;a&&""!=a&&null!=a?(hubber.server.changeNameResource(a,b),document.getElementById("fakehiveadd").style.display="none",document.getElementById("progdiv").style.display="",document.getElementById("result").style.display="",document.getElementById("realhiveadd").click()):alert("Job name not set!")}function toggleChild(a,b){console.log(a+" toggled"),hubber.server.toggleChild(a),"none"==$("#childs"+b).css("display")?$("#childs"+b).css("display",""):$("#childs"+b).css("display","none"),$("body").click()}function changePriority(a,b,c){switch(console.log(a+" to priority "+b),hubber.server.changePriority(a,b),resetPrior(c),b){case 0:document.getElementById("prior"+c).className+="btn-default",document.getElementById("prior"+c).innerHTML="Low";break;case 1:document.getElementById("prior"+c).className+="btn-info",document.getElementById("prior"+c).innerHTML="Normal";break;case 2:document.getElementById("prior"+c).className+="btn-warning",document.getElementById("prior"+c).innerHTML="Urgent";break;case 3:document.getElementById("prior"+c).className+="btn-danger",document.getElementById("prior"+c).innerHTML="Critical"}document.getElementById("prior"+c).innerHTML+="<span class='caret'></span>"}function resetPrior(a){document.getElementById("prior"+a).className="btn dropdown-toggle "}function paraEdit(a,b,c,d,e){hubber.server.paraEdit(a,b,c,d,e)}var hubber=$.connection.progressHub;$(function(){var a=document.getElementById("userId").innerHTML;console.log(a),$.connection.hub.qs={userid:a},$.connection.hub.start().done(function(){$("#progress").css("width","0%"),$("#progress").attr("aria-valuenow",0),hubber.server.handleMessage("Looking for connection...")}),hubber.client.processMessage=function(a,b){b>$("#progress").attr("aria-valuenow")&&($("#progress").css("width",b+"%"),$("#progress").attr("aria-valuenow",b),$("#progress").html(b+"%"),$("#result").html(a))}}); -
TabularUnified branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/js/hubs/userinfohubber.js ¶
r13805 r13827 1 function resetPass(a){hubber.server.resetPassword(a)}var hubber=$.connection.userInfoHub;$(function(){var a=document.getElementById("userId").innerHTML;console.log(a),$.connection.hub.qs={userid:a},$.connection.hub.start(),hubber.client.showNewPass=function(a){$("#inppassreset").html("<label class=' control-label' style='text-align:left'> An email has been sent to the user containing the new password</label>")}});1 function resetPass(a){hubber.server.resetPassword(a)}var hubber=$.connection.userInfoHub;$(function(){var a=document.getElementById("userId").innerHTML;console.log(a),$.connection.hub.qs={userid:a},$.connection.hub.start(),hubber.client.showNewPass=function(a){$("#inppassreset").html("<label class=' control-label' style='text-align:left'>New pass: "+a+". An email has been sent to the user containing the new password</label>")}}); -
TabularUnified branches/WebJobManager/HeuristicLab.Data/3.3/BoolValue.cs ¶
r13656 r13827 48 48 } 49 49 50 public override IDeepCloneable Clone(Cloner cloner) { 50 public static BoolValue Parse(string val) 51 { 52 if (val == "true" || val == "on") 53 return new BoolValue(true); 54 else 55 return new BoolValue(false); 56 } 57 58 public override IDeepCloneable Clone(Cloner cloner) { 51 59 return new BoolValue(this, cloner); 52 60 } -
TabularUnified branches/WebJobManager/HeuristicLab.Data/3.3/DoubleValue.cs ¶
r13656 r13827 44 44 public DoubleValue(double value) : base(value) { } 45 45 46 public override IDeepCloneable Clone(Cloner cloner) { 46 public static DoubleValue Parse(string val) 47 { 48 return new DoubleValue(Double.Parse(val)); 49 } 50 51 public override IDeepCloneable Clone(Cloner cloner) { 47 52 return new DoubleValue(this, cloner); 48 53 } -
TabularUnified branches/WebJobManager/HeuristicLab.Data/3.3/IntValue.cs ¶
r13656 r13827 55 55 return Value.CompareTo(obj); 56 56 } 57 public static IntValue Parse(string val) 58 { 59 return new IntValue(int.Parse(val)); 60 } 57 61 58 62 protected virtual bool Validate(string value, out string errorMessage) { -
TabularUnified branches/WebJobManager/HeuristicLab.Data/3.3/PercentValue.cs ¶
r12012 r13827 53 53 public PercentValue(double value) : base(value) { } 54 54 55 public PercentValue(double value, bool restrictToUnitInterval) 55 public static PercentValue Parse(string val) 56 { 57 return new PercentValue((Double.Parse(val) / 100)); 58 } 59 60 public PercentValue(double value, bool restrictToUnitInterval) 56 61 : base() { 57 62 this.restrictToUnitInterval = restrictToUnitInterval;
Note: See TracChangeset
for help on using the changeset viewer.